AGX Dynamics  2.38.0.2
RigidBodyLogListener.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXSDK_RIGIDBODYLOGLISTENER_H
18 #define AGXSDK_RIGIDBODYLOGLISTENER_H
19 
20 #include <agxSDK/agxSDK.h>
21 #include <agxSDK/LogListener.h>
22 #include <agx/RigidBody.h>
23 #include <string>
24 
25 namespace agxSDK
26 {
27 
32  {
33  public:
34 
42  RigidBodyLogListener(const std::string& fileName = "",
43  bool newFilePerTimeStep = false,
44  const std::string& valueSeparator = "\t");
45 
47  inline void addBody( agx::RigidBody* body );
48 
49  protected:
50  virtual void obtainHeader( std::stringstream& header );
51  virtual void collectData ( std::stringstream& data, const agx::TimeStamp& /*time*/ );
52 
53 
54  protected:
56  };
57 
59 
60 
61 
63  {
64  m_bodies.push_back( body );
65  }
66 
67 }
68 
69 #endif /* AGXSDK_RIGIDBODYLOGLISTENER_H */
agxSDK::RigidBodyLogListener
Class that will log various properties of rigid bodies.
Definition: RigidBodyLogListener.h:31
agx::Vector
Templated vector class.
Definition: Vector.h:52
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:51
agxSDK::RigidBodyLogListenerRef
agx::ref_ptr< RigidBodyLogListener > RigidBodyLogListenerRef
Definition: RigidBodyLogListener.h:58
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agxSDK::LogListener
Abstract class for logging properties per time step to a file/standard out.
Definition: LogListener.h:29
LogListener.h
RigidBody.h
agxSDK::RigidBodyLogListener::m_bodies
agx::Vector< agx::observer_ptr< agx::RigidBody > > m_bodies
Definition: RigidBodyLogListener.h:55
agx::TimeStamp
agx::Real TimeStamp
Definition: TimeStamp.h:26
agxSDK::RigidBodyLogListener::addBody
void addBody(agx::RigidBody *body)
Adds a body for logging.
Definition: RigidBodyLogListener.h:62
agxSDK
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
agxSDK.h
agx::Vector::push_back
void push_back(const T2 &value)
Definition: Vector.h:715