Actin  Version 5.5.3
Software for Robotics Simulation and Control
EcPolyPhysicalExtent Class Reference

A class describing the physical extent of a link. It includes a description of the mesh and the surface properties. More...

#include <ecPolyPhysicalExtent.h>

Inheritance diagram for EcPolyPhysicalExtent:
[legend]
Collaboration diagram for EcPolyPhysicalExtent:
[legend]

Public Member Functions

 EcPolyPhysicalExtent ()
 default constructor
 
virtual ~EcPolyPhysicalExtent ()
 destructor
 
 EcPolyPhysicalExtent (const EcPolyPhysicalExtent &orig)
 copy constructor
 
EcPolyPhysicalExtentoperator= (const EcPolyPhysicalExtent &orig)
 assignment operator
 
EcBoolean operator== (const EcPolyPhysicalExtent &orig) const
 equality operator
 
virtual EcBoolean xmlInit () EC_OVERRIDE
 initialize XML components for reading and writing
 
virtual EcXmlObjectclone () const EC_OVERRIDE
 clone - a virtual constructor to an EcXmlObject pointer
 
virtual void registerComponents () EC_OVERRIDE
 register components with the parent
 
virtual EcBoolean equality (const EcXmlObject *other) const EC_OVERRIDE
 equality - virtual equality to an EcXmlObject pointer
 
virtual EcXmlObjectnewObject () const EC_OVERRIDE
 virtual new that returns an EcXmlObject
 
virtual EcBasePhysicalExtentphysicalExtent () const EC_OVERRIDE
 
virtual void physicalExtent (std::vector< EcBasePhysicalExtent * > &physExtent) const EC_OVERRIDE
 cyc am not sure about this revisit
 
virtual void setPointCollectionPointer () EC_OVERRIDE
 set points pointer for all polygons
 
virtual void setNormalsAndPolygons (const EcXmlVectorVector &normals, const EcPolygonWithKeyVector &polygons)
 
virtual void setNormalsAndPolygons (const EcXmlVectorVector &normals, const EcXmlStringPolygonVectorPairVector &surKeyPolysPairVec)
 
virtual const EcTriPhysicalExtentConstSharedPtr triPhysicalExtent () const EC_OVERRIDE
 Represent this PE as a group of triangles.
 
virtual const EcXmlStringPolygonVectorPairVectorsurfKeyPolyVecPairVector () const
 get surface key polygon vector pair vector
 
virtual void setSurfKeyPolyVecPairVector (const EcXmlStringPolygonVectorPairVector &surfKeyPolyVecPairVector)
 set surface key polygon vector pair vector
 
virtual EcU32 numberOfGroups () const EC_OVERRIDE
 get number of groups
 
virtual EcU32 numberOfFacetsInGroup (const EcU32 &groupId) const EC_OVERRIDE
 get number of polygons in a group
 
virtual EcU32 numberOfPointsInFacet (const EcU32 &groupId, const EcU32 &facetId) const EC_OVERRIDE
 get number of points in a polygon
 
virtual EcU32 numberOfNormalsInFacet (const EcU32 &groupId, const EcU32 &facetId) const EC_OVERRIDE
 get number of normals in a polygon
 
virtual EcU32 getFacetPointIndex (const EcU32 &groupId, const EcU32 &facetId, const EcU32 &pointId) const EC_OVERRIDE
 get the point index of a polygon
 
virtual EcU32 getFacetPointIndexNoCheck (const EcU32 &groupId, const EcU32 &facetId, const EcU32 &pointId) const EC_OVERRIDE
 
virtual EcU32 getFacetNormalIndex (const EcU32 &groupId, const EcU32 &facetId, const EcU32 &pointId) const EC_OVERRIDE
 get the normal index of a Facet
 
virtual EcU32 getFacetNormalIndexNoCheck (const EcU32 &groupId, const EcU32 &facetId, const EcU32 &pointId) const EC_OVERRIDE
 
virtual const EcStringgetGroupSurfaceKey (const EcU32 &groupId) const EC_OVERRIDE
 get surface key of a group
 
virtual EcPlane getFacetPlane (const EcU32 &groupId, const EcU32 &facetId) const EC_OVERRIDE
 get the plane of one facet
 
const EcPolygongetPolygon (const EcU32 groupId, const EcU32 facetId) const EC_OVERRIDE
 Return a polygon given group and facet id. More...
 
virtual EcBoolean checkFacetIntersect (const EcU32 groupId, const EcU32 facetId, const EcVector &pt) const EC_OVERRIDE
 check the facet intersection with a point
 
virtual EcBoolean checkFacetIntersect (const EcU32 groupId, const EcU32 facetId, const EcLineSegment &line) const EC_OVERRIDE
 check the facet intersection with a line
 
virtual void optimizeForRendering ()
 reorganize physical extent to improve performance
 
virtual EcReal distanceToLineSegment (const EcLineSegment &seg) const EC_OVERRIDE
 get the distance to a line segment
 
virtual EcReal distanceToPoint (const EcVector &vec) const EC_OVERRIDE
 get the distance to a point
 
