AGX Dynamics  2.35.0.1
ContactForceReader.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 AGX_CONTACT_FORCE_READER_H
18 #define AGX_CONTACT_FORCE_READER_H
19 
20 #include <agx/agx.h>
21 #include <agx/Referenced.h>
22 #include <agx/agxPhysics_export.h>
23 #include <agxSDK/Simulation.h>
24 
25 namespace agx
26 {
34  {
35  public:
37  {
38  IMPACT = (1 << 0),
39  RESTING = (1 << 1),
40  IMPACT_AND_RESTING = (IMPACT & RESTING)
41  };
42 
44 
53  const agx::RigidBody* body1, const agx::RigidBody* body2 = nullptr, ContactType type = IMPACT_AND_RESTING);
54 
63  const agx::RigidBody* body, const agxCollide::Geometry* geometry, ContactType type = IMPACT_AND_RESTING);
64 
73  const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2 = nullptr,
74  ContactType type = IMPACT_AND_RESTING);
75 
84  const agx::RigidBody* body1, const agx::RigidBody* body2 = nullptr, ContactType type = IMPACT_AND_RESTING);
85 
94  const agx::RigidBody* body, const agxCollide::Geometry* geometry, ContactType type = IMPACT_AND_RESTING);
95 
104  const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2 = nullptr,
105  ContactType type = IMPACT_AND_RESTING);
106 
115  const agx::RigidBody* body1, const agx::RigidBody* body2 = nullptr, ContactType type = IMPACT_AND_RESTING);
116 
125  const agx::RigidBody* body, const agxCollide::Geometry* geometry, ContactType type = IMPACT_AND_RESTING);
126 
135  const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2 = nullptr,
136  ContactType type = IMPACT_AND_RESTING);
137 
146  const agx::RigidBody* body1, const agx::RigidBody* body2 = nullptr, ContactType type = IMPACT_AND_RESTING);
147 
156  const agx::RigidBody* body, const agxCollide::Geometry* geometry, ContactType type = IMPACT_AND_RESTING);
157 
166  const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2 = nullptr,
167  ContactType type = IMPACT_AND_RESTING);
168 
177  const agx::RigidBody* body1, const agx::RigidBody* body2 = nullptr, ContactType type = IMPACT_AND_RESTING);
178 
187  const agx::RigidBody* body, const agxCollide::Geometry* geometry, ContactType type = IMPACT_AND_RESTING);
188 
197  const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2 = nullptr,
198  ContactType type = IMPACT_AND_RESTING);
199 
208  const agx::RigidBody* body1, const agx::RigidBody* body2 = nullptr, ContactType type = IMPACT_AND_RESTING);
209 
218  const agx::RigidBody* body, const agxCollide::Geometry* geometry, ContactType type = IMPACT_AND_RESTING);
219 
228  const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2 = nullptr,
229  ContactType type = IMPACT_AND_RESTING);
230 
233 
234  private:
236  };
237 
239 
240 } // namespace agx
241 
242 #endif
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:93
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
Class for reading contact forces between rigid bodies and geometries.
void setSimulation(agxSDK::Simulation *simulation)
Update reference to Simulation.
Vec3 getContactForces(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all contact (Normal and Friction) forces in world coordinate system between two geometries...
Vec3 getSumAbsoluteTangentialContactForces(const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute friction contact forces between two rigid bodies.
Vec3 getNormalContactForces(const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all Normal contact forces in world coordinate system between two rigid bodies.
Vec3 getSumAbsoluteNormalContactForces(const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute normal contact forces between two rigid bodies.
Vec3 getContactForces(const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all contact (Normal and Friction) forces in world coordinate system between two rigid bodi...
Vec3 getSumAbsoluteContactForces(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute contact forces between two geometries.
ContactForceReader(const agxSDK::Simulation *sim)
Vec3 getSumAbsoluteContactForces(const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute contact forces between two rigid bodies.
Vec3 getSumAbsoluteTangentialContactForces(const agx::RigidBody *body, const agxCollide::Geometry *geometry, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute friction contact forces between a rigid body and a geometry.
Vec3 getTangentialContactForces(const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all Friction contact forces in world coordinate system between two rigid bodies.
Vec3 getNormalContactForces(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all Normal contact forces in world coordinate system between two geometries.
Vec3 getSumAbsoluteContactForces(const agx::RigidBody *body, const agxCollide::Geometry *geometry, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute contact forces between a rigid body and a geometry.
Vec3 getSumAbsoluteTangentialContactForces(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute friction contact forces between two geometries.
Vec3 getSumAbsoluteNormalContactForces(const agx::RigidBody *body, const agxCollide::Geometry *geometry, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute normal contact forces between two rigid bodies.
Vec3 getTangentialContactForces(const agx::RigidBody *body, const agxCollide::Geometry *geometry, ContactType type=IMPACT_AND_RESTING)
Get sum of all Friction contact forces in world coordinate system between a rigid body and a geometry...
Vec3 getNormalContactForces(const agx::RigidBody *body, const agxCollide::Geometry *geometry, ContactType type=IMPACT_AND_RESTING)
Get sum of all Normal contact forces in world coordinate system between a rigid body and a geometry.
Vec3 getTangentialContactForces(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all Friction contact forces in world coordinate system between two geometries.
Vec3 getContactForces(const agx::RigidBody *body, const agxCollide::Geometry *geometry, ContactType type=IMPACT_AND_RESTING)
Get sum of all contact (Normal and Friction) forces in world coordinate system between a rigid body a...
Vec3 getSumAbsoluteNormalContactForces(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr, ContactType type=IMPACT_AND_RESTING)
Get sum of all absolute normal contact forces between two geometries.
Base class providing referencing counted objects.
Definition: Referenced.h:114
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
#define CALLABLE
Definition: macros.h:72
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
ref_ptr< ContactForceReader > ContactForceReaderRef