99 bool removeBranch(
size_t index );
104 size_t getNumBranches()
const;
161 void setMaxTranslationalLoad(
agx::Real maxLoad );
167 void setMaxRotationalLoad(
agx::Real maxLoad );
178 agx::Real getMaxTranslationalLoad()
const;
194 agx::Real getCurrentTranslationalLoad()
const;
199 agx::Real getCurrentRotationalLoad()
const;
305 Tree* getTree()
const;
309 void setTree(
Tree* tree );
359 enum State { INITIALIZED = (1<<0), STATIC = (1<<1), WAKE_ON_CONTACT = (1<<2), RESTORING = (1<<3) };
370 virtual Tree* clone();
380 bool initialized()
const;
387 virtual bool initialize();
392 bool isStatic()
const;
397 bool wakeOnContact()
const;
597 virtual void clear();
643 virtual void preCollide();
659 void configure(
Branch* branch );
686 virtual void checkLoad(
Branch* branch );
691 void split(
Branch* source,
Branch* destination )
const;
699 void remove(
Branch* branch );
705 void add(
Branch* branch );
724 void copyParameters(
const Branch* source,
Branch* destination )
const;
742 : m_tree( tree ) { setMask( IMPACT ); }
759 : m_tree( tree ) { setMask( PRE_COLLIDE | PRE_STEP | POST_STEP ); }
788 template<
typename T >
791 agx::Real oldLength = shape->getHeight();
792 newBelowLength =
agx::Real( 0.5 ) * oldLength + position;
793 newAboveLength = oldLength - newBelowLength;
794 if ( newBelowLength < 0 || newAboveLength < 0 )
796 shape->setHeight( newBelowLength );
797 return new T( shape->getRadius(), newAboveLength );
agx::observer_ptr< Tree > m_tree
BranchContainer::iterator BranchIterator
bool add(agx::Constraint *constraint)
Add a constraint to the assembly.
AGXTERRAIN_EXPORT void clear()
agx::ref_ptr< BranchEventListener > BranchEventListenerRef
AGXMODEL_EXPORT agx::Real getShapeLength(const agxCollide::Shape *shape)
agx::ref_ptr< Branch > BranchRef
Derive from this class to implement a listener for simulation step events.
GroupIdContainer m_geometryIDs
agx::MaterialRef m_material
TreeStepEventListenerRef m_stepListener
agx::SymmetricPair< agx::Physics::GeometryPtr > GeometryPair
Branch is a part of the Tree, with a body and a constraint to its parent.
Abstract base class that implements a filter that selects which events should trigger a Listener...
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
agx::observer_ptr< Branch > BranchObs
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
The base class for a constraint.
const BranchRef * const_iterator
#define AGX_DECLARE_POINTER_TYPES(type)
virtual ~TreeStepEventListener()
Representation of a name string.
virtual bool match(const agxCollide::GeometryContact &gc) const
Called when narrow phase tests have determined overlap (when we have detailed intersection between th...
TreeExecuteFilter allows to catch contacts with the Tree.
agx::Vector< BranchRef > BranchContainer
agx::HashVector< agxCollide::Geometry *, agx::observer_ptr< agxCollide::Geometry > > DisabledCollisionsGeometryContainer
Base class providing referencing counted objects.
TreeStepEventListener(Tree *tree)
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
The geometry representation used by the collision detection engine.
bool remove(agx::Constraint *constraint)
Remove a constraint from this assembly (does not recurse down in tree).
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
agx::ref_ptr< agx::Referenced > m_customData
Vector containing 'raw' data.
Generic BranchEventListener throwing exceptions for non-implemented virtual methods.
AGXMODEL_EXPORT agx::Real getShapeRadius(const agxCollide::Shape *shape)
DisabledCollisionsGeometryContainer m_externalDisabledGeometries
T * cutShape(T *shape, agx::Real position, agx::Real &newBelowLength, agx::Real &newAboveLength)
agx::ConstraintRef m_constraint
agx::ref_ptr< agx::Referenced > m_customData
agx::UInt32 m_geometriesID
Tree is a structure of Branch objects in a mathematical Tree structure where a Branch can have severa...
agx::ref_ptr< TreeContactEventListener > TreeContactEventListenerRef
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.
BranchEventListenerRef m_branchListener
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...
SolveType
Specifies in what solvers the constraint will be solved.
The object defining a frame of reference and providing transformations operations.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
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...
agx::ref_ptr< TreeStepEventListener > TreeStepEventListenerRef
LinearProbingHashSetImplementation< KeyT, HashT >::iterator end(LinearProbingHashSetImplementation< KeyT, HashT > &set)
agx::UInt32 m_disabledCollisionsID
#define AGX_DECLARE_VECTOR_TYPES(type)
AGXCORE_EXPORT Component * root()
TreeContactEventListenerRef m_wakeOnContactListener
agx::ref_ptr< TreeExecuteFilter > TreeExecuteFilterRef
agx::SetVector< agx::UInt32 > GroupIdContainer
BranchContainer::const_iterator BranchConstIterator
#define DOXYGEN_END_INTERNAL_BLOCK()
BranchContainer m_branches
#define DOXYGEN_START_INTERNAL_BLOCK()
BranchEventListener handles certain events happening to a Tree.
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.