Actin®  Version 5.2.0
Software for Robotics Simulation and Control
EcPlane Class Reference

Holds a description of a plane. More...

#include <ecPlane.h>

Inheritance diagram for EcPlane:
EcXmlCompoundType EcXmlObject

Public Member Functions

 EcPlane ()
 default constructor
 
 EcPlane (const EcVector &basePoint, const EcVector &normalVector)
 constructor from a point and a unit normal vector
 
virtual ~EcPlane ()
 destructor
 
 EcPlane (const EcPlane &orig)
 copy constructor
 
EcPlaneoperator= (const EcPlane &orig)
 assignment operator
 
EcBoolean operator== (const EcPlane &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 const EcVectorbasePoint () const
 get the base point
 
virtual void setBasePoint (const EcVector &basePoint)
 set the base point
 
virtual const EcVectornormal () const
 get the normal vector
 
virtual void setNormalVector (const EcVector &normalVector)
 set the normal vector
 
virtual EcBoolean intersectLineSegment (const EcLineSegment &seg, EcReal &tValue) const
 
virtual EcReal distanceToLineSegment (const EcLineSegment &seg) const
 
virtual EcReal distanceToLineSegment (const EcLineSegment &seg, EcVector &closestPtOnSegment, EcVector &closestPt) const
 
virtual EcReal distanceToPoint (const EcVector &pt) const
 
virtual EcReal distanceToRectangle (const EcRectangle &rect) const
 
virtual EcReal distanceToRectangle (const EcRectangle &rect, EcVector &closestOnPlane, EcVector &closestOnRect) const
 return the distance to a rectangle
 
virtual EcReal distanceToTriangle (const EcGeomTriangle &tri) const
 returns the distance to a triangle
 
virtual EcReal distanceToTriangle (const EcGeomTriangle &triangle, EcVector &closestPtOnTriangle, EcVector &closestPt) const
 get the distance to a triangle More...
 
virtual EcReal directedDistanceToTriangle (const EcGeomTriangle &triangle) const
 get the directed distance to a triangle More...
 
virtual EcReal directedDistanceToTriangle (const EcGeomTriangle &triangle, EcVector &witnessPtOnTriangle, EcVector &witnessPtOnPlane) const
 get the directed distance to a triangle More...
 
virtual EcReal distanceToCircle (const EcCircle &circle) const
 get the distance to a circle More...
 
virtual EcReal distanceToCircle (const EcCircle &circle, EcVector &direction, EcVector &closestPt) const
 get the distance to a circle plus data regarding witness points More...
 
virtual EcBoolean checkIntersectWithTriangle (const EcGeomTriangle &tri) const
 check intersection of a plane and a triangle
 
virtual void calculateProjectionPoint (const EcVector &point, EcVector &projectionOfPoint) const
 find the projection of a point onto the plane
 
virtual const EcTokentoken () const EC_OVERRIDE
 get token
 
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 EcBoolean setByHessianNormalForm (const EcReal &a, const EcReal &b, const EcReal &c, const EcReal &d)
 set plane by Hessian Normal Form. More...
 
virtual EcBoolean fitFromPoints (const EcVectorVector &points)
 fit plane from points More...
 
- 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 writeSchema (EcXmlSchema &stream) const EC_OVERRIDE
 write schema
 
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 EcPlane nullObject ()
 get an empty polygon
 

Protected Attributes

EcXmlVector m_BasePoint
 the base point of the plane
 
EcXmlVector m_NormalVector
 the normal vector of the plane
 
- 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
 

Additional Inherited Members

- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 special-descriptor codes More...
 
- Protected Member Functions inherited from EcXmlCompoundType
virtual EcBoolean readValueFromToken (const EcToken &token, EcXmlReader &stream)
 
virtual EcBoolean readValueFromSpecialToken (const EcToken &token, EcXmlReader &stream)
 read value from unregistered token
 
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 ()
 
- 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

Holds a description of a plane.

A class that describes a plane using a normal vector and a point.

Definition at line 28 of file ecPlane.h.

Member Function Documentation

virtual EcReal EcPlane::directedDistanceToTriangle ( const EcGeomTriangle triangle) const
virtual

get the directed distance to a triangle

This method returns the positive distance is the entire triangle is on the normal side of the plane. It returns the negative penetration distance if the triangle pierces the plane or is opposide the normal.

Parameters
[in]triangleThe triangle.
Returns
The directed distance to the triangle.
virtual EcReal EcPlane::directedDistanceToTriangle ( const EcGeomTriangle triangle,
EcVector witnessPtOnTriangle,
EcVector witnessPtOnPlane 
) const
virtual

get the directed distance to a triangle

This method returns the positive distance is the entire triangle is on the normal side of the plane. It returns the negative penetration distance if the triangle pierces the plane or is opposide the normal.

Parameters
[in]triangleThe triangle.
[out]witnessPtOnTriangleThe point on the triangle closest to plane if return value is positive or most penetrating if the return value is negative.
[out]witnessPtOnPlaneThe point on the plane closest to triangle (positive case) or closest to the most penetrating point (negative case).
Returns
The directed distance to the triangle.
virtual EcReal EcPlane::distanceToCircle ( const EcCircle circle) const
virtual

get the distance to a circle

This method returns zero if the circle touches the plane and negative if the circle penetrates or is behind the plane.

Parameters
[in]circleThe circle.
Returns
The distance to the circle.
virtual EcReal EcPlane::distanceToCircle ( const EcCircle circle,
EcVector direction,
EcVector closestPt 
) const
virtual

get the distance to a circle plus data regarding witness points

This method returns zero if the circle touches the plane and negative if the circle penetrates or is behind the plane.

Parameters
[in]circleThe circle.
[out]directionThe direction to the point on the circle closest to plane (closest point = center + direction*radius).
[out]closestPtThe point on the plane closest to circle.
Returns
The distance to the circle.
virtual EcReal EcPlane::distanceToLineSegment ( const EcLineSegment seg) const
virtual

get the distance to a line segment returns zero if the line intersects the plane, a positive distance if the line is on the side of the plane in the direction of the normal vector and a negative distance if the line segment lies on the side of the plane in the opposite direction of the normal vector

virtual EcReal EcPlane::distanceToLineSegment ( const EcLineSegment seg,
EcVector closestPtOnSegment,
EcVector closestPt 
) const
virtual

get the distance to a line segment returns zero if the line intersects the plane, a positive distance if the line is on the side of the plane in the direction of the normal vector and a negative distance if the line segment lies on the side of the plane in the opposite direction of the normal vector

Parameters
[in]segThe segment.
[out]closestPtOnSegmentThe point on the segment closest to plane.
[out]closestPtThe point on the plane closest to line segment.
Returns
The distance to the line segment.
virtual EcReal EcPlane::distanceToPoint ( const EcVector pt) const
virtual

get the distance to a point returns zero if the point is in the plane, a positive distance if if it is on the side of the plane in the direction of the normal vector and a negative distance if the point lies on the side of the plane in the opposite direction of the normal vector

virtual EcReal EcPlane::distanceToRectangle ( const EcRectangle rect) const
virtual

get the distance to a rectangle returns zero if the point is in the plane, a positive distance if if it is on the side of the plane in the direction of the normal vector and a negative distance if the point lies on the side of the plane in the opposite direction of the normal vector

virtual EcReal EcPlane::distanceToTriangle ( const EcGeomTriangle triangle,
EcVector closestPtOnTriangle,
EcVector closestPt 
) const
virtual

get the distance to a triangle

This method returns zero if the triangle touches the plane and negative if the triangle penetrates or is behind the plane.

Parameters
[in]triangleThe triangle.
[out]closestPtOnTriangleThe point on the triangle closest to plane.
[out]closestPtThe point on the plane closest to triangle.
Returns
The distance to the triangle.
virtual EcBoolean EcPlane::fitFromPoints ( const EcVectorVector points)
virtual

fit plane from points

Parameters
[in]points\ This method returns false if the input number of points is less than 3
virtual EcBoolean EcPlane::intersectLineSegment ( const EcLineSegment seg,
EcReal tValue 
) const
virtual

calculate the intersection with a line segment if intersection occurs, the t-value for the intersection point is returned.

Parameters
[in]segThe line segment
[out]tValueThe t-Value of point on the line segment intersecting the plane
Returns
true if intersection ocurred, false otherwise
virtual EcBoolean EcPlane::setByHessianNormalForm ( const EcReal a,
const EcReal b,
const EcReal c,
const EcReal d 
)
virtual

set plane by Hessian Normal Form.

Parameters
[in]a,b,c,d\ This method returns false if the plane is not well define a=b=c=0

The documentation for this class was generated from the following file:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.