virtual void intersectLineSegment (const EcLineSegment &lineSegment, EcShapePointEvent &pointEvent) const EC_OVERRIDE
 Intersect a line segment with the shape. More...
 
virtual void intersectLineSegmentWithNormal (const EcLineSegment &lineSegment, EcShapePointEvent &pointEvent, EcVector &normal) const EC_OVERRIDE
 
virtual EcBoolean checkIntersectWithLineSegment (const EcLineSegment &lineSegment) const EC_OVERRIDE
 check the intersection with line segment
 
virtual EcBoolean checkIntersectWithPoint (const EcVector &point) const EC_OVERRIDE
 check the intersection with a point
 
virtual EcPlane plane () const
 returns the plane in which the polygon lies
 
virtual EcU32 type () const EC_OVERRIDE
 
virtual void fitToPoints (const EcXmlVectorVector &points) EC_OVERRIDE
 expand this shape to fit this collection of points
 
virtual void mergeWith (const EcBasePhysicalExtent &other) EC_OVERRIDE
 merge the other extent into this one.
 
virtual void mergeWith (const EcPolyPhysicalExtent &other)
 merge with another poly physical extent
 
virtual EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 read this object from an XML stream
 
virtual EcBoolean write (EcXmlWriter &stream) const EC_OVERRIDE
 write this object to an XML stream
 
virtual const EcTokentoken () const EC_OVERRIDE
 virtual method returning the token for this object
 
virtual EcString const & impactedSurface (const EcU32 &intPointIndex, const EcVector &point) const EC_OVERRIDE
 
virtual EcBoolean findVertexNeighborFacetsVector () EC_OVERRIDE
 assign Neighbor Polygons Vec according to m_Polygons
 
virtual EcBoolean convexHull (const EcXmlVectorVector &points) EC_OVERRIDE
 Find the convex hull of the passed in points.
 
virtual EcBoolean convexHull () EC_OVERRIDE
 
virtual EcBoolean bestNeighbor (const EcVector &v, EcReal &value, EcU32 &vertID) const EC_OVERRIDE
 Best neighbor for support point calculation. More...
 
virtual EcU32 getClosestPointID (const EcVector &closestPoint, const EcU32 &pointID) const EC_OVERRIDE
 get closest point ID given last support point and the closest point
 
virtual EcBoolean dump (const EcString &filePath) const EC_OVERRIDE
 dump data out for matlab
 
virtual const EcStringsurfaceProperty () const EC_OVERRIDE
 return the surface property for the physical extent
 
virtual void setSurfaceProperty (const EcString &surfaceProp) EC_OVERRIDE
 
void setPolygonSurface (const EcString &surName)
 set all polygons to default bounding color
 
virtual EcBoolean sortPolys (const EcPolygonWithKeyVector &polygons)
 sort polygons by surface
 
virtual EcBoolean triangulize (EcTriPhysicalExtent &triPhy) const
 
- Public Member Functions inherited from EcBasePhysicalExtent
 EcBasePhysicalExtent ()
 Default constructor.
 
virtual ~EcBasePhysicalExtent ()
 Destructor.
 
 EcBasePhysicalExtent (const EcBasePhysicalExtent &orig)
 Copy constructor. More...
 
EcBasePhysicalExtentoperator= (const EcBasePhysicalExtent &orig)
 Assignment operator. More...
 
EcBoolean operator== (const EcBasePhysicalExtent &orig) const
 Equality operator. More...
 
virtual EcBoolean writeSchema (EcXmlSchema &stream) const EC_OVERRIDE
 write this object to an XML schema More...
 
virtual EcBoolean isConvex () const EC_OVERRIDE
 Gets convexity flag. More...
 
void resetNeighborFlags ()
 Reset all the neighbor flags to false. More...
 
virtual void setIsConvex (EcBoolean value=EcTrue)
 Sets convexity flag. More...
 
virtual const EcXmlVectorVectorpoints () const
 Gets 3D point collection. More...
 
virtual void setPoints (const EcXmlVectorVector &points)
 Sets 3D point collection. More...
 
virtual const EcVectorpoint (EcU32 index) const
 Get the point corresponding to the index. More...
 
virtual void fitFromShape (const EcShape &shape) EC_OVERRIDE
 resizes this shape to completely contain the shape passed in
 
virtual void truncateValues (const EcReal &precision)
 truncate values in the physical extents to the precision specified
 
virtual const EcXmlVectorVectornormals () const
 gets normal collection
 
virtual void setNormals (const EcXmlVectorVector &normals)
 sets normal collection
 
virtual const EcPlanarVectorVectorrasterMapPoints () const
 gets raster-map point collection
 
virtual void setRasterMapPoints (const EcPlanarVectorVector &rasterMapPoints)
 sets raster-map point collection
 
virtual const EcXmlU32U32PairVectormodifiedFacetIndices () const
 get modified facet indices
 
virtual void setModifiedFacetIndices (const EcXmlU32U32PairVector &modifiedFacetIndices)
 set modified facet indices
 
