Protected Member Functions |
| | DtBuoyBeaconFeatureBuilder (DtDe &de, const std::string ®istrantName, DtBuoyBeaconModelStringParser &parser, DtTextureAtlasIndexParser &atlasParser, const std::string &featureClass) |
| | CTOR.
|
| virtual void | determineStationaryHeight (DtVector &buoyOrBeaconPos, double modelHeightAboveOrigin) |
| | This method is used to determine the height (z value, or altitude for geocentric) at which the model origin is placed for non-buoyant navigation features.
|
| 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.
|
|
| 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) |
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
| virtual void makVrv::DtBuoyBeaconFeatureBuilder::determineStationaryHeight |
( |
DtVector & |
buoyOrBeaconPos, |
|
|
double |
modelHeightAboveOrigin |
|
) |
| |
|
protectedvirtual |
This method is used to determine the height (z value, or altitude for geocentric) at which the model origin is placed for non-buoyant navigation features.
IF the model definition provides a non-zero modelHeightAboveOrigin and IF their is a non-zero height attribute for the feature, then these will be used to determine an origin that will place the feature with the top of the model at the correct height. If these are not provided, an intersector going from 50km up to 50km down is used to find a point on the terrain to place the origin of the object. If the intersector does not return a result, then the altitude of the original position provided to this method is used (the osgEarth-provided altitude for the feature); but osgEarth altitude clamping won't take ocean into consideration, in which case, this location could be below sea level. So finally, if the intersector altitude or osgEarth altiude IS below sea level, then sea level is used instead. Note that if a light is later attached to the object and it has a height attribute (and the model definition provides a modelHeightAboveOrigin) this height will be overridden by that action.
| std::string makVrv::DtBuoyBeaconFeatureBuilder::parseAndBuild |
( |
const std::string & |
markerStr | ) |
|
|
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