46 class MergeSplitBodyStorage;
55 class LocalContactPoint;
124 Geometry *clone(
bool shallowCopyRenderData=
false )
const;
168 void removeMaterial();
189 agx::Vec3 calculateCenterOfMassOffset()
const;
202 void setEnable(
bool flag );
210 bool isEnabled()
const;
217 bool getEnable()
const;
233 void setSensor(
bool flag,
bool generateContactData =
true);
238 bool isSensor()
const;
244 bool isSensorGeneratingContactData()
const;
251 void setEnableMassProperties(
bool enableMassProperties);
256 bool getEnableMassProperties()
const;
304 void removeAllGroups(
bool forceContactUpdate =
false);
320 bool hasGroup(
const agx::Name& name )
const;
335 const GroupSet& getGroupIDs()
const;
348 bool getEnableCollisions(
const Geometry* otherGeometry )
const;
360 bool getEnableCollisions()
const;
373 bool canCollide(
const Geometry *otherGeometry )
const;
399 bool hasPropertyContainer()
const;
415 const Space* getSpace()
const;
454 void setSurfaceVelocity(
const agx::Vec3f& surfaceVelocity );
465 virtual void updateBoundingVolume();
470 virtual void shapeUpdated();
515 void setLocalPosition(
const agx::Vec3& p );
552 void setLocalRotation(
const agx::Quat& q );
627 bool remove(
Shape *shape );
654 const
Shape *getShape() const;
661 bool setShape(
Shape *shape);
669 bool remove(
size_t index );
680 bool replace(
Shape *oldShape,
Shape *newShape, const
agx::AffineMatrix4x4& localTransform =
agx::AffineMatrix4x4());
688 bool replaceShapeTransform(
size_t shapeIndex, const
agx::AffineMatrix4x4& newTransform );
696 bool replaceShapeTransform(
Shape *shape, const
agx::AffineMatrix4x4& newTransform );
703 void cloneShapeRenderData(agxCollide::
Shape* target,
bool shallowCopy) const;
716 MergeSplitProperties();
719 void setEnableSplit(
bool flag );
722 bool getEnableSplit( )
const;
727 void setEnableMerge(
bool flag );
731 bool getEnableMerge( )
const;
738 void setForceSplitInPreStep(
bool flag );
742 bool getForceSplitInPreStep( )
const;
771 friend class GeometryGroup;
774 friend class agxCollide::ShapeGroup;
777 void propagateTransform();
778 void updateFrameStorage();
779 ShapeGroup *createWrapperGroup();
806 size_t findShapeIndex(
Shape *shape);
808 void enableCollisionsWithGroup(
agx::UInt32 groupId);
809 void disableCollisionsWithGroup(
agx::UInt32 groupId);
812 friend class
agx::InternalData;
828 agx::RigidBody * m_rigidBody;
833 mutable GeometryHashVector m_disabledCollisionsHash;
838 agx::observer_ptr<
agx::RigidBody> m_originalBody;
845 static GroupSet s_emptySet;
858 return const_cast<Geometry *
>( this )->getShape();
882 return m_entity.state().enabled();
887 return m_entity.state().sensor();
892 return m_entity.state().enableMassProperties();
896 inline bool Geometry::isSensorGeneratingContactData()
const 898 return !m_entity.state().booleanSensor();
903 return m_entity.sweepAndPruneIndex();
908 return CollisionGroupManager::hasGroup(m_entity.collisionGroupSet(), id);
913 return CollisionGroupManager::hasGroup(m_entity.collisionGroupSet(), name);
918 return m_entity.collisionGroupSet();
923 m_entity.collisionGroupSet() =
set;
938 m_entity.surfaceVelocity() = surfaceVelocity;
943 return m_entity.surfaceVelocity();
948 m_originalBody = body;
953 return m_originalBody.get() ? m_originalBody.get() : m_rigidBody;
958 return m_originalBody.get() ? m_originalBody.get() : m_rigidBody;
963 return m_entity.state().enabled();
977 return m_frame.get();
982 return m_frame.get();
987 return &m_entity.boundingAABB();
993 if ( !m_propertyContainer )
995 return m_propertyContainer;
1000 return ( m_propertyContainer.
isValid() );
1005 if ( !m_propertyContainer )
1008 return m_propertyContainer;
1013 return getSurfaceVelocity();
1018 return m_msProperties;
1022 return m_msProperties;
1027 m_flags[ENABLE_SPLIT] = flag;
1031 return m_flags[ENABLE_SPLIT];
1036 m_flags[ENABLE_MERGE] = flag;
1041 return m_flags[ENABLE_MERGE];
1046 m_flags[FORCE_SPLIT_IN_PRE] = flag;
1051 return m_flags[FORCE_SPLIT_IN_PRE];
1058 return m_entity.transform();
1060 return m_frame->getMatrix();
1067 return m_entity.transform().getTranslate();
1069 return m_frame->getTranslate();
1075 return m_entity.transform().
getRotate();
1076 return m_frame->getRotate();
1086 return m_internalData;
void getRotate(T &angle, T &x, T &y, T &z) const
Get the angle and vector components represented by the quaternion.
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API...
Inheritance with partial specialization due to bug with ref_ptr containers.
AffineMatrix4x4T< Real > AffineMatrix4x4
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a) ...
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
Data storage for a collection of entity instances of a specified EntityModel.
agx::SymmetricPair< agx::Physics::GeometryPtr > GeometryPair
This namespace consists of a set of classes for handling geometric intersection tests including boole...
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes...
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
agx::HashVector< const Geometry *, agx::observer_ptr< const Geometry > > GeometryHashVector
agx::ref_ptr< Frame > FrameRef
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * localTransformAttribute
#define AGX_DECLARE_POINTER_TYPES(type)
Representation of a name string.
agx::Event1< Geometry * > ShapeChangeEvent
Spawns new bodys inside a given volume.
Pointer to a entity instance of type Physics.CollisionGroupSet.
agx::ref_ptr< Material > MaterialRef
Base class providing referencing counted objects.
ShapeChangeEvent shapeChangeEvent
The geometry representation used by the collision detection engine.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
agx::SetVector< agx::ref_ptr< agxCollide::Geometry > > GeometryRefSetVector
AGXPHYSICS_EXPORT void addGroup(const agx::RigidBody *body, unsigned id)
For the specified body, add the collision group ID to its geometries.
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
Class that is a container of named properties.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Pointer to a entity instance of type Physics.Geometry.
Collection of geometry group names and id's.
Specialized type of matrices for holding symmetric positive definite matrices.
Contains classes for low level data storage for AGX.
agx::HashSet< const Geometry *> GeometryHashSet
Specify MergeSplit properties for a Geometry.
The rigid body class, combining a geometric model and a frame of reference.
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.
AGXPHYSICS_EXPORT bool setEnableCollisions(agx::RigidBody *rb1, agx::RigidBody *rb2, bool enable)
Enable or disable the collision between all geometries in RigidBody rb1 and RigidBody rb2...
The object defining a frame of reference and providing transformations operations.
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * transformAttribute
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
AGXPHYSICS_EXPORT void removeGroup(const agx::RigidBody *body, unsigned id)
For the specified body, remove the collision group ID to its geometries.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
CollisionGroupManager::GroupIdHash GroupSet
Deprecated: Only for backward compatibility.
#define AGX_DECLARE_VECTOR_TYPES(type)
Axis aligned bounding box implementation.
Referenced()
Default constructor.
#define DOXYGEN_END_INTERNAL_BLOCK()
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
#define DOXYGEN_START_INTERNAL_BLOCK()
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.
Specialized types of matrices for holding orthogonal transformation matrices.