AGX Dynamics  2.37.2.0
agxOSGUnitTestHelperFunctions.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 AGXUNIT_AGXOSGUNITTESTHELPERFUNCTIONS_H
18 #define AGXUNIT_AGXOSGUNITTESTHELPERFUNCTIONS_H
19 
20 
21 #include <agxOSG/export.h>
22 #include <agx/agx_vector_types.h>
23 #include <agxUnit/UnitMacros.h>
24 #include <agx/RigidBody.h>
25 
26 namespace osg
27 {
28  class Group;
29 }
30 
31 namespace agx
32 {
33  class RigidBody;
34 }
35 namespace agxCollide
36 {
37  class GeometryContact;
38 }
39 
40 namespace agxOSG {
41  class Group;
42  class ExampleApplication;
43 }
44 
45 namespace agxSDK {
46  class Simulation;
47 }
48 
49 
50 namespace agxUnit {
51 
52  typedef void (*ScenePtr)(
53  agxSDK::Simulation* simulation,
54  osg::Group* root );
55 
56  typedef agx::RigidBody* (*OneBodyRestingScenePtr)(
57  agxSDK::Simulation* simulation,
58  osg::Group* root );
59 
61  agxSDK::Simulation* simulation,
62  osg::Group* root );
63 
64 
65  AGXOSG_EXPORT osg::Group* testResting(
66  agxSDK::Simulation* simulation,
67  agxOSG::ExampleApplication* application,
68  OneBodyRestingScenePtr restingScene,
69  const char* groupName,
70  const char* testName,
71  agx::Real preTestingTime = agx::Real(1));
72 
73  AGXOSG_EXPORT osg::Group* testResting(
74  agxSDK::Simulation* simulation,
75  agxOSG::ExampleApplication* application,
76  ManyBodiesRestingScenePtr restingScene,
77  const char* groupName,
78  const char* testName,
79  agx::Real preTestingTime = agx::Real(1));
80 
81  enum NormalType {
87  };
88 
90  agxSDK::Simulation* simulation,
91  agxOSG::ExampleApplication* application,
92  ScenePtr scene,
93  const char* groupName,
94  const char* testName,
95  agx::Vec3f normal,
96  agx::Real depth,
97  NormalType normalType = NORMAL,
98  unsigned int minNumContacts = 1);
99 
100  // Utility method for passing normal as Vec3 instead of Vec3f.
102  agxSDK::Simulation* simulation,
103  agxOSG::ExampleApplication* application,
104  ScenePtr scene,
105  const char* groupName,
106  const char* testName,
107  agx::Vec3 normal,
108  agx::Real depth,
109  NormalType normalType = NORMAL,
110  unsigned int minNumContacts = 1);
111 
112 
113 
115  agxSDK::Simulation* simulation,
116  agxOSG::ExampleApplication* application,
117  ScenePtr scene,
118  const char* groupName,
119  const char* testName );
120 }
121 
122 #endif
123 
Class that encapsulates rendering and simulation using OpenSceneGraph.
#define AGXOSG_EXPORT
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::VectorPOD< RigidBody * > RigidBodyPtrVector
Definition: RigidBody.h:48
void(* ScenePtr)(agxSDK::Simulation *simulation, osg::Group *root)
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
AGXOSG_EXPORT osg::Group * testContainsContact(agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, ScenePtr scene, const char *groupName, const char *testName, agx::Vec3 normal, agx::Real depth, NormalType normalType=NORMAL, unsigned int minNumContacts=1)
AGXOSG_EXPORT osg::Group * testResting(agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, ManyBodiesRestingScenePtr restingScene, const char *groupName, const char *testName, agx::Real preTestingTime=agx::Real(1))
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
AGXOSG_EXPORT osg::Group * testContainsNoContact(agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, ScenePtr scene, const char *groupName, const char *testName)
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
agx::RigidBody *(* OneBodyRestingScenePtr)(agxSDK::Simulation *simulation, osg::Group *root)
double Real
Definition: Real.h:42
AGXCORE_EXPORT Component * root()
agx::RigidBodyPtrVector(* ManyBodiesRestingScenePtr)(agxSDK::Simulation *simulation, osg::Group *root)
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30