 |
AGXDynamics
2.35.0.2
|
Go to the documentation of this file.
17 #ifndef AGXCOLLIDE_SHAPE_H
18 #define AGXCOLLIDE_SHAPE_H
77 static const char* getTypeName(
agx::UInt8 type);
84 virtual Shape *clone()
const;
89 const char* getTypeName()
const;
104 ShapeGroup* asGroup();
109 const ShapeGroup* asGroup()
const;
120 virtual bool hasSupportFunction()
const;
178 const Geometry* getGeometry()
const;
201 void store(
agxStream::OutputArchive&
out ) const override;
202 void restore(
agxStream::InputArchive&
in ) override;
250 friend class ShapeGroup;
256 virtual
void setGeometry(
Geometry* geometry);
257 virtual
void transfer(
Space* space);
259 virtual
void updateGeometryPtr();
264 void syncronizeShapeIndex();
271 ShapeGroup* m_parent;
283 virtual Shape *clone()
const override;
286 void removeChild(
Shape* shape);
287 void removeChild(
size_t index);
298 size_t getNumChildren()
const;
299 Shape* getChild(
size_t index);
300 const Shape* getChild(
size_t index)
const;
322 virtual agx::Real getVolume()
const override;
328 virtual const BoundingAABB& updateBoundingVolume()
override;
331 virtual BoundingAABB calculateLocalBound()
const override;
338 virtual ~ShapeGroup();
344 virtual void updateGeometryPtr()
override;
345 virtual void setGeometry(
Geometry* geometry)
override;
346 virtual void transfer(
Space* space)
override;
358 const Shape* getShape()
const;
361 bool isValid()
const;
380 return m_entity.type();
389 return static_cast<ShapeGroup*
>(
this);
393 return const_cast<Shape*
>(
this)->asGroup();
410 return m_entity.transform();
415 return m_entity.boundingAABB();
425 return m_children.size();
429 return m_children[index];
433 return m_children[index];
437 return getEntity().childTransforms()[index];
457 return m_entity.modifiedCount();
462 return ++m_entity.modifiedCount();
469 return m_shapes[m_index];
474 return const_cast<ShapeIterator*
>(
this)->getShape();
480 return m_transforms[m_index];
485 return m_index < m_shapes.size();
agx::UInt32 incrementModifiedCount()
Increment the number of times the shape have been modified.
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive.
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
virtual bool hasSupportFunction() const
AGXCORE_EXPORT Type * getType(const agx::String &name)
#define DOXYGEN_END_INTERNAL_BLOCK()
virtual agx::Vec3 getSupportPoint(const agx::Vec3 &supportDirection) const
Returns the support point on face of the shape.
Class for storing rendering information for a Shape.
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::UInt32 getModifiedCount() const
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Axis aligned bounding box implementation.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Vector containing 'raw' data.
agx::Physics::Geometry::ShapePtr getEntity() const
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
#define AGX_DECLARE_VECTOR_TYPES(type)
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Pointer to a entity instance of type Physics.Geometry.ShapeGroup.
agx::Vector< agx::ref_ptr< Shape > > ShapeRefVector
AGXMODEL_EXPORT agx::Vec3 getCenter(const agxCollide::Mesh::Triangle &triangle)
Type
Define the type of a Shape.
The geometry representation used by the collision detection engine.
Specialized type of matrices for holding symmetric positive definite matrices.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
ShapeGroup * asGroup()
Auto-cast shape to group.
Base class providing referencing counted objects.
Real calculateBoundingRadius(Real)
Pointer to a entity instance of type Physics.Geometry.Shape.
This namespace consists of a set of classes for handling geometric intersection tests including boole...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
AGX_DECLARE_POINTER_TYPES(SpaceListener)
const BoundingAABB & getBoundingVolume() const
virtual agx::Vec3 getCenter() const
static BoundingAABB calculateBound(const agx::AffineMatrix4x4 &transform, const BoundingAABB &localBound)
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.
agx::AffineMatrix4x4 getTransform() const