AGX Dynamics  2.37.2.0
FBXUtils.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_FBXUTILS_H
18 #define AGXOSG_FBXUTILS_H
19 
20 #if defined (SWIG) || defined(_MSC_VER)
21 #include <agx/config/AGX_USE_FBX.h>
22 #if defined(SWIG) || AGX_USE_FBX()
23 
24 #define FBXSDK_NEW_API
25 
26 #include <agx/agx.h>
27 #include <agxUtil/agxUtil.h>
28 #include <agxOSG/export.h>
30 
31 namespace agxOSG {
32 
34  class FBXInterface;
36 
42  class AGXOSG_EXPORT FBXWriter : public agx::Referenced
43  {
44  public:
49  FBXWriter();
50 
56  void init(const agx::String& path);
57 
58 
64  bool connect(agxSDK::Simulation *simulation);
65 
71  bool connect(agxSDK::SimulationController *simulationController);
72 
76  bool disconnect();
77 
84  bool addMesh(agx::UInt32 id,
85  const agx::Vec3Vector& vertices,
86  const agx::UInt32Vector& indices,
87  const agx::Vec3Vector& normals,
88  const agx::Vec2Vector& texCoordinates,
90  agxCollide::RenderMaterial *material = nullptr);
91 
96  bool writeToFile();
97 
100  agxOSG::FBXInterface *getInterface();
102 
103 
104  protected:
105  virtual ~FBXWriter();
106  protected:
107  agx::observer_ptr<agxSDK::StepEventListener> m_listener;
108 
109  agx::ref_ptr<agx::Referenced> m_fbxInterface;
110  private:
111  };
112 }
113 
114 // AGX_USE_FBX
115 #endif
116 
117 #endif
118 #endif
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API...
#define AGXOSG_EXPORT
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Class for storing rendering material.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
uint32_t UInt32
Definition: Integer.h:40
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97