27 static const char* GetStaticType() {
return "FROM_MIRRORED_OBJ"; }
28 virtual const char* GetType()
const {
return GetStaticType(); }
30 MirroredObjSectorUserData() {}
31 MirroredObjSectorUserData(
KyInt32 x,
KyInt32 y) : m_sectorPosInGrid(x, y) {}
47 Config() : m_desiredWorldSizeInMeters(0.0f), m_useMultipleSector(
false) {}
50 Kaim::String m_objFileName;
54 bool m_useMultipleSector;
60 KyResult Initialize(
const Config& config);
61 void SetDefaultNavTag(
const Kaim::DynamicNavTag& defaultNavTag) {
m_defaultNavTag = defaultNavTag; }
65 KyUInt32 GetNbSectorAlongX() {
return (m_useMultipleSector ? m_nbInstanceAlongX : 1); }
66 KyUInt32 GetNbSectorAlongY() {
return (m_useMultipleSector ? m_nbInstanceAlongY : 1); }
67 KyUInt32 GetSectorCount() {
return (m_useMultipleSector ? m_nbInstanceAlongX * m_nbInstanceAlongY : 1); }
70 void AddSeedPoint(
const Kaim::Vec3f& seedpoint) { m_seedPoints.PushBack(seedpoint); }
81 void MirrorPosX(
Kaim::Vec3f& pos) { pos.x = 2.0f * m_mirrorAxisX - pos.x; }
82 void MirrorPosY(
Kaim::Vec3f& pos) { pos.y = 2.0f * m_mirrorAxisY - pos.y; }
89 Kaim::String m_objFileName;
99 bool m_useMultipleSector;
2d axis aligned box of 32bits integers. Very Important: CountX() returns m_max.x - m_min...
Definition: box2i.h:17
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
This class maintains the mapping between the system of coordinate axes used by the client game engine...
Definition: coordsystem.h:119
The MirroredOBJProducer class is a concrete implementation of GeneratorInputProducer that can read th...
Definition: mirroredobjproducer.h:41
virtual KyResult Produce(const Kaim::GeneratorSector §or, Kaim::ClientInputConsumer &inputConsumer)
Called by the NavData generation system to retrieve the geometry associated to the sector...
Definition: mirroredobjproducer.cpp:86
3d axis aligned box of 32bits floating points
Definition: box3f.h:16
A basic parser of .obj files in text format able to read triangles.
Definition: objfiletrianglesoup.h:22
Navigation return code class.
Definition: types.h:108
The GeneratorSector class provides a definition for a single sector to be treated by the Generator...
Definition: generatorsector.h:39
2d vector using KyInt32
Definition: vec2i.h:18
Base class for the optional m_refCountedUserData that allows to refCount your user data...
Definition: generatorsector.h:25
The GeneratorParameters class contains configuration parameters that control the characteristics of t...
Definition: generatorparameters.h:67
std::int32_t KyInt32
int32_t
Definition: types.h:24
Kaim::DynamicNavTag m_defaultNavTag
The default NavTag that will be applied to all triangles.
Definition: mirroredobjproducer.h:86
void ClientToNavigation_Pos(const Vec3f &clientPos, Vec3f &navigationPos) const
Convert positions or any other vectors which length have to be scaled when converted.
Definition: coordsystem.inl:78
float KyFloat32
float
Definition: types.h:32
3d vector using 32bits floating points.
Definition: vec3f.h:16
Definition: mirroredobjproducer.cpp:12
Kaim::CoordSystem m_objCoordSystem
defines the CoordSystem of the obj files
Definition: mirroredobjproducer.h:87