CamSim  0.0.0
A rasterization-based simulator for various types of cameras
List of all members
CamSim::Importer Class Reference

Public Member Functions

Constructor / Destructor
 Importer ()
 Constructor. More...
 
 ~Importer ()
 Destructor. More...
 

Importing objects, materials, light sources

bool import (const QString &fileName)
 Import from the file with the given fileName. More...
 
void setTransformationMatrix (const QMatrix4x4 transformationMatrix)
 Set a global transformation matrix for all imported data. More...
 
void addLightsToScene (Scene &scene) const
 Add all imported light sources to a scene, with corresponding animations. More...
 
int lightCount () const
 Get the number of light sources in the imported data. More...
 
void addLightToScene (int lightSourceIndex, Scene &scene) const
 Add an imported light source to a scene, with a corresponding animation. More...
 
void addObjectToScene (Scene &scene) const
 Add all imported shapes combined into one object to a scene, with corresponding animations. This function creates OpenGL objects in the current OpenGL context. More...
 
static unsigned int importTexture (const QString &fileName)
 Import a texture from the file with the given fileName. Returns zero on failure. More...
 

Constructor & Destructor Documentation

◆ Importer()

CamSim::Importer::Importer ( )

Constructor.

◆ ~Importer()

CamSim::Importer::~Importer ( )

Destructor.

Member Function Documentation

◆ addLightsToScene()

void CamSim::Importer::addLightsToScene ( Scene scene) const

Add all imported light sources to a scene, with corresponding animations.

◆ addLightToScene()

void CamSim::Importer::addLightToScene ( int  lightSourceIndex,
Scene scene 
) const

Add an imported light source to a scene, with a corresponding animation.

◆ addObjectToScene()

void CamSim::Importer::addObjectToScene ( Scene scene) const

Add all imported shapes combined into one object to a scene, with corresponding animations. This function creates OpenGL objects in the current OpenGL context.

◆ import()

bool CamSim::Importer::import ( const QString &  fileName)

Import from the file with the given fileName.

◆ importTexture()

static unsigned int CamSim::Importer::importTexture ( const QString &  fileName)
static

Import a texture from the file with the given fileName. Returns zero on failure.

This function currently supports 8-bit-per-channel image formats that Qt can load (e.g. PNG, JPEG). This will probably extended in the future for file formats that can hold floating point data (e.g. GTA).

◆ lightCount()

int CamSim::Importer::lightCount ( ) const

Get the number of light sources in the imported data.

◆ setTransformationMatrix()

void CamSim::Importer::setTransformationMatrix ( const QMatrix4x4  transformationMatrix)
inline

Set a global transformation matrix for all imported data.


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