virtual void initModifiedFacetIndices ()
 initialize the modified facet indices
 
virtual const EcGeometryOverwriteDescriptorgeometryOverwriteDescriptor () const
 gets the vector of the polygon change descriptor
 
virtual EcGeometryOverwriteDescriptorgeometryOverwriteDescriptor ()
 gets the vector of the modified shape key (non const version)
 
virtual void setGeometryOverwriteDescriptor (const EcGeometryOverwriteDescriptor &geometryOverwriteDescriptor)
 sets the vector of the modified shape key
 
virtual const EcCapsulecapsuleBoundingVolume () const EC_OVERRIDE
 gets capsule bounding volume
 
virtual void setCapsuleBoundingVolume (const EcCapsule &capsuleBoundingVolume) EC_OVERRIDE
 sets capsule bounding volume
 
virtual void normalizePoints ()
 normalize the points in a physical extent
 
virtual void transformBy (const EcCoordinateSystemTransformation &xform, const EcBoolean recurseLowerFidelityRepresentations=EcTrue) EC_OVERRIDE
 
virtual void scaleSelfBy (EcReal scaleFactor) EC_OVERRIDE
 
virtual void scaleSelfBy (EcReal xScaleFactor, EcReal yScaleFactor, EcReal zScaleFactor)
 
void removeRedundancy (const EcReal eps=0.0)
 non-virtual remove redundancy
 
virtual EcBoolean expandCapsule ()
 
virtual EcVector supportPoint (const EcVector &v) const EC_OVERRIDE
 get support point given a vector
 
virtual const EcXmlU32U32PairVectorVectorvertexNeighborFacetsVector () const
 gets neighbor pair Vec 2D
 
virtual void setVertexNeighborFacetsVector (const EcXmlU32U32PairVectorVector &vertexNeighborFacetsVector)
 sets neighbor Facets Vec
 
virtual const EcLineAndNeighborsVectorlineAndNeighborsVector () const
 gets line and its neighbors
 
void setLineAndNeighborsVector (const EcLineAndNeighborsVector &lineAndNeighborsVector)
 sets line and its neighbors
 
virtual const EcU32tipPointIndex () const
 get the tip point index
 
virtual void setTipPointIndex (const EcU32 &tipPointIndex)
 set the tip point index
 
virtual const EcU32endPointIndex () const
 get the end point index
 
virtual void setEndPointIndex (const EcU32 &endPointIndex)
 set the end point index
 
virtual EcU32 pickNearestVertexIndex (const EcVector &toolTip, const EcXmlVectorVector &originalPointVector)
 Return the index of the vertex point that's nearest to tooltip.
 
virtual void checkModifiedFacetIndices (const EcXmlU32U32Pair &pair)
 check whether or not the face has been changed
 
virtual EcU32 totalNumberOfFacets () const
 return total number of facets, sum of all groups
 
virtual EcU32 supportPointID () const EC_OVERRIDE
 get support point ID (last calculated)
 
virtual EcBoolean isModified () const
 return if is modified
 
virtual const EcXmlU32VectorVectorvertexNeighborVerticesVector () const
 get vector of vertex's neighbor vertices (indexed)
 
virtual void setVertexNeighborVerticesVector (const EcXmlU32VectorVector &vertexNeighborVerticesVector)
 set vector of vertex's neighbor vertices (indexed)
 
virtual const EcXmlU32VectorVectorvertexNeighborLinesVector () const
 get vector of vertex's neighbor lines (indexed)
 
virtual void setVertexNeighborLinesVector (const EcXmlU32VectorVector &vertexNeighborLinesVector)
 set vector of vertex's neighbor lines (indexed)
 
virtual const EcXmlU32Vector3DfacetNeighborLinesVector () const
 get vector of Facet's neighbor lines
 
virtual void setFacetNeighborLinesVector (const EcXmlU32Vector3D &facetNeighborLinesVector)
 set vector of Facet's neighbor lines
 
virtual const EcXmlVectorVectorVectornormalsOfFacets () const
 get the normal vector of facet
 
virtual void setNormalsOfFacets (const EcXmlVectorVectorVector &normalsOfFacets)
 set the normal vector of facet
 
virtual const EcXmlVectorVectornormalsOfPoints () const
 get normal of points
 
virtual void setNormalsOfPoints (const EcXmlVectorVector &normalsOfPoints)
 set normal of points
 
virtual const EcXmlVectorVectornormalsOfLines () const
 get the normal vector of lines
 
virtual void setNormalsOfLines (const EcXmlVectorVector &normalsOfLines)
 set the normal vector of lines
 
virtual const EcBooleanmodIsCleanedUp () const
 gets the bool to clean up the modified
 
virtual void setModIsCleanedUp (const EcBoolean &value)
 sets the bool to clean up the modified
 
virtual EcReal pointTolerance () const
 gets point tolerance
 
virtual void setPointTolerance (EcReal value)
 sets point tolerance
 
virtual EcBoolean findVertexNeighborVertices ()
 find the vertices's neighbor vertices.
 
