Kaim::GeneratorInputProducer Class Reference

#include <generatorinputproducer.h>

Class Description

The GeneratorInputProducer is an abstract base class for an object invoked by the NavData generation system to retrieve the geometry for which it should generate NavData.

This class cannot be used as-is; you must create your own class that derives from GeneratorInputProducer, and implement the Produce() method.

You pass an instance of this class to the Generator for each sector or multi-sector that you want to create. Therefore, each object that derives from this class is typically responsible for handling a single sector chunk of the geometry in your terrain.

+ Examples:

Inherits Kaim::RefCountBaseNTS< C, Stat >.

Inherited by Kaim::OBJProducer, and LabEngine::MirroredOBJProducer.

Public Member Functions

 GeneratorInputProducer ()
 
KyResult ProduceSectorInputs (const GeneratorSector &sector, ClientInputConsumer &sectorInputConsumer)
 

Private Member Functions

virtual KyResult Produce (const GeneratorSector &sector, ClientInputConsumer &sectorInputConsumer)=0
 

Constructor & Destructor Documentation

Kaim::GeneratorInputProducer::GeneratorInputProducer ( )
inline

Constructor for objects of this class.

It should not be necessary to use this constructor directly in your own code. However, if you write a class that derives directly from this class, you may need to call this constructor from within the constructor of your derived class.

Member Function Documentation

virtual KyResult Kaim::GeneratorInputProducer::Produce ( const GeneratorSector sector,
ClientInputConsumer sectorInputConsumer 
)
privatepure virtual

Called by the NavData generation system to retrieve the geometry associated to the sector.

Your implementation of this method must push the triangles and NavTags contained in your geometry to the inputConsumer using the methods provided by the ClientInputConsumer class. Typically, this means iterating through the triangles in the geometry managed by this object, and making a call to one of the Consume... methods of the ClientInputConsumer for each triangle.

You can also add TagVolumes by calling ClientInputConsumer::ConsumeTagVolume, which automatically tags all triangles in the specified volume with a specified NavTag.

You can also add SeedPoints by calling ClientInputConsumer::ConsumeSeedPoint, which automatically tags all triangles in the specified volume with a specified NavTag.

Implemented in LabEngine::MirroredOBJProducer, and Kaim::OBJProducer.

+ Examples:
KyResult Kaim::GeneratorInputProducer::ProduceSectorInputs ( const GeneratorSector sector,
ClientInputConsumer sectorInputConsumer 
)
inline

Called by the NavData generation system to retrieve the geometry all the input associated with this sector.

Consume sector.m_inputTagVolumes and sector.m_inputSeedPoints before calling Produce().


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