|
AGXDynamics
2.31.1.0
|
The geometry representation used by the collision detection engine. More...
#include <Geometry.h>
Inheritance diagram for agxCollide::Geometry:Classes | |
| class | MergeSplitProperties |
| Specify MergeSplit properties for a Geometry. More... | |
Public Types | |
| typedef agx::Event1< Geometry * > | ShapeChangeEvent |
Public Member Functions | |
| Geometry (const agx::Name &name="") | |
| Constructor. More... | |
| Geometry (Shape *shape) | |
| Constructor. More... | |
| Geometry (Shape *shape, const agx::AffineMatrix4x4 &localShapeTransform) | |
| Constructor. More... | |
| 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. More... | |
| 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. More... | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| agx::Vec3 | calculateCenterOfMassOffset () const |
| agx::SPDMatrix3x3 | calculateInertia (agx::Real mass) const |
| agx::Real | calculateMass () const |
| agx::Real | calculateVolume () const |
| Geometry * | clone () const |
| This method will make a deep copy of the geometry, excluding membership in any RigidBody. More... | |
| bool | getEnable () const |
| Return whether the geometry should be used in intersection tests. More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::Int64 | getId () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Material * | getMaterial () |
| const agx::Material * | getMaterial () const |
| const agx::Name & | getName () const |
| Get the name. More... | |
| int | getReferenceCount () const |
| agx::RigidBody * | getRigidBody () |
| const agx::RigidBody * | getRigidBody () const |
| agx::Uuid | getUuid () const |
| bool | hasGroup (agx::UInt32 id) const |
| This is performing a linear search among the collision group id for this Geometry. More... | |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isEnabled () const |
| Alias for getEnable Return whether the geometry should be used in intersection tests. More... | |
| bool | isFinished () const |
| bool | isSensor () const |
| Return true if geometry is a sensor. More... | |
| bool | isSensorGeneratingContactData () const |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | removeAllGroups (bool forceContactUpdate=false) |
| Remove all collision group ids. More... | |
| void | removeGroup (agx::UInt32 id, bool forceContactUpdate=false) |
| Remove a collision group id from the vector of group ids. More... | |
| void | removeGroup (const agx::Name &name, bool forceContactUpdate=false) |
| Remove a named collision group from the vector of named group ids. More... | |
| void | removeMaterial () |
| Remove the material from the geometry. More... | |
| void | setEnable (bool flag) |
| Enable/disable collision testing for geometry. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setMaterial (agx::Material *material) |
| Set the material of the geometry. More... | |
| void | setName (const agx::Name &name) |
| Set the name of this Geometry. More... | |
| void | setSensor (bool flag, bool generateContactData=true) |
| Sets if the geometry should be a sensor. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Public Attributes | |
| ShapeChangeEvent | shapeChangeEvent |
Protected Member Functions | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
for this geometry and return true if it can be found. | |||
| |||
| typedef CollisionGroupManager::GroupIdHash | GroupSet | ||
| Deprecated: Only for backward compatibility. More... | |||
| bool | hasGroup (const agx::Name &name) const | ||
| const agx::Physics::CollisionGroupSetPtr & | getGroupSet () const | ||
| const GroupSet & | getGroupIDs () const | ||
| void | setEnableCollisions (const Geometry *otherGeometry, bool flag) | ||
Specify whether otherGeometry is allowed to collide with this geometry. More... | |||
| bool | getEnableCollisions (const Geometry *otherGeometry) const | ||
| void | setEnableCollisions (bool collide) | ||
| Should this geometry collide with any other geometries. More... | |||
| bool | getEnableCollisions () const | ||
| bool | canCollide (const Geometry *otherGeometry) 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. More... | |||
| virtual const BoundingAABB * | getBoundingVolume () const | ||
| The bounding volume for the geometry is made large enough to fit all shape bounds. More... | |||
| agx::PropertyContainer * | getPropertyContainer () | ||
| const agx::PropertyContainer * | getPropertyContainer () const | ||
| bool | hasPropertyContainer () const | ||
| void | setPropertyContainer (agx::PropertyContainer *container) | ||
| Give this a new PropertyContainer. More... | |||
| Space * | getSpace () | ||
| const Space * | getSpace () const | ||
| agxStream::StorageAgent * | getStorageAgent () const override | ||
| const char * | getClassName () const override | ||
| virtual void | store (agxStream::OutputArchive &out) const override | ||
| virtual void | restore (agxStream::InputArchive &in) override | ||
| agx::Referenced * | getCustomData () | ||
| const agx::Referenced * | getCustomData () const | ||
| void | setCustomData (agx::Referenced *data) | ||
| Store a ref_ptr to a user custom data class, which must be inherited from Referenced. More... | |||
| agx::RigidBody * | getOriginalBody () | ||
| This method is guaranteed to always return the same value as getRigidBody() if MergeSplit is not in use. More... | |||
| const agx::RigidBody * | getOriginalBody () const | ||
| This method is guaranteed to always return the same value as getRigidBody() if MergeSplit is not in use. More... | |||
| void | setSurfaceVelocity (const agx::Vec3f &surfaceVelocity) | ||
| Set the velocity of this geometry's surface in the geometry's local coordinate frame. More... | |||
| const agx::Vec3f & | getSurfaceVelocity () const | ||
| agx::UInt32 | getSweepAndPruneIndex () const | ||
| virtual void | updateBoundingVolume () | ||
| agx::Physics::GeometryPtr | getEntity () const | ||
| virtual void | shapeUpdated () | ||
| agxCollide::GroupIdCollection | findGroupIdCollection () const | ||
| agx::Frame * | getFrame () | ||
| const agx::Frame * | getFrame () const | ||
| void | setTransform (const agx::AffineMatrix4x4 &matrix) | ||
| Set the transform of the geometry. More... | |||
| const agx::AffineMatrix4x4 & | getLocalTransform () const | ||
| void | setLocalTransform (const agx::AffineMatrix4x4 &matrix) | ||
| Assign the local transformation matrix for this geometry, ignoring any eventual parent transformation. More... | |||
| agx::Vec3 | getLocalPosition () const | ||
| void | setLocalPosition (const agx::Vec3 &p) | ||
| Set the position of the geometry relative to its frame's parent frame. More... | |||
| void | setLocalPosition (agx::Real x, agx::Real y, agx::Real z) | ||
| Set the position of the geometry relative to its frame's parent frame. More... | |||
| void | setRotation (const agx::Quat &q) | ||
| Set the rotation of the geometry relative to world frame. More... | |||
| void | setRotation (const agx::EulerAngles &e) | ||
| Set the rotation of the geometry relative to world frame. More... | |||
| void | setRotation (const agx::OrthoMatrix3x3 &m) | ||
| Set the rotation of the geometry relative to world frame. More... | |||
| agx::Quat | getLocalRotation () const | ||
| void | setLocalRotation (const agx::Quat &q) | ||
| Set the rotation of the geometry relative to its frame's parent frame. More... | |||
| void | setLocalRotation (const agx::EulerAngles &e) | ||
| Set the rotation of the geometry relative to its frame's parent frame. More... | |||
| agx::Frame * | getParentFrame () | ||
| const agx::Frame * | getParentFrame () const | ||
| bool | setParentFrame (agx::Frame *frame) | ||
| Set the parent frame of this geometry's frame. More... | |||
| void | setPosition (const agx::Vec3 &p) | ||
| Set the position of the frame in world coordinates. More... | |||
| void | setPosition (agx::Real x, agx::Real y, agx::Real z) | ||
| Set the position of the frame in world coordinates. More... | |||
| agx::AffineMatrix4x4 | getTransform () const | ||
| agx::Vec3 | getPosition () const | ||
| agx::Quat | getRotation () const | ||
| bool | add (Shape *shape, const agx::AffineMatrix4x4 &localTransform=agx::AffineMatrix4x4()) | ||
| Add a shape to the geometry. More... | |||
| bool | remove (Shape *shape) | ||
| Remove a shape from the geometry. More... | |||
| bool | remove (size_t index) | ||
| Remove the i:th shape from the Geometry. More... | |||
| const ShapeRefVector & | getShapes () const | ||
| bool | replace (size_t shapeIndex, Shape *newShape, const agx::AffineMatrix4x4 &localTransform=agx::AffineMatrix4x4()) | ||
| Replace a shape in the geometry. More... | |||
| bool | replace (Shape *oldShape, Shape *newShape, const agx::AffineMatrix4x4 &localTransform=agx::AffineMatrix4x4()) | ||
| bool | replaceShapeTransform (size_t shapeIndex, const agx::AffineMatrix4x4 &newTransform) | ||
| Replace the shape transform for the specified shapeIndex. More... | |||
| bool | replaceShapeTransform (Shape *shape, const agx::AffineMatrix4x4 &newTransform) | ||
| Replace the shape transform for the specified shape. More... | |||
| MergeSplitProperties & | getMergeSplitProperties () | ||
| const MergeSplitProperties & | getMergeSplitProperties () const | ||
| static const char * | getConstructClassId () | ||
| static agxStream::Serializable * | create () | ||
| static agxStream::Serializable * | create (agxStream::InputArchive &) | ||
| virtual | ~Geometry () | ||
| Destructor. More... | |||
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 88 of file Geometry.h.
Deprecated: Only for backward compatibility.
Definition at line 311 of file Geometry.h.
Definition at line 91 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.
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.
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| 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 967 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 | ( | ) | const |
This method will make a deep copy of the geometry, excluding membership in any RigidBody.
|
inlinestatic |
Definition at line 392 of file Geometry.h.
|
inlinestatic |
Definition at line 392 of file Geometry.h.
|
protectedinherited |
| agxCollide::GroupIdCollection agxCollide::Geometry::findGroupIdCollection | ( | ) | const |
|
protectedinherited |
|
virtual |
The bounding volume for the geometry is made large enough to fit all shape bounds.
Definition at line 941 of file Geometry.h.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Reimplemented in agxModel::SurfaceVelocityConveyorBelt.
Definition at line 392 of file Geometry.h.
|
inlinestatic |
Definition at line 392 of file Geometry.h.
| agx::Referenced* agxCollide::Geometry::getCustomData | ( | ) |
| const agx::Referenced* agxCollide::Geometry::getCustomData | ( | ) | const |
|
staticprotectedinherited |
| 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 917 of file Geometry.h.
| bool agxCollide::Geometry::getEnableCollisions | ( | const Geometry * | otherGeometry | ) | const |
geometry. | bool agxCollide::Geometry::getEnableCollisions | ( | ) | const |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inline |
Definition at line 828 of file Geometry.h.
Referenced by agxCollide::GeometryContact::geometry().
| agx::Frame * agxCollide::Geometry::getFrame | ( | ) |
Definition at line 931 of file Geometry.h.
| const agx::Frame * agxCollide::Geometry::getFrame | ( | ) | const |
Definition at line 936 of file Geometry.h.
| const GroupSet& agxCollide::Geometry::getGroupIDs | ( | ) | const |
| const agx::Physics::CollisionGroupSetPtr & agxCollide::Geometry::getGroupSet | ( | ) | const |
Definition at line 877 of file Geometry.h.
| agx::Int64 agxCollide::Geometry::getId | ( | ) | const |
Definition at line 842 of file Geometry.h.
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.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 887 of file Geometry.h.
| const agx::Material * agxCollide::Geometry::getMaterial | ( | ) | const |
Definition at line 882 of file Geometry.h.
| Geometry::MergeSplitProperties & agxCollide::Geometry::getMergeSplitProperties | ( | ) |
Definition at line 972 of file Geometry.h.
| const Geometry::MergeSplitProperties & agxCollide::Geometry::getMergeSplitProperties | ( | ) | const |
Definition at line 976 of file Geometry.h.
| const agx::Name& agxCollide::Geometry::getName | ( | ) | const |
Get the name.
| agx::RigidBody * agxCollide::Geometry::getOriginalBody | ( | ) |
This method is guaranteed to always return the same value as getRigidBody() if MergeSplit is not in use.
Definition at line 907 of file Geometry.h.
| const agx::RigidBody * agxCollide::Geometry::getOriginalBody | ( | ) | const |
This method is guaranteed to always return the same value as getRigidBody() if MergeSplit is not in use.
Definition at line 912 of file Geometry.h.
| agx::Frame* agxCollide::Geometry::getParentFrame | ( | ) |
| const agx::Frame* agxCollide::Geometry::getParentFrame | ( | ) | const |
| agx::Vec3 agxCollide::Geometry::getPosition | ( | ) | const |
Definition at line 1020 of file Geometry.h.
| agx::PropertyContainer * agxCollide::Geometry::getPropertyContainer | ( | ) |
Definition at line 947 of file Geometry.h.
Referenced by agxSDK::PropertyFilter::match().
| const agx::PropertyContainer * agxCollide::Geometry::getPropertyContainer | ( | ) | const |
Definition at line 959 of file Geometry.h.
|
inherited |
| agx::RigidBody * agxCollide::Geometry::getRigidBody | ( | ) |
Definition at line 832 of file Geometry.h.
Referenced by agxCollide::GeometryContact::calculateRelativeVelocity(), agxWire::getNode(), agxSDK::MergeSplitHandler::getProperties(), agxCollide::LocalGeometryContact::init(), agxCollide::LocalGeometryContact::LocalGeometryContact(), agxSDK::UuidHashCollisionFilter::match(), agxOSG::FilterContactByName::match(), agxWire::LinkObjectStabilizingAlgorithm::match(), agxSDK::matchFilter(), agxWire::LinkObjectStabilizingAlgorithm::matchOther(), and agxCollide::GeometryContact::rigidBody().
| const agx::RigidBody * agxCollide::Geometry::getRigidBody | ( | ) | const |
Definition at line 837 of file Geometry.h.
| agx::Quat agxCollide::Geometry::getRotation | ( | ) | const |
Definition at line 1028 of file Geometry.h.
References AGX_FORCE_INLINE, agxData::getEntity(), agx::QuatT< T >::getRotate(), agx::Physics::GeometryModel::localTransformAttribute, and agx::Physics::GeometryModel::transformAttribute.
| const ShapeRefVector& agxCollide::Geometry::getShapes | ( | ) | const |
Referenced by agxWire::transformPointToShape(), agxWire::transformPointToWorld(), agxWire::transformVectorToShape(), and agxWire::transformVectorToWorld().
| Space * agxCollide::Geometry::getSpace | ( | ) |
Definition at line 922 of file Geometry.h.
| const Space * agxCollide::Geometry::getSpace | ( | ) | const |
Definition at line 926 of file Geometry.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Reimplemented in agxModel::SurfaceVelocityConveyorBelt.
Definition at line 392 of file Geometry.h.
| const agx::Vec3f & agxCollide::Geometry::getSurfaceVelocity | ( | ) | const |
Definition at line 897 of file Geometry.h.
References AGX_FORCE_INLINE.
| agx::UInt32 agxCollide::Geometry::getSweepAndPruneIndex | ( | ) | const |
Definition at line 862 of file Geometry.h.
| agx::AffineMatrix4x4 agxCollide::Geometry::getTransform | ( | ) | const |
Definition at line 1011 of file Geometry.h.
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
| 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 867 of file Geometry.h.
Referenced by agxSDK::CollisionGroupFilter::hasMemberGroup().
| bool agxCollide::Geometry::hasGroup | ( | const agx::Name & | name | ) | const |
Definition at line 872 of file Geometry.h.
| bool agxCollide::Geometry::hasPropertyContainer | ( | ) | const |
Definition at line 954 of file Geometry.h.
References agx::ref_ptr< T >::isValid().
Referenced by agxSDK::PropertyFilter::match().
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
| 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 847 of file Geometry.h.
Referenced by agxCollide::Space::reportOverlap().
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
| bool agxCollide::Geometry::isSensor | ( | ) | const |
Return true if geometry is a sensor.
Definition at line 852 of file Geometry.h.
|
inline |
Definition at line 857 of file Geometry.h.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
| 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. |
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 | ( | size_t | shapeIndex, |
| Shape * | newShape, | ||
| const agx::AffineMatrix4x4 & | localTransform = agx::AffineMatrix4x4() |
||
| ) |
Replace a shape in the geometry.
| bool agxCollide::Geometry::replace | ( | Shape * | oldShape, |
| Shape * | newShape, | ||
| const agx::AffineMatrix4x4 & | localTransform = agx::AffineMatrix4x4() |
||
| ) |
| 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. | 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.
|
overridevirtual |
Reimplemented in agxModel::SurfaceVelocityConveyorBelt.
| void agxCollide::Geometry::setCustomData | ( | agx::Referenced * | data | ) |
Store a ref_ptr to a user custom data class, which must be inherited from Referenced.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| void agxCollide::Geometry::setEnable | ( | bool | flag | ) |
Enable/disable collision testing for geometry.
A disabled geometry does not render in debug rendering or osg.
Specify whether otherGeometry is allowed to collide with this geometry.
| 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 |
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
Set the position of the geometry relative to its frame's parent frame.
| p | - local translate of geometry as a 3D vector |
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 |
Set the rotation of the geometry relative to its frame's parent frame.
| q | - rotation given as a quaternion |
| 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::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.
| p | - desired position in world coordinates. |
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::setPropertyContainer | ( | agx::PropertyContainer * | container | ) |
Give this a new PropertyContainer.
| container | - The new PropertyContainer of this instance. |
Set the rotation of the geometry relative to world frame.
| q | - rotation given as a quaternion |
| 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::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 892 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. |
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
virtual |
|
overridevirtual |
Reimplemented in agxModel::SurfaceVelocityConveyorBelt.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
virtual |
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
| ShapeChangeEvent agxCollide::Geometry::shapeChangeEvent |
Definition at line 92 of file Geometry.h.