VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
makVrv::DtInstancedFeatureBuilder Class Reference

DtInstancedFeatureBuilder implements a DtStreamedFeatureCreator for static instanceable models. More...

Inheritance diagram for makVrv::DtInstancedFeatureBuilder:
Inheritance graph
[legend]

Classes

struct  FeatureRecord

Public Member Functions

 DtInstancedFeatureBuilder (const DtInstancedFeatureBuilder &rhs)
 Copy CTOR.
DtInstancedFeatureBuilderoperator= (const DtInstancedFeatureBuilder &orig)
 Assignment Operator.
virtual ~DtInstancedFeatureBuilder ()
 virtual DTOR
DtUniqueID create (DtDe &de, const std::string &registrantName, const std::string &featureStyleName, const std::string &strFeatureName, DtVector vPosition, double scale, DtVector minBound, DtVector maxBound)
 Create a feature (a DtBuoyOrBeaconFacade for now)
- Public Member Functions inherited from makVrv::DtStreamedFeatureCreator
 DtStreamedFeatureCreator (DtAgentManagerInterface &sceneInterface)
 CTOR.
 DtStreamedFeatureCreator (const DtStreamedFeatureCreator &orig)
DtStreamedFeatureCreatoroperator= (const DtStreamedFeatureCreator &rhs)
 Assignment operator.
virtual ~DtStreamedFeatureCreator ()

Protected Types

typedef boost::unordered_map
< DtUniqueID, FeatureRecord
FeatureMap

Protected Member Functions

 DtInstancedFeatureBuilder (DtDe &de, const std::string &registrantName, const std::string &featureClass)
 CTOR.
std::string buildModelDefinition (const std::string &markerName)
 buildModelDefinition is the entry point for turning a string found as a marker name in a CustomFeatureNode feature request into a model definition.
std::string parseAndBuild (const std::string &markerStr)
 parseAndBuild() uses the DtInstancedModelStringParser to break a marker name string into its component pieces; pattern and attribute/value pairs.
virtual void createAndAddFeature (DtUniqueID elementId, const std::string &modelDefName, const std::string &featureName, const DtVector &vPosition)
void slot_featureToBeDeleted (const std::string &resgistrant, DtUniqueID featureId)
 Callback for signal from the streamed feature manager that a buoy has paged out.
Utility methods for reading model definition parameters into a variable
void readModelDefParam (DtModelDefinition &modelDef, const std::string &paramName, bool &resultOut)
void readModelDefParam (DtModelDefinition &modelDef, const std::string &paramName, float &resultOut)
void readModelDefParam (DtModelDefinition &modelDef, const std::string &paramName, std::string &resultOut)

Protected Attributes

DtDemyDe
std::string myFeatureName
std::string myFeatureClass
std::string myRegistrantName
int myCurrentDayOfTheYear
FeatureMap myFeatureMap
DtSignalConnectionManager myConnections
- Protected Attributes inherited from makVrv::DtStreamedFeatureCreator
DtAgentManagerInterfacemySceneInterface

Friends

class DtInstancedFeatureBuilderCreator

Detailed Description

DtInstancedFeatureBuilder implements a DtStreamedFeatureCreator for static instanceable models.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtInstancedFeatureBuilder::DtInstancedFeatureBuilder ( const DtInstancedFeatureBuilder rhs)

Copy CTOR.

virtual makVrv::DtInstancedFeatureBuilder::~DtInstancedFeatureBuilder ( )
virtual

virtual DTOR

makVrv::DtInstancedFeatureBuilder::DtInstancedFeatureBuilder ( DtDe de,
const std::string &  registrantName,
const std::string &  featureClass 
)
protected

CTOR.

Parameters
sceneInterfaceneeds to be provided to the constructor of the DtBuoyOrBeaconFacade that may be created
parseris used to parse an encode marker name string and generate a model definition based on its contents

Member Function Documentation

