2022-01-28 07:02:15 +08:00
|
|
|
#pragma once
|
2022-06-01 13:49:36 +08:00
|
|
|
|
2022-08-26 04:06:34 +08:00
|
|
|
#include "../rage/vector.hpp"
|
2022-11-07 05:38:41 +08:00
|
|
|
#include "phArchetype.hpp"
|
2022-01-28 07:02:15 +08:00
|
|
|
|
2022-10-30 21:32:30 +08:00
|
|
|
#pragma pack(push, 1)
|
2022-01-28 07:02:15 +08:00
|
|
|
class CNavigation
|
|
|
|
{
|
|
|
|
public:
|
2022-11-09 05:11:50 +08:00
|
|
|
char pad_0000[16]; //0x0000
|
|
|
|
class rage::phArchetypeDamp* m_damp; //0x0010
|
|
|
|
char pad_0018[8]; //0x0018
|
|
|
|
rage::fmatrix44 m_transformation_matrix;
|
2022-11-09 05:02:11 +08:00
|
|
|
|
2022-11-09 05:11:50 +08:00
|
|
|
rage::fvector3* get_position()
|
|
|
|
{
|
|
|
|
return reinterpret_cast<rage::fvector3*>(&m_transformation_matrix.rows[3]);
|
|
|
|
}
|
2022-11-29 05:14:26 +08:00
|
|
|
|
|
|
|
void model_to_world(const rage::fvector3& model_coords, rage::fvector3& world_coords)
|
|
|
|
{
|
|
|
|
world_coords.x = model_coords.x * m_transformation_matrix.data[0][0] + model_coords.y * m_transformation_matrix.data[1][0] + model_coords.z * m_transformation_matrix.data[2][0] + m_transformation_matrix.data[3][0];
|
|
|
|
world_coords.y = model_coords.x * m_transformation_matrix.data[0][1] + model_coords.y * m_transformation_matrix.data[1][1] + model_coords.z * m_transformation_matrix.data[2][1] + m_transformation_matrix.data[3][1];
|
|
|
|
world_coords.z = model_coords.x * m_transformation_matrix.data[0][2] + model_coords.y * m_transformation_matrix.data[1][2] + model_coords.z * m_transformation_matrix.data[2][2] + m_transformation_matrix.data[3][2];
|
|
|
|
}
|
2022-01-28 07:02:15 +08:00
|
|
|
}; //Size: 0x0060
|
2022-11-07 05:38:41 +08:00
|
|
|
static_assert(sizeof(CNavigation) == 0x60);
|
2022-10-30 21:32:30 +08:00
|
|
|
#pragma pack(pop)
|