![]() |
VR-Forces 4.10 Class Documentation
|
Lights Table class, handles loading the light type table default files and keeping track of all the custom light point types that are added when an osgSim light point is replaced with a DtLightPoint. More...
Public Member Functions | |
| DtLightPointTable () | |
| CTOR. More... | |
| virtual | ~DtLightPointTable () |
| Destructor h. More... | |
| virtual bool | addLight (DtLightPointType *lightPointType, const std::string &codeStr) |
| add a light type to the table returns true if the light was added or false if it was not added because it is a duplicate if it is a duplicate the hierarchy is added to the hierarchy to type map More... | |
| virtual DtLightPointType * | getLight (unsigned int code) |
| return a pointer to the light associated to the light code (could be null) More... | |
| virtual DtLightPointType * | getLight (const std::string &type) |
| return a pointer to the light associated to the light type (could be null) More... | |
| virtual void | loadLightTableFromXML (const std::string &fileName) |
| Load the Light.xml file This file follows the CDB standard for defining the hierarchy of light point types. More... | |
| virtual void | saveDefaultLightValuesToCSV (const std::string &filename) |
| Save the current light type values to a CSV file. More... | |
| virtual void | loadDefaultLightValuesFromCSV (const std::string &filename) |
| Load light type values from a CSV file loads a CSV file which contains the same parameters defined in the Default Values xml file. More... | |
| virtual void | loadDefaultLightValuesFromXML (const std::string &fileName) |
| Load default values for light type from the Light_DefaultValuesXX.xml follows the CDB standard for the light point values file. More... | |
| virtual void | loadTunningLightValuesFromXML (const std::string &fileName) |
| Load tunning values for light type from the Lights_xxx.xml follows the CDB standard for tunning light point tables. More... | |
| virtual bool | isDirty () |
| dirty flag to know if the table has changed since the last time clean has been called More... | |
| virtual void | clean () |
| reset the dirty flag More... | |
| virtual int | maxCode () |
| get the highest light type value More... | |
| virtual void | updateLightPointTypeMap () |
| Create entries in the light point type map for all the light point types that have been added. More... | |
| virtual int | getOrCreateLightTypeCode (const DtLightPointType &lp) |
| See if there is a type code for this light point type and assign it one if there is not one yet. More... | |
Protected Types | |
| typedef std::map < DtLightPointType, unsigned int > | LightPointTypeIntMap |
| typedef std::pair < DtLightPointType, unsigned int > | LightPointTypeIntPair |
| typedef std::map< unsigned int, DtLightPointType * > | IntLightPointTypeMap |
| typedef std::pair< unsigned int, DtLightPointType * > | IntLightPointTypePair |
| typedef std::map< const std::string, unsigned int > | StringIntMap |
| typedef std::pair< const std::string, unsigned int > | StringIntPair |
Protected Member Functions | |
| virtual void | loadLightTypeFromXML (xmlNodePtr lightTypeNode, const std::string *parentType) |
| Load one types of light from the Light.xml (recursive) More... | |
| virtual bool | compareXmlString (const xmlChar *xmlStr, const char *compareStr) |
| utility function for comparing an xmlStr to a char array. More... | |
Protected Attributes | |
| IntLightPointTypeMap | myLightsTable |
| Table of CDB Lights loaded from Light.xml (and complete by either the Light_xxx.xml Tunning file or Light_DefaultValues.xml) More... | |
| LightPointTypeIntMap | myLightPointTypes |
| used when creating additional custom types that are not in the tables that are saved on disk More... | |
| boost::atomic< bool > | myDirtyFlag |
| int | myMaxCode |
| StringIntMap | myHierarchyToCodeTable |
Lights Table class, handles loading the light type table default files and keeping track of all the custom light point types that are added when an osgSim light point is replaced with a DtLightPoint.
It can load both xml and csv files for the main light point type table.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| makVrv::DtLightPointTable::DtLightPointTable | ( | ) |
CTOR.
|
virtual |
Destructor h.
|
virtual |
add a light type to the table returns true if the light was added or false if it was not added because it is a duplicate if it is a duplicate the hierarchy is added to the hierarchy to type map
|
virtual |
return a pointer to the light associated to the light code (could be null)
|
virtual |
return a pointer to the light associated to the light type (could be null)
|
virtual |
Load the Light.xml file This file follows the CDB standard for defining the hierarchy of light point types.
Light point type must be defined in this file in order for it to be used in the other files. Also this function should be called before any other load functions.
|
virtual |
Save the current light type values to a CSV file.
saves a CSV file which contains the same parameters defined in the Default Values xml file. Format is: Code, Intensity, Red, Green, Blue, Directionality, Horizontal Lobe, Vertical Lobe, Residual Intensity, Frequency, Duty Cycle, Min Pixel Size, Max Pixel Size, Max Visible Distance one light point type per line and all values are separated by commas.
|
virtual |
Load light type values from a CSV file loads a CSV file which contains the same parameters defined in the Default Values xml file.
Format is: Code, Intensity, Red, Green, Blue, Directionality, Horizontal Lobe, Vertical Lobe, Residual Intensity, Frequency, Duty Cycle, Min Pixel Size, Max Pixel Size, Max Visible Distance one light point type per line and all values are separated by commas.
|
virtual |
Load default values for light type from the Light_DefaultValuesXX.xml follows the CDB standard for the light point values file.
|
virtual |
Load tunning values for light type from the Lights_xxx.xml follows the CDB standard for tunning light point tables.
optional file which overrides the light point type values found in the default light values file. Should be called after the default light values file has been loaded.
|
virtual |
dirty flag to know if the table has changed since the last time clean has been called
|
virtual |
reset the dirty flag
|
virtual |
get the highest light type value
|
virtual |
Create entries in the light point type map for all the light point types that have been added.
|
virtual |
See if there is a type code for this light point type and assign it one if there is not one yet.
|
protectedvirtual |
Load one types of light from the Light.xml (recursive)
|
protectedvirtual |
utility function for comparing an xmlStr to a char array.
|
protected |
Table of CDB Lights loaded from Light.xml (and complete by either the Light_xxx.xml Tunning file or Light_DefaultValues.xml)
|
protected |
used when creating additional custom types that are not in the tables that are saved on disk
|
protected |
|
protected |
|
protected |