virtual EcBoolean findLineAndNeighbors ()
 Description: find lines and their neighbors (poly or tri and vertices index)
 
virtual EcBoolean findVertexNeighborLines ()
 find the vertices' neighbor lines
 
virtual EcBoolean findFacetNeighborLinesVector ()
 find Facet's Neighbor lines
 
virtual EcBoolean findNormalOfFacets ()
 find normals of facets
 
virtual EcBoolean findNormalOfPoints ()
 find normals of points
 
virtual EcBoolean findNormalOfLines ()
 find normals of lines
 
virtual void usedPoints (EcXmlVectorVector &pointVector) const
 get all the used point indices
 
virtual void getAabb (EcAxisAlignedBoundingBox &aabb) const EC_OVERRIDE
 get aabb for shape
 
virtual EcBoolean copyGeometricProperties (const EcShape &another) EC_OVERRIDE
 For physical extent, this simply returns false and does not copy the properties.
 
EcXmlString sourceFileName () const
 
void setSourceFileName (const EcXmlString &sourceFileName)
 
EcXmlReal importingScaleFactor () const
 
void setImportingScaleFactor (const EcXmlReal &importingScaleFactor)
 
EcCoordinateSystemTransformation origin () const
 
void setOrigin (const EcCoordinateSystemTransformation &origin)
 
virtual void scaleSelfLocallyBy (EcReal scaleFactor)
 
- Public Member Functions inherited from EcShape
 EcShape ()
 default constructor
 
virtual ~EcShape ()
 destructor
 
 EcShape (const EcShape &orig)
 copy constructor
 
EcShapeoperator= (const EcShape &orig)
 assignment operator
 
EcBoolean operator== (const EcShape &orig) const
 equality operator
 
virtual void scaleBy (EcReal scaleFactor)
 
virtual const EcShapelowerFidelityRepresentation () const
 lower fidelity representation
 
virtual const EcShapelowestFidelityNotToExceed (EcU32 level) const
 lowest fidelity not to exceed the given level
 
virtual const EcShapehigherFidelityRepresentation () const
 higher fidelity representation
 
virtual void setLowerFidelityRepresentationPointer (EcShape *ptr)
 
virtual void setHigherFidelityRepresentationPointer (EcShape *ptr)
 higher fidelity representation
 
virtual void setLowerFidelityRepresentation (const EcShape &shape)
 lower fidelity representation (makes a copy)
 
virtual void addBoundingVolume (const EcShapeValues &bv)
 add a bounding volume to this shape
 
virtual void deleteBoundingVolumes ()
 delete all the bounding volumes in the hierarchy
 
virtual void deletePhysicalExtent ()
 delete the physical extent
 
virtual EcBoolean normalOfIntersection (const EcLineSegment &seg, const EcCoordinateSystemTransformation &xform, EcVector &normalVector) const
 
virtual EcBoolean readValueFromSpecialToken (const EcToken &token, EcXmlReader &stream) EC_OVERRIDE
 read value from unregistered token
 
virtual EcU32 detailLevel () const
 get function for detail level
 
virtual void setDetailLevel (const EcU32 detLev)
 set function for detail level
 
virtual void setIndexAndBackPointer (EcU32 &index, const EcManipulatorLink *link, EcShapeConstPointerMap &shapePointerMap, EcShapePointerVector &shapePointerVec)
 set the proximity database index for this shape, and the link pointer
 
virtual EcU32 proximityDatabaseIndex () const
 get the proximity database index for this shape
 
virtual void setProximityDatabaseIndex (const EcU32 &index)
 set the proximity database index for this shape
 
virtual void mapBVHLevel (EcU32 &bvhLevel)
 
virtual const EcStringidentifier () const
 get the shape identifier
 
virtual void setIdentifier (const EcString &identifier)
 set the shape identifier
 
virtual void setBVHLevel (const EcU32 &level)
 set the level of this shape in the bounding volume hierarchy
 
virtual const EcU32bvhLevel () const
 get the level of this shape in the bounding volume hierarchy
 
virtual void capsuleBoundingVolumeVectorInPrimary (EcXmlVectorType< EcCapsule > &capsuleVec, EcU32Vector &shapeIDVec) const
 
virtual void subdivide (EcXmlVectorVector &points, EcPolygonWithKeyVector &polys, const EcU32 triIds[3], const EcInt32 level) const
 Subdivide a triangle into 4. More...
 
virtual void icosahedron (EcBasePhysicalExtent &physExtent, const EcReal radius, const EcVector center, const EcU32 detailLevel) const
 Create polygon/mesh of a sphere. More...
 
virtual const EcStringDataMapMapsurfaces () const
 gets surface property collection
 
virtual EcStringDataMapMapsurfaces ()
 gets surface property collection non-const
 
virtual EcBoolean lookup (const EcString &key, const EcDataMap *&surfProp) const
 lookup a surface property for this shape using an EcString
 
virtual EcBoolean lookup (const EcXmlString &xmlKey, const EcDataMap *&surfProp) const
 lookup a surface property for this shape using an EcXmlString (preferred method)
 
