AGXDynamics  2.31.1.0
agxOSGUnitTestHelperFunctions.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2021. 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 
50 namespace agxUnit {
51 
52 
53 
54  typedef void (*ScenePtr)(
55  agxSDK::Simulation* simulation,
56  osg::Group* root );
57 
58  typedef agx::RigidBody* (*OneBodyRestingScenePtr)(
59  agxSDK::Simulation* simulation,
60  osg::Group* root );
61 
63  agxSDK::Simulation* simulation,
64  osg::Group* root );
65 
66 
67  AGXOSG_EXPORT osg::Group* testResting(
68  agxSDK::Simulation* simulation,
69  agxOSG::ExampleApplication* application,
70  OneBodyRestingScenePtr restingScene,
71  const char* groupName,
72  const char* testName,
73  agx::Real preTestingTime = agx::Real(1));
74 
75  AGXOSG_EXPORT osg::Group* testResting(
76  agxSDK::Simulation* simulation,
77  agxOSG::ExampleApplication* application,
78  ManyBodiesRestingScenePtr restingScene,
79  const char* groupName,
80  const char* testName,
81  agx::Real preTestingTime = agx::Real(1));
82 
83  enum NormalType {
89  };
90 
92  agxSDK::Simulation* simulation,
93  agxOSG::ExampleApplication* application,
94  ScenePtr scene,
95  const char* groupName,
96  const char* testName,
97  agx::Vec3f normal,
98  agx::Real depth,
99  NormalType normalType = NORMAL,
100  unsigned int minNumContacts = 1);
101 
102  // Utility method for passing normal as Vec3 instead of Vec3f.
104  agxSDK::Simulation* simulation,
105  agxOSG::ExampleApplication* application,
106  ScenePtr scene,
107  const char* groupName,
108  const char* testName,
109  agx::Vec3 normal,
110  agx::Real depth,
111  NormalType normalType = NORMAL,
112  unsigned int minNumContacts = 1);
113 
114 
115 
117  agxSDK::Simulation* simulation,
118  agxOSG::ExampleApplication* application,
119  ScenePtr scene,
120  const char* groupName,
121  const char* testName );
122 }
123 
124 #endif
125 
Class that encapsulates rendering and simulation using OpenSceneGraph.
#define AGXOSG_EXPORT
agxCollide namespace consists of a set of classes for handling geometric intersection tests including...
void(* ScenePtr)(agxSDK::Simulation *simulation, osg::Group *root)
Namespace agx 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))
Contains classes/macros for handling unit tests within the AGX framework.
typedef void(GLAD_API_PTR *GLDEBUGPROC)(GLenum source
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:52
agx::VectorPOD< RigidBodyPtr > RigidBodyPtrVector
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:121
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