The Triangle class represents a triangle in three dimensional space. More...
#include <triangle.h>
Public Member Functions | |
| Triangle () | |
| Creates a new degenerated Triangle, with all points in (0, 0, 0). More... | |
| Triangle (const QVector3D &a, const QVector3D &b, const QVector3D &c) | |
| Creates a new Triangle, with specified points. It is expected, that points a, b and c are ordered counter clock wise. More... | |
| Triangle (const Triangle &triangle) | |
| Creates a new Triangle with data copied from given triangle. More... | |
| ~Triangle () | |
| Triangle & | operator= (const Triangle &triangle) |
| const QVector3D & | a () const |
| void | setA (const QVector3D &a) |
| const QVector3D & | b () const |
| void | setB (const QVector3D &b) |
| const QVector3D & | c () const |
| void | setC (const QVector3D &c) |
| const QVector3D & | normal () const |
| Returns normal of triangle. The vertices a(), b() and c() ordered counter clockwise are expected to describe outer side of triangle. More... | |
| QList< QVector3D > | vertices () const |
| Convenience method. All vertices are returned in QList. More... | |
| QVector3D | reflect (const QVector3D &incidentVector) const |
| Reflects incoming ray at outer side of triangle. More... | |
Protected Member Functions | |
| void | calculateNormal () const |
Protected Attributes | |
| QVector3D * | m_a |
| QVector3D * | m_b |
| QVector3D * | m_c |
| QVector3D * | m_normal |
The Triangle class represents a triangle in three dimensional space.
Mostly this is a data class storing the vertices and is easy copyable. Also, some helper functions are implemented.
| Triangle::Triangle | ( | ) |
Creates a new degenerated Triangle, with all points in (0, 0, 0).
| Triangle::Triangle | ( | const QVector3D & | a, |
| const QVector3D & | b, | ||
| const QVector3D & | c | ||
| ) |
Creates a new Triangle, with specified points. It is expected, that points a, b and c are ordered counter clock wise.
| a | First vertex. |
| b | Second vertex. |
| c | Third vertex. |
| Triangle::Triangle | ( | const Triangle & | triangle | ) |
| Triangle::~Triangle | ( | ) |
| const QVector3D & Triangle::a | ( | ) | const |
| const QVector3D & Triangle::b | ( | ) | const |
| const QVector3D & Triangle::c | ( | ) | const |
|
protected |
| const QVector3D & Triangle::normal | ( | ) | const |
| QVector3D Triangle::reflect | ( | const QVector3D & | incidentVector | ) | const |
Reflects incoming ray at outer side of triangle.
| incidentVector | The vector that will be reflected. |
| void Triangle::setA | ( | const QVector3D & | a | ) |
| void Triangle::setB | ( | const QVector3D & | b | ) |
| void Triangle::setC | ( | const QVector3D & | c | ) |
| QList< QVector3D > Triangle::vertices | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
1.8.8