virtual void setSurfaces (const EcStringDataMapMap &surfaces)
 set the surface properties collection for this shape
 
virtual EcShapelowerFidelityRepresentation ()
 lower fidelity representation (Non-Const)
 
virtual EcShapehigherFidelityRepresentation ()
 higher fidelity representation (Non-Const)
 
virtual void setSupportPointID (const EcU32 supportPointID)
 set support point ID
 
virtual const EcBooleanbypassDynamics () const
 get the bypass dynamics flag
 
virtual void setBypassDynamics (const EcBoolean &flag)
 set the bypass dynamics flag
 
virtual EcU32 numberOfShapes () const
 
virtual void addExplicitBoundingVolume (const EcShape &shape)
 add the shape passed in as a new bounding volume
 
virtual EcBoolean setSurfaceProperties (const EcString &key, const EcDataMap &properties)
 set the properties of the surface identified by key. More...
 
virtual void boundingVolumes (EcShapeConstPointerVector &boundingVolumes, const EcU32 bvhLevel=1) const
 
virtual EcShapecreateBoundingShape (const EcShapeValues &bv) const
 create a bounding shape for this shape
 
virtual EcBoolean isUnion () const
 returns true if the shape is a union of shapes
 
virtual EcAxisAlignedBoundingBoxutilityAabb () const
 returns a utility aabb used in EcShapeCollisionTool
 
- Public Member Functions inherited from EcBaseExpressionTreeElement
 EcBaseExpressionTreeElement ()
 default constructor
 
 EcBaseExpressionTreeElement (const EcXmlBaseVariableCompoundType *containerPointer)
 constructor given container pointer
 
virtual ~EcBaseExpressionTreeElement ()
 destructor
 
 EcBaseExpressionTreeElement (const EcBaseExpressionTreeElement &orig)
 copy constructor
 
EcBaseExpressionTreeElementoperator= (const EcBaseExpressionTreeElement &orig)
 assignment operator
 
EcBoolean operator== (const EcBaseExpressionTreeElement &orig) const
 equality operator
 
virtual const EcXmlBaseVariableCompoundTypecontainer () const
 gets the container
 
virtual void setContainer (const EcXmlBaseVariableCompoundType *container)
 sets the container
 
- Public Member Functions inherited from EcXmlCompoundType
 ECDECLARE_BIGFOUR (EcXmlCompoundType)
 
virtual EcBoolean readAttributes (EcXmlReader &stream)
 read object attributes from an XML stream
 
virtual EcBoolean readElements (EcXmlReader &stream)
 read object elements from an XML stream
 
virtual EcBoolean writeAttributes (EcXmlWriter &stream) const
 write object attributes to an XML stream
 
virtual EcBoolean writeElements (EcXmlWriter &stream) const
 write object elements to an XML stream
 
virtual EcBoolean writeSchemaAttributes (EcXmlSchema &stream) const
 write schema attributes
 
virtual EcBoolean writeSchemaElements (EcXmlSchema &stream) const
 write schema elements
 
virtual void registerComponent (const EcToken &token, EcXmlObject *obj)
 register a single component More...
 
virtual void registerComponent (EcXmlObject *obj)
 register a single component More...
 
virtual void registerComponentReadOnly (const EcToken &token, EcXmlObject *obj)
 register a single component as read-only More...
 
virtual const EcXmlComponentMapcomponentMap () const
 get a reference to the component map
 
virtual void registerAttributeComponent (const EcToken &AttribToken, EcXmlObject *Obj)
 register a single attribute component More...
 
virtual void registerAttributeComponentReadOnly (const EcToken &AttribToken, EcXmlObject *Obj)
 register a single attribute component read-only More...
 
virtual const EcXmlComponentMapattributeComponentMap ()
 get a reference to the component attribute map
 
virtual const EcXmlSpecialDescriptorMapspecialDescriptorMap ()
 get a reference to the special-descriptor map
 
virtual void registerComponentDescriptor (const EcToken &xmlToken, const EcToken &descriptorToken, const EcString &descriptorString)
 register an XML token-string descriptor More...
 
virtual const EcXmlTokenStringDescriptorMapMaptokenStringDescriptorMap ()
 get a reference to the XML token-string descriptor map
 
virtual EcBoolean hasChildren () const
 return EcTrue if there are children components or EcFalse if an empty element.
 
virtual EcBoolean hasAttributes () const
 return EcTrue if there are attributes in the element.
 
- Public Member Functions inherited from EcXmlObject
 ECDECLARE_BIGFOUR (EcXmlObject)
 
virtual EcBoolean readAttribute (EcXmlReader &stream)
 read this attribute from an XML stream
 
virtual EcBoolean createSchema (const EcString &filename, const EcToken &objectName=EcXml::EcDefaultToken) const
 create schema
 
virtual EcBoolean xmlInitialized () const
 get XML initialized flag. This bit is set on initialization.
 
