AGX Dynamics  2.35.0.1
LuaScript.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 AGXOSG_LUASCRIPT_H
18 #define AGXOSG_LUASCRIPT_H
19 
20 #include <agx/config/AGX_USE_LUA.h>
21 #include <agxOSG/export.h>
22 #include <string>
23 
24 #include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
25 #include <osgDB/ReadFile>
26 #include <agx/PopDisableWarnings.h> // End of disabled warnings.
27 
28 #include <agx/Math.h>
29 #include <agxSDK/Simulation.h>
30 
31 namespace osg {
32  class Node;
33 }
34 
35 namespace agxSDK
36 {
37  class Simulation;
38  class Assembly;
39 }
40 
41 namespace agxOSG
42 {
43  class ExampleApplication;
44  class Group;
45 
46 #if AGX_USE_LUA()
47 
49  bool executeScriptImpl(const std::string& filenameOrScript,
50  const std::string& function,
51  agxSDK::Simulation *simulation,
52  agxOSG::ExampleApplication* application,
53  osg::Group *root,
54  bool filenameGiven,
55  std::string& errorMessage);
57 
73  AGXOSG_EXPORT bool executeScript(const std::string& filename,
74  const std::string& function,
75  agxSDK::Simulation *simulation,
76  agxOSG::ExampleApplication* application,
77  osg::Group *root);
78 
93  AGXOSG_EXPORT bool executeScriptString(const std::string& script,
94  const std::string& function,
95  agxSDK::Simulation *simulation,
96  agxOSG::ExampleApplication* application,
97  osg::Group *root,
98  std::string& errorMessage);
99 
105  AGXOSG_EXPORT std::string readScriptError();
106 
110  AGXOSG_EXPORT void resetScriptError();
111 
112 #endif
113 }
114 
115 #endif /* AGXOSG_LUASCRIPT_H */
#define AGXOSG_EXPORT
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
AGXCORE_EXPORT Component * root()