Kaim::OBJProducer Class Reference

Kaim::OBJProducer Class Reference

#include <objproducer.h>

Class Description

The OBJProducer class is a concrete implementation of GeneratorInputProducer that can read the triangles contained in a .obj file, and pass it to the ClientInputConsumer.

This class is used internally by the standalone NavData generation tools supplied with Gameware Navigation. If you save your terrain geometry in .obj files, you can use this class yourself to create NavData from the triangles in your files.

+ Examples:

Inherits Kaim::GeneratorInputProducer.

Public Member Functions

virtual KyResult Produce (const GeneratorSector &sector, ClientInputConsumer &inputConsumer)
 
KyResult ProduceSectorInputs (const GeneratorSector &sector, ClientInputConsumer &sectorInputConsumer)
 

Public Attributes

CoordSystem m_objCoordSystem
 

Member Function Documentation

virtual KyResult Kaim::OBJProducer::Produce ( const GeneratorSector sector,
ClientInputConsumer sectorInputConsumer 
)
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.

Implements Kaim::GeneratorInputProducer.

KyResult Kaim::GeneratorInputProducer::ProduceSectorInputs ( const GeneratorSector sector,
ClientInputConsumer sectorInputConsumer 
)
inlineinherited

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().

Member Data Documentation

CoordSystem Kaim::OBJProducer::m_objCoordSystem

defines the CoordSystem of the obj files


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