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

Public Member Functions | |
| DtLuaFeatureSet () | |
| CTOR. | |
| DtLuaFeatureSet (DtSimManager *) | |
| CTOR. | |
| DtLuaFeatureSet (const DtLuaFeatureSet &) | |
| Copy CTOR. | |
| DtLuaFeatureSet & | operator= (const DtLuaFeatureSet &orig) |
| virtual | ~DtLuaFeatureSet () |
| DTOR. | |
| 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 | 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. | |
| virtual void | setSimManager (DtSimManager *simManager) |
| Script API functions above. ////////////////////////////////////. | |
| virtual DtString | objectType () const |
| Should return the string name of this object. | |
| DtString | serialize () |
| Inherited from DtAsciiSerializable. Returns a string serialized version of this class. | |
| bool | deserialize (const DtString &data) |
| Inherited from DtAsciiSerializable. | |
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. | |
| DtAsciiSerializable (const DtAsciiSerializable &orig) | |
| virtual | ~DtAsciiSerializable () |
Static Public Member Functions | |
| static DtAsciiSerializable * | creator () |
| Inherited from DtAsciiSerializable. Returns a new object of this type with default values. | |
Protected Types | |
| typedef std::vector < MAKVRinTerra::DtFeature::CPtr > | Features |
Protected Member Functions | |
| virtual MAKVRinTerra::DtQuery | generateQuery (const MAKVRinTerra::DtFeatureGeometry &, luabind::object const &attributes) |
| Generates a query given the attributes and some feature geometry. | |
| virtual void | gatherFeatures (const MAKVRinTerra::DtFeature &) |
| Gathers all the found features into a local vector. | |
| virtual void | testLoaded () |
| Tests to see if the feature set is loaded. | |
Protected Attributes | |
| boost::shared_ptr < MAKVRinTerra::DtFeatureSet > | myFeatureSet |
| DtSimManager * | mySimManager |
| std::vector< DtLocation3D > | myLocations |
| Items used to be stored into or restored from saved state. | |
| double | myRange |
| std::map< std::string, std::string > | myAttributes |
| bool | myProcessed |
| Features | myFeatures |
| bool | getIsLoaded () const |
| Return true if the feature set is loaded. | |
| int | getFeatureCount () |
| Return the number of features in the set. | |
| bool | getIsPointFeature (int) |
| Returns true if the feature at the particular index is a point feature. | |
| bool | getIsLinearFeature (int) |
| Returns true if the feature at the particular index is a linear feature. | |
| bool | getIsArealFeature (int) |
| Returns true if the feature at the particular index is an areal feature. | |
| std::string | getFeatureType (int) |
| Returns a string of the type of feature (point, line, area). | |
| std::vector< std::string > | getFeatureAttributeNames (int) |
| Returns a lua bound table list of all attribute names for the particular feature index. | |
| bool | getHasAttributeNamed (int, const std::string) |
| Returns true if there is an attribute named on the particular feature. | |
| DtLocation3D | getLocation3D (int) |
| Returns the 3D location of the feature. | |
| std::vector< DtLocation3D > | getLocations3D (int) |
| Returns a vector of points for the particular feature. | |
| MAKVRinTerra::DtFeature::CPtr | feature (int) |
| Returns a feature at the given index or throws an exception if index is out of range. | |
| static luabind::object | getFeatureAttributeValue (DtLuaFeatureSet &, int, const std::string, lua_State *) |
| Returns an attribute value for the specified index and attribute name. | |
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
|
protected |
| DtLuaFeatureSet::DtLuaFeatureSet | ( | ) |
CTOR.
| DtLuaFeatureSet::DtLuaFeatureSet | ( | DtSimManager * | ) |
CTOR.
| DtLuaFeatureSet::DtLuaFeatureSet | ( | const DtLuaFeatureSet & | ) |
Copy CTOR.
|
virtual |
DTOR.
| DtLuaFeatureSet& DtLuaFeatureSet::operator= | ( | const DtLuaFeatureSet & | orig | ) |
| 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
|
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.
| bool DtLuaFeatureSet::getIsPointFeature | ( | int | ) |
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
| bool DtLuaFeatureSet::getIsLinearFeature | ( | int | ) |
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
| bool DtLuaFeatureSet::getIsArealFeature | ( | int | ) |
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
| bool DtLuaFeatureSet::getHasAttributeNamed | ( | int | , |
| const std::string | |||
| ) |
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.
|
protectedvirtual |
Generates a query given the attributes and some feature geometry.
|
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 |
Items used to be stored into or restored from saved state.
|
protected |
|
protected |
|
protected |
|
protected |