ProjectedTextures
Prototype software for spacial augmented reality applications.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Geometry Class Reference

#include <Geometry.h>

Inheritance diagram for Geometry:
Trackable

Public Slots

void scale (float factor)
 
void setScale (float absScale)
 
void setTranslation (float x, float y, float z)
 
void setRotation (QQuaternion rotation)
 
void setRotation (float x, float y, float z)
 
void setActiveColorSet (int layer)
 

Public Member Functions

 Geometry (QString name, QString filename, QVector< ColorSetInfo > colorSetInfos, bool renderOnProjector=true)
 
 ~Geometry (void)
 
void setInherentTransform (Similarity inherentTransform)
 
QString getName ()
 
QString getFilename (bool wholePath)
 
bool isValid ()
 
bool isRenderedOnProjector ()
 
int getActiveColorSet ()
 
QMatrix4x4 getModelMatrix ()
 
Similarity getInherentTransform ()
 
QVector< QVector4D > * getPositions ()
 
QVector< QVector3D > * getNormals ()
 
QVector< QVector2D > * getUvs ()
 
QVector< GLuint > * getIndices ()
 
QVector< QVector4D > * getVertexColors (int layer)
 
QVector< ColorSetInfo > * getColorSetInfos ()
 
bool hasNormals ()
 
bool hasUvs ()
 
bool hasVertexColors ()
 
int numVertices ()
 
int numIndices ()
 
int numColorSets ()
 
- Public Member Functions inherited from Trackable
 Trackable ()
 
virtual ~Trackable (void)
 
void addTracker (Tracker *tracker)
 
int getId ()
 
QMatrix4x4 getPoseMat ()
 
Similarity getPose ()
 
bool isTracked ()
 
void updatePose ()
 

Protected Member Functions

void freeAssimpScene ()
 

Protected Attributes

QString name
 
QString filename
 
Assimp::Importer importer
 
SceneDestroyersd
 
bool valid
 
bool renderOnProjector
 
QVector< QVector4D > positions
 
QVector< QVector3D > normals
 
QVector< QVector2D > uvs
 
QVector< GLuint > indices
 
QVector< QVector< QVector4D > > vertexColors
 
QVector< ColorSetInfocolorSetInfos
 
Similarity inherentTransform
 
int activeColorSet
 
- Protected Attributes inherited from Trackable
int id
 
QList< Tracker * > trackers
 
Similarity pose
 
clock_t timeOfLastTrack
 
float trackingTimeout
 

Additional Inherited Members

- Static Protected Attributes inherited from Trackable
static int numTrackables
 

Detailed Description

A virtual object that can be displayed and used for augmentation

Constructor & Destructor Documentation

Geometry::Geometry ( QString  name,
QString  filename,
QVector< ColorSetInfo colorSetInfos,
bool  renderOnProjector = true 
)
Parameters
adescriptive name of the object
filenamefull path to geometry file
colorSetInfosmeta-data for the color sets that come with the model (description, which color means what)
renderOnProjectorrender the object on projector?
Geometry::~Geometry ( void  )

Member Function Documentation

void Geometry::freeAssimpScene ( )
inlineprotected

frees memory used by assimp while importing the scene. runs on own thread and may take a while; application may crash if closed before this is finished.

int Geometry::getActiveColorSet ( )
inline

returns the index of the currently displayed color set

QVector<ColorSetInfo>* Geometry::getColorSetInfos ( )
inline

returns the whole collection of colorset infos

QString Geometry::getFilename ( bool  wholePath)

returns the path to the used geometry file, or just the filename

QVector<GLuint>* Geometry::getIndices ( )
inline

returns the triangle indices for rendering

Similarity Geometry::getInherentTransform ( )
inline

returns only the inherent transformation (See inherentTransform)

QMatrix4x4 Geometry::getModelMatrix ( )

returns the current estimated global model matrix, including the inherent transformation

QString Geometry::getName ( )
inline

returns the object's name

QVector<QVector3D>* Geometry::getNormals ( )
inline

returns the vertex normals for rendering

QVector<QVector4D>* Geometry::getPositions ( )
inline

returns the vertex positions for rendering

QVector<QVector2D>* Geometry::getUvs ( )
inline

returns the vertex UVs for rendering

QVector< QVector4D > * Geometry::getVertexColors ( int  layer)

returns a set of vertex colors for rendering

Parameters
layerinxed of the desired color set
bool Geometry::hasNormals ( )
inline

are normals included in the data?

bool Geometry::hasUvs ( )
inline

are uvs included in the data?

bool Geometry::hasVertexColors ( )
inline

are vertex colors included in the data?

bool Geometry::isRenderedOnProjector ( )
inline

render the object on projector?

bool Geometry::isValid ( )
inline

tells you if the geometry has been successfully importet

int Geometry::numColorSets ( )
inline

returns the number of available color sets

int Geometry::numIndices ( )
inline

returns the number of triangle indices

int Geometry::numVertices ( )
inline

returns the total number of vertices

void Geometry::scale ( float  factor)
slot

scales the object by a factor

void Geometry::setActiveColorSet ( int  layer)
slot

sets the current color set index

void Geometry::setInherentTransform ( Similarity  inherentTransform)
inline

See inherentTransform

Parameters
inherentTransformnew value
void Geometry::setRotation ( QQuaternion  rotation)
slot

sets the object's tracked rotation (quaternion)

void Geometry::setRotation ( float  x,
float  y,
float  z 
)
slot

sets the object's tracked rotation (euler angles)

void Geometry::setScale ( float  absScale)
slot

sets an absolute new scale for the object

void Geometry::setTranslation ( float  x,
float  y,
float  z 
)
slot

sets the object's tracked position

Member Data Documentation

int Geometry::activeColorSet
protected

index of the currently displayed color set

QVector<ColorSetInfo> Geometry::colorSetInfos
protected

meta-info of color sets for display in GUI

QString Geometry::filename
protected

full path to the geometry data in use

Assimp::Importer Geometry::importer
protected

an instance of the "Assimp" asset importer

QVector<GLuint> Geometry::indices
protected

triangle indices for rendering

Similarity Geometry::inherentTransform
protected

the offset between the model's origin and the origin of the tracked marker/whatever that is attached to the object

QString Geometry::name
protected

a descriptive name of the object

QVector<QVector3D> Geometry::normals
protected

vertex normals for rendering

QVector<QVector4D> Geometry::positions
protected

vertex positions for rendering

bool Geometry::renderOnProjector
protected

should the geometry be rendered on a projector?

SceneDestroyer* Geometry::sd
protected

a helper thread for cleaning up memory after import

QVector<QVector2D> Geometry::uvs
protected

vertex uvs for rendering

bool Geometry::valid
protected

has the geometry been successfully imported

QVector<QVector<QVector4D> > Geometry::vertexColors
protected

sets of vertex colors for rendering (max 8)


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