Kaim::GeneratorSector Class Reference

#include <generatorsector.h>

Class Description

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.

+ Examples:

Inherits Kaim::RefCountBaseNTS< C, Stat >.

Public Types

enum  ClearPointedDataMode
 

Public Member Functions

 GeneratorSector (const KyGuid &sectorGuid, const char *sectorName)
 
Ptr< CollisionDataGetColData ()
 
String GetGuidString () const
 
const char * GetName () const
 
const String & GetNameString () const
 
Ptr< NavDataGetNavData ()
 
Ptr< NavDataGetNavDataPatch ()
 
GenFlags::SectorChange GetSectorChange () const
 
bool IsNavDataCellBoxSet () const
 
KyResult SaveNavData (const char *filename, FileOpenerBase *fileOpener=0, Endianness::Type endianness=Endianness::BigEndian)
 
void SetSectorChange (GenFlags::SectorChange sectorChange)
 

High level description of the sector, once these parameters has been set, they must not change.

KyGuid m_sectorGuid
 
String m_sectorName
 
CellBox m_navDataCellBox
 
bool m_isPatch
 

How to produce the sector generation inputs. These parameters are mostly used in your implementation of GeneratorInputProducer::ProduceSectorInputs()

KyUInt32 m_inputSource
 
KyArray< String > m_inputFileNames
 
KyArray< Vec3fm_inputSeedPoints
 
KyArray< ClientInputTagVolumem_inputTagVolumes
 
void * m_userData
 
Ptr< GeneratorSectorRefCountedUserDatam_refCountedUserData
 

What has changed in the sector since previous generation

KyUInt32 m_sectorChange
 

Debug/Iterative file setup

bool m_isClientInputSaveEnabled
 
KyUInt32 m_colDataBuildMode
 

Generation Outputs

String m_clientInputAbsoluteFileName
 
String m_navDataAbsoluteFileName
 
String m_navDataPatchAbsoluteFileName
 
String m_colDataAbsoluteFileName
 
Ptr< NavDatam_navData
 
Ptr< NavDatam_navDataPatch
 
Ptr< CollisionDatam_colData
 

Previous generation outputs, which are useful for iterative generations

KyArray< CellPosm_previousPatchCellPosList
 
CellBox m_previousInputCellBox
 
KyArray< Vec3fm_previousSeedPoints
 

Member Enumeration Documentation

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

Constructor & Destructor Documentation

Kaim::GeneratorSector::GeneratorSector ( const KyGuid sectorGuid,
const char *  sectorName 
)

constructor

Member Function Documentation

Ptr<CollisionData> Kaim::GeneratorSector::GetColData ( )
inline

Retrieve a pointer to the ColData that was generated for this sector, or KY_NULL 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

String Kaim::GeneratorSector::GetGuidString ( ) const
inline

Retrieves the GUID set for this sector.

Retrieves a string representing the GUID set for this sector.

const char* Kaim::GeneratorSector::GetName ( ) const
inline
const String& Kaim::GeneratorSector::GetNameString ( ) const
inline

Retrieves the name set for this sector as String.

Ptr<NavData> Kaim::GeneratorSector::GetNavData ( )
inline

Retrieve a pointer to the NavData that was generated for this sector, or KY_NULL 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

+ Examples:
Ptr<NavData> Kaim::GeneratorSector::GetNavDataPatch ( )
inline

Retrieve a pointer to the NavDataPatch that was generated for this sector, or KY_NULL if the navDataPath is not available or has not been generated yet.

GenFlags::SectorChange Kaim::GeneratorSector::GetSectorChange ( ) const
inline

Read accessor for m_sectorChange.

bool Kaim::GeneratorSector::IsNavDataCellBoxSet ( ) const
inline

Determines whether or not a cellBox was set for this sector.

KyResult Kaim::GeneratorSector::SaveNavData ( const char *  filename,
FileOpenerBase fileOpener = 0,
Endianness::Type  endianness = Endianness::BigEndian 
)

If NavData was generated, save it to the specified location.

void Kaim::GeneratorSector::SetSectorChange ( GenFlags::SectorChange  sectorChange)
inline

Write accessor for m_sectorChange.

Member Data Documentation

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(). KY_NULL until then.

String Kaim::GeneratorSector::m_colDataAbsoluteFileName

Set by the Generator when the ColData is saved.

KyUInt32 Kaim::GeneratorSector::m_colDataBuildMode

takes values from GenerationFlags::SectorColDataSaveMode

KyArray<String> Kaim::GeneratorSector::m_inputFileNames
KyArray<Vec3f> Kaim::GeneratorSector::m_inputSeedPoints

Optional facility. Will be fed automatically to the Sector. Sometimes easier than producing seedPoints in GeneratorInputProducer::ProduceSectorInputs().

KyUInt32 Kaim::GeneratorSector::m_inputSource

Indicates whether GeneratorInputProducer::ProduceSectorInputs() is called -or- the sector ClientInput file is loaded.

+ Examples:
KyArray<ClientInputTagVolume> Kaim::GeneratorSector::m_inputTagVolumes

Optional facility. Will be fed automatically to the Sector. Sometimes easier than producing TagVolumes in GeneratorInputProducer::ProduceSectorInputs().

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

Set by the Generator when the NavData is saved. Relevant when isPatch is false.

CellBox Kaim::GeneratorSector::m_navDataCellBox

Optional, limits the NavData generation to this CellBox. Relevant when pipeline uses tiles as sectors.

+ Examples:
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.

KyArray<CellPos> Kaim::GeneratorSector::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.

KyArray<Vec3f> Kaim::GeneratorSector::m_previousSeedPoints

From previous generation, the sector SeedPoints.

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.

+ Examples:
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().


The documentation for this class was generated from the following file: