54 class LocalContactPoint;
209 bool isEnabled()
const;
216 bool getEnable()
const;
232 void setSensor(
bool flag,
bool generateContactData =
true);
237 bool isSensor()
const;
243 bool isSensorGeneratingContactData()
const;
255 bool getEnableMassProperties()
const;
319 bool hasGroup(
const agx::Name& name )
const;
398 bool hasPropertyContainer()
const;
414 const Space* getSpace()
const;
441 void setSurfaceVelocity(
const agx::Vec3f& surfaceVelocity );
641 const
Shape *getShape() const;
648 bool setShape(
Shape *shape);
656 bool remove(
size_t index );
666 bool replace(
size_t shapeIndex,
Shape *newShape, const
agx::AffineMatrix4x4& localTransform =
agx::AffineMatrix4x4());
667 bool replace(
Shape *oldShape,
Shape *newShape, const
agx::AffineMatrix4x4& localTransform =
agx::AffineMatrix4x4());
675 bool replaceShapeTransform(
size_t shapeIndex, const
agx::AffineMatrix4x4& newTransform );
683 bool replaceShapeTransform(
Shape *shape, const
agx::AffineMatrix4x4& newTransform );
699 friend class
agx::Emitter;
700 friend class
agx::RigidBody;
702 friend class GeometryGroup;
708 void propagateTransform();
709 void updateFrameStorage();
710 ShapeGroup *createWrapperGroup();
712 void init(const
agx::Name& name);
714 mutable
agx::PropertyContainerRef m_propertyContainer;
716 void setBody(
agx::RigidBody *body, const
agx::AffineMatrix4x4& invBodyTransform );
725 bool setSpace(
Space* space,
agx::Int64
id );
727 void setSweepAndPruneIndex(
agx::UInt32 index );
728 void setEntity(
agx::Physics::GeometryPtr entity );
730 void transfer(
agxData::EntityStorage *storage );
732 size_t findShapeIndex(
Shape *shape);
734 void enableCollisionsWithGroup(
agx::UInt32 groupId);
735 void disableCollisionsWithGroup(
agx::UInt32 groupId);
738 friend class
agx::InternalData;
742 agx::Referenced* getInternalData() const;
747 void setInternalData(
agx::Referenced* data );
754 agx::RigidBody * m_rigidBody;
757 agx::MaterialRef m_material;
761 agx::FrameRef m_frame;
762 agx::ref_ptr<
agx::Referenced> m_customData;
763 agx::ref_ptr<
agx::Referenced> m_internalData;
764 agx::observer_ptr<
agx::RigidBody> m_originalBody;
783 return const_cast<Geometry *
>( this )->getShape();
807 return m_entity.state().enabled();
812 return m_entity.state().sensor();
817 return m_entity.state().enableMassProperties();
821 inline bool Geometry::isSensorGeneratingContactData()
const
823 return !m_entity.state().booleanSensor();
828 return m_entity.sweepAndPruneIndex();
833 return CollisionGroupManager::hasGroup(m_entity.collisionGroupSet(),
id);
838 return CollisionGroupManager::hasGroup(m_entity.collisionGroupSet(), name);
843 return m_entity.collisionGroupSet();
848 m_entity.collisionGroupSet() = set;
863 m_entity.surfaceVelocity() = surfaceVelocity;
868 return m_entity.surfaceVelocity();
873 return m_entity.state().enabled();
887 return m_frame.get();
892 return m_frame.get();
897 return &m_entity.boundingAABB();
903 if ( !m_propertyContainer )
905 return m_propertyContainer;
910 return ( m_propertyContainer.isValid() );
915 if ( !m_propertyContainer )
918 return m_propertyContainer;
923 return getSurfaceVelocity();
929 return m_entity.transform();
931 return m_frame->getMatrix();
938 return m_entity.transform().getTranslate();
940 return m_frame->getTranslate();
947 return m_frame->getRotate();
957 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.
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.
void setLocalTransform(const agx::AffineMatrix4x4 &matrix)
Assign the local transformation matrix for this geometry, ignoring any eventual parent transformation...
const GroupSet & getGroupIDs() const
const agx::Frame * getParentFrame() const
const agx::Name & getName() const
Get the name.
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.
Geometry * clone(bool shallowCopyRenderData=false) const
This method will make a deep copy of the geometry, excluding membership in any RigidBody.
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.
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 setEnableMassProperties(bool enableMassProperties)
If set to true, this geometry will be included in mass property computation when part of a rigid body...
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
agx::Referenced * getCustomData()
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()
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
void removeGroup(const agx::Name &name, bool forceContactUpdate=false)
Remove a named collision group from the vector of named group ids.
Geometry(Shape *shape, const agx::AffineMatrix4x4 &localShapeTransform)
Constructor.
const agx::Referenced * getCustomData() const
bool getEnableCollisions(const Geometry *otherGeometry) const
This method is only based on what is set using setEnableCollisions().
agx::Frame * getParentFrame()
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.
const agx::AffineMatrix4x4 & getLocalTransform() const
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...
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...
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
An event with one argument.
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.
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.
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...
Contains classes for low level data storage for AGX.
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.