78 virtual agx::UInt32 getDisabledCollisionGroupId()
const;
150 virtual void setLinearVelocityDamping(
const agx::Vec3& linearVelocityDamping );
155 virtual agx::Vec3 getLinearVelocityDamping()
const;
164 virtual void setAngularVelocityDamping(
const agx::Vec3& angularVelocityDamping );
169 virtual agx::Vec3 getAngularVelocityDamping()
const;
181 virtual agx::Real getCurrentLength()
const;
223 T* getComponent()
const;
319 virtual void onMaterialNew();
324 virtual void onGroupAdd(
const IdData& group );
329 virtual void onGroupRemove(
const IdData& group );
339 virtual void onPreCollideStep();
344 virtual void onPreStep();
349 virtual void onPostStep();
354 virtual void onLastStep();
417 template<
typename ObjT>
429 template<
typename T,
typename ObjT>
452 void trigger( SimulationEvent simulationEvent );
453 void addGroup(
const IdData& group );
455 agx::Bool hasGroup(
const IdData& group )
const;
462 IdDataContainer m_externallyAddedGroups;
471 auto data = LinkedStructureObjectData::get<LinkedStructureObjectData>( rb );
472 return data !=
nullptr && data->linkedStructure !=
nullptr ? data->linkedStructure->template asSafe<T>() :
nullptr;
478 return LinkedStructure::getT<T>(
const_cast<agx::RigidBody*
>( rb ) );
484 for (
auto component : m_components ) {
485 auto typed = component->template asSafe<T>();
486 if ( typed !=
nullptr )
500 return m_segments.
size();
514 getSegmentIterator<T>( endIndex ) );
520 return m_segments[ index ];
528 m_segments[ index ] :
535 return data !=
nullptr && data->segment !=
nullptr && data->linkedStructure ==
this ?
536 data->segment->getIndex() :
546 template<
typename T,
typename ObjT>
550 if ( segment ==
nullptr )
552 return getSegmentIterator<T>( segment->getIndex(), boundaryless );
557 auto data = LinkedStructureObjectData::get<LinkedStructureObjectData>( rb );
560 return data !=
nullptr && ( data->linkedStructure ==
this || data->linkedStructure == nullptr ) ?
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
IdData(const agx::Name &name)
Construct group given name where id == agx::InvalidIndex.
Segment range object for linked structure.
LinkedSegmentIterator< T > getSegmentIterator(agx::UInt index, agx::Bool boundaryless=false) const
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
agx::UInt getNumSegments() const
bool operator==(T val, InvalidIndexStruct)
#define AGXPHYSICS_EXPORT
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex
IdData()
Default constructor, group id is invalid with id == agx::InvalidIndex and name == ""...
#define AGX_DECLARE_POINTER_TYPES(type)
Representation of a name string.
const agxSDK::LinkedSegmentContainer & getSegmentsContainer() const
LinkedStructureObjectData * getData(const agx::RigidBody *rb) const
static LinkedSegmentIterator begin(const agxSDK::LinkedSegmentContainer &segments)
The geometry representation used by the collision detection engine.
AGXPHYSICS_EXPORT void addGroup(const agx::RigidBody *body, unsigned id)
For the specified body, add the collision group ID to its geometries.
IdData(agx::UInt32 id)
Construct group given int id where name == "".
Group id 'union' of int id and name id.
LinkedSegment * getSegment(agx::UInt index) const
Collection of geometry group names and id's.
The rigid body class, combining a geometric model and a frame of reference.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Optionally unbounded linked structure segment iterator object to iterate segments in a SegmentStructu...
static LinkedSegmentIterator end(const agxSDK::LinkedSegmentContainer &segments)
AGXPHYSICS_EXPORT bool setEnableCollisions(agx::RigidBody *rb1, agx::RigidBody *rb2, bool enable)
Enable or disable the collision between all geometries in RigidBody rb1 and RigidBody rb2...
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
AGXPHYSICS_EXPORT void removeGroup(const agx::RigidBody *body, unsigned id)
For the specified body, remove the collision group ID to its geometries.
virtual void addNotification(agxSDK::Simulation *)
Called when this assembly is added to a simulation (given that it not already is in the simulation)...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Segment object in a linked structure.
bool operator!=(T val, InvalidIndexStruct)
Connection back from bodies, constraints etc.
LinkedSegmentRange< T > getSegments() const
Constructs a segment range over all segments.
static T * getT(agx::RigidBody *rb)
Base implementation of a component (e.g., specific functionality) in linked structures.
agx::UInt getSegmentIndex(const agx::RigidBody *rb) const
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.