#include <generatorsector.h>
The GeneratorSector class provides a definition for a single sector to be treated by the Generator.
It contains the sector configuration and the generated NavData. Typically a GeneratorSector can be obtained from a GeneratorInputOutput instance using AddSector() or one of the GetSector() method.
Inherits Kaim::RefCountBaseNTS< C, Stat >.
Public Types | |
enum | ClearPointedDataMode |
Reset the GeneratorSector as if is was just default constructed. More... | |
Public Member Functions | |
const char * | GetName () const |
Retrieves the name set for this sector as char*. More... | |
const String & | GetNameString () const |
Retrieves the name set for this sector as String. More... | |
String | GetGuidString () const |
Retrieves the GUID set for this sector. More... | |
Ptr< NavData > | GetNavData () |
Retrieve a pointer to the NavData that was generated for this sector, or nullptr if the navdata is not available or has not been generated yet. More... | |
Ptr< NavData > | GetNavDataPatch () |
Retrieve a pointer to the NavDataPatch that was generated for this sector, or nullptr if the navDataPath is not available or has not been generated yet. More... | |
Ptr< CollisionData > | GetColData () |
Retrieve a pointer to the ColData that was generated for this sector, or nullptr if the ColData is not available or has not been generated yet. More... | |
KyResult | SaveNavData (const char *filename, FileOpenerBase *fileOpener=nullptr, Endianness::Type endianness=Endianness::LittleEndian) |
If NavData was generated, save it to the specified location. More... | |
High level description of the sector, once these parameters has been set, they must not change. | |
KyGuid | m_sectorGuid |
The sector GUID. More... | |
String | m_sectorName |
The sector Name. More... | |
CellBox | m_navDataCellBox |
Optional, limits the NavData generation to this CellBox. Relevant when pipeline uses tiles as sectors. More... | |
bool | m_isPatch |
Indicates if the Sector is a Patch. More... | |
How to produce the sector generation inputs. These parameters are mostly used in your implementation of GeneratorInputProducer::ProduceSectorInputs() | |
KyUInt32 | m_inputSource |
GenFlags::SectorInputSource. Indicates whether GeneratorInputProducer::ProduceSectorInputs() is called -or- the sector ClientInput file is loaded. More... | |
KyUInt32 | m_produceInputMask |
GenFlags::ProduceInputMask. Read when producing input from ClientInput. default = GenFlags::ProduceInputMask_All. More... | |
KyUInt32 | m_sectorChange |
What has changed in the sector since previous generation. More... | |
bool | m_isClientInputSaveEnabled |
Indicates whether to save ClientInput file. More... | |
KyUInt32 | m_colDataBuildMode |
GenFlags::SectorColDataBuildMode. More... | |
KyArray< String > | m_inputFileNames |
Optional. To be used in GeneratorInputProducer::ProduceSectorInputs(). More... | |
KyArray< Vec3f > | m_additionalSeedPoints |
Optional. Will be fed automatically to the Sector. Sometimes easier than producing seedPoints in GeneratorInputProducer::ProduceSectorInputs(). More... | |
KyArray< ClientInputTagVolume > | m_additionalTagVolumes |
Optional. Will be fed automatically to the Sector. Sometimes easier than producing TagVolumes in GeneratorInputProducer::ProduceSectorInputs(). More... | |
void * | m_userData |
Allows to point to your own sector data. Typically to be used in GeneratorInputProducer::ProduceSectorInputs(). More... | |
Ptr< GeneratorSectorRefCountedUserData > | m_refCountedUserData |
Allows to point to your own sector data. Typically to be used in GeneratorInputProducer::ProduceSectorInputs(). More... | |
Generation Outputs | |
String | m_clientInputAbsoluteFileName |
Indicates Set by the Generator when the ClientInput is saved. More... | |
String | m_navDataAbsoluteFileName |
Set by the Generator when the NavData is saved. Relevant when isPatch is false. More... | |
String | m_navDataPatchAbsoluteFileName |
Set by the Generator when the NavDataPatch is saved. More... | |
String | m_colDataAbsoluteFileName |
Set by the Generator when the ColData is saved. More... | |
Ptr< NavData > | m_navData |
Generated NavData. Relevant when m_isPatch=false and m_buildMode=SECTOR_CHANGE. More... | |
Ptr< NavData > | m_navDataPatch |
Generated NavData. Relevant when m_isPatch=true and m_patchOperation!=PATCH_NO_CHANGE. More... | |
Ptr< CollisionData > | m_colData |
Will be accessible when generation is done through GetColData(). nullptr until then. More... | |
Previous generation outputs, which are useful for iterative generations | |
KyArray< CellPos > | m_previousPatchCellPosList |
From previous generation, the list of CellPos that were impacted by the Patch inputs. Empty if m_isPatch is false or if the Patch is new. More... | |
CellBox | m_previousInputCellBox |
From previous generation, the AABB of CellPos that were impacted by the Sector or Patch Inputs. More... | |
KyArray< Vec3f > | m_previousSeedPoints |
From previous generation, the sector SeedPoints. Currently not used except to maintain Blob compatibility. More... | |
Reset the GeneratorSector as if is was just default constructed.
NOTE: Copy Constructor and Copy Assignment Operator are those generated automatically. They perform SHALLOW Copy. original and copy will point to the same instances of: void* m_userData; Ptr<> m_refCountedUserData; Ptr<> m_navData; Ptr<> m_navDataPatch; To make sure those members are NULL, call ClearPointedData() after Copy Constructor or Copy Assignment Operator
|
inline |
Retrieve a pointer to the ColData that was generated for this sector, or nullptr if the ColData is not available or has not been generated yet.
The ColData provided is not bound to any Kaim::World and needs to be added manually in order to use it.
|
inline |
Retrieves the GUID set for this sector.
Retrieves a string representing the GUID set for this sector.
|
inline |
Retrieves the name set for this sector as char*.
|
inline |
Retrieves the name set for this sector as String.
|
inline |
Retrieve a pointer to the NavData that was generated for this sector, or nullptr if the navdata is not available or has not been generated yet.
The NavData provided is not bound to any Kaim::Database or Kaim::World and needs to be added manually in order to have access to the stitched runtime data.
|
inline |
Retrieve a pointer to the NavDataPatch that was generated for this sector, or nullptr if the navDataPath is not available or has not been generated yet.
KyResult Kaim::GeneratorSector::SaveNavData | ( | const char * | filename, |
FileOpenerBase * | fileOpener = nullptr , |
||
Endianness::Type | endianness = Endianness::LittleEndian |
||
) |
If NavData was generated, save it to the specified location.
Optional. Will be fed automatically to the Sector. Sometimes easier than producing seedPoints in GeneratorInputProducer::ProduceSectorInputs().
KyArray<ClientInputTagVolume> Kaim::GeneratorSector::m_additionalTagVolumes |
Optional. Will be fed automatically to the Sector. Sometimes easier than producing TagVolumes in GeneratorInputProducer::ProduceSectorInputs().
String Kaim::GeneratorSector::m_clientInputAbsoluteFileName |
Indicates Set by the Generator when the ClientInput is saved.
Ptr<CollisionData> Kaim::GeneratorSector::m_colData |
Will be accessible when generation is done through GetColData(). nullptr until then.
String Kaim::GeneratorSector::m_colDataAbsoluteFileName |
Set by the Generator when the ColData is saved.
KyUInt32 Kaim::GeneratorSector::m_colDataBuildMode |
KyArray<String> Kaim::GeneratorSector::m_inputFileNames |
Optional. To be used in GeneratorInputProducer::ProduceSectorInputs().
KyUInt32 Kaim::GeneratorSector::m_inputSource |
GenFlags::SectorInputSource. Indicates whether GeneratorInputProducer::ProduceSectorInputs() is called -or- the sector ClientInput file is loaded.
bool Kaim::GeneratorSector::m_isClientInputSaveEnabled |
Indicates whether to save ClientInput file.
bool Kaim::GeneratorSector::m_isPatch |
Indicates if the Sector is a Patch.
Ptr<NavData> Kaim::GeneratorSector::m_navData |
Generated NavData. Relevant when m_isPatch=false and m_buildMode=SECTOR_CHANGE.
String Kaim::GeneratorSector::m_navDataAbsoluteFileName |
CellBox Kaim::GeneratorSector::m_navDataCellBox |
Optional, limits the NavData generation to this CellBox. Relevant when pipeline uses tiles as sectors.
Ptr<NavData> Kaim::GeneratorSector::m_navDataPatch |
Generated NavData. Relevant when m_isPatch=true and m_patchOperation!=PATCH_NO_CHANGE.
String Kaim::GeneratorSector::m_navDataPatchAbsoluteFileName |
Set by the Generator when the NavDataPatch is saved.
CellBox Kaim::GeneratorSector::m_previousInputCellBox |
From previous generation, the AABB of CellPos that were impacted by the Sector or Patch Inputs.
From previous generation, the list of CellPos that were impacted by the Patch inputs. Empty if m_isPatch is false or if the Patch is new.
From previous generation, the sector SeedPoints. Currently not used except to maintain Blob compatibility.
KyUInt32 Kaim::GeneratorSector::m_produceInputMask |
GenFlags::ProduceInputMask. Read when producing input from ClientInput. default = GenFlags::ProduceInputMask_All.
Ptr<GeneratorSectorRefCountedUserData> Kaim::GeneratorSector::m_refCountedUserData |
Allows to point to your own sector data. Typically to be used in GeneratorInputProducer::ProduceSectorInputs().
KyUInt32 Kaim::GeneratorSector::m_sectorChange |
What has changed in the sector since previous generation.
KyGuid Kaim::GeneratorSector::m_sectorGuid |
The sector GUID.
String Kaim::GeneratorSector::m_sectorName |
The sector Name.
void* Kaim::GeneratorSector::m_userData |
Allows to point to your own sector data. Typically to be used in GeneratorInputProducer::ProduceSectorInputs().