VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
DtLocalVertexList Class Reference

class DtLocalVertexList:

Instances of DtLocalVertexList are lists of DtLocalVector vertices.

Inheritance diagram for DtLocalVertexList:
Inheritance graph
[legend]

Public Member Functions

 DtLocalVertexList ()
 
 DtLocalVertexList (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
 
virtual ~DtLocalVertexList ()
 
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 bool leftOf (const DtVector &point) const
 
virtual double headingAngleTo (const DtVector &point) const
 
virtual double elevationAngleTo (const DtVector &point) const
 
virtual double localDistSquaredTo (const DtVector &point) const
 
virtual double distSquaredTo2D (const DtVector &point) const
 
virtual bool intersects (const DtVector &point1, const DtVector &point2) const
 
virtual bool getClosestVertex2D (const DtVector &point, DtVector &vertex) const
 
virtual DtListItem * getClosestVertex2D (const DtVector &point) const
 
virtual bool getClosestLine2D (const DtVector &point, DtVector &linePt1, DtVector &linePt2) const
 
virtual void setFrom (const DtLocalVectorIterator &)
 
DtLocalVertexListoperator= (const DtLocalVertexList &orig)
 
DtLocalVertexListoperator= (const std::vector< DtVector > &orig)
 
- Public Member Functions inherited from DtVertexList
 DtVertexList ()
 
 DtVertexList (const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
 
 DtVertexList (const DtVertexList &orig, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVertexList ()
 
virtual DtRwVectoroperator[] (unsigned index) const
 
virtual int index (const DtListItem *entry) const
 
virtual double distSquaredTo (const DtVector &point) const
 
virtual bool getClosestVertex (const DtVector &point, DtVector &vertex) const
 
virtual DtListItem * getClosestVertex (const DtVector &point) const
 
virtual bool getClosestLine (const DtVector &point, DtVector &linePt1, DtVector &linePt2) const
 
virtual void translate (const DtVector &offset)
 
virtual void copyList (const DtVertexList &)
 
virtual void copyList (const DtList &)
 
DtVertexListoperator= (const std::vector< DtVector > &)
 
DtVertexListoperator= (const DtVertexList &)
 
virtual void emptyList ()
 
virtual void resetVerticesVector ()
 
const std::vector< DtVector > & asVector () const
 
void removeVertex (int)
 
- Public Member Functions inherited from DtRwList
 DtRwList ()
 
 DtRwList (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtRwList (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL)
 
virtual ~DtRwList ()
 
const DtRwListoperator= (const DtRwList &orig)
 
virtual DtListItem * add (DtReaderWriter *data)
 
virtual DtListItem * addWithAlternateName (DtReaderWriter *data, const DtString &name)
 
virtual DtListItem * addToStart (DtReaderWriter *data)
 
virtual DtListItem * addToEnd (DtReaderWriter *data)
 
virtual void * remove (DtReaderWriter *data, DtListItem *item)
 
virtual DtlObjPtr getLocalData (DtlObjPtr args)
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual DtListItem * addBefore (DtReaderWriter *data, DtReaderWriter *before)
 
virtual DtListItem * addAfter (DtReaderWriter *data, DtReaderWriter *after)
 
virtual void removeAll ()
 
virtual void removeAndDeleteAll ()
 
virtual void reset ()
 
virtual const charreaderWriterType () const
 
bool operator== (const DtRwList &rhs) const
 
bool operator!= (const DtRwList &rhs) const
 
virtual void populateList (boost::function< void(DtReaderWriter *)> addFunction, DtEnvironmentSP env, DtEnvValueSP node, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &bindings)
 
virtual void populateListByType (boost::function< void(DtReaderWriter *)> addFunction, DtEnvironmentSP env, DtEnvValueSP node, const DtString &bindingType, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &bindings)
 
 DtRwList (const DtString &name, const DtRwList &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtRwList (const DtSymbolString &name, const DtRwList &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
virtual DtListItem * addBefore (DtReaderWriter *data, const DtString &before)
 
virtual DtListItem * addBefore (DtReaderWriter *data, const DtSymbolString &before)
 
virtual DtListItem * addAfter (DtReaderWriter *data, const DtString &after)
 
virtual DtListItem * addAfter (DtReaderWriter *data, const DtSymbolString &after)
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP value, const DtReaderWriter::SearchPaths &searchPaths=DtReaderWriter::SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual const charxmlType () const
 
virtual std::set< DtStringsupportedXmlTypes () const
 
- Public Member Functions inherited from DtReaderWriter
 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 DtReaderWriteroperator= (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 aliasContaineraliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
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 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 DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () 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 putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Static Public Member Functions

static double distanceSquaredPointToLine2D (const DtVector &point, const DtVector &linePt1, const DtVector &linePt2)
 
static double distanceSquaredPointToPoint2D (const DtVector &point1, const DtVector &point2)
 
- Static Public Member Functions inherited from DtVertexList
static DtRwVectorzero ()
 
static double distanceSquaredPointToLine (const DtVector &point, const DtVector &linePt1, const DtVector &linePt2)
 
static double distanceSquaredPointToPoint (const DtVector &point1, const DtVector &point2)
 
- Static Public Member Functions inherited from DtRwList
static const chartheXmlType ()
 
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Attributes

bool myClosedFigure
 
bool myIsEllipsoid
 
bool myProjection
 
- Protected Attributes inherited from DtVertexList
std::vector< DtVectormyVertexList
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

Private Member Functions

 DtLocalVertexList (const DtLocalVertexList &orig)
 

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 
- Protected Member Functions inherited from DtVertexList
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
- Protected Member Functions inherited from DtRwList
virtual DtListItem * addBefore (DtReaderWriter *data, DtListItem *before)
 
virtual DtListItem * addAfter (DtReaderWriter *data, DtListItem *after)
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Constructor & Destructor Documentation

DtLocalVertexList::DtLocalVertexList ( )

default constructor

DtLocalVertexList::DtLocalVertexList ( const DtString name,
DtReaderWriterRegistry parentRegistry = NULL 
)

constructor

virtual DtLocalVertexList::~DtLocalVertexList ( )
virtual

destructor

DtLocalVertexList::DtLocalVertexList ( const DtLocalVertexList orig)
private

copy constructor Not implemented. Do not call.

Member Function Documentation

virtual bool DtLocalVertexList::closedFigure ( ) const
virtual

Set / Get closed figure flag. If true, then the last vertex connects back to the first, forming a closed figure.

virtual void DtLocalVertexList::setClosedFigure ( bool  closed)
virtual
virtual bool DtLocalVertexList::isEllipsoid ( ) const
virtual

Set / Get elipsoid figure flag. If true, the second point lies on the X radius, and, if present, the 3rd on the Y. An ellipsoid has, at most, 3 points.

virtual void DtLocalVertexList::setIsEllipsoid ( bool  closed)
virtual
virtual bool DtLocalVertexList::projection ( ) const
virtual

Set / Get projection flag. If true, then the Z values in the vertices should be ignored.

virtual void DtLocalVertexList::setProjection ( bool  projection)
virtual
virtual bool DtLocalVertexList::leftOf ( const DtVector point) const
virtual

What follows is a number of methods for determining the relative geometry between this object and other 2D or 3D points.


The following public member functions are deprecated. They apply only when the given database coordinate system is UTM. To write coordinate system independent code, use the functions (with corresponding names) defined in kinTools.h. They will work for any of the supported

coordinates in VR-Forces (e.g. UTM, geocentric).

Deprecated:
VR-Forces 3.11. To be removed following this release. Returns true if point is left of the geometry in 2D. always returns false if this has only one vertex. if this has more than two vertices (ie. more than one line segment), acts on the closest (infinite) line.
virtual double DtLocalVertexList::headingAngleTo ( const DtVector point) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Returns the angle at which point would proceed to arrive most quickly at this. if the object geometry has more than one vertex, then headingAngleTo() acts on the closest vertex (which is not always the closest point on this). all points are considered in 2D.
virtual double DtLocalVertexList::elevationAngleTo ( const DtVector point) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Returns the elevation angle in 3D at which point would proceed to arrive most quickly at this. if the object geometry has more than one vertex, then elevationAngleTo() acts on the closest vertex (which is not always the closest point on this).
virtual double DtLocalVertexList::localDistSquaredTo ( const DtVector point) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Returns the distance from localPoint to the closest vertex in this. If this is projected, calls distSquaredTo2D to find the the nearest vertex on this. Otherwise, calls closestLocalPosition() to determine the nearest vertex on this.
virtual double DtLocalVertexList::distSquaredTo2D ( const DtVector point) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Returns the squared distance to this. if this has more than two vertices (ie. more than one line segment), acts on the closest line segment. if projection() then distSquaredTo() calls distSquared2D.
virtual bool DtLocalVertexList::intersects ( const DtVector point1,
const DtVector point2 
) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Returns true if the line segment point1-point2 intersects any line segment in this object geometry, all in 2D. note: for purposes of this function, line segments don't intersect if they are colinear, even if they are partially coincident. this should be what a caller would want.
virtual bool DtLocalVertexList::getClosestVertex2D ( const DtVector point,
DtVector vertex 
) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Sets vertex to be the vertex closest in 2D to point in this object geometry.
virtual DtListItem* DtLocalVertexList::getClosestVertex2D ( const DtVector point) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Returns a pointer to the item in this list which is closest in 2D to point.
virtual bool DtLocalVertexList::getClosestLine2D ( const DtVector point,
DtVector linePt1,
DtVector linePt2 
) const
virtual
Deprecated:
VR-Forces 3.11. To be removed following this release. Sets linePt1 and linePt2 to be the vertices of the line closest in 2D to point in this object geometry.
virtual void DtLocalVertexList::setFrom ( const DtLocalVectorIterator )
virtual

Sets points from the local vector iterator passed int.

static double DtLocalVertexList::distanceSquaredPointToLine2D ( const DtVector point,
const DtVector linePt1,
const DtVector linePt2 
)
static

Returns the distance^2 from point to linePt1-linePt2 in 2D.

static double DtLocalVertexList::distanceSquaredPointToPoint2D ( const DtVector point1,
const DtVector point2 
)
static

Returns the distance^2 from point1 to point2 in 2D.

DtLocalVertexList& DtLocalVertexList::operator= ( const DtLocalVertexList orig)

assignment operator

DtLocalVertexList& DtLocalVertexList::operator= ( const std::vector< DtVector > &  orig)

Member Data Documentation

bool DtLocalVertexList::myClosedFigure
protected
bool DtLocalVertexList::myIsEllipsoid
protected
bool DtLocalVertexList::myProjection
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)