DtInstancedFeatureBuilder& makVrv::DtInstancedFeatureBuilder::operator= ( const DtInstancedFeatureBuilder orig)

Assignment Operator.

DtUniqueID makVrv::DtInstancedFeatureBuilder::create ( DtDe de,
const std::string &  registrantName,
const std::string &  featureStyleName,
const std::string &  strFeatureName,
DtVector  vPosition,
double  scale,
DtVector  minBound,
DtVector  maxBound 
)
virtual

Create a feature (a DtBuoyOrBeaconFacade for now)

Parameters
registrantNameis the name that was provided to the DtStreamedFeatureManager when the DtStreamedFeatureCreator was registered
styleNameis the name provided in the .osgEarth style block specified for this feature.
strFeatureNameis the markerName returned by osgEarth for the feature from a marker: specification
vPositionis the position of the feature
scaleis any scale factor provided from an osgEarth marker-scale: specification
minBoundis the min x,y,z of the feature bound
maxBoundis the max x,y,z of the feature bound
Returns
A uniqueId that will be used to identify the feature created when it comes time to delete it. returns 0 if no feature is created.

Implements makVrv::DtStreamedFeatureCreator.

std::string makVrv::DtInstancedFeatureBuilder::buildModelDefinition ( const std::string &  markerName)
protected

buildModelDefinition is the entry point for turning a string found as a marker name in a CustomFeatureNode feature request into a model definition.

It first checks to see if there are any special characters in the string that would indicate that it needs to be parsed. If not, it just returns the string (minus the path that is usually included as part of a marker name). If parsing is required, it calls parseAndBuild().

std::string makVrv::DtInstancedFeatureBuilder::parseAndBuild ( const std::string &  markerStr)
protected

parseAndBuild() uses the DtInstancedModelStringParser to break a marker name string into its component pieces; pattern and attribute/value pairs.

Once it has the attribute value pairs decoded, it checks for an object name (OBJNAM) parameter value. If it exists, it checks the object name will be looked up in he parser's name to model definition map. If any entry is found, that model definition will be used. Otherwise substitution is performed on the pattern based on the attribute values found and the generated model definition is returned

virtual void makVrv::DtInstancedFeatureBuilder::createAndAddFeature ( DtUniqueID  elementId,
const std::string &  modelDefName,
const std::string &  featureName,
const DtVector vPosition 
)
protectedvirtual
void makVrv::DtInstancedFeatureBuilder::slot_featureToBeDeleted ( const std::string &  resgistrant,
DtUniqueID  featureId 
)
protected

Callback for signal from the streamed feature manager that a buoy has paged out.

void makVrv::DtInstancedFeatureBuilder::readModelDefParam ( DtModelDefinition modelDef,
const std::string &  paramName,
bool resultOut 
)
protected
void makVrv::DtInstancedFeatureBuilder::readModelDefParam ( DtModelDefinition modelDef,
const std::string &  paramName,
float &  resultOut 
)
protected
void makVrv::DtInstancedFeatureBuilder::readModelDefParam ( DtModelDefinition modelDef,
const std::string &  paramName,
std::string &  resultOut 
)
protected

Friends And Related Function Documentation

friend class DtInstancedFeatureBuilderCreator
friend

Member Data Documentation

DtDe& makVrv::DtInstancedFeatureBuilder::myDe
protected
std::string makVrv::DtInstancedFeatureBuilder::myFeatureName
protected
std::string makVrv::DtInstancedFeatureBuilder::myFeatureClass
protected
std::string makVrv::DtInstancedFeatureBuilder::myRegistrantName
protected
int makVrv::DtInstancedFeatureBuilder::myCurrentDayOfTheYear
protected
FeatureMap makVrv::DtInstancedFeatureBuilder::myFeatureMap
protected
DtSignalConnectionManager makVrv::DtInstancedFeatureBuilder::myConnections
protected

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)