![]() |
VR-Forces 4.8 Class Documentation
|
The DtLuaFeatureSet class is a wrapper around a DtFeatureSet that will provide feature information for lua scripts. More...

Public Types | |
| typedef std::vector< DtLocation3D > | LocationVector |
| typedef std::map< std::string, std::string > | AttributeMap |
Public Member Functions | |
| DtLuaFeatureSet (DtSimManager *=0, const std::string &type="") | |
| CTOR. More... | |
| DtLuaFeatureSet (const DtLuaFeatureSet &) | |
| DtLuaFeatureSet & | operator= (const DtLuaFeatureSet &) |
| DtLuaFeatureSet | getFeaturesWithinArea (luabind::object const &points, luabind::object const &attributes) |
| Returns a feature set which contains all features within the specified geometry containing the specified attributes. More... | |
| DtLuaFeatureSet | getFeaturesWithinRange (const DtLocation3D &, double range, luabind::object const &attributes) |
| Returns a feature set which contains all features within the specified point and box size containing the specified attributes. More... | |
| DtLuaFeatureSet | filter (const DtLuaFeatureGeometry &geom, luabind::object const &attributes) |
| DtLuaFeatureSet | filterGeometry (const DtLuaFeatureGeometry &geom) |
| DtLuaFeatureSet | filterAttributes (luabind::object const &attributes) |
| virtual void | setSimManager (DtSimManager *simManager) |
| Script API functions above. ////////////////////////////////////! More... | |
| virtual DtString | objectType () const |
| Should return the string name of this object. More... | |
| DtString | serialize () |
| Inherited from DtAsciiSerializable. Returns a string serialized version of this class. More... | |
| bool | deserialize (const DtString &data) |
| Inherited from DtAsciiSerializable. More... | |
Public Member Functions inherited from DtAsciiSerializable | |
| DtAsciiSerializable () | |
| The implementer of this interface should be sure to create a creator function to create an empty object that returns a pointer to this interface. More... | |
| DtAsciiSerializable (const DtAsciiSerializable &orig) | |
| virtual | ~DtAsciiSerializable () |
| virtual std::string | objectTypeC () const |
| Returns a std::string version of the objectType. More... | |
| virtual void | init (void *userData) |
| This function is called right after the object is constructed during the deserialization process, but before deserialize() is called. More... | |
Static Public Member Functions | |
| static DtAsciiSerializable * | creator () |
| Inherited from DtAsciiSerializable. Returns a new object of this type with default values. More... | |
Static Public Member Functions inherited from DtObjectDebugger< DtAsciiSerializable > | |
| static DtObjectCounter::CounterType | ObjectCount () |
| static const DtObjectContainer * | ObjectContainer () |
Static Public Member Functions inherited from DtObjectDebugger< DtLuaFeatureSet > | |
| static DtObjectCounter::CounterType | ObjectCount () |
| static const DtObjectContainer * | ObjectContainer () |
Protected Types | |
| typedef std::vector < MAKVRinTerra::DtFeature::CPtr > | Features |
Protected Member Functions | |
| virtual void | gatherFeatures (const MAKVRinTerra::DtFeature &) |
| Gathers all the found features into a local vector. More... | |
| virtual void | testLoaded () |
| Tests to see if the feature set is loaded. More... | |
| void | update (MAKVRinTerra::DtFeatureGeometry) |
| void | update (const LocationVector &locations) |
| void | update (const AttributeMap &attributes) |
| void | updateRange (const DtLocation3D ¢er, double range) |
| void | updatePoints (luabind::object const &points) |
| void | updateAttributes (luabind::object const &attributes) |
| void | filterFeatures () |
Protected Member Functions inherited from DtObjectDebugger< DtAsciiSerializable > | |
| DtObjectDebugger () | |
| DtObjectDebugger (const DtObjectDebugger &) | |
| ~DtObjectDebugger () | |
Protected Member Functions inherited from DtObjectDebugger< DtLuaFeatureSet > | |
| DtObjectDebugger () | |
| DtObjectDebugger (const DtObjectDebugger &) | |
| ~DtObjectDebugger () | |
Protected Attributes | |
| DtSimManager * | mySimManager |
| std::vector< DtLocation3D > | myLocations |
| Items used to be stored into or restored from saved state. More... | |
| std::map< std::string, std::string > | myAttributes |
| boost::shared_ptr < MAKVRinTerra::DtFeatureSet > | myFeatureSet |
| bool | myProcessed |
| Features | myFeatures |
| std::string | myType |
| boost::optional < MAKVRinTerra::DtQuery > | myQuery |
| boost::optional < MAKVRinTerra::DtFeatureGeometry > | myGeomFilter |
| bool | getIsLoaded () const |
| Return true if the feature set is loaded. More... | |
| int | getFeatureCount () |
| Return the number of features in the set. More... | |
| bool | getIsPointFeature (int) |
| Returns true if the feature at the particular index is a point feature. More... | |
| bool | getIsLinearFeature (int) |
| Returns true if the feature at the particular index is a linear feature. More... | |
| bool | getIsArealFeature (int) |
| Returns true if the feature at the particular index is an areal feature. More... | |
| std::string | getFeatureType (int) |
| Returns a string of the type of feature (point, line, area). More... | |
| std::vector< std::string > | getFeatureAttributeNames (int) |
| Returns a lua bound table list of all attribute names for the particular feature index. More... | |
| bool | getHasAttributeNamed (int, const std::string) |
| Returns true if there is an attribute named on the particular feature. More... | |
| DtLocation3D | getLocation3D (int) |
| Returns the 3D location of the feature. More... | |
| std::vector< DtLocation3D > | getLocations3D (int) |
| Returns a vector of points for the particular feature. More... | |
| MAKVRinTerra::DtFeature::CPtr | feature (int) |
| Returns a feature at the given index or throws an exception if index is out of range. More... | |
| DtLuaFeatureGeometry | geometry (int) |
| Returns the feature geometry at the given index or throws an exception if index is out of range. More... | |
| DtLuaFeatureSet | load () |
| static luabind::object | getFeatureAttributeValue (DtLuaFeatureSet &, int, const std::string, lua_State *) |
| Returns an attribute value for the specified index and attribute name. More... | |
The DtLuaFeatureSet class is a wrapper around a DtFeatureSet that will provide feature information for lua scripts.
When archived the query that was used to create the feature set will be saved. Upon restore the feature set will again be created. Calling isLoaded() is essential to knowing when the query is complete
| typedef std::vector<DtLocation3D> DtLuaFeatureSet::LocationVector |
| typedef std::map<std::string, std::string> DtLuaFeatureSet::AttributeMap |
|
protected |
| DtLuaFeatureSet::DtLuaFeatureSet | ( | DtSimManager * | = 0, |
| const std::string & | type = "" |
||
| ) |
CTOR.
| DtLuaFeatureSet::DtLuaFeatureSet | ( | const DtLuaFeatureSet & | ) |
| DtLuaFeatureSet& DtLuaFeatureSet::operator= | ( | const DtLuaFeatureSet & | ) |
| DtLuaFeatureSet DtLuaFeatureSet::getFeaturesWithinArea | ( | luabind::object const & | points, |
| luabind::object const & | attributes | ||
| ) |
Returns a feature set which contains all features within the specified geometry containing the specified attributes.
| DtLuaFeatureSet DtLuaFeatureSet::getFeaturesWithinRange | ( | const DtLocation3D & | , |
| double | range, | ||
| luabind::object const & | attributes | ||
| ) |
Returns a feature set which contains all features within the specified point and box size containing the specified attributes.
The range is in meters. The range will create a bounding box with the point supplied at the center
| DtLuaFeatureSet DtLuaFeatureSet::filter | ( | const DtLuaFeatureGeometry & | geom, |
| luabind::object const & | attributes | ||
| ) |
| DtLuaFeatureSet DtLuaFeatureSet::filterGeometry | ( | const DtLuaFeatureGeometry & | geom | ) |
| DtLuaFeatureSet DtLuaFeatureSet::filterAttributes | ( | luabind::object const & | attributes | ) |
|
virtual |
Script API functions above. ////////////////////////////////////!
Used by the object serializer so that an instance of this object can call checkSelf()
|
virtual |
Should return the string name of this object.
The object name should not be part of the serialization unless you want it to be, but you should take it into account when implementing both functions.
Implements DtAsciiSerializable.
|
virtual |
Inherited from DtAsciiSerializable. Returns a string serialized version of this class.
Implements DtAsciiSerializable.
Inherited from DtAsciiSerializable.
Returns true if it could fill its members with the data contained in the string. False otherwise.
Implements DtAsciiSerializable.
|
static |
Inherited from DtAsciiSerializable. Returns a new object of this type with default values.
| bool DtLuaFeatureSet::getIsLoaded | ( | ) | const |
Return true if the feature set is loaded.
Operations that can be performed on a feature set
| int DtLuaFeatureSet::getFeatureCount | ( | ) |
Return the number of features in the set.
Returns true if the feature at the particular index is a point feature.
Will throw an exception if index is out of range or feature set is not loaded
Returns true if the feature at the particular index is a linear feature.
Will throw an exception if index is out of range or feature set is not loaded
Returns true if the feature at the particular index is an areal feature.
Will throw an exception if index is out of range or feature set is not loaded
| std::string DtLuaFeatureSet::getFeatureType | ( | int | ) |
Returns a string of the type of feature (point, line, area).
Will throw an exception if index is out of range or feature set is not loaded
| std::vector<std::string> DtLuaFeatureSet::getFeatureAttributeNames | ( | int | ) |
Returns a lua bound table list of all attribute names for the particular feature index.
Will throw an exception if index is out of range or if feature set is not loaded
Returns true if there is an attribute named on the particular feature.
| DtLocation3D DtLuaFeatureSet::getLocation3D | ( | int | ) |
Returns the 3D location of the feature.
If a multi-point feature returns the first point. Will throw an exception if the index is out of range, the feature set is not loaded
| std::vector<DtLocation3D> DtLuaFeatureSet::getLocations3D | ( | int | ) |
Returns a vector of points for the particular feature.
If a point feature returns a vector of 1 point. Will throw an exception if the index is out of range, the feature set is not loaded
|
static |
Returns an attribute value for the specified index and attribute name.
Will throw an exception if the index is out of range, the feature set is not loaded, or the attribute name is not valid for the particular feature
| MAKVRinTerra::DtFeature::CPtr DtLuaFeatureSet::feature | ( | int | ) |
Returns a feature at the given index or throws an exception if index is out of range.
| DtLuaFeatureGeometry DtLuaFeatureSet::geometry | ( | int | ) |
Returns the feature geometry at the given index or throws an exception if index is out of range.
| DtLuaFeatureSet DtLuaFeatureSet::load | ( | ) |
|
protectedvirtual |
Gathers all the found features into a local vector.
|
protectedvirtual |
Tests to see if the feature set is loaded.
Throws an exception if not. If it is loaded and the features have not been gathered into the feature set collection will do that
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Items used to be stored into or restored from saved state.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |