20 class GeneratorSectorBlob;
21 class GeneratorFileSystem;
22 class BlobFieldsMapping;
28 virtual const char* GetType()
const = 0;
30 bool Isa(
const char* type)
const {
return SFstrcmp(GetType(), type) == 0; }
39 class GeneratorSector :
public RefCountBaseNTS<GeneratorSector, MemStat_NavDataGen>
56 enum ClearPointedDataMode { CLEAR_NONE = 0, CLEAR_NAVDATA = 1, CLEAR_USERDATA = 2, CLEAR_ALL_POINTED_DATA = 3 };
69 void SetProduceInputMask(GenFlags::ProduceInputMask produceInputMask) {
m_produceInputMask = produceInputMask; }
70 GenFlags::ProduceInputMask GetProduceInputMask()
const {
return (GenFlags::ProduceInputMask)
m_produceInputMask; }
81 void AddInputFileName(
const char* inputFileName) {
m_inputFileNames.PushBack(String(inputFileName)); }
84 void AddInputSeedPointInClientCoordinates(
const Vec3f& client_position,
const CoordSystem& coordSystem) { AddInputSeedPoint(coordSystem.ClientToNavigation_Pos(client_position)); }
86 void AddInputTagVolume(
const ClientInputTagVolume& clientInputTagVolume) {
m_additionalTagVolumes.PushBack(clientInputTagVolume); }
90 String GetAbsoluteOutputFileName(
const GeneratorFileSystem& fileSystem,
const String& extension)
const;
91 String GetRelativeOutputFileName(
const GeneratorFileSystem& fileSystem,
const String& extension)
const;
108 void InitBlobFieldsMapping(BlobFieldsMapping& mapping);
153 return String(guidChars);
Ptr< GeneratorSectorRefCountedUserData > m_refCountedUserData
Allows to point to your own sector data. Typically to be used in GeneratorInputProducer::ProduceSecto...
Definition: generatorsector.h:131
Ptr< NavData > m_navDataPatch
Generated NavData. Relevant when m_isPatch=true and m_patchOperation!=PATCH_NO_CHANGE.
Definition: generatorsector.h:139
Ptr< CollisionData > m_colData
Will be accessible when generation is done through GetColData(). nullptr until then.
Definition: generatorsector.h:140
Ptr< CollisionData > GetColData()
Retrieve a pointer to the ColData that was generated for this sector, or nullptr if the ColData is no...
Definition: generatorsector.h:102
const char * GetName() const
Retrieves the name set for this sector as char*.
Definition: generatorsector.h:60
Base interface for a class that opens a file on disk.
Definition: fileopener.h:30
KyGuid m_sectorGuid
The sector GUID.
Definition: generatorsector.h:113
Ptr< NavData > GetNavData()
Retrieve a pointer to the NavData that was generated for this sector, or nullptr if the navdata is no...
Definition: generatorsector.h:95
String m_clientInputAbsoluteFileName
Indicates Set by the Generator when the ClientInput is saved.
Definition: generatorsector.h:134
2d axis aligned box of 32bits integers. Very Important: CountX() returns m_max.x - m_min...
Definition: box2i.h:17
bool m_isClientInputSaveEnabled
Indicates whether to save ClientInput file.
Definition: generatorsector.h:124
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
Maintains generation data for each sector.
Definition: generatorsectorbuilder.h:39
SectorColDataBuildMode
Describes whether or not CollisionData should be saved on a per-sector basis.
Definition: genflags.h:41
Ptr< NavData > m_navData
Generated NavData. Relevant when m_isPatch=false and m_buildMode=SECTOR_CHANGE.
Definition: generatorsector.h:138
Used to serialize GeneratorInputOutput.
Definition: generatorsectorconfigblob.h:56
KyArray< ClientInputTagVolume > m_additionalTagVolumes
Optional. Will be fed automatically to the Sector. Sometimes easier than producing TagVolumes in Gene...
Definition: generatorsector.h:129
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.
Definition: generatorsector.h:143
The Generator is the principal class in the NavData generation system.
Definition: generator.h:56
SectorInputSource
Describes where the Generator will get its input for each sector.
Definition: genflags.h:15
Used to serialize GeneratorInputOutput. Corresponds to GeneratorSector.
Definition: generatorsectorconfigblob.h:25
KyArray< Vec3f > m_additionalSeedPoints
Optional. Will be fed automatically to the Sector. Sometimes easier than producing seedPoints in Gene...
Definition: generatorsector.h:128
KyUInt32 m_produceInputMask
GenFlags::ProduceInputMask. Read when producing input from ClientInput. default = GenFlags::ProduceIn...
Definition: generatorsector.h:122
bool m_isPatch
Indicates if the Sector is a Patch.
Definition: generatorsector.h:116
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
KyArray< String > m_inputFileNames
Optional. To be used in GeneratorInputProducer::ProduceSectorInputs().
Definition: generatorsector.h:127
KyUInt32 m_colDataBuildMode
GenFlags::SectorColDataBuildMode.
Definition: generatorsector.h:125
String m_sectorName
The sector Name.
Definition: generatorsector.h:114
Little-endian format (used, for example, for Windows, Linux).
Definition: endianness.h:22
String m_navDataAbsoluteFileName
Set by the Generator when the NavData is saved. Relevant when isPatch is false.
Definition: generatorsector.h:135
KyUInt32 m_inputSource
GenFlags::SectorInputSource. Indicates whether GeneratorInputProducer::ProduceSectorInputs() is calle...
Definition: generatorsector.h:121
Navigation return code class.
Definition: types.h:108
KyResult SaveNavData(const char *filename, FileOpenerBase *fileOpener=nullptr, Endianness::Type endianness=Endianness::LittleEndian)
If NavData was generated, save it to the specified location.
Definition: generatorsector.cpp:111
SectorChange
Describes what the generation does about a sector.
Definition: genflags.h:26
The GeneratorSector class provides a definition for a single sector to be treated by the Generator...
Definition: generatorsector.h:39
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
The KyGuid class represents a globally unique ID.
Definition: kyguid.h:20
Base class for the optional m_refCountedUserData that allows to refCount your user data...
Definition: generatorsector.h:25
KyArray< Vec3f > m_previousSeedPoints
From previous generation, the sector SeedPoints. Currently not used except to maintain Blob compatibi...
Definition: generatorsector.h:145
void ToString(char guidString[]) const
Converts this GUID to a string.
Definition: kyguid.cpp:157
Type
Enumerates possible endianness types.
Definition: endianness.h:20
String m_colDataAbsoluteFileName
Set by the Generator when the ColData is saved.
Definition: generatorsector.h:137
CellBox m_navDataCellBox
Optional, limits the NavData generation to this CellBox. Relevant when pipeline uses tiles as sectors...
Definition: generatorsector.h:115
String m_navDataPatchAbsoluteFileName
Set by the Generator when the NavDataPatch is saved.
Definition: generatorsector.h:136
used to serialize GeneratorInputOutput
Definition: generatorsectorlistblob.h:21
CellBox m_previousInputCellBox
From previous generation, the AABB of CellPos that were impacted by the Sector or Patch Inputs...
Definition: generatorsector.h:144
Ptr< NavData > GetNavDataPatch()
Retrieve a pointer to the NavDataPatch that was generated for this sector, or nullptr if the navDataP...
Definition: generatorsector.h:98
ClearPointedDataMode
Reset the GeneratorSector as if is was just default constructed.
Definition: generatorsector.h:56
const String & GetNameString() const
Retrieves the name set for this sector as String.
Definition: generatorsector.h:61
KyUInt32 m_sectorChange
What has changed in the sector since previous generation.
Definition: generatorsector.h:123
void * m_userData
Allows to point to your own sector data. Typically to be used in GeneratorInputProducer::ProduceSecto...
Definition: generatorsector.h:130
String GetGuidString() const
Retrieves the GUID set for this sector.
Definition: generatorsector.h:149