AGX Dynamics  2.38.0.2
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 
agx::UInt
uint64_t UInt
Definition: Integer.h:27
agx::Real
double Real
Definition: Real.h:42
agxOSG::readFile
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:
Simulation.h
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxSDK::Assembly
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Definition: Assembly.h:67
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:125
Math.h
agxOSG
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
PushDisableWarnings.h
agxOSG::readNodeFile
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.
agxSDK::Simulation::READ_DEFAULT
@ READ_DEFAULT
Definition: Simulation.h:1018
agx::root
AGXCORE_EXPORT Component * root()
agxOSG::RigidBodyRenderCache
RigidBodyRenderCache is used to cache generated visuals and lookup mappings of RigidBodies cloned fro...
Definition: RigidBodyRenderCache.h:36
RigidBodyRenderCache.h
export.h
agxSDK
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
AGXOSG_EXPORT
#define AGXOSG_EXPORT
PopDisableWarnings.h