GL Studio API
|
#include <vertex.h>
Public Member Functions | |
Vertex () | |
Vertex (const VertexNoColor &noColor) | |
Vertex (const VertexNoColor &noColor, const glsColor &_color) | |
Vertex (float _x, float _y, float _z) | |
Vertex (float _x, float _y, float _z, unsigned char _r, unsigned char _g, unsigned char _b, unsigned char _a) | |
Vertex (float _x, float _y, float _z, const glsColor &_color) | |
Vertex | operator+ (const VertexNoColor &arg) const |
Vertex | operator* (const float s) const |
Vertex | Rotate (const float angle) const |
Vertex | Rotate (const VertexNoColor &orig, const float angle) const |
Vertex | Rotate (const VertexNoColor &orig, const float angle, const int axis) const |
Vertex | Rotate (const VertexNoColor &orig, const float theta, const Vector &r) const |
Vertex | operator- (const VertexNoColor &arg) const |
Vertex | operator- () const |
Vertex | operator* (const VertexNoColor &arg) const |
Vertex | CrossProduct (const VertexNoColor &w) const |
Public Member Functions inherited from VertexNoColor | |
VertexNoColor () | |
VertexNoColor (float _x, float _y, float _z) | |
float | Distance3Squared (const VertexNoColor &v) const |
float | DistanceFromLineSquared (const float startx, const float starty, const float startz, const VertexNoColor &direction) const |
float | Distance3 (const VertexNoColor &v) const |
float | Distance2Squared (const VertexNoColor &v) const |
float | Distance2 (const VertexNoColor &v) const |
VertexNoColor | operator+ (const VertexNoColor &arg) const |
VertexNoColor | operator- () const |
VertexNoColor | operator* (const float s) const |
VertexNoColor & | operator*= (const float s) |
VertexNoColor | operator/ (const float s) const |
VertexNoColor & | operator/= (const float s) |
VertexNoColor & | operator+= (const VertexNoColor &arg) |
VertexNoColor | operator- (const VertexNoColor &arg) const |
VertexNoColor & | operator-= (const VertexNoColor &arg) |
bool | operator== (const VertexNoColor &arg) const |
bool | operator!= (const VertexNoColor &arg) const |
VertexNoColor | operator* (const VertexNoColor &arg) const |
VertexNoColor | Rotate (const float angle) const |
VertexNoColor | Rotate (const VertexNoColor &orig, const float angle) const |
VertexNoColor | Rotate (const VertexNoColor &orig, const float angle, const int axis) const |
VertexNoColor | Rotate (const VertexNoColor &orig, const float angle, const Vector &r) const |
void | Normalize (void) |
float | Magnitude () const |
float | MagnitudeSquared () const |
VertexNoColor | CrossProduct (const VertexNoColor &w) const |
float | DotProduct (const VertexNoColor &w) const |
float | AngleToVector (const VertexNoColor &arg) const |
bool | PointInTriangle (const VertexNoColor &a, const VertexNoColor &b, const VertexNoColor &c) const |
bool | CloseTo (const VertexNoColor &arg, float tolerance=0.0001f) const |
float | DistanceFromLine (const VertexNoColor &start, const VertexNoColor &direction) const |
VertexNoColor | ProjectPointToLine (const VertexNoColor &origin, const VertexNoColor &direction) const |
A 3D coordinate in space with an RGBA color value
|
inline |
Simple constructor. Ensures all values are initialized
|
inline |
Just add the default color constructor
|
inline |
Just add the color constructor
|
inline |
Position only constructor. Color values are set to defaults
_x | The X value of the vertex, in logical units |
_y | The Y value of the vertex, in logical units |
_z | The Z value of the vertex, in logical units |
|
inline |
Position only constructor. Color values are set to defaults
_x | The X value of the vertex, in logical units |
_y | The Y value of the vertex, in logical units |
_z | The Z value of the vertex, in logical units |
_r | The R value of the color of the vertex 0-255 |
_g | The G value of the color of the vertex 0-255 |
_b | The B value of the color of the vertex 0-255 |
_a | The A value of the color of the vertex 0-255 |
Position only constructor. Color values are set to defaults
_x | The X value of the vertex, in logical units |
_y | The Y value of the vertex, in logical units |
_z | The Z value of the vertex, in logical units |
_color | The value of the color of the vertex |
|
inline |
Returns the vector cross-product of this vector with the argument vector HS Algebra review: vector cross-product is the vector that is perpendicular to the two given vectors.
w | Second vector |
|
inline |
Compute the result of multiplying this point by a scalar
s | The Scalar to multiply by |
|
inline |
Computes the result of muliplying this point to another one.
arg | vertex to multiple with |
|
inline |
Compute the result of adding this point to another one, in 3D
arg | The vertex to add to this one |
|
inline |
Compute the result of subtracting this point from another one, in 3D
arg | The vertex to subtract from this one |
|
inline |
Negation operator
Vertex Rotate | ( | const float | angle | ) | const |
Rotate this point in 2D around the z axis
angle | The angle to rotate around, in degrees. |
Vertex Rotate | ( | const VertexNoColor & | orig, |
const float | angle | ||
) | const |
Rotate this point around a different point in 2D around the z axis
orig | The rotation origin to rotate around. |
angle | The angle to rotate around, in degrees. |
Vertex Rotate | ( | const VertexNoColor & | orig, |
const float | angle, | ||
const int | axis | ||
) | const |
Rotate this point around a different point in 2D around the z axis
orig | The rotation origin to rotate around. |
angle | The angle to rotate around, in degrees. |
axis | The axis to rotate 180 degrees around. x = 1, y = 2, z = 3. |
Vertex Rotate | ( | const VertexNoColor & | orig, |
const float | theta, | ||
const Vector & | r | ||
) | const |
Rotate this vertex by angle theta around an arbitrary axis r Return the rotated point. Positive angles are anticlockwise looking down the axis towards the origin.