8 #ifndef LabEngine_ProceduralGeometryClonerProducer_H
9 #define LabEngine_ProceduralGeometryClonerProducer_H
30 static const char* GetStaticType() {
return "FROM_MIRRORED_OBJ"; }
31 virtual const char* GetType()
const {
return GetStaticType(); }
33 MirroredObjSectorUserData() {}
34 MirroredObjSectorUserData(
KyInt32 x,
KyInt32 y) : m_sectorPosInGrid(x, y) {}
50 Config() : m_desiredWorldSizeInMeters(0.0f), m_useMultipleSector(
false) {}
53 Kaim::String m_objFileName;
57 bool m_useMultipleSector;
63 KyResult Initialize(
const Config& config);
64 void SetDefaultNavTag(
const Kaim::DynamicNavTag& defaultNavTag) {
m_defaultNavTag = defaultNavTag; }
68 KyUInt32 GetNbSectorAlongX() {
return (m_useMultipleSector ? m_nbInstanceAlongX : 1); }
69 KyUInt32 GetNbSectorAlongY() {
return (m_useMultipleSector ? m_nbInstanceAlongY : 1); }
70 KyUInt32 GetSectorCount() {
return (m_useMultipleSector ? m_nbInstanceAlongX * m_nbInstanceAlongY : 1); }
73 void AddSeedPoint(
const Kaim::Vec3f& seedpoint) { m_seedPoints.PushBack(seedpoint); }
84 void MirrorPosX(
Kaim::Vec3f& pos) { pos.
x = 2.0f * m_mirrorAxisX - pos.
x; }
85 void MirrorPosY(
Kaim::Vec3f& pos) { pos.
y = 2.0f * m_mirrorAxisY - pos.
y; }
92 Kaim::String m_objFileName;
102 bool m_useMultipleSector;
This class represents a two-dimensional axis-aligned bounding box whose dimensions are stored using 3...
Definition: box2i.h:119
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
This class maintains the mapping between the system of coordinate axes used internally within the gam...
Definition: coordsystem.h:144
The MirroredOBJProducer class is a concrete implementation of GeneratorInputProducer that can read th...
Definition: mirroredobjproducer.h:48
int KyInt32
Type used internally to represent a 32-bit integer.
Definition: types.h:35
A basic parser of .obj files in text format able to read triangles.
Definition: objfilereader.h:25
KyFloat32 y
The size of the vector along the Y axis.
Definition: vec3f.h:228
This class represents a three-dimensional axis-aligned bounding box whose dimensions are stored using...
Definition: box3f.h:25
KyFloat32 x
The size of the vector along the X axis.
Definition: vec3f.h:227
The GeneratorSector class provides a definition for a single sector to be treated by the Generator...
Definition: generatorsector.h:46
This class defines a two-dimensional vector whose coordinates are stored using 32-bit integers...
Definition: vec2i.h:26
Base class for the optional m_refCountedUserData that allows to refCount your user data...
Definition: generatorsector.h:29
The GeneratorParameters class contains configuration parameters that control the characteristics of t...
Definition: generatorparameters.h:75
Kaim::DynamicNavTag m_defaultNavTag
The default NavTag that will be applied to all triangles.
Definition: mirroredobjproducer.h:109
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
void ClientToNavigation_Pos(const Vec3f &clientPos, Vec3f &navigationPos) const
Converts a position from the game engine coordinate system to the Gameware Navigation coordinate syst...
Definition: coordsystem.inl:82
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
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.h:24
Kaim::CoordSystem m_objCoordSystem
defines the CoordSystem of the obj files
Definition: mirroredobjproducer.h:110