8 #ifndef GwNavGen_GeneratorSector_H
9 #define GwNavGen_GeneratorSector_H
23 class GeneratorSectorBlob;
24 class GeneratorFileSystem;
25 class BlobFieldsMapping;
32 virtual const char* GetType()
const = 0;
34 bool Isa(
const char* type)
const {
return SFstrcmp(GetType(), type) == 0; }
43 class GeneratorSector :
public RefCountBaseNTS<GeneratorSector, MemStat_NavDataGen>
54 GeneratorSector(const
KyGuid& sectorGuid, const
char* sectorName);
60 enum
ClearPointedDataMode { CLEAR_NONE = 0, CLEAR_NAVDATA = 1, CLEAR_USERDATA = 2, CLEAR_ALL_POINTED_DATA = 3 };
76 void AddInputFileName(
const char* inputFileName) {
m_inputFileNames.PushBack(String(inputFileName)); }
79 void AddInputSeedPointInClientCoordinates(
const Vec3f& client_position,
const CoordSystem& coordSystem) { AddInputSeedPoint(coordSystem.ClientToNavigation_Pos(client_position)); }
81 void AddInputTagVolume(
const ClientInputTagVolume& clientInputTagVolume) {
m_inputTagVolumes.PushBack(clientInputTagVolume); }
85 String GetAbsoluteOutputFileName(
const GeneratorFileSystem& fileSystem,
const String& extension)
const;
86 String GetRelativeOutputFileName(
const GeneratorFileSystem& fileSystem,
const String& extension)
const;
107 void InitBlobFieldsMapping(BlobFieldsMapping& mapping);
154 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:142
Ptr< NavData > m_navDataPatch
Generated NavData. Relevant when m_isPatch=true and m_patchOperation!=PATCH_NO_CHANGE.
Definition: generatorsector.h:169
Ptr< CollisionData > m_colData
Will be accessible when generation is done through GetColData(). KY_NULL until then.
Definition: generatorsector.h:170
Ptr< CollisionData > GetColData()
Retrieve a pointer to the ColData that was generated for this sector, or KY_NULL if the ColData is no...
Definition: generatorsector.h:108
const char * GetName() const
Retrieves the name set for this sector as char*.
Definition: generatorsector.h:69
Base interface for a class that opens a file on disk.
Definition: fileopener.h:35
KyGuid m_sectorGuid
The sector GUID.
Definition: generatorsector.h:125
KyArray< ClientInputTagVolume > m_inputTagVolumes
Optional facility. Will be fed automatically to the Sector. Sometimes easier than producing TagVolume...
Definition: generatorsector.h:140
Ptr< NavData > GetNavData()
Retrieve a pointer to the NavData that was generated for this sector, or KY_NULL if the navdata is no...
Definition: generatorsector.h:98
String m_clientInputAbsoluteFileName
Indicates Set by the Generator when the ClientInput is saved.
Definition: generatorsector.h:164
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
bool m_isClientInputSaveEnabled
Indicates whether to save ClientInput file.
Definition: generatorsector.h:156
Maintains generation data for each sector.
Definition: generatorsectorbuilder.h:41
bool IsNavDataCellBoxSet() const
Determines whether or not a cellBox was set for this sector.
Definition: generatorsector.h:192
SectorColDataBuildMode
Describes whether or not CollisionData should be saved on a per-sector basis.
Definition: genflags.h:54
Ptr< NavData > m_navData
Generated NavData. Relevant when m_isPatch=false and m_buildMode=SECTOR_CHANGE.
Definition: generatorsector.h:168
Used to serialize GeneratorInputOutput.
Definition: generatorsectorconfigblob.h:61
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:177
The Generator is the principal class in the NavData generation system.
Definition: generator.h:61
#define KY_NULL
Null value.
Definition: types.h:247
Used to serialize GeneratorInputOutput. Corresponds to GeneratorSector.
Definition: generatorsectorconfigblob.h:29
void SetSectorChange(GenFlags::SectorChange sectorChange)
Write accessor for m_sectorChange.
Definition: generatorsector.h:190
GenFlags::SectorChange GetSectorChange() const
Read accessor for m_sectorChange.
Definition: generatorsector.h:191
bool m_isPatch
Indicates if the Sector is a Patch.
Definition: generatorsector.h:128
Big-endian format (used, for example, for PlayStation 3, Xbox 360).
Definition: endianness.h:31
KyArray< String > m_inputFileNames
Optional facility. To be used in GeneratorInputProducer::ProduceSectorInputs().
Definition: generatorsector.h:138
KyUInt32 m_colDataBuildMode
takes values from GenerationFlags::SectorColDataSaveMode
Definition: generatorsector.h:157
String m_sectorName
The sector Name.
Definition: generatorsector.h:126
KyResult SaveNavData(const char *filename, FileOpenerBase *fileOpener=0, Endianness::Type endianness=Endianness::BigEndian)
If NavData was generated, save it to the specified location.
String m_navDataAbsoluteFileName
Set by the Generator when the NavData is saved. Relevant when isPatch is false.
Definition: generatorsector.h:165
KyUInt32 m_inputSource
Indicates whether GeneratorInputProducer::ProduceSectorInputs() is called -or- the sector ClientInput...
Definition: generatorsector.h:137
SectorChange
Describes what the generation does about a sector.
Definition: genflags.h:28
The GeneratorSector class provides a definition for a single sector to be treated by the Generator...
Definition: generatorsector.h:46
Definition: gamekitcrowddispersion.h:20
The KyGuid class represents a globally unique ID.
Definition: kyguid.h:22
Base class for the optional m_refCountedUserData that allows to refCount your user data...
Definition: generatorsector.h:29
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
KyArray< Vec3f > m_previousSeedPoints
From previous generation, the sector SeedPoints.
Definition: generatorsector.h:179
void ToString(char guidString[]) const
Converts this GUID to a string.
Type
Enumerates possible endianness types.
Definition: endianness.h:28
String m_colDataAbsoluteFileName
Set by the Generator when the ColData is saved.
Definition: generatorsector.h:167
CellBox m_navDataCellBox
Optional, limits the NavData generation to this CellBox. Relevant when pipeline uses tiles as sectors...
Definition: generatorsector.h:127
String m_navDataPatchAbsoluteFileName
Set by the Generator when the NavDataPatch is saved.
Definition: generatorsector.h:166
used to serialize GeneratorInputOutput
Definition: generatorsectorlistblob.h:23
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
KyArray< Vec3f > m_inputSeedPoints
Optional facility. Will be fed automatically to the Sector. Sometimes easier than producing seedPoint...
Definition: generatorsector.h:139
bool IsValid() const
Indicates whether or not the extents of the bounding box are valid.
Definition: box2i.h:154
CellBox m_previousInputCellBox
From previous generation, the AABB of CellPos that were impacted by the Sector or Patch Inputs...
Definition: generatorsector.h:178
Ptr< NavData > GetNavDataPatch()
Retrieve a pointer to the NavDataPatch that was generated for this sector, or KY_NULL if the navDataP...
Definition: generatorsector.h:102
ClearPointedDataMode
Reset the GeneratorSector as if is was just default constructed.
Definition: generatorsector.h:64
const String & GetNameString() const
Retrieves the name set for this sector as String.
Definition: generatorsector.h:70
KyUInt32 m_sectorChange
What has changed in the sector since previous generation.
Definition: generatorsector.h:149
void * m_userData
Allows to point to your own sector data. Typically to be used in GeneratorInputProducer::ProduceSecto...
Definition: generatorsector.h:141
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
String GetGuidString() const
Retrieves the GUID set for this sector.
Definition: generatorsector.h:183