17 #ifndef AGXSDK_SIMULATIONSTATISTICSLISTENER_H 18 #define AGXSDK_SIMULATIONSTATISTICSLISTENER_H 89 void reset( T val=0 );
186 void collectSystemData(
agx::Real time = 0);
204 RealStatisticsListenerData getMaxLinearSpeed()
const;
207 RealStatisticsListenerData getMaxAngularSpeed()
const;
210 RealStatisticsListenerData getMaxContactSpeed()
const;
213 RealStatisticsListenerData getMaxPenetrationDepth()
const;
215 RealStatisticsListenerData getMaxConstraintViolation()
const;
218 RealStatisticsListenerData getMinFeature()
const;
221 RealStatisticsListenerData getMinContactFeature()
const;
224 RealStatisticsListenerData getMaxContactSpeedFeatureRatio()
const;
227 RealStatisticsListenerData getMaxFeature()
const;
230 RealStatisticsListenerData getMaxFeatureSpeed()
const;
253 void updateContactData(
agx::Real time );
258 virtual void addNotification()
override;
259 virtual void removeNotification()
override;
264 bool calculateShapeFeatures(
269 bool calculateFeatures(
292 m_parent(parent), m_name(id)
304 m_group->addObject( m_value );
307 m_group->addObject( m_time );
310 m_group->addObject( body1 );
312 m_group->addObject( body2 );
314 m_group->addObject( geometry1 );
316 m_group->addObject( geometry2 );
335 return m_value->
get();
341 m_value->
set(m_value->get()+1);
agx::ref_ptr< StatisticsData > StatisticsDataRef
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...
RealStatisticsListenerData maxFeatureSpeed
Derive from this class to implement a listener for simulation step events.
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...
A component is an object containing other objects, enabling hierarchical structuring.
Store all the various statistics of a simulation.
UInt32StatisticsListenerData numShapes
agx::Component * getDataRoot()
RealStatisticsListenerData maxLinearSpeed
RealStatisticsListenerData maxContactSpeedFeatureRatio
StatisticsListenerData< agx::UInt32 > UInt32StatisticsListenerData
void set(T val)
Set the value explicitly without comparison.
#define AGXPHYSICS_EXPORT
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex
UInt32StatisticsListenerData numContacts
StatisticsListenerData< agx::Real > RealStatisticsListenerData
StatisticsDataRef m_statisticsData
RealStatisticsListenerData maxConstraintViolation
UInt32StatisticsListenerData numConstraints
This class will collect statistics and sizes of a simulation.
Base class providing referencing counted objects.
agx::observer_ptr< agxSDK::Simulation > m_simulation
The geometry representation used by the collision detection engine.
RealStatisticsListenerData maxFeature
agxSDK::Simulation * getSimulation()
RealStatisticsListenerData minContactFeature
RealStatisticsListenerData maxContactSpeed
agx::ref_ptr< SimulationStatisticsListener > SimulationStatisticsListenerRef
RealStatisticsListenerData minFeature
UInt32StatisticsListenerData totalNumContacts
The rigid body class, combining a geometric model and a frame of reference.
RealStatisticsListenerData maxPenetrationDepth
virtual ~SimulationStatisticsListener()
Destructor.
agx::ComponentRef m_dataRoot
RealStatisticsListenerData maxAngularSpeed
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Class for writing serialized data in binary format to a stream.
UInt32StatisticsListenerData maxNumContactsPerTimestep
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Class for storing min/max values together with a ID for the associated RigidBody/Geometry.
virtual void addObject(agx::Object *object, bool assignContext=true)
Add an object to the component.
UInt32StatisticsListenerData numBodies
UInt32StatisticsListenerData numTriangles
AGXCORE_EXPORT Component * root()
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
agx::UInt32 m_numTimeSteps
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...