Point Cloud Viewer  1.00
A Viewer to display point clouds with phong shading by converting them to splats.
EntityMoveable Class Reference

Complements the Entity with a possibility to define and edit a local coordinate system. More...

#include <entitymoveable.h>

Inherits Entity.

Inherited by EntityCloud, and Light.

Public Member Functions

 EntityMoveable ()
 Creates the Entity at the origin. More...
 
 EntityMoveable (float x, float y, float z)
 Creates the Entity at the given position. More...
 
void rotate (QVector3D &axis, float angle)
 Rotates the local coordinate system around a given axis. More...
 
void move (QVector3D &vec)
 Moves the model along a vector. More...
 
virtual void scale (float value)
 Scales the object around the local origin. More...
 
virtual void reset ()
 Resets the local coordinate system to the world coordinate system.
 
- Public Member Functions inherited from Entity
 Entity (float x, float y, float z)
 Creates a new entity at the given location. More...
 
 Entity ()
 Creates a new entity at the origin (0,0,0).
 
float distance (Entity &to)
 Computes the euclidean distance to another entity. More...
 
float distance (float x, float y, float z)
 Computes the euclidean distance to a location. More...
 
QVector3D getPos ()
 Returns the location of the entity. More...
 
virtual void setPos (QVector3D &pos)
 Changes the entity's location. More...
 
virtual void setPos (float x, float y, float z)
 Changes the entity's location. More...
 

Protected Attributes

QMatrix4x4 modelMat
 

Additional Inherited Members

- Public Attributes inherited from Entity
float x
 The x coordinate of the entity's location.
 
float y
 The y coordinate of the entity's location.
 
float z
 The z coordinate of the entity's location.
 

Detailed Description

Complements the Entity with a possibility to define and edit a local coordinate system.

Constructor & Destructor Documentation

EntityMoveable::EntityMoveable ( )

Creates the Entity at the origin.

The local coordinate system equals the global one.

EntityMoveable::EntityMoveable ( float  x,
float  y,
float  z 
)

Creates the Entity at the given position.

The local coordinate system is shifted to the given location.

Parameters
xThe x coordinate of the local origin in world coordinates.
yThe y coordinate of the local origin in world coordinates.
zThe z coordinate of the local origin in world coordinates.

Member Function Documentation

void EntityMoveable::move ( QVector3D &  vec)

Moves the model along a vector.

Parameters
vecThe translation vector in world space coordinates.
void EntityMoveable::rotate ( QVector3D &  axis,
float  angle 
)

Rotates the local coordinate system around a given axis.

The rotation center is the local origin.

Parameters
axisThe rotation axis, given in world space coordinates.
angleThe rotation angle in degrees.
void EntityMoveable::scale ( float  value)
virtual

Scales the object around the local origin.

Parameters
valueThe scaling coefficient.

Reimplemented in Light.


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