AGX Dynamics  2.37.2.0
agxOSG/ReaderWriter.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 AGXOSG_READERWRITER_H
18 #define AGXOSG_READERWRITER_H
19 
20 #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 
32 
33 
34 namespace osg {
35  class Node;
36 }
37 
38 namespace agxSDK
39 {
40  class Assembly;
41 }
43 
44 namespace agxOSG
45 {
46  class ExampleApplication;
47 
59  AGXOSG_EXPORT osg::Node* readNodeFile(const std::string& filename, bool searchForIve=false);
60 
72  AGXOSG_EXPORT osg::Node* readNodeFile(const std::string& filename, const osgDB::ReaderWriter::Options* options, bool searchForIve=false );
73 
93  AGXOSG_EXPORT bool readFile(const std::string& filename, agxSDK::Simulation *simulation,
94  osg::Group *root, agxSDK::Assembly *parent=nullptr,
95  agx::Real detailRatio=0.35, bool createAxis=false,
97  agxOSG::RigidBodyRenderCache* cache = nullptr );
98 
99 
100 
101 } // Namespace agxOSG
102 
103 #endif
104 
#define AGXOSG_EXPORT
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, agxOSG::RigidBodyRenderCache *cache=nullptr)
Utility function for reading various files:
uint32_t UInt
Definition: Integer.h:34
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
RigidBodyRenderCache is used to cache generated visuals and lookup mappings of RigidBodies cloned fro...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
double Real
Definition: Real.h:42
AGXCORE_EXPORT Component * root()
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.
Definition: Assembly.h:66