|
AGXDynamics
2.31.1.0
|
#include <Plane.h>
Inheritance diagram for agxCollide::Plane:Public Types | |
| enum | Type { GROUP, BOX, CAPSULE, CYLINDER, LINE, PLANE, SPHERE, TRIMESH, HEIGHT_FIELD, CONVEX, WIRE_SHAPE, CONE, HOLLOW_CONE, HOLLOW_CYLINDER, NUM_TYPES } |
| Define the type of a Shape. More... | |
Public Member Functions | |
| Plane () | |
| Default constructor. More... | |
| Plane (agx::Real const a, agx::Real const b, agx::Real const c, agx::Real d) | |
| Constructor, using plane equation ax+by+cz+d=0. More... | |
| Plane (const agx::Vec3 &normal, agx::Real d) | |
| Constructor. More... | |
| Plane (const agx::Vec3 &normal, const agx::Vec3 &point) | |
| Constructor. More... | |
| Plane (const agx::Vec4 &plane) | |
| Plane (const agx::Vec3 &p1, const agx::Vec3 &p2, const agx::Vec3 &p3) | |
| Create a plane which is spanned using three distinct points. More... | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| ShapeGroup * | asGroup () |
| Auto-cast shape to group. More... | |
| const ShapeGroup * | asGroup () const |
| Auto-cast shape to group. More... | |
| 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::Vec4 | asVec4 () const |
| virtual agx::Real | calculateBoundingRadius (BoundingAABB &localAABB) const |
Calculate the bounding volume (AABB) into localAABB and calculate the bounding radius based on the new AABB size. More... | |
| virtual agx::SPDMatrix3x3 | calculateInertia (agx::Real mass) const override |
| Calculate the inertia for the shape given a mass. More... | |
| virtual BoundingAABB | calculateLocalBound () const override |
| Calculate the bounding volume in the local coordinate system. More... | |
| agx::Vec4 | calculatePlane (const agx::AffineMatrix4x4 &transform) const |
| virtual Shape * | clone () const override |
| Create a clone. More... | |
| const BoundingAABB & | getBoundingVolume () const |
| virtual agx::Vec3 | getCenter () const |
| const char * | getClassName () const override |
| agx::Real | getDistance () const |
| Get the distance d (from plane equation ax+by+cz+d=0). More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::Physics::Geometry::PlanePtr | getEntity () const |
| Geometry * | getGeometry () |
| const Geometry * | getGeometry () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::AffineMatrix4x4 | getLocalTransform () const |
| agx::UInt32 | getModifiedCount () const |
| const agx::Vec3 | getNormal () const |
| Get the normal (a, b, c) from plane equation ax+by+cz+d=0. More... | |
| int | getReferenceCount () const |
| const agxCollide::RenderData * | getRenderData () const |
| If this is a ShapeGroup, then this method will return nullptr as the render data is stored in the actual children (Box, Mesh etc. More... | |
| agxStream::StorageAgent * | getStorageAgent () const override |
| virtual agx::Vec3 | getSupportPoint (const agx::Vec3 &supportDirection) const |
| Returns the support point on face of the shape. More... | |
| agx::AffineMatrix4x4 | getTransform () const |
| agx::UInt8 | getType () const |
| const char * | getTypeName () const |
| agx::Uuid | getUuid () const |
| virtual agx::Real | getVolume () const override |
| Return the volume of the shape. More... | |
| virtual bool | hasSupportFunction () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| bool | isGroup () const |
| virtual void | propagateTransform (const agx::AffineMatrix4x4 &transform) |
| 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... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| void | set (const agx::Vec4 &plane) |
| void | set (const agx::Vec3 &p1, const agx::Vec3 &p2, const agx::Vec3 &p3) |
| void | setDistance (agx::Real distance) |
| Set the distance d (from plane equation ax+by+cz+d=0). 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 | setNormal (const agx::Vec3 &normal) |
| Set the normal (a, b, c) from plane equation ax+by+cz+d=0. More... | |
| virtual void | setRenderData (agxCollide::RenderData *renderData) |
| Store render data with the Shape. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| agx::Real | signedDistanceToPoint (const agx::Vec3 &point) const |
| Calculates the distance from the plane to a point. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| 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... | |
| virtual const BoundingAABB & | updateBoundingVolume () override |
| Calculate the bounding volume based on the current Shape parameters including transformation. More... | |
Static Public Member Functions | |
| static BoundingAABB | calculateBound (const agx::AffineMatrix4x4 &transform, const agx::Plane &plane) |
| static BoundingAABB | calculateBound (const agx::AffineMatrix4x4 &transform, const BoundingAABB &localBound) |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create () |
| static const char * | getConstructClassId () |
| static const char * | getTypeName (agx::UInt8 type) |
| 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) |
Protected Member Functions | |
| virtual | ~Plane () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
| agx::UInt32 | incrementModifiedCount () |
| Increment the number of times the shape have been modified. More... | |
| Plane & | operator= (const Plane &) |
| void | syncronizeShapeIndex () |
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 | |
| agx::Physics::Geometry::ShapeRef | m_entity |
| Geometry * | m_geometry |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| ShapeGroup * | m_parent |
| AtomicValue | m_refCount |
| agxCollide::RenderDataRef | m_renderData |
| agx::Index | m_shapeIndex |
Definition at line 34 of file ollide/Plane.h.
|
inherited |
| agxCollide::Plane::Plane | ( | ) |
Default constructor.
Constructor, using plane equation ax+by+cz+d=0.
Constructor.
| normal | plane normal (a,b,c) in plane equation |
| d | distance |
Constructor.
| normal | - Normal (a,b,c) in the plane equation |
| point | - A point on the plane |
| agxCollide::Plane::Plane | ( | const agx::Vec4 & | plane | ) |
Create a plane which is spanned using three distinct points.
|
protectedvirtual |
|
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 |
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| agx::Vec4 agxCollide::Plane::asVec4 | ( | ) | const |
|
static |
Definition at line 131 of file ollide/Plane.h.
References agx::BoundT< T >::max(), agx::BoundT< T >::min(), and agx::RealMax.
|
staticinherited |
transform) AABB (localBound) Definition at line 417 of file Shape.h.
References AGX_FORCE_INLINE, and agxData::getEntity().
|
virtualinherited |
Calculate the bounding volume (AABB) into localAABB and calculate the bounding radius based on the new AABB size.
Reimplemented in agxCollide::Sphere.
|
overridevirtual |
Calculate the inertia for the shape given a mass.
Implements agxCollide::Shape.
|
overridevirtual |
Calculate the bounding volume in the local coordinate system.
Implements agxCollide::Shape.
| agx::Vec4 agxCollide::Plane::calculatePlane | ( | const agx::AffineMatrix4x4 & | transform | ) | const |
|
overridevirtual |
Create a clone.
Reimplemented from agxCollide::Shape.
|
inlinestatic |
Definition at line 106 of file ollide/Plane.h.
|
inlinestatic |
Definition at line 106 of file ollide/Plane.h.
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inlinevirtualinherited |
Reimplemented in agxCollide::Mesh, agxCollide::HollowCone, and agxCollide::Cone.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 106 of file ollide/Plane.h.
|
inlinestatic |
Definition at line 106 of file ollide/Plane.h.
|
staticprotectedinherited |
| agx::Real agxCollide::Plane::getDistance | ( | ) | const |
Get the distance d (from plane equation ax+by+cz+d=0).
Definition at line 123 of file ollide/Plane.h.
References agxData::getEntity().
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inline |
Definition at line 120 of file ollide/Plane.h.
|
inherited |
|
inherited |
|
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.
|
inherited |
|
inherited |
| const agx::Vec3 agxCollide::Plane::getNormal | ( | ) | const |
Get the normal (a, b, c) from plane equation ax+by+cz+d=0.
Definition at line 122 of file ollide/Plane.h.
References agxData::getEntity().
|
inherited |
|
inherited |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 106 of file ollide/Plane.h.
|
inlinevirtualinherited |
Returns the support point on face of the shape.
| supportDirection | - Direction in shape coords where to find a support point |
Reimplemented in agxCollide::HollowCone, agxCollide::Cone, agxCollide::HollowCylinder, agxCollide::Line, agxCollide::Cylinder, agxCollide::Capsule, agxCollide::Convex, agxCollide::Box, and agxCollide::Sphere.
|
inherited |
|
inherited |
Definition at line 377 of file Shape.h.
Referenced by agxCollide::ColliderTable::getCollider().
|
staticinherited |
type
|
inherited |
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
|
overridevirtual |
Return the volume of the shape.
Implements agxCollide::Shape.
|
inlinevirtualinherited |
Reimplemented in agxCollide::HollowCone, agxCollide::Cone, agxCollide::HollowCylinder, agxCollide::Line, agxCollide::Cylinder, agxCollide::Capsule, agxCollide::Convex, agxCollide::Box, and agxCollide::Sphere.
Definition at line 493 of file Shape.h.
Referenced by agxCollide::FallbackConvexCollider< ShapeType1, ShapeType2 >::_calculateContacts().
|
protectedinherited |
Increment the number of times the shape have been modified.
Definition at line 459 of file Shape.h.
References AGX_FORCE_INLINE, and agxAssert.
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
|
inherited |
Definition at line 381 of file Shape.h.
References agxData::getType().
Definition at line 111 of file ollide/Plane.h.
References agx::init().
|
virtualinherited |
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.
|
overridevirtual |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
Set the distance d (from plane equation ax+by+cz+d=0).
|
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 normal (a, b, c) from plane equation ax+by+cz+d=0.
|
virtualinherited |
Store render data with the Shape.
If the shape is a Group, the render data will be stored in all the children and NOT in the actual ShapeGroup. It is better to actually access the actual primitives and store the render data there instead of the group.
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!
Calculates the distance from the plane to a point.
Negative value if the point is behind the plane, otherwise positive.
Definition at line 125 of file ollide/Plane.h.
|
overridevirtual |
|
protectedinherited |
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.
|
overridevirtual |
Calculate the bounding volume based on the current Shape parameters including transformation.
Implements agxCollide::Shape.
|
staticinherited |
|
protectedinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protectedinherited |
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protectedinherited |
|
protectedinherited |