46 class MergeSplitBodyStorage;
55 class LocalContactPoint;
210 bool isEnabled()
const;
217 bool getEnable()
const;
233 void setSensor(
bool flag,
bool generateContactData =
true);
238 bool isSensor()
const;
244 bool isSensorGeneratingContactData()
const;
308 bool hasGroup(
const agx::Name& name )
const;
384 bool hasPropertyContainer()
const;
400 const Space* getSpace()
const;
439 void setSurfaceVelocity(
const agx::Vec3f& surfaceVelocity );
639 const
Shape *getShape() const;
646 bool setShape(
Shape *shape);
654 bool remove(
size_t index );
704 void setEnableSplit(
bool flag );
707 bool getEnableSplit( )
const;
712 void setEnableMerge(
bool flag );
716 bool getEnableMerge( )
const;
723 void setForceSplitInPreStep(
bool flag );
727 bool getForceSplitInPreStep( )
const;
742 MergeSplitProperties& getMergeSplitProperties();
745 const MergeSplitProperties& getMergeSplitProperties()
const;
756 friend class GeometryGroup;
759 friend class agxCollide::ShapeGroup;
762 void propagateTransform();
763 void updateFrameStorage();
764 ShapeGroup *createWrapperGroup();
791 size_t findShapeIndex(
Shape *shape);
793 void enableCollisionsWithGroup(
agx::UInt32 groupId);
794 void disableCollisionsWithGroup(
agx::UInt32 groupId);
797 friend class
agx::InternalData;
813 agx::RigidBody * m_rigidBody;
823 agx::observer_ptr<
agx::RigidBody> m_originalBody;
843 return const_cast<Geometry *
>( this )->getShape();
867 return m_entity.state().enabled();
872 return m_entity.state().sensor();
875 inline bool Geometry::isSensorGeneratingContactData()
const
877 return !m_entity.state().booleanSensor();
882 return m_entity.sweepAndPruneIndex();
887 return CollisionGroupManager::hasGroup(m_entity.collisionGroupSet(),
id);
892 return CollisionGroupManager::hasGroup(m_entity.collisionGroupSet(), name);
897 return m_entity.collisionGroupSet();
902 m_entity.collisionGroupSet() = set;
917 m_entity.surfaceVelocity() = surfaceVelocity;
922 return m_entity.surfaceVelocity();
927 m_originalBody = body;
932 return m_originalBody.get() ? m_originalBody.get() : m_rigidBody;
937 return m_originalBody.get() ? m_originalBody.get() : m_rigidBody;
942 return m_entity.state().enabled();
956 return m_frame.get();
961 return m_frame.get();
966 return &m_entity.boundingAABB();
972 if ( !m_propertyContainer )
974 return m_propertyContainer;
979 return ( m_propertyContainer.
isValid() );
984 if ( !m_propertyContainer )
987 return m_propertyContainer;
992 return getSurfaceVelocity();
997 return m_msProperties;
1001 return m_msProperties;
1006 m_flags[ENABLE_SPLIT] = flag;
1010 return m_flags[ENABLE_SPLIT];
1015 m_flags[ENABLE_MERGE] = flag;
1020 return m_flags[ENABLE_MERGE];
1025 m_flags[FORCE_SPLIT_IN_PRE] = flag;
1030 return m_flags[FORCE_SPLIT_IN_PRE];
1037 return m_entity.transform();
1039 return m_frame->getMatrix();
1046 return m_entity.transform().getTranslate();
1048 return m_frame->getTranslate();
1054 return m_entity.transform().
getRotate();
1055 return m_frame->getRotate();
1065 return m_internalData;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Axis aligned bounding box implementation.
Specify MergeSplit properties for a Geometry.
MergeSplitProperties()
Constructor.
The geometry representation used by the collision detection engine.
ShapeChangeEvent shapeChangeEvent
agx::SPDMatrix3x3 calculateInertia(agx::Real mass) const
void removeGroup(agx::UInt32 id, bool forceContactUpdate=false)
Remove a collision group id from the vector of group ids.
void setLocalPosition(agx::Real x, agx::Real y, agx::Real z)
Set the position of the geometry relative to its frame's parent frame.
Geometry(Shape *shape)
Constructor.
virtual ~Geometry()
Destructor.
void setLocalTransform(const agx::AffineMatrix4x4 &matrix)
Assign the local transformation matrix for this geometry, ignoring any eventual parent transformation...
agx::Referenced * getCustomData()
const agx::Referenced * getCustomData() const
void setEnable(bool flag)
Enable/disable collision testing for geometry.
void setEnableCollisions(const Geometry *otherGeometry, bool flag)
Specify whether otherGeometry is allowed to collide with this geometry.
const agx::Frame * getParentFrame() const
void setRotation(const agx::EulerAngles &e)
Set the rotation of the geometry relative to world frame.
agx::Event1< Geometry * > ShapeChangeEvent
void setLocalRotation(const agx::EulerAngles &e)
Set the rotation of the geometry relative to its frame's parent frame.
void setEnableCollisions(bool collide)
Should this geometry collide with any other geometries.
agx::Quat getLocalRotation() const
void setCustomData(agx::Referenced *data)
Store a ref_ptr to a user custom data class, which must be inherited from Referenced.
void setLocalPosition(const agx::Vec3 &p)
Set the position of the geometry relative to its frame's parent frame.
const agx::AffineMatrix4x4 & getLocalTransform() const
agx::Frame * getParentFrame()
void setTransform(const agx::AffineMatrix4x4 &matrix)
Set the transform of the geometry.
void setName(const agx::Name &name)
Set the name of this Geometry.
void setMaterial(agx::Material *material)
Set the material of the geometry.
void removeAllGroups(bool forceContactUpdate=false)
Remove all collision group ids.
Geometry(const agx::Name &name="")
Constructor.
void setPosition(agx::Real x, agx::Real y, agx::Real z)
Set the position of the frame in world coordinates.
bool setParentFrame(agx::Frame *frame)
Set the parent frame of this geometry's frame.
void setSensor(bool flag, bool generateContactData=true)
Sets if the geometry should be a sensor.
agx::Vec3 getLocalPosition() const
CollisionGroupManager::GroupIdHash GroupSet
Deprecated: Only for backward compatibility.
agx::Vec3 calculateCenterOfMassOffset() const
bool getEnableCollisions() const
void setRotation(const agx::OrthoMatrix3x3 &m)
Set the rotation of the geometry relative to world frame.
void removeMaterial()
Remove the material from the geometry.
virtual void updateBoundingVolume()
const GroupSet & getGroupIDs() const
agx::Real calculateMass() const
agxCollide::GroupIdCollection findGroupIdCollection() const
void addGroup(agx::UInt32 id, bool forceContactUpdate=false)
Add the specified id to a vector of group id, this will make a geometry part of the group id.
void setPosition(const agx::Vec3 &p)
Set the position of the frame in world coordinates.
agx::Real calculateVolume() const
bool canCollide(const Geometry *otherGeometry) const
const agx::Name & getName() const
Get the name.
void removeGroup(const agx::Name &name, bool forceContactUpdate=false)
Remove a named collision group from the vector of named group ids.
Geometry * clone(bool shallowCopyRenderData=false) const
This method will make a deep copy of the geometry, excluding membership in any RigidBody.
Geometry(Shape *shape, const agx::AffineMatrix4x4 &localShapeTransform)
Constructor.
bool getEnableCollisions(const Geometry *otherGeometry) const
void addGroup(const agx::Name &name, bool forceContactUpdate=false)
Add the specified name to a vector of named group id, this will make a geometry part of the group nam...
bool remove(Shape *shape)
Remove a shape from the geometry.
void setRotation(const agx::Quat &q)
Set the rotation of the geometry relative to world frame.
virtual void shapeUpdated()
void setPropertyContainer(agx::PropertyContainer *container)
Give this a new PropertyContainer.
void setLocalRotation(const agx::Quat &q)
Set the rotation of the geometry relative to its frame's parent frame.
bool add(Shape *shape, const agx::AffineMatrix4x4 &localTransform=agx::AffineMatrix4x4())
Add a shape to the geometry.
Collection of geometry group names and id's.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Data storage for a collection of entity instances of a specified EntityModel.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
Spawns new bodys inside a given volume.
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
The object defining a frame of reference and providing transformations operations.
Inheritance with partial specialization due to bug with ref_ptr containers.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Main material class which acts as a holder of a Surface Material and a Bulk material.
Book keeping of a body which can be merged with other bodies.
Representation of a name string.
Specialized types of matrices for holding orthogonal transformation matrices.
Pointer to a entity instance of type Physics.CollisionGroupSet.
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * transformAttribute
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * localTransformAttribute
Pointer to a entity instance of type Physics.Geometry.
Class that is a container of named properties.
void getRotate(T &angle, T &x, T &y, T &z) const
Get the angle and vector components represented by the quaternion.
Base class providing referencing counted objects.
Referenced()
Default constructor.
The rigid body class, combining a geometric model and a frame of reference.
Specialized type of matrices for holding symmetric positive definite matrices.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::SetVector< agx::ref_ptr< agxCollide::Geometry > > GeometryRefSetVector
agx::HashVector< const Geometry *, agx::observer_ptr< const Geometry > > GeometryHashVector
agx::HashSet< const Geometry * > GeometryHashSet
Contains classes for low level data storage for AGX.
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.
agx::SymmetricPair< agx::Physics::GeometryPtr > GeometryPair
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AffineMatrix4x4T< Real > AffineMatrix4x4
agx::ref_ptr< Material > MaterialRef
void AGXPHYSICS_EXPORT init()
Initialize agx.
agx::ref_ptr< Frame > FrameRef