virtual void setXmlInitialized (EcBoolean val=EcTrue)
 set XML initialized flag. This bit is set on initialization.
 
virtual EcBoolean specified () const
 get specified flag. This bit is set upon reading from an XML file.
 
virtual void setSpecified (EcBoolean val=EcTrue)
 set specified flag. This bit is set upon reading from an XML file.
 
virtual EcBoolean isBasicType () const
 Return true/false for basic type.
 
virtual EcBoolean equalsDefault () const
 tests equality of XML object with default
 

Static Public Member Functions

static EcPolyPhysicalExtent nullObject ()
 get an empty extent
 
static EcXmlObjectcreator ()
 the creator function for this object
 
static const EcTokenclassToken ()
 returns a class token
 
- Static Public Member Functions inherited from EcBasePhysicalExtent
static void combineMeshes (const EcShapePointerVector &shapeVec, EcBasePhysicalExtent &physicalExtent)
 

Protected Member Functions

virtual void setPolygons (const EcPolygonWithKeyVector &polygons)
 
virtual void validateNormals () EC_OVERRIDE
 validate normals in each polygon
 
virtual void vRemoveRedundancy () EC_OVERRIDE
 
virtual EcBoolean readValueFromToken (const EcToken &token, EcXmlReader &stream) EC_OVERRIDE
 read value from token More...
 
- Protected Member Functions inherited from EcBasePhysicalExtent
virtual void init ()
 initialize normal and neighbor data
 
virtual EcBoolean recalculateCapsule ()
 
virtual void initNeighborInformation ()
 initialize normal and neighbor data
 
virtual void removeRedundancyForVectors (const EcReal eps, EcXmlVectorVector &vv, EcU32Vector &indexMapping)
 remove redundancy for vectors
 
- Protected Member Functions inherited from EcXmlCompoundType
virtual EcBoolean readAttributeFromToken (const EcToken &token, EcXmlReader &stream)
 
virtual EcXmlComponentMapnewComponentMap () const
 allocate a new componentMap
 
virtual EcXmlSpecialDescriptorMapnewSpecialDescriptorMap ()
 allocate a new specialDescriptorsMap
 
virtual EcXmlTokenStringDescriptorMapMapnewTokenStringDescriptorMap ()
 allocate a new tokenStringDescriptorsMap
 
virtual void createComponentMap () const
 create component map
 
virtual void createAttributeComponentMap ()
 create attribute component map
 
virtual void createSpecialDescriptorMap ()
 create special-descriptors map
 
virtual void createTokenStringDescriptorMap ()
 create token-string descriptor map
 
virtual EcBoolean isReadOnlyComponent (const EcToken token) const
 check to see if the token corresponds to a read-only component
 
virtual EcBoolean isReadOnlyAttribute (const EcToken token) const
 check to see if the token corresponds to a read-only attribute
 
virtual EcXmlObjectlibraryAttribute ()
 

Protected Attributes

EcXmlStringPolygonVectorPairVector m_SurfKeyPolyVecPairVector
 sorted surfaceKey,polyVector pair
 
- Protected Attributes inherited from EcBasePhysicalExtent
EcXmlBoolean m_IsConvex
 a flag indicating convexity for the link surface
 
EcXmlVectorVector m_Points
 a vector of polygon 3D vertices
 
EcXmlVectorVector m_Normals
 an optional vector of polygon vertex normals
 
EcPlanarVectorVector m_RasterMapPoints
 a vector of UV coordinates into raster data
 
EcXmlU32 m_TipPointIndex
 the point index that representing the whole object.
 
EcXmlU32 m_EndPointIndex
 the end point index that use in line segment with m_TipPointIndex.
 
EcXmlReal m_PointTolerance
 tolerance for point comparison
 
EcXmlString m_sourceFileName
 source file if imported
 
EcXmlReal m_importingScaleFactor
 effective scale factor from original imported format
 
EcCoordinateSystemTransformation m_origin
 local frame origin for the physical extent
 
EcNeighborFlags m_NeighborFlags
 flags indicating status of neighbor information calculation.
 
EcCapsule m_CapsuleBoundingVolume
 a default capsule bounding volume
 
EcBoolean m_IsCapsuleSet
 flag indicating whether the capsule has been sized yet
 
EcXmlU32U32PairVectorVector m_VertexNeighborFacetsVector
 a vector of neighbor Facets of a vertex
 
EcLineAndNeighborsVector m_LineAndNeighborsVector
 vector of lines and its neighbor information
 
EcXmlU32VectorVector m_VertexNeighborVerticesVector
 a vector of vertex's neighbor vertices (indexed)
 
EcXmlU32VectorVector m_VertexNeighborLinesVector
 a vector of vertex's neighbor lines (indexed)
 
EcXmlU32Vector3D m_FacetNeighborLinesVector
 Facet's neighbor lines.
 
EcXmlVectorVector m_NormalsOfPoints
 normal vector of vertices
 
EcXmlVectorVector m_NormalsOfLines
 normal vector of Lines
 
EcXmlVectorVectorVector m_NormalsOfFacets
 normal vector of Facets
 
EcBooleanVector m_VertVisitedVector
 a vector indicating if a vert has been visited
 
EcBooleanVector m_VertVisitedPrevVector
 a vector indicating if a vert has been visited in the previous round
 
EcString m_UtilString
 a utility string
 
EcBoolean m_IsModified
 
EcXmlU32U32PairVector m_ModifiedFacetIndices
 vector storing the modified facet's indices
 
EcGeometryOverwriteDescriptor m_GeometryOverwriteDescriptor
 vector storing the polygon change descriptor
 
EcBoolean m_ModIsCleanedUp
 bool to clean up the modification
 
EcU32Vector m_PointIndexMapping
 a utility vector for removing point redundancy
 
EcU32Vector m_NormalIndexMapping
 a utility vector for removing normal redundancy
 
EcU32Vector m_RasterMapPointIndexMapping
 a utility vector for removing raster map point redundancy
 
- Protected Attributes inherited from EcShape
EcXmlU32 m_DetailLevel
 detail value for some of the shapes
 
EcStringDataMapMap m_Surfaces
 a map of surface properties by string key
 
EcXmlString m_SurfaceProperty
 contains the surface property of this shape (assumes homogeneous)
 
EcXmlString m_ShapeIdentifier
 optional identifier for this shape
 
EcXmlBoolean m_BypassDynamics
 flag indicating whether to bypass collision dynamics for this shape
 
ecboost::scoped_ptr< EcShapem_pLowerFidelityRepresentation
 a pointer to a low-fidelity representation of this shape
 
EcBasePhysicalExtentm_pPhysicalExtent
 a pointer to a physical extent representing this shape
 
EcShapem_pHigherFidelityRepresentation
 a higher-fidelity representation of this shape
 
EcU32 m_BVHLevel
 indicates the level of this shape in the Bounding Volume Hierarchy
 
EcU32 m_ProximityDatabaseIndex
 the index of this shape into the proximity database
 
EcU32 m_SupportPointID
 the support point ID
 
EcCapsulem_pCapsuleBoundingVolume
 a default capsule bounding volume
 
EcXmlString m_UtilityXmlString
 utility string
 
EcAxisAlignedBoundingBox m_UtilityAabb
 utility aabb
 
- Protected Attributes inherited from EcBaseExpressionTreeElement
const EcXmlBaseVariableCompoundTypem_pContainer
 a pointer to the container
 
- Protected Attributes inherited from EcXmlCompoundType
EcXmlComponentMapm_pComponentMap
 
EcXmlComponentMapm_pAttributeComponentMap
 
EcXmlSpecialDescriptorMapm_pSpecialDescriptorMap
 
EcXmlTokenStringDescriptorMapMapm_pComponentMapTokenStringDescriptor
 
- Protected Attributes inherited from EcXmlObject
EcU8 m_State
 the state of the object - eight boolean flags
 

Friends

class Ec::test::EcPolyPhysicalExtentTester
 XXX FIXME: selfTest requires access to protected methods.
 

Additional Inherited Members

- Public Types inherited from EcBasePhysicalExtent
typedef struct EcBasePhysicalExtent::EcNeighborFlags EcNeighborFlags
 neighbor flags
 
- Public Types inherited from EcShape
enum  EcShapeValues {
  POINT_POLYGON,
  POLY_PHYSICAL,
  TRI_PHYSICAL,
  GRID,
  SPHERE,
  CAPSULE,
  ELLIPSOID,
  TETRAHEDRON,
  OBB,
  LOZENGE,
  HALFSPACE,
  CYLINDER,
  CONE,
  BOXLOZENGE,
  CIRCULARLOZENGE,
  TRIANGULARLOZENGE,
  CYLINDRICALLOZENGE,
  TETRAHEDRALLOZENGE,
  CONICALLOZENGE,
  TERRAIN,
  TERRAIN_UNION,
  UNION,
  INTERSECTION
}
 enumerations for supported geometry More...
 
enum  EcCollisionQueryOptions {
  ALL,
  DEEPEST
}
 enumerations for collision data accessing
 
- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 special-descriptor codes More...
 
- Static Protected Attributes inherited from EcBasePhysicalExtent
static const EcString m_TheNullMaterialType
 a default material type
 
- Static Protected Attributes inherited from EcXmlObject
static const EcU8 m_theXmlInitializedBit
 the bit used to describe xml initialization
 
static const EcU8 m_theSpecifiedBit
 the bit used to describe specification
 

Detailed Description

A class describing the physical extent of a link. It includes a description of the mesh and the surface properties.

Holds a description of a physical extent (surface) of a rigid body. This includes the polygons describing the surface and properties of the surface.

Examples:
ecCollisionAvoidanceExample.cpp.

Definition at line 28 of file ecPolyPhysicalExtent.h.

Member Function Documentation

virtual EcBoolean EcPolyPhysicalExtent::bestNeighbor ( const EcVector v,
EcReal value,
EcU32 vertID 
) const
virtual

Best neighbor for support point calculation.

Parameters
[in]vdirection
[out]valuevalue of dot product
[out]vertIDbest vert ID
Returns
EcBoolean

Implements EcBasePhysicalExtent.

virtual EcBoolean EcPolyPhysicalExtent::convexHull ( )
virtual

Find the convex hull of the points within this object. The resulting polyPhysicalExtent will have all the polygons in one group.

Implements EcBasePhysicalExtent.

virtual EcU32 EcPolyPhysicalExtent::getFacetNormalIndexNoCheck ( const EcU32 groupId,
const EcU32 facetId,
const EcU32 pointId 
) const
virtual

get the normal index of a Facet without checking the bound. Use only if bounds checked beforehand.

Implements EcBasePhysicalExtent.

virtual EcU32 EcPolyPhysicalExtent::getFacetPointIndexNoCheck ( const EcU32 groupId,
const EcU32 facetId,
const EcU32 pointId 
) const
virtual

get the point index of a polygon without checking the bound. Use only if bounds checked beforehand.

Implements EcBasePhysicalExtent.

const EcPolygon& EcPolyPhysicalExtent::getPolygon ( const EcU32  groupId,
const EcU32  facetId 
) const
virtual

Return a polygon given group and facet id.

Parameters
[in]groupIdgroup Id
[in]facetIdfacet id
Returns
const EcPolygon&

Implements EcBasePhysicalExtent.

virtual EcString const& EcPolyPhysicalExtent::impactedSurface ( const EcU32 intPointIndex,
const EcVector point 
) const
virtual

returns the impacted surface based on the points of intersection passed in.

Implements EcBasePhysicalExtent.

virtual void EcPolyPhysicalExtent::intersectLineSegment ( const EcLineSegment lineSegment,
EcShapePointEvent pointEvent 
) const
virtual

Intersect a line segment with the shape.

If the initial isImpacted in pointEvent is false and the line segment intersects with the shape, isImpacted in pointEvent will be set to true and the distance in pointEvent will be set to the distance from the first endpoint along the line segment to the point of intersection of the shape. If the first endpoint of the line segment lies inside or on the surface of the shape (regardless of whether the other endpoint lies inside the shape), then the distance is set to 0 and isImpacted is set to true. If the line segment does not intersect with the shape, then nothing happens. If the initial isImpacted in pointEvent is true and the line segment intersects with the shape, the initial distance in pointEvent will be compared to the distance from the first endpoint along the line segment to the point of intersection. If the new distance is less than the initial distance, the distance in pointEvent will be set to the new distance. Otherwise, the distance in pointEvent will remain unchanged.

Implements EcShape.

virtual void EcPolyPhysicalExtent::intersectLineSegmentWithNormal ( const EcLineSegment lineSegment,
EcShapePointEvent pointEvent,
EcVector normal 
) const
virtual

Same as EcShape::intersectLineSegment(const EcLineSegment&, EcShapePointEvent&) except that it also returns the normal of the surface at the intersection

Implements EcBasePhysicalExtent.

virtual EcBasePhysicalExtent* EcPolyPhysicalExtent::physicalExtent ( ) const
virtual

get a physical extent from the top shape in the CSG tree NOTE: This is for backward compatibility

Implements EcBasePhysicalExtent.

virtual EcBoolean EcPolyPhysicalExtent::readValueFromToken ( const EcToken token,
EcXmlReader stream 
)
protectedvirtual

read value from token

Reimplemented from EcBasePhysicalExtent.

virtual void EcPolyPhysicalExtent::setNormalsAndPolygons ( const EcXmlVectorVector normals,
const EcPolygonWithKeyVector polygons 
)
virtual

sets the normals and polygons together, will be sorted immediately the normals must be set before the polygons, and this method ensures that.

virtual void EcPolyPhysicalExtent::setNormalsAndPolygons ( const EcXmlVectorVector normals,
const EcXmlStringPolygonVectorPairVector surKeyPolysPairVec 
)
virtual

sets the normals and polygons together, polygons sorted already. The normals must be set before the polygons, and this method ensures that.

virtual void EcPolyPhysicalExtent::setPolygons ( const EcPolygonWithKeyVector polygons)
protectedvirtual

sets polygon collection, will be sorted immediately. It is protected so that it will not be called before the normals are set

virtual void EcPolyPhysicalExtent::setSurfaceProperty ( const EcString surfaceProp)
virtual

set the surface property for the physical extent. NOTE this will set all the polygons to the surface property specified.

Implements EcBasePhysicalExtent.

virtual EcBoolean EcPolyPhysicalExtent::triangulize ( EcTriPhysicalExtent triPhy) const
virtual

triangulize polygons. No new points will be introduced. Assume all polygons are convex!

virtual EcU32 EcPolyPhysicalExtent::type ( ) const
virtual

returns the type of shape. NOTE higher number shapes know how to compute distances to lower number shapes.

Reimplemented from EcBasePhysicalExtent.

virtual void EcPolyPhysicalExtent::vRemoveRedundancy ( )
protectedvirtual

Implements EcBasePhysicalExtent.


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