|
AGX Dynamics 2.41.1.2
|
The geometry representation used by the collision detection engine. More...
#include <Geometry.h>
Inheritance diagram for agxCollide::Geometry:Public Types | |
| typedef CollisionGroupManager::GroupIdHash | GroupSet |
| Deprecated: Only for backward compatibility. | |
| typedef agx::Event1< Geometry * > | ShapeChangeEvent |
Public Member Functions | |
| Geometry (const agx::Name &name="") | |
| Constructor. | |
| Geometry (Shape *shape) | |
| Constructor. | |
| Geometry (Shape *shape, const agx::AffineMatrix4x4 &localShapeTransform) | |
| Constructor. | |
| bool | add (Shape *shape, const agx::AffineMatrix4x4 &localTransform=agx::AffineMatrix4x4()) |
| Add a shape to the geometry. | |
| 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 | 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 name. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxCollide::Geometry) | |
| agx::Vec3 | calculateCenterOfMassOffset () const |
| agx::SPDMatrix3x3 | calculateInertia (agx::Real mass) const |
| agx::Real | calculateMass () const |
| virtual agx::Vec3f | calculateSurfaceVelocity (const agxCollide::LocalContactPoint &point, size_t index) const |
| Implement this method to get access to different surface velocities on the geometry:s surface. | |
| agx::Real | calculateVolume () const |
| bool | canCollide (const Geometry *otherGeometry) const |
| Geometry * | clone (bool shallowCopyRenderData=false) const |
| This method will make a deep copy of the geometry, excluding membership in any RigidBody. | |
| void | cloneShapeRenderData (agxCollide::Shape *target, bool shallowCopy) const |
| Clone the shape render data from the geometry shape onto target shape. | |
| agxCollide::GroupIdCollection | findGroupIdCollection () const |
| virtual const BoundingAABB * | getBoundingVolume () const |
| The bounding volume for the geometry is made large enough to fit all shape bounds. | |
| agx::Referenced * | getCustomData () |
| const agx::Referenced * | getCustomData () const |
| bool | getEnable () const |
| Return whether the geometry should be used in intersection tests. | |
| bool | getEnableCollisions () const |
| bool | getEnableCollisions (const Geometry *otherGeometry) const |
| This method is only based on what is set using setEnableCollisions(). | |
| bool | getEnableMassProperties () const |
| agx::Physics::GeometryPtr | getEntity () const |
| agx::Frame * | getFrame () |
| const agx::Frame * | getFrame () const |
| const GroupSet & | getGroupIDs () const |
| const agx::Physics::CollisionGroupSetPtr & | getGroupSet () const |
| agx::Int64 | getId () const |
| agx::Vec3 | getLocalPosition () const |
| agx::Quat | getLocalRotation () const |
| const agx::AffineMatrix4x4 & | getLocalTransform () const |
| agx::Material * | getMaterial () |
| const agx::Material * | getMaterial () const |
| const agx::Name & | getName () const |
| Get the name. | |
| agx::Frame * | getParentFrame () |
| const agx::Frame * | getParentFrame () const |
| agx::Vec3 | getPosition () const |
| agx::PropertyContainer * | getPropertyContainer () |
| const agx::PropertyContainer * | getPropertyContainer () const |
| agx::RigidBody * | getRigidBody () |
| const agx::RigidBody * | getRigidBody () const |
| agx::Quat | getRotation () const |
| const ShapeRefVector & | getShapes () const |
| Space * | getSpace () |
| const Space * | getSpace () const |
| const agx::Vec3f & | getSurfaceVelocity () const |
| agx::UInt32 | getSweepAndPruneIndex () const |
| agx::AffineMatrix4x4 | getTransform () const |
| bool | hasGroup (agx::UInt32 id) const |
| This is performing a linear search among the collision group id for this Geometry. | |
| bool | hasGroup (const agx::Name &name) const |
| Searches for the named group name for this geometry and return true if it can be found. | |
| bool | hasPropertyContainer () const |
| bool | isEnabled () const |
| Alias for getEnable Return whether the geometry should be used in intersection tests. | |
| bool | isSensor () const |
| Return true if geometry is a sensor. | |
| bool | isSensorGeneratingContactData () const |
| bool | remove (Shape *shape) |
| Remove a shape from the geometry. | |
| bool | remove (size_t index) |
| Remove the i:th shape from the Geometry. | |
| void | removeAllGroups (bool forceContactUpdate=false) |
| Remove all collision group ids. | |
| void | removeGroup (agx::UInt32 id, bool forceContactUpdate=false) |
| Remove a collision group id from the vector of group ids. | |
| void | removeGroup (const agx::Name &name, bool forceContactUpdate=false) |
| Remove a named collision group from the vector of named group ids. | |
| void | removeMaterial () |
| Remove the material from the geometry. | |
| bool | replace (Shape *oldShape, Shape *newShape, const agx::AffineMatrix4x4 &localTransform=agx::AffineMatrix4x4()) |
| bool | replace (size_t shapeIndex, Shape *newShape, const agx::AffineMatrix4x4 &localTransform=agx::AffineMatrix4x4()) |
| Replace a shape in the geometry. | |
| bool | replaceShapeTransform (Shape *shape, const agx::AffineMatrix4x4 &newTransform) |
| Replace the shape transform for the specified shape. | |
| bool | replaceShapeTransform (size_t shapeIndex, const agx::AffineMatrix4x4 &newTransform) |
| Replace the shape transform for the specified shapeIndex. | |
| void | setCustomData (agx::Referenced *data) |
| Store a ref_ptr to a user custom data class, which must be inherited from Referenced. | |
| void | setEnable (bool flag) |
| Enable/disable collision testing for geometry. | |
| void | setEnableCollisions (bool collide) |
| Should this geometry collide with any other geometries. | |
| void | setEnableCollisions (const Geometry *otherGeometry, bool flag) |
Specify whether otherGeometry is allowed to collide with this geometry. | |
| void | setEnableMassProperties (bool enableMassProperties) |
| If set to true, this geometry will be included in mass property computation when part of a rigid body. | |
| void | setGroupSet (agx::Physics::CollisionGroupSetPtr set) |
| Set the collision group set of the geometry. | |
| void | setLocalPosition (agx::Real x, agx::Real y, agx::Real z) |
| Set the position of the geometry relative to its frame's parent frame. | |
| void | setLocalPosition (const agx::Vec3 &p) |
| Set the position of the geometry relative to its frame's parent frame. | |
| void | setLocalRotation (const agx::EulerAngles &e) |
| Set the rotation of the geometry relative to its frame's parent frame. | |
| void | setLocalRotation (const agx::Quat &q) |
| Set the rotation of the geometry relative to its frame's parent frame. | |
| void | setLocalTransform (const agx::AffineMatrix4x4 &matrix) |
| Assign the local transformation matrix for this geometry, ignoring any eventual parent transformation. | |
| void | setMaterial (agx::Material *material) |
| Set the material of the geometry. | |
| void | setName (const agx::Name &name) |
| Set the name of this Geometry. | |
| bool | setParentFrame (agx::Frame *frame) |
| Set the parent frame of this geometry's frame. | |
| void | setPosition (agx::Real x, agx::Real y, agx::Real z) |
| Set the position of the frame in world coordinates. | |
| void | setPosition (const agx::Vec3 &p) |
| Set the position of the frame in world coordinates. | |
| void | setPropertyContainer (agx::PropertyContainer *container) |
| Give this a new PropertyContainer. | |
| void | setRotation (const agx::EulerAngles &e) |
| Set the rotation of the geometry relative to world frame. | |
| void | setRotation (const agx::OrthoMatrix3x3 &m) |
| Set the rotation of the geometry relative to world frame. | |
| void | setRotation (const agx::Quat &q) |
| Set the rotation of the geometry relative to world frame. | |
| void | setSensor (bool flag, bool generateContactData=true) |
| Sets if the geometry should be a sensor. | |
| void | setSurfaceVelocity (const agx::Vec3f &surfaceVelocity) |
| Set the velocity of this geometry's surface in the geometry's local coordinate frame. | |
| void | setTransform (const agx::AffineMatrix4x4 &matrix) |
| Set the transform of the geometry. | |
| virtual void | shapeUpdated () |
| virtual void | updateBoundingVolume () |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. | |
| virtual const char * | getClassName () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. | |
| virtual StorageAgent * | getStorageAgent () const =0 |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. | |
Static Public Member Functions | |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. | |
Public Attributes | |
| ShapeChangeEvent | shapeChangeEvent |
Protected Member Functions | |
| virtual | ~Geometry () |
| Destructor. | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. | |
| Serializable (const Serializable &other) | |
| Copy constructor. | |
| void | generateUuid () |
Additional Inherited Members | |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
The geometry representation used by the collision detection engine.
A geometry may be a composite of multiple shapes with local transformations.
Internal to the physics engine, the only geometry considered is that used for interference detection. Because of the namespace, there should be no collision with any other name.
Definition at line 91 of file Geometry.h.
Deprecated: Only for backward compatibility.
Definition at line 333 of file Geometry.h.
Definition at line 94 of file Geometry.h.
| agxCollide::Geometry::Geometry | ( | const agx::Name & | name = "" | ) |
Constructor.
| name | - name of the geometry |
| agxCollide::Geometry::Geometry | ( | Shape * | shape | ) |
Constructor.
| shape | - pointer to a shape that will be part of this Geometry |
| agxCollide::Geometry::Geometry | ( | Shape * | shape, |
| const agx::AffineMatrix4x4 & | localShapeTransform | ||
| ) |
|
protectedvirtual |
Destructor.
| bool agxCollide::Geometry::add | ( | Shape * | shape, |
| const agx::AffineMatrix4x4 & | localTransform = agx::AffineMatrix4x4() |
||
| ) |
Add a shape to the geometry.
Will create an implicit shape group if needed.
| shape | The shape to add. |
| localTransform | The shape transformation in local geometry coordinates. |
| void agxCollide::Geometry::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.
By default a geometry is not part of any group.
This can be used to partition the simulation where some groups cannot collide with other groups. Which groups can collide or not is determined by Space and can be set using the method agxCollide::Space::setEnablePair(id1,id2);
This does not remove current contacts. To do this, forceContactUpdate should be set to true. This can be an expensive operation, so if repeated many times and issues might occur, it could be better to do this manually using Space::enableForContacts and Space::disableForContacts.
| void agxCollide::Geometry::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 name.
By default a geometry is not part of any group.
This can be used to partition the simulation where some groups cannot collide with other groups. Which groups can collide or not is determined by Space and can be set using the method agxCollide::Space::setEnablePair(name1,name2);
This does not remove current contacts. To do this, forceContactUpdate should be set to true. This can be an expensive operation, so if repeated many times and issues might occur, it could be better to do this manually using Space::enableForContacts and Space::disableForContacts.
| agxCollide::Geometry::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | agxCollide::Geometry | ) |
| agx::Vec3 agxCollide::Geometry::calculateCenterOfMassOffset | ( | ) | const |
| agx::SPDMatrix3x3 agxCollide::Geometry::calculateInertia | ( | agx::Real | mass | ) | const |
| agx::Real agxCollide::Geometry::calculateMass | ( | ) | const |
|
virtual |
Implement this method to get access to different surface velocities on the geometry:s surface.
One example would be to have a texture specifying a velocity field of the geometry
| point | - ContactPoint in world coordinates that can be used to calculate the surface velocity. |
| index | - Which geometry in the contact is this one? Valid values: 0 or 1. The normal in 'point' points in the direction that 0 has to move to leave the contact with 0. |
Reimplemented in agxModel::SurfaceVelocityConveyorBelt.
Definition at line 921 of file Geometry.h.
| agx::Real agxCollide::Geometry::calculateVolume | ( | ) | const |
| bool agxCollide::Geometry::canCollide | ( | const Geometry * | otherGeometry | ) | const |
this geometry CAN collide with otherGeometry.Following has to be true to make this method return true.
if they belong to a group pair that is not disabled g1 != g2. collisions for g1 is not disabled against g2 (g1->setEnableCollisions(g2, false) if they both have a body, that it is not the same body.
| Geometry * agxCollide::Geometry::clone | ( | bool | shallowCopyRenderData = false | ) | const |
This method will make a deep copy of the geometry, excluding membership in any RigidBody.
| void agxCollide::Geometry::cloneShapeRenderData | ( | agxCollide::Shape * | target, |
| bool | shallowCopy | ||
| ) | const |
Clone the shape render data from the geometry shape onto target shape.
|
inlinestatic |
Definition at line 417 of file Geometry.h.
| agxCollide::GroupIdCollection agxCollide::Geometry::findGroupIdCollection | ( | ) | const |
|
virtual |
The bounding volume for the geometry is made large enough to fit all shape bounds.
Definition at line 895 of file Geometry.h.
| agx::Referenced * agxCollide::Geometry::getCustomData | ( | ) |
| const agx::Referenced * agxCollide::Geometry::getCustomData | ( | ) | const |
| bool agxCollide::Geometry::getEnable | ( | ) | const |
Return whether the geometry should be used in intersection tests.
This can be set using the setEnable() method.
Definition at line 871 of file Geometry.h.
| bool agxCollide::Geometry::getEnableCollisions | ( | ) | const |
| bool agxCollide::Geometry::getEnableCollisions | ( | const Geometry * | otherGeometry | ) | const |
This method is only based on what is set using setEnableCollisions().
Any collision settings set by collision groups will not be taken into account. If you want to know if two geometries can collide at all, use canCollide().
geometry according to geometry pairs. | bool agxCollide::Geometry::getEnableMassProperties | ( | ) | const |
Definition at line 815 of file Geometry.h.
|
inline |
Definition at line 786 of file Geometry.h.
| agx::Frame * agxCollide::Geometry::getFrame | ( | ) |
Definition at line 885 of file Geometry.h.
| const agx::Frame * agxCollide::Geometry::getFrame | ( | ) | const |
Definition at line 890 of file Geometry.h.
| const GroupSet & agxCollide::Geometry::getGroupIDs | ( | ) | const |
| const agx::Physics::CollisionGroupSetPtr & agxCollide::Geometry::getGroupSet | ( | ) | const |
Definition at line 841 of file Geometry.h.
| agx::Int64 agxCollide::Geometry::getId | ( | ) | const |
Definition at line 800 of file Geometry.h.
| agx::Vec3 agxCollide::Geometry::getLocalPosition | ( | ) | const |
| agx::Quat agxCollide::Geometry::getLocalRotation | ( | ) | const |
| const agx::AffineMatrix4x4 & agxCollide::Geometry::getLocalTransform | ( | ) | const |
| agx::Material * agxCollide::Geometry::getMaterial | ( | ) |
Definition at line 856 of file Geometry.h.
| const agx::Material * agxCollide::Geometry::getMaterial | ( | ) | const |
Definition at line 851 of file Geometry.h.
| const agx::Name & agxCollide::Geometry::getName | ( | ) | const |
Get the name.
| agx::Frame * agxCollide::Geometry::getParentFrame | ( | ) |
| const agx::Frame * agxCollide::Geometry::getParentFrame | ( | ) | const |
| agx::Vec3 agxCollide::Geometry::getPosition | ( | ) | const |
Definition at line 935 of file Geometry.h.
| agx::PropertyContainer * agxCollide::Geometry::getPropertyContainer | ( | ) |
Definition at line 901 of file Geometry.h.
Referenced by agxSDK::PropertyFilter::match().
| const agx::PropertyContainer * agxCollide::Geometry::getPropertyContainer | ( | ) | const |
Definition at line 913 of file Geometry.h.
| agx::RigidBody * agxCollide::Geometry::getRigidBody | ( | ) |
Definition at line 790 of file Geometry.h.
Referenced by agxCollide::LocalGeometryContact::LocalGeometryContact(), agxCollide::GeometryContact::calculateRelativeVelocity(), agxSDK::MergeSplitHandler::getProperties(), agxCollide::LocalGeometryContact::init(), agxSDK::matchFilter(), and agxCollide::GeometryContact::rigidBody().
| const agx::RigidBody * agxCollide::Geometry::getRigidBody | ( | ) | const |
Definition at line 795 of file Geometry.h.
| agx::Quat agxCollide::Geometry::getRotation | ( | ) | const |
Definition at line 943 of file Geometry.h.
References agx::QuatT< T >::getRotate().
| const ShapeRefVector & agxCollide::Geometry::getShapes | ( | ) | const |
Referenced by agxWire::transformPointToShape(), agxWire::transformPointToWorld(), agxWire::transformVectorToShape(), and agxWire::transformVectorToWorld().
| Space * agxCollide::Geometry::getSpace | ( | ) |
Definition at line 876 of file Geometry.h.
| const Space * agxCollide::Geometry::getSpace | ( | ) | const |
Definition at line 880 of file Geometry.h.
| const agx::Vec3f & agxCollide::Geometry::getSurfaceVelocity | ( | ) | const |
Definition at line 866 of file Geometry.h.
| agx::UInt32 agxCollide::Geometry::getSweepAndPruneIndex | ( | ) | const |
Definition at line 826 of file Geometry.h.
| agx::AffineMatrix4x4 agxCollide::Geometry::getTransform | ( | ) | const |
Definition at line 926 of file Geometry.h.
| bool agxCollide::Geometry::hasGroup | ( | agx::UInt32 | id | ) | const |
This is performing a linear search among the collision group id for this Geometry.
| id | - The group id we are looking for. |
id Definition at line 831 of file Geometry.h.
Referenced by agxSDK::CollisionGroupFilter::hasMemberGroup().
| bool agxCollide::Geometry::hasGroup | ( | const agx::Name & | name | ) | const |
Searches for the named group name for this geometry and return true if it can be found.
| name | - The group id we are looking for. |
name Definition at line 836 of file Geometry.h.
| bool agxCollide::Geometry::hasPropertyContainer | ( | ) | const |
Definition at line 908 of file Geometry.h.
Referenced by agxSDK::PropertyFilter::match().
| bool agxCollide::Geometry::isEnabled | ( | ) | const |
Alias for getEnable Return whether the geometry should be used in intersection tests.
This can be set using the setEnable() method.
Definition at line 805 of file Geometry.h.
Referenced by agxCollide::Space::reportOverlap().
| bool agxCollide::Geometry::isSensor | ( | ) | const |
Return true if geometry is a sensor.
Definition at line 810 of file Geometry.h.
|
inline |
Definition at line 821 of file Geometry.h.
| bool agxCollide::Geometry::remove | ( | Shape * | shape | ) |
Remove a shape from the geometry.
| bool agxCollide::Geometry::remove | ( | size_t | index | ) |
| void agxCollide::Geometry::removeAllGroups | ( | bool | forceContactUpdate = false | ) |
Remove all collision group ids.
| forceContactUpdate | - Should current overlaps between disabled groups be found and create impacts. |
| void agxCollide::Geometry::removeGroup | ( | agx::UInt32 | id, |
| bool | forceContactUpdate = false |
||
| ) |
Remove a collision group id from the vector of group ids.
| id | - The group id to be removed |
| forceContactUpdate | - Should current overlaps between disabled groups be found and create impacts. |
| void agxCollide::Geometry::removeGroup | ( | const agx::Name & | name, |
| bool | forceContactUpdate = false |
||
| ) |
Remove a named collision group from the vector of named group ids.
| name | - The group id to be removed |
| forceContactUpdate | - Should current overlaps between disabled groups be found and create impacts. |
| void agxCollide::Geometry::removeMaterial | ( | ) |
Remove the material from the geometry.
| bool agxCollide::Geometry::replace | ( | Shape * | oldShape, |
| Shape * | newShape, | ||
| const agx::AffineMatrix4x4 & | localTransform = agx::AffineMatrix4x4() |
||
| ) |
| bool agxCollide::Geometry::replace | ( | size_t | shapeIndex, |
| Shape * | newShape, | ||
| const agx::AffineMatrix4x4 & | localTransform = agx::AffineMatrix4x4() |
||
| ) |
Replace a shape in the geometry.
| bool agxCollide::Geometry::replaceShapeTransform | ( | Shape * | shape, |
| const agx::AffineMatrix4x4 & | newTransform | ||
| ) |
Replace the shape transform for the specified shape.
| shape | - The shape for which the transform should be replaced. |
| newTransform | - The new transform |
shape is valid. | bool agxCollide::Geometry::replaceShapeTransform | ( | size_t | shapeIndex, |
| const agx::AffineMatrix4x4 & | newTransform | ||
| ) |
Replace the shape transform for the specified shapeIndex.
| shapeIndex | - Index of the transform that should be replaced. Valid values are 0..numShapes-1 |
| newTransform | - The new transform |
shapeIndex is valid. | void agxCollide::Geometry::setCustomData | ( | agx::Referenced * | data | ) |
Store a ref_ptr to a user custom data class, which must be inherited from Referenced.
| void agxCollide::Geometry::setEnable | ( | bool | flag | ) |
Enable/disable collision testing for geometry.
A disabled geometry does not render in debug rendering or osg.
| void agxCollide::Geometry::setEnableCollisions | ( | bool | collide | ) |
Should this geometry collide with any other geometries.
Disabling this still means that it will be part of MassProperty calculations if it belongs to a rigid body.
| collide | - If false this geometry will not generate any contacts with any other geometry |
| void agxCollide::Geometry::setEnableCollisions | ( | const Geometry * | otherGeometry, |
| bool | flag | ||
| ) |
Specify whether otherGeometry is allowed to collide with this geometry.
| void agxCollide::Geometry::setEnableMassProperties | ( | bool | enableMassProperties | ) |
If set to true, this geometry will be included in mass property computation when part of a rigid body.
(default==true)
| enableMassProperties | - If true this geometry will contribute to mass properties for a rigid body |
| void agxCollide::Geometry::setGroupSet | ( | agx::Physics::CollisionGroupSetPtr | set | ) |
Set the collision group set of the geometry.
| set | - the collision group set to set on the geometry. |
Definition at line 846 of file Geometry.h.
Set the position of the geometry relative to its frame's parent frame.
| x | - local x translate |
| y | - local y translate |
| z | - local z translate |
| void agxCollide::Geometry::setLocalPosition | ( | const agx::Vec3 & | p | ) |
Set the position of the geometry relative to its frame's parent frame.
| p | - local translate of geometry as a 3D vector |
| void agxCollide::Geometry::setLocalRotation | ( | const agx::EulerAngles & | e | ) |
Set the rotation of the geometry relative to its frame's parent frame.
| e | - rotation given as Euler angles |
| void agxCollide::Geometry::setLocalRotation | ( | const agx::Quat & | q | ) |
Set the rotation of the geometry relative to its frame's parent frame.
| q | - rotation given as a quaternion |
| void agxCollide::Geometry::setLocalTransform | ( | const agx::AffineMatrix4x4 & | matrix | ) |
Assign the local transformation matrix for this geometry, ignoring any eventual parent transformation.
| matrix | - transformation matrix relative to parent transform for the geometry's frame |
| void agxCollide::Geometry::setMaterial | ( | agx::Material * | material | ) |
Set the material of the geometry.
| bool agxCollide::Geometry::setParentFrame | ( | agx::Frame * | frame | ) |
Set the parent frame of this geometry's frame.
This means that getLocalTranslate, getLocalRotate, getLocalTransform will be given in the parents coordinate frame. I.e., this frame's transformation will be concatenated with the parents.
| frame | - new parent frame, 0 to remove parent |
Set the position of the frame in world coordinates.
| x | - desired x-coordinate in world frame |
| y | - desired y-coordinate in world frame |
| z | - desired z-coordinate in world frame |
| void agxCollide::Geometry::setPosition | ( | const agx::Vec3 & | p | ) |
Set the position of the frame in world coordinates.
| p | - desired position in world coordinates. |
| void agxCollide::Geometry::setPropertyContainer | ( | agx::PropertyContainer * | container | ) |
Give this a new PropertyContainer.
| container | - The new PropertyContainer of this instance. |
| void agxCollide::Geometry::setRotation | ( | const agx::EulerAngles & | e | ) |
Set the rotation of the geometry relative to world frame.
| e | - rotation given as Euler angles |
| void agxCollide::Geometry::setRotation | ( | const agx::OrthoMatrix3x3 & | m | ) |
Set the rotation of the geometry relative to world frame.
| m | - rotation given as an orthogonal transformation matrix |
| void agxCollide::Geometry::setRotation | ( | const agx::Quat & | q | ) |
Set the rotation of the geometry relative to world frame.
| q | - rotation given as a quaternion |
| void agxCollide::Geometry::setSensor | ( | bool | flag, |
| bool | generateContactData = true |
||
| ) |
Sets if the geometry should be a sensor.
Sensors are included in collision detection but the resulting contacts are not passed to the solver.
Contact data generation for sensors is disabled by passing false into generateContactData. GeometryContacts are still created, but they will contain no contact points. This flag has no effect while isSensor returns false. Support for disabling contact data generation is currently only supported for some shape type pairs. Other shape type pairs will continue to get full contact data.
| flag | - True to make this Geometry a sensor. |
| generateContactData | - True if contact data is to be generated, false otherwise. False only supported for some shape type pairs. |
| void agxCollide::Geometry::setSurfaceVelocity | ( | const agx::Vec3f & | surfaceVelocity | ) |
Set the velocity of this geometry's surface in the geometry's local coordinate frame.
If this velocity is non-zero the constraints will try to achieve the relative velocity between the objects (in the friction plane) to be the wanted surface velocity.
| surfaceVelocity | - velocity given in geometry's local coordinate frame |
Definition at line 861 of file Geometry.h.
| void agxCollide::Geometry::setTransform | ( | const agx::AffineMatrix4x4 & | matrix | ) |
Set the transform of the geometry.
Its frame will move to the specified transform, which is given in world coordintaes.
| matrix | - desired transform for the frame in world coordinates. |
|
virtual |
|
virtual |
| ShapeChangeEvent agxCollide::Geometry::shapeChangeEvent |
Definition at line 95 of file Geometry.h.