![]() |
VR-Forces 4.3.1 Class Documentation
|
DtBuoyBeaconFeatureBuilder implements a DtStreamedFeatureCreator for buoys. More...
Classes | |
| struct | SeasonalBuoyRecord |
Public Member Functions | |
| DtBuoyBeaconFeatureBuilder (const DtBuoyBeaconFeatureBuilder &rhs) | |
| Copy CTOR. | |
| DtBuoyBeaconFeatureBuilder & | operator= (const DtBuoyBeaconFeatureBuilder &orig) |
| Assignment Operator. | |
| virtual | ~DtBuoyBeaconFeatureBuilder () |
| virtual DTOR | |
| DtUniqueID | create (DtDe &de, const std::string ®istrantName, 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) | |
| DtStreamedFeatureCreator & | operator= (const DtStreamedFeatureCreator &rhs) |
| Assignment operator. | |
| virtual | ~DtStreamedFeatureCreator () |
Protected Types | |
| typedef boost::unordered_map < DtUniqueID, SeasonalBuoyRecord > | SeasonalBuoyMap |
Protected Member Functions | |
| DtBuoyBeaconFeatureBuilder (DtDe &de, const std::string ®istrantName, DtBuoyBeaconModelStringParser &parser, DtTextureAtlasIndexParser &atlasParser, 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. | |
| void | build2DModelDefinitions (const std::string &markerName, std::string &modelDef2dUnlighted, std::string &modelDef2dLighted) |
| std::string | parseAndBuild (const std::string &markerStr) |
| parseAndBuild() uses the DtBuoyBeaconModelStringParser to break a marker name string into its component pieces; pattern and attribute/value pairs. | |
| virtual void | createAndAddBuoy (DtUniqueID elementId, const std::string &modelDefName, const std::string &modelDef2dUnlighted, std::string &modelDef2dLighted, const std::string &buoyName, const DtVector &vPosition, const std::string &designator) |
| int | s57SeasonDateToDayInYear (const std::string &seasonDate) |
| Convert an s57 seasonal date string (form is –MMDD or –MM) to a day of the year, from 0 (Jan 1) to 364 (or 365 on a leap year). | |
| int | calcCurrentDayOfTheYear () |
| Returns the day of the year for whatever date our calendar is currently set for, from 0 (Jan 1) to 364 (or 365 on a leap year). | |
| virtual void | setBuoyTextureOffset (DtArticulatedModelAgent *model, const std::string &atlasFileName, const std::string &key) |
| Use the parsed buoy data with the buoy texture atlas to set the buoy color (ex. | |
| virtual void | setBuoyDesignator (DtArticulatedModelAgent *model, const std::string &atlasFileName, const std::string &designator) |
| Set the designator for the buoy, 3 character max (ex. | |
| void | slot_featureToBeDeleted (const std::string &resgistrant, DtUniqueID featureId) |
| Callback for signal from the streamed feature manager that a buoy has paged out. | |
| void | slot_dateChanged () |
| Callback for signal from shared state signaler that the date has changed. | |
Utility methods for reading model definition parameters into a variable | |
| void | readModelDefParam (DtModelDefinition &modelDef, const std::string ¶mName, bool &resultOut) |
| void | readModelDefParam (DtModelDefinition &modelDef, const std::string ¶mName, float &resultOut) |
| void | readModelDefParam (DtModelDefinition &modelDef, const std::string ¶mName, std::string &resultOut) |
Static Protected Member Functions | |
| static bool | checkSeasonalState (int seasonStart, int seasonEnd, int currentDay) |
| Check to see if the current date is within the season seasonStart / seasonEnd. | |
Protected Attributes | |
| DtDe & | myDe |
| DtBuoyBeaconModelStringParser & | myBuoyMarkerStringParser |
| DtTextureAtlasIndexParser & | myBuoyTextureAtlasIndexParser |
| std::string | myBuoyName |
| std::string myAtlasTextureName; | |
| std::string | myFeatureClass |
| std::string | myRegistrantName |
| int | myCurrentDayOfTheYear |
| SeasonalBuoyMap | mySeasonalBuoyMap |
| DtSignalConnectionManager | myConnections |
Protected Attributes inherited from makVrv::DtStreamedFeatureCreator | |
| DtAgentManagerInterface * | mySceneInterface |
Friends | |
| class | DtBuoyBeaconFeatureBuilderCreator |
DtBuoyBeaconFeatureBuilder implements a DtStreamedFeatureCreator for buoys.
It reads configuration files found in appData/importConfig that it uses to build a model definition based on a pattern, attribute values, and the configuration data read. It then creates a DtBuoyOrBeaconFacade using the model definition that it generates
|
protected |
| makVrv::DtBuoyBeaconFeatureBuilder::DtBuoyBeaconFeatureBuilder | ( | const DtBuoyBeaconFeatureBuilder & | rhs | ) |
Copy CTOR.
|
virtual |
virtual DTOR
|
protected |
CTOR.
| sceneInterface | needs to be provided to the constructor of the DtBuoyOrBeaconFacade that may be created |
| parser | is used to parse an encode marker name string and generate a model definition based on its contents |
| DtBuoyBeaconFeatureBuilder& makVrv::DtBuoyBeaconFeatureBuilder::operator= | ( | const DtBuoyBeaconFeatureBuilder & | orig | ) |
Assignment Operator.
|
virtual |
Create a feature (a DtBuoyOrBeaconFacade for now)
| registrantName | is the name that was provided to the DtStreamedFeatureManager when the DtStreamedFeatureCreator was registered |
| styleName | is the name provided in the .osgEarth style block specified for this feature. |
| strFeatureName | is the markerName returned by osgEarth for the feature from a marker: specification |
| vPosition | is the position of the feature |
| scale | is any scale factor provided from an osgEarth marker-scale: specification |
| minBound | is the min x,y,z of the feature bound |
| maxBound | is the max x,y,z of the feature bound |
Implements makVrv::DtStreamedFeatureCreator.
|
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().
|
protected |
|
protected |
parseAndBuild() uses the DtBuoyBeaconModelStringParser 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
|
protectedvirtual |
|
protected |
Convert an s57 seasonal date string (form is –MMDD or –MM) to a day of the year, from 0 (Jan 1) to 364 (or 365 on a leap year).
Returns -1 if string is not valid
|
protected |
Returns the day of the year for whatever date our calendar is currently set for, from 0 (Jan 1) to 364 (or 365 on a leap year).
|
staticprotected |
Check to see if the current date is within the season seasonStart / seasonEnd.
|
protectedvirtual |
Use the parsed buoy data with the buoy texture atlas to set the buoy color (ex.
Red, Green, etc.)
|
protectedvirtual |
Set the designator for the buoy, 3 character max (ex.
'CF','123','A')
|
protected |
Callback for signal from the streamed feature manager that a buoy has paged out.
|
protected |
Callback for signal from shared state signaler that the date has changed.
Look through the list of seasonal buoys to see if any need to be created or destroyed
|
protected |
|
protected |
|
protected |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
std::string myAtlasTextureName;
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |