243 const size_t numPoints )
const override;
255 SCALE_WITH_DEPTH = 1 << 0
257 using Flags = agx::BitState<Flag, agx::UInt16>;
268 : T( solveType ), m_refFrame( refFrame ), m_primaryDirection( primaryDirection )
286 m_refFrame = refFrame;
292 return m_primaryDirection;
298 m_primaryDirection = primaryDirection;
311 ret_u = m_refFrame !=
nullptr ?
312 m_refFrame->transformVectorToWorld( m_primaryDirection ) :
314 ret_u -= ( normal * ret_u ) * normal;
320 ret_v = normal.
cross( ret_u );
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
static void createAttachmentBase(const agx::Vec3d &N, agx::Vec3d &U, agx::Vec3d &V)
Given vector N, create orthonormal base.
Oriented box friction model that uses the same normal force magnitude for all contact points associat...
virtual ~ConstantNormalForceOrientedBoxFrictionModel()
void setEnableScaleWithDepth(agx::Bool enable)
Enable/disable scale of the given normal force with the contact point depth resulting in a maximum fr...
virtual agx::Real calculateNormalForce(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2, const agx::Vec3 &point, const agx::Vec3 &normal, const agx::Real depth, const agx::Real dt, const size_t numPoints) const override
agx::Real getNormalForceMagnitude() const
void setNormalForceMagnitude(agx::Real normalForceMagnitude)
Assign normal force magnitude.
ConstantNormalForceOrientedBoxFrictionModel(agx::Real normalForceMagnitude, const agx::Frame *refFrame, const agx::Vec3 &primaryDirection, agx::FrictionModel::SolveType solveType=agx::FrictionModel::SPLIT, agx::Bool scaleWithDepth=false)
Construct given normal force magnitude, reference frame and primary direction.
ConstantNormalForceOrientedBoxFrictionModel()
agx::Bool getEnableScaleWithDepth() const
The object defining a frame of reference and providing transformations operations.
@ SPLIT
First Normal equation is calculated in the DIRECT solver, then in a second pass the normal and the fr...
Box friction model with oriented friction box.
OrientedBoxFrictionModel(const agx::Frame *refFrame, const agx::Vec3 &primaryDirection, agx::FrictionModel::SolveType solveType=agx::FrictionModel::SPLIT)
Construct given frame of reference and primary friction direction.
virtual ~OrientedBoxFrictionModel()
OrientedBoxFrictionModel()
Oriented friction box base implementation containing a frame of reference and the primary direction g...
virtual ~OrientedFrictionModelImpl()
OrientedFrictionModelImpl(const agx::Frame *refFrame, const agx::Vec3 &primaryDirection, agx::FrictionModel::SolveType solveType)
Construct given frame of reference and primary friction direction.
void setPrimaryDirection(const agx::Vec3 &primaryDirection)
Assign primary friction direction given in reference frame.
const agx::Frame * getReferenceFrame() const
void setReferenceFrame(const agx::Frame *refFrame)
Assign frame of reference.
virtual void calculateTangentPlane(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2, const agx::Vec3 &point, const agx::Vec3 &normal, const agx::Real depth, agx::Vec3 &ret_u, agx::Vec3 &ret_v) const override
Calculates primary and secondary friction directions in world coordinates given contact point.
const agx::Vec3 & getPrimaryDirection() const
Iterative projected cone friction model with oriented friction box.
OrientedIterativeProjectedConeFrictionModel()
OrientedIterativeProjectedConeFrictionModel(const agx::Frame *refFrame, const agx::Vec3 &primaryDirection, agx::FrictionModel::SolveType solveType=agx::FrictionModel::SPLIT)
Construct given frame of reference and primary friction direction.
virtual ~OrientedIterativeProjectedConeFrictionModel()
Scale box friction model with oriented friction box.
OrientedScaleBoxFrictionModel(const agx::Frame *refFrame, const agx::Vec3 &primaryDirection, agx::FrictionModel::SolveType solveType=agx::FrictionModel::SPLIT)
Construct given frame of reference and primary friction direction.
virtual ~OrientedScaleBoxFrictionModel()
OrientedScaleBoxFrictionModel()
Real normalize()
Normalize the vector so that it has length unity.
const Vec3T cross(const Vec3T &rhs) const
Cross product method.
Flags
Flags for specifying what is enabled in the debug rendering system.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT const Real RealEpsilon