TetrahedronGems are gems with a shape like a tetrahedron. The only difference to AbstracGem is the fact, that a TetrahedronGem has a shape defined.
More...
#include <tetrahedrongem.h>
|
| TetrahedronGem (QObject *parent=0) |
|
virtual | ~TetrahedronGem () |
|
| AbstractGem (QObject *parent=0) |
|
virtual | ~AbstractGem () |
|
const QVector3D & | color () const |
|
void | setColor (const QVector3D &color) |
|
const GemData & | data () const |
| Returns the GemData object describing the gem. This method was not intended to be public, but public access is needed it for rendering. More...
|
|
const QMatrix4x4 & | model () const |
| Constructs normal matrix for gem in order to transform it from objectspace into worldsapce. More...
|
|
const QVector3D & | position () const |
|
virtual void | setPosition (const QVector3D &position) |
|
qreal | radius () const |
| Radius of boundingsphere. This value is influenced by scale and the geometry of gem. More...
|
|
const QQuaternion & | rotation () const |
| Rotation around own center. More...
|
|
virtual void | setRotation (const QQuaternion &rotation) |
| Sets the rotation of gem around own center. More...
|
|
void | rotate (const QQuaternion &quaternion) |
| Rotates the gem around the center of the gem. More...
|
|
qreal | scale () const |
|
void | setScale (qreal scaleFactor) |
|
GemType | type () const |
| Returns the type of gem, in order to differentiate between types even if you have only AbstractGems. More...
|
|
float | boundingSphereIntersectedBy (const LightRay &ray, QVector3D *collisionPoint=nullptr) |
| Calculates distance to collision with gem's boundingsphere. The boundingsphere is specified by gems themself and cannot be influenced from outside. Because the collision point is only calculated with the bondingsphere computation is pretty fast. More...
|
|
virtual float | intersectedBy (const LightRay &ray, QVector3D *collisionPoint=nullptr) |
| Calcualtes the distance to collision of ray with gem. This method calculates the real collision point. Therefore, many computations are done especially for complex gems. More...
|
|
virtual QList< LightRay * > | processRayIntersection (const LightRay &ray, Scene *scene) |
| Calculates all new rays, that will be created by a collision with that gem. Also affect gem attributes. More...
|
|
TetrahedronGems are gems with a shape like a tetrahedron. The only difference to AbstracGem is the fact, that a TetrahedronGem has a shape defined.
TetrahedronGem::TetrahedronGem |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
TetrahedronGem::~TetrahedronGem |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following files: