AGX Dynamics  2.37.3.2
agxIO::PovExporter Class Reference

Class for exporting a simulation into AGX .pov format. More...

#include <PovExporter.h>

Public Member Functions

 PovExporter ()
 
 ~PovExporter ()
 
bool write (const agx::String &filename, agxSDK::Simulation *simulation, agx::Vec3 from, agx::Vec3 at, agx::Vec3 up, double fovy, double aspectRatio)
 Write a simulation into the Pov-ray file format for rendering. More...
 
bool write (std::ostream &outStream, agxSDK::Simulation *simulation, agx::Vec3 from, agx::Vec3 at, agx::Vec3 up, double fovy, double aspectRatio)
 Write a simulation in .pov format to a stream. More...
 

Static Public Member Functions

static void setEnableFocalBlur (bool enable)
 
static void setFocalSettings (agx::Real distance, agx::Real aperture, int blur_samples, agx::Real variance)
 

Protected Types

typedef agx::HashSet< agxSDK::Assembly * > AssemblyPtrHashSet
 
typedef agx::HashSet< agxCollide::Geometry * > GeometryPtrHashSet
 
typedef agx::HashSet< agx::RigidBody * > RigidBodyPtrHashSet
 

Protected Member Functions

agx::String cleanupString (const agx::String &in)
 Translate any non-alphanumeric letters into '_'. More...
 
bool exportAssemblies ()
 
bool exportAssembly (agxSDK::Assembly *assembly)
 
bool exportGeometries (const agx::String &parentMaterial)
 
bool exportGeometry (agxCollide::Geometry *geometry, const agx::String &parentMaterial)
 
bool exportRigidBodies ()
 
bool exportRigidBody (agx::RigidBody *body)
 
bool exportShape (const agx::AffineMatrix4x4 &t, const agxCollide::Shape *shape, const agx::String &parentMaterial)
 

Protected Attributes

bool m_declareStarted
 
AssemblyPtrHashSet m_exportedAssemblies
 
RigidBodyPtrHashSet m_exportedBodies
 
GeometryPtrHashSet m_exportedGeometries
 
GeometryPtrHashSet m_geometryHasMaterial
 
std::ostream * m_outStream
 
agxSDK::Simulation * m_simulation
 

Static Protected Attributes

static agx::Real m_aperture
 
static int m_blurSamples
 
static bool m_focalBlurEnable
 
static agx::Real m_focalDistance
 
static agx::Real m_variance
 

Detailed Description

Class for exporting a simulation into AGX .pov format.

Definition at line 49 of file PovExporter.h.

Member Typedef Documentation

◆ AssemblyPtrHashSet

Definition at line 119 of file PovExporter.h.

◆ GeometryPtrHashSet

◆ RigidBodyPtrHashSet

Definition at line 117 of file PovExporter.h.

Constructor & Destructor Documentation

◆ PovExporter()

agxIO::PovExporter::PovExporter ( )

◆ ~PovExporter()

agxIO::PovExporter::~PovExporter ( )

Member Function Documentation

◆ cleanupString()

agx::String agxIO::PovExporter::cleanupString ( const agx::String &  in)
inlineprotected

Translate any non-alphanumeric letters into '_'.

Definition at line 92 of file PovExporter.h.

References agxStream::out().

◆ exportAssemblies()

bool agxIO::PovExporter::exportAssemblies ( )
protected

◆ exportAssembly()

bool agxIO::PovExporter::exportAssembly ( agxSDK::Assembly *  assembly)
protected

◆ exportGeometries()

bool agxIO::PovExporter::exportGeometries ( const agx::String &  parentMaterial)
protected

◆ exportGeometry()

bool agxIO::PovExporter::exportGeometry ( agxCollide::Geometry *  geometry,
const agx::String &  parentMaterial 
)
protected

◆ exportRigidBodies()

bool agxIO::PovExporter::exportRigidBodies ( )
protected

◆ exportRigidBody()

bool agxIO::PovExporter::exportRigidBody ( agx::RigidBody *  body)
protected

◆ exportShape()

bool agxIO::PovExporter::exportShape ( const agx::AffineMatrix4x4 &  t,
const agxCollide::Shape *  shape,
const agx::String &  parentMaterial 
)
protected

◆ setEnableFocalBlur()

static void agxIO::PovExporter::setEnableFocalBlur ( bool  enable)
static

◆ setFocalSettings()

static void agxIO::PovExporter::setFocalSettings ( agx::Real  distance,
agx::Real  aperture,
int  blur_samples,
agx::Real  variance 
)
static

◆ write() [1/2]

bool agxIO::PovExporter::write ( const agx::String &  filename,
agxSDK::Simulation *  simulation,
agx::Vec3  from,
agx::Vec3  at,
agx::Vec3  up,
double  fovy,
double  aspectRatio 
)

Write a simulation into the Pov-ray file format for rendering.

Parameters
filename- Path to the file which will be created
simulation- The simulation that will be written to the scene file
from- Camera from (eye) position
at- Camera looking at position
up- Camera up vector
fovy- field of view value
aspectRatio- aspect between the height/width of the window
Returns
true if exporting to pov-ray file was successful.

◆ write() [2/2]

bool agxIO::PovExporter::write ( std::ostream &  outStream,
agxSDK::Simulation *  simulation,
agx::Vec3  from,
agx::Vec3  at,
agx::Vec3  up,
double  fovy,
double  aspectRatio 
)

Write a simulation in .pov format to a stream.

Parameters
outStream- Stream into which the data will be written
simulation- The simulation that will be written to the pov-ray file
from- Camera from (eye) position
at- Camera looking at position
up- Camera up vector
fovy- field of view value
aspectRatio- aspect between the height/width of the window
Returns
true if exporting to pov-ray file was successful.

Member Data Documentation

◆ m_aperture

agx::Real agxIO::PovExporter::m_aperture
staticprotected

Definition at line 179 of file PovExporter.h.

◆ m_blurSamples

int agxIO::PovExporter::m_blurSamples
staticprotected

Definition at line 181 of file PovExporter.h.

◆ m_declareStarted

bool agxIO::PovExporter::m_declareStarted
protected

Definition at line 177 of file PovExporter.h.

◆ m_exportedAssemblies

AssemblyPtrHashSet agxIO::PovExporter::m_exportedAssemblies
protected

Definition at line 169 of file PovExporter.h.

◆ m_exportedBodies

RigidBodyPtrHashSet agxIO::PovExporter::m_exportedBodies
protected

Definition at line 170 of file PovExporter.h.

◆ m_exportedGeometries

GeometryPtrHashSet agxIO::PovExporter::m_exportedGeometries
protected

Definition at line 171 of file PovExporter.h.

◆ m_focalBlurEnable

bool agxIO::PovExporter::m_focalBlurEnable
staticprotected

Definition at line 182 of file PovExporter.h.

◆ m_focalDistance

agx::Real agxIO::PovExporter::m_focalDistance
staticprotected

Definition at line 178 of file PovExporter.h.

◆ m_geometryHasMaterial

GeometryPtrHashSet agxIO::PovExporter::m_geometryHasMaterial
protected

Definition at line 121 of file PovExporter.h.

◆ m_outStream

std::ostream* agxIO::PovExporter::m_outStream
protected

Definition at line 175 of file PovExporter.h.

◆ m_simulation

agxSDK::Simulation* agxIO::PovExporter::m_simulation
protected

Definition at line 173 of file PovExporter.h.

◆ m_variance

agx::Real agxIO::PovExporter::m_variance
staticprotected

Definition at line 180 of file PovExporter.h.


The documentation for this class was generated from the following file: