|
Core 1.0
|
Quadrangles. More...
#include <quadrangle.h>
Public Member Functions | |
| Quadrangle () | |
| Empty. | |
| Quadrangle (const Vector &, const Vector &, const Vector &, const Vector &) | |
| Create a quadrangle. | |
| Quadrangle (double, double) | |
| Create a horizontal quadrangle. | |
| Quadrangle (double) | |
| Create a horizontal quadrangle. | |
| ~Quadrangle () | |
| Empty. | |
| Vector | Vertex (const double &, const double &) const |
| Compute the position of a vertex inside the quadrangle. | |
| Vector | Normal (const double &, const double &) const |
| Compute the normal of a vertex inside the quadrangle. | |
| Vector | Normal () const |
| Compute the normal of the quadrangle. | |
| void | Rotate (const Matrix &) |
| Rotate the quadrangle. | |
| void | Translate (const Vector &) |
| Translate the quadrangle. | |
| void | Scale (const double &) |
| Scale the quadrangle. | |
| void | Transform (const FrameScaled &) |
| Transform the quadrangle. | |
| Quadrangle | Transformed (const FrameScaled &) const |
| Transform the quadrangle. | |
| Quadrangle | Translated (const Vector &) const |
| Return a translated quadrangle. | |
Protected Attributes | |
| Vector | p [4] = { Vector::Null,Vector::X,Vector::X + Vector::Y,Vector::Y } |
| Vertices, stored in counter-clockwize order. | |
Static Protected Attributes | |
| static double | epsilon = 1.0e-10 |
| Internal \epsilon; constant. | |
Quadrangles.
Quadrangles should be planar and convex.
|
explicit |
Create a quadrangle.
| a,b,c,d | Vertices. |
|
explicit |
Create a horizontal quadrangle.
| x,y | Half size, the quadrangle vertexes will have (±x ±y) coordinates. |
|
explicit |
Create a horizontal quadrangle.
| r | Radius, i.e., half size. |
| Vector Quadrangle::Normal | ( | ) | const |
Compute the normal of the quadrangle.
The quadrangle should be flat.
| Vector Quadrangle::Normal | ( | const double & | u, |
| const double & | v ) const |
Compute the normal of a vertex inside the quadrangle.
| u,v | Parametric coordinates of the vertex. |
| void Quadrangle::Rotate | ( | const Matrix & | r | ) |
Rotate the quadrangle.
| r | Rotation matrix. |
| void Quadrangle::Scale | ( | const double & | s | ) |
Scale the quadrangle.
| s | Scaling factor. |
| void Quadrangle::Transform | ( | const FrameScaled & | frame | ) |
Transform the quadrangle.
| frame | Transformation. |
| Quadrangle Quadrangle::Transformed | ( | const FrameScaled & | frame | ) | const |
Transform the quadrangle.
| frame | Transformation. |
| void Quadrangle::Translate | ( | const Vector & | t | ) |
Translate the quadrangle.
| t | Translation vector. |
| Quadrangle Quadrangle::Translated | ( | const Vector & | t | ) | const |
Return a translated quadrangle.
| t | Translation vector. |
| Vector Quadrangle::Vertex | ( | const double & | u, |
| const double & | v ) const |
Compute the position of a vertex inside the quadrangle.
| u,v | Parametric coordinates of the vertex. |