AGX Dynamics  2.35.0.1
agxOSG/ReaderWriter.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_READERWRITER_H
18 #define AGXOSG_READERWRITER_H
19 
20 #include <agxOSG/export.h>
21 #include <string>
22 
23 #include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
24 #include <osgDB/ReadFile>
25 #include <agx/PopDisableWarnings.h> // End of disabled warnings.
26 
27 #include <agx/Math.h>
28 #include <agxSDK/Simulation.h>
29 
31 
32 
33 namespace osg {
34  class Node;
35 }
36 
37 namespace agxSDK
38 {
39  class Assembly;
40 }
42 
43 namespace agxOSG
44 {
45  class ExampleApplication;
46 
58  AGXOSG_EXPORT osg::Node* readNodeFile(const std::string& filename, bool searchForIve=false);
59 
71  AGXOSG_EXPORT osg::Node* readNodeFile(const std::string& filename, const osgDB::ReaderWriter::Options* options, bool searchForIve=false );
72 
95  AGXOSG_EXPORT bool readFile(const std::string& filename, agxSDK::Simulation *simulation,
96  osg::Group *root, agxSDK::Assembly *parent=nullptr,
97  agx::Real detailRatio=0.35, bool createAxis=false,
99 
100 
101 
102 } // Namespace agxOSG
103 
104 #endif
105 
#define AGXOSG_EXPORT
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Definition: Assembly.h:67
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
#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.
AGXOSG_EXPORT osg::Node * readNodeFile(const std::string &filename, const osgDB::ReaderWriter::Options *options, bool searchForIve=false)
Read a specified filename from disk and return it as a OpenSceneGraph node.
AGXOSG_EXPORT bool readFile(const std::string &filename, agxSDK::Simulation *simulation, osg::Group *root, agxSDK::Assembly *parent=nullptr, agx::Real detailRatio=0.35, bool createAxis=false, agx::UInt selection=agxSDK::Simulation::READ_DEFAULT)
Utility function for reading various files:
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
AGXCORE_EXPORT Component * root()
uint32_t UInt
Definition: Integer.h:34
double Real
Definition: Real.h:42