104 bool isGroup()
const;
109 ShapeGroup* asGroup();
114 const ShapeGroup* asGroup()
const;
125 virtual bool hasSupportFunction()
const;
183 const Geometry* getGeometry()
const;
206 void store(
agxStream::OutputArchive& out ) const override;
207 void restore(
agxStream::InputArchive& in ) override;
252 agx::UInt32 incrementModifiedCount();
267 friend class ShapeGroup;
273 virtual
void setGeometry(
Geometry* geometry);
274 virtual
void transfer(
Space* space);
276 virtual
void updateGeometryPtr();
279 friend class
agx::InternalData;
283 agx::Referenced* getInternalData() const;
288 void setInternalData(
agx::Referenced* data );
293 void syncronizeShapeIndex();
300 ShapeGroup* m_parent;
302 agx::ref_ptr<
agx::Referenced> m_internalData;
314 virtual Shape *clone()
const override;
317 void removeChild(
Shape* shape);
318 void removeChild(
size_t index);
329 size_t getNumChildren()
const;
330 Shape* getChild(
size_t index);
331 const Shape* getChild(
size_t index)
const;
353 virtual agx::Real getVolume()
const override;
356 virtual agx::Vec3 getCenter()
const override;
359 virtual const BoundingAABB& updateBoundingVolume()
override;
362 virtual BoundingAABB calculateLocalBound()
const override;
369 virtual ~ShapeGroup();
375 virtual void updateGeometryPtr()
override;
376 virtual void setGeometry(
Geometry* geometry)
override;
377 virtual void transfer(
Space* space)
override;
389 const Shape* getShape()
const;
392 bool isValid()
const;
411 return m_entity.type();
415 return getType() == GROUP;
420 return static_cast<ShapeGroup*
>(
this);
424 return const_cast<Shape*
>(
this)->asGroup();
441 return m_entity.transform();
446 return m_entity.boundingAABB();
456 return m_children.size();
460 return m_children[index];
464 return m_children[index];
468 return getEntity().childTransforms()[index];
488 return m_entity.modifiedCount();
493 return ++m_entity.modifiedCount();
500 return m_shapes[m_index];
505 return const_cast<ShapeIterator*
>(
this)->getShape();
511 return m_transforms[m_index];
516 return m_index < m_shapes.size();
525 inline bool Shape::hasSupportFunction()
const
542 return m_internalData;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Axis aligned bounding box implementation.
The geometry representation used by the collision detection engine.
Class for storing rendering information for a Shape.
Type
Define the type of a Shape.
virtual Shape * clone() const
Create a clone.
virtual void propagateTransform(const agx::AffineMatrix4x4 &transform)
const char * getTypeName() const
virtual agx::Real calculateBoundingRadius(BoundingAABB &localAABB) const
Calculate the bounding volume (AABB) into localAABB and calculate the bounding radius based on the ne...
virtual BoundingAABB calculateLocalBound() const =0
Calculate the bounding volume in the local coordinate system.
agx::AffineMatrix4x4 getLocalTransform() const
virtual agx::Real getVolume() const =0
Return the volume of the shape.
virtual const BoundingAABB & updateBoundingVolume()=0
Calculate the bounding volume based on the current Shape parameters including transformation.
static const char * getTypeName(agx::UInt8 type)
virtual agx::SPDMatrix3x3 calculateInertia(agx::Real mass) const =0
Calculate the inertia for the shape given a mass.
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...
Pointer to a entity instance of type Physics.Geometry.ShapeGroup.
Pointer to a entity instance of type Physics.Geometry.Shape.
Base class providing referencing counted objects.
Specialized type of matrices for holding symmetric positive definite matrices.
Vector containing 'raw' data.
#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...
agx::Vector< agx::ref_ptr< Shape > > ShapeRefVector
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
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.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.