21 #define DEBUG_RENDER_SHAPE_CONTACTS 0 32 class GeometryContactPtr;
38 class ShapeContactColliderUtils;
47 : normal(n), prevNormal(prev), nextNormal(next)
51 ShapeCurvature& operator=(
const ShapeCurvature& rhs)
53 this->normal = rhs.normal;
54 this->prevNormal = rhs.prevNormal;
55 this->nextNormal = rhs.nextNormal;
64 agx::Vec3 calculateCurvatureOrthogonalNormal()
const 66 agx::Vec3 orthoVector = prevNormal ^ nextNormal;
74 prevNormal.normalize();
75 nextNormal.normalize();
91 agx::Vec3 totDir = prevNormal + nextNormal;
114 ShapeContactEdge& operator=(
const ShapeContactEdge& rhs)
116 this->m_shape = rhs.m_shape;
117 this->m_edgeNormal = rhs.m_edgeNormal;
118 this->m_edgeStart = rhs.m_edgeStart;
119 this->m_edgeEnd = rhs.m_edgeEnd;
120 this->m_localShapeSurfaceProjectedPosition = rhs.m_localShapeSurfaceProjectedPosition;
121 this->m_previousLocalShapePosition = rhs.m_previousLocalShapePosition;
122 this->m_worldVectorFromLastProjection = rhs.m_worldVectorFromLastProjection;
123 this->getLocalCurvature() = rhs.m_localCurvature;
130 const ShapeContactColliderUtils* colliderUtils,
const agx::Vec3& normal,
const agx::Vec3& wpOnSurface,
144 ShapeCurvature transformCurvatureToWorld(
const ShapeCurvature& localCurvature)
const;
145 ShapeCurvature transformCurvatureToShape(
const ShapeCurvature& worldCurvature)
const;
147 ShapeCurvature getWorldCurvature()
const;
148 ShapeCurvature getShapeLocalCurvature()
const;
154 void clearClampShapes();
162 void setWorldEdgeNormal(
const agx::Vec3& worldEdgeDir);
163 void setShapeEdgeNormal(
const agx::Vec3& shapeEdgeDir);
168 void resetEdgeLength(
agx::Real edgeHalfLength);
170 ShapeContactEdge::ClampDirection getClampDirection(
agx::Real edgeDefaultLength)
const;
172 void renderDebug(
const agx::Vec4& color)
const;
182 void setEdgeStart(
const agx::Real& lengthToStartAlongEdgeDir);
185 void setEdgeEnd(
const agx::Real& lengthToEndAlongEdgeDir);
188 void setLocalShapeSurfaceProjectedPosition(
agx::Vec3 pos);
189 agx::Vec3 getLocalShapeSurfaceProjectedPosition()
const;
191 void setPreviousLocalShapePosition(
agx::Vec3 pos);
192 agx::Vec3 getPreviousLocalShapePosition()
const;
194 void setWorldPositionIfThisEdgeIsUsed(
agx::Vec3 worldPos);
195 agx::Vec3 getWorldPositionIfThisEdgeIsUsed()
const;
197 void setWorldVectorFromLastProjection(
agx::Vec3 vec);
198 agx::Vec3 getWorldVectorFromLastProjection()
const;
200 ShapeCurvature& getLocalCurvature();
201 const ShapeCurvature& getLocalCurvature()
const;
202 void setLocalCurvature(ShapeCurvature& newLocalCurvature);
204 void setWorldNormal(
const agx::Vec3& worldNormal);
207 void setWorldSurfaceProjectedPosition(
const agx::Vec3& worldPos);
208 agx::Vec3 getWorldSurfaceProjectedPosition()
const;
218 agx::Vec3 m_localShapeSurfaceProjectedPosition;
220 agx::Vec3 m_worldVectorFromLastProjection;
222 ShapeCurvature m_localCurvature;
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
This namespace consists of a set of classes for handling geometric intersection tests including boole...
A class holding 4 dimensional vectors and providing basic arithmetic.
#define AGXPHYSICS_EXPORT
static agx::Vec3 transformVectorToShape(const agx::Vec3 &v, const agxCollide::Geometry *g)
Transforms a vector given in world coordinates to shape coordinates of geometry g.
Implements a Wire model with adaptive resolution.
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)
Real normalize()
Normalize the vector so that it has length unity.
static agx::Vec3 transformVectorToWorld(const agx::Vec3 &v, const agxCollide::Geometry *g)
Transforms a vector given in shape coordinates to world coordinates given geometry g...
T1 clamp(T1 v, T2 minimum, T3 maximum)
NodeContainer::const_iterator NodeConstIterator
static agx::Vec3 transformPointToWorld(const agx::Vec3 &p, const agxCollide::Geometry *g)
Transforms a point given in shape coordinates to world given geometry g.
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
static agx::Vec3 transformPointToShape(const agx::Vec3 &p, const agxCollide::Geometry *g)
Transforms a point given in world coordinates to shape coordinates of geometry g. ...