This class maintains a rectangular bounding volume and an ordered list of vertices describing the physical extent of the object. Control objects may have one or more vertices representing the object. Individual simulation objects are represented by a single vertex and a rectangular bounding volume. The file kinTools.h contains utility functions for determining such things as the elevation angle to a given point, distance between points, and whether or not a given point lies inside the bounding volume.
Objects such as platform entities usually do not provide any model data, but are described by a rectangular bounding volume. For an area control object or a route, the vertices of the object are provided. The list of vertices may either be closed (as in an area), or open (as in a route). The vertices may also be projected (as in a phase line). If the vertices are projected, then in topocentric coordinates, any computations performed on the vertices ignore the Z component. If you know that your object has projected coordinates, then setting the object geometry projected flag using setProjection() enables some of the geometry functions to be optimized for 2-D.
Object geometry provides an interface for working in either local (database) coordinates or world coordinates. It is initialized for an object from its object parameter database entry. For example, to iterate over the vertices in an object, do the following:
|
| | DtVrfObjectGeometry (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=nullptr) |
| |
| | DtVrfObjectGeometry (const DtVrfObjectGeometry &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=nullptr) |
| |
| DtVrfObjectGeometry & | operator= (const DtVrfObjectGeometry &orig) |
| |
| virtual | ~DtVrfObjectGeometry () override |
| |
| const DtSimBoundingGeometry & | boundingGeometry () const |
| |
| void | setBoundingGeometry (const DtSimBoundingGeometry &bounds) |
| |
| void | setBoundingVolume (const Dt3dBoundingVolume &) |
| |
| void | setBoundingGeometryType (DtSimBoundingGeometry::DtSimBoundingGeometryType type) |
| |
| void | setHalfLengthWidthHeight (double l, double w, double h) |
| |
| const DtSimBoundingGeometry & | localBoundingGeometry () const |
| |
| const DtSimBoundingGeometry & | worldBoundingGeometry () const |
| |
| virtual bool | closedFigure () const |
| |
| virtual void | setClosedFigure (bool closed) |
| |
| virtual bool | isEllipsoid () const |
| |
| virtual void | setIsEllipsoid (bool closed) |
| |
| virtual bool | projection () const |
| |
| virtual void | setProjection (bool projection) |
| |
| virtual void | removeAllObjectVertices () |
| |
| virtual bool | worldPointInsideBoundingGeometry (const DtVector &worldPoint, const DtVector &objectWorldLocation, const DtTaitBryan &objectWorldOrientation) const |
| |
| virtual bool | calculateBoundingVolume (const DtVertexList &vertices, DtSimBoundingGeometry &boundingGeometry) |
| |
| virtual void | setEngineeringArea (const DtVector &) |
| |
| const DtVector & | engineeringArea () const |
| |
| virtual void | recalculateBoundingGeometry () |
| |
|
| virtual void | setObjectVertices (const DtLocalVertexList &vertices) |
| |
| virtual void | setObjectVertices (const DtList &vertices) |
| |
| virtual const DtLocalVertexList & | objectVertices () const |
| |
| virtual DtLocalVertexList & | objectVertices () |
| |
virtual const std::vector
< DtVector > & | objectVerticesAsVector () const |
| |
| | DtReaderWriter () |
| |
| | DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) |
| |
| | DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) |
| |
| | DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) |
| |
| | DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) |
| |
| | DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL) |
| |
| const DtReaderWriter & | operator= (const DtReaderWriter &orig) |
| |
| bool | operator== (const DtReaderWriter &) const |
| |
| bool | operator!= (const DtReaderWriter &rhs) const |
| |
| virtual | ~DtReaderWriter () |
| |
| virtual void | putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| |
| virtual void | postPutSelf () |
| |
| virtual void | prePutSelf () |
| |
| virtual void | postGetSelf () |
| |
| virtual void | preGetSelf () |
| |
| virtual void | writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| |
| virtual DtSymbolString | name () const |
| |
| virtual void | addAlias (const DtSymbolString &alias) |
| |
| virtual void | addAlias (const DtString &alias) |
| |
| virtual bool | hasAlias (const DtSymbolString &alias) |
| |
| virtual const aliasContainer & | aliases () const |
| |
| virtual void | setReadonly (bool flag) |
| |
| bool | isReadonly () const |
| |
| virtual void | reset () |
| |
| virtual int | alignment () const |
| |
| virtual bool | variableIsBound () const |
| |
| virtual void | unbindVariable () |
| |
| virtual void | setName (const DtString &) |
| |
| virtual const char * | readerWriterType () const |
| |
| virtual const char * | xmlType () const |
| |
| virtual DtString | prettyPrint () const |
| |
| std::string | debugText () const |
| |
| virtual void | bindVariables (DtVariableBindingsList variableBindings) |
| |
virtual std::list
< DtVariableNameType > | unboundVariables () const |
| |
| bool | invalid () const |
| |
| virtual bool | hasChild (const DtReaderWriter *p) const |
| |
| virtual bool | hasVariableReference () const |
| |
| virtual void | bindLocalVariables (const DtVariableBindingsList &variableBindings) |
| |
| virtual void | recordUpdateTime () const |
| |
| virtual bool | changedSinceLastChecked () |
| |
| virtual bool | peekChangedSinceLastChecked () const |
| |
| virtual void | putData (std::string &fp, int indentLevel=0) |
| |
| virtual DtlObjPtr | getData (DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) |
| |
| virtual void | setValueSpecified (bool specified, bool recurse=false) |
| |
| virtual bool | valueSpecified () const |
| |
| virtual bool | isVariableReference () const |
| |
| virtual void | setIsVariableReference (bool value) |
| |
| virtual void | clearAllVariableReferenceFlags () |
| |
| virtual DtSymbolString | variableName () const |
| |
| virtual void | setVariableName (const DtSymbolString variableName) |
| |
| virtual const DtReaderWriter * | defaultRWValue () const |
| |
| virtual DtReaderWriter * | defaultRWValue () |
| |
| virtual void | setDefaultRWValue (DtReaderWriter *) |
| |
| virtual bool | checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| |
| const DtReaderWriterRegistry & | registry () const |
| |
| DtReaderWriterRegistry & | registry () |
| |
| virtual DtPropertyInterface * | property () |
| |
| virtual const DtPropertyInterface * | property () const |
| |
| virtual DtString | toXml () const |
| |
| virtual DtRwVariableBindings * | generateVariableBindings () const |
| |
| virtual bool | toXml (const DtFilename &) const |
| |
| virtual bool | fromXml (const DtString &) |
| |
| virtual bool | fromXmlFile (const DtFilename &) |
| |
| virtual void | putSelf (DtEnvironmentSP, DtEnvValueSP parent) const |
| |
| virtual void | putData (DtEnvironmentSP, DtEnvValueSP value) const |
| |
| virtual void | putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const |
| |
| virtual void | getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList()) |
| |
| virtual void | getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList()) |
| |
| virtual void | unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings) |
| |
| virtual void | getVariableReference (DtEnvironmentSP, DtEnvValueSP value) |
| |