|
Free Electron
|
Barycentric coordinates for a triangle. More...
#include <Barycenter.h>

Public Member Functions | |
| Barycenter (T a_b0, T a_b1) | |
| Barycenter (T a_b0, T a_b1, T a_b2) | |
| Barycenter (const Barycenter< T > &a_rOther) | |
| Barycenter (const Vector< 3, T > &a_rOther) | |
| Barycenter & | operator= (const Barycenter< T > &a_rOther) |
| Barycenter & | operator= (const Vector< 3, T > &a_rOther) |
| Barycenter & | setUV (T a_u, T a_v) |
| operator Vector< 3, T > (void) const | |
| void | solve (const Vector< 3, T > &a_vert0, const Vector< 3, T > &a_vert1, const Vector< 3, T > &a_vert2, const Vector< 3, T > &a_point) |
| void | clamp (const Vector< 3, T > &a_vert0, const Vector< 3, T > &a_vert1, const Vector< 3, T > &a_vert2) |
Public Member Functions inherited from fe::Vector< 2, T > | |
| Vector (const Vector< N, T > &other) | |
| Vector (const Vector< N, U > &other) | |
| Vector (const Vector< N+1, U > &other) | |
| Vector (const Vector< N+2, U > &other) | |
| Vector (const Vector< N-1, U > &other) | |
| Vector (const Vector< N-2, U > &other) | |
| Vector (const T *array) | |
| Vector (T x, T y, T z, T w, T v, T u) | |
| Vector (T x, T y, T z, T w, T v) | |
| Vector (T x, T y, T z, T w) | |
| Vector (T x, T y, T z) | |
| Vector (T x, T y) | |
| Vector (T x) | |
| Vector (const Vector< 2, U > &other) | |
| const T & | operator[] (unsigned int index) const |
| T & | operator[] (unsigned int index) |
| T * | raw (void) |
| const T * | raw (void) const |
| const T * | temp (void) const |
| Vector< N, T > & | operator= (const T *array) |
| Vector< N, T > & | operator= (const Vector< N, T > &other) |
| Vector< N, T > & | operator= (const Vector< N, U > &other) |
| Vector< N, T > & | operator= (const Vector< N+1, T > &other) |
| Vector< N, T > & | operator= (const Vector< N+1, U > &other) |
| Vector< N, T > & | operator= (const Vector< N+2, U > &other) |
| Vector< N, T > & | operator= (const Vector< N-1, U > &other) |
| Vector< N, T > & | operator= (const Vector< N-2, U > &other) |
| bool | operator== (const Vector< N, T > &other) const |
| bool | operator!= (const Vector< N, T > &other) const |
Static Private Member Functions | |
| static T | along (const Vector< 3, T > &start, const Vector< 3, T > &end, const Vector< 3, T > &point) |
Additional Inherited Members | |
Public Attributes inherited from fe::Vector< 2, T > | |
| T | m_data [N] |
Related Functions inherited from fe::Vector< 2, T > | |
| bool | operator== (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| equality test More... | |
| Vector< M, T > & | multiply (Vector< M, T > &b, const Matrix< M, N, T > &A, const Vector< N, U > &x) |
| Matrix Vector multiply. More... | |
| Vector< M, T > | multiply (const Matrix< M, N, T > &A, const Vector< N, U > &x) |
| Matrix Vector multiply. More... | |
| Vector< M, T > | transposeMultiply (const Matrix< M, N, T > &A, const Vector< N, T > &x) |
| Matrix Vector multiply with the matrix transposed. More... | |
| Vector< M, U > | operator* (const Matrix< M, N, T > &lhs, const Vector< N, U > &rhs) |
| Matrix Vector multiply. More... | |
| Vector< N, T > | operator* (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| Piecewise multiply operation. More... | |
| Vector< N, T > | operator* (const U lhs, const Vector< N, T > &rhs) |
| Scale operation. More... | |
| Vector< N, T > | operator* (const Vector< N, T > &lhs, const U &rhs) |
| Scale operation. More... | |
| Vector< 4, T > | operator* (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Return a Vector of products of each component. More... | |
| boost::enable_if< boost::is_arithmetic< U >, Vector< 4, T > >::type | operator* (const U lhs, const Vector< 4, T > &rhs) |
| Return a uniformly scale Vector (pre) More... | |
| boost::enable_if< boost::is_arithmetic< U >, Vector< 4, T > >::type | operator* (const Vector< 4, T > &lhs, const U rhs) |
| Return a uniformly scale Vector (post) More... | |
| Vector< FE_VDIM, F32 > | operator* (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Return a Vector of products of each component. More... | |
| boost::enable_if< boost::is_arithmetic< T >, Vector< FE_VDIM, F32 > >::type | operator* (const T lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Return a uniformly scaled Vector (pre) More... | |
| boost::enable_if< boost::is_arithmetic< T >, Vector< FE_VDIM, F32 > >::type | operator* (const Vector< FE_VDIM, F32 > &lhs, const T rhs) |
| Return a uniformly scaled Vector (post) More... | |
| bool | equivalent (const Matrix< 3, 4, T > &lhs, const Matrix< 3, 4, T > &rhs, U margin) |
| Equivalence test within the given tolerance margin. More... | |
| bool | equivalent (const Vector< N, T > &lhs, const Vector< N, T > &rhs, U margin) |
| Equivalence test within the given tolerance margin. More... | |
| Vector< N, T > & | set (Vector< N, T > &lhs) |
| Set all the elements to zero. More... | |
| Vector< 4, T > & | set (Vector< 4, T > &r) |
| Set components. More... | |
| Vector< 4, T > & | set (Vector< 4, T > &r, U x) |
| Set components. More... | |
| Vector< 4, T > & | set (Vector< 4, T > &r, U x, V y) |
| Set components. More... | |
| Vector< 4, T > & | set (Vector< 4, T > &r, U x, V y, W z) |
| Set components. More... | |
| Vector< 4, T > & | set (Vector< 4, T > &r, U x, V y, W z, X w) |
| Set components. More... | |
| Vector< FE_VDIM, F32 > & | set (Vector< FE_VDIM, F32 > &r) |
| Set components. More... | |
| Vector< FE_VDIM, F32 > & | set (Vector< FE_VDIM, F32 > &r, T x) |
| Set components. More... | |
| Vector< FE_VDIM, F32 > & | set (Vector< FE_VDIM, F32 > &r, T x, U y) |
| Set components. More... | |
| Vector< FE_VDIM, F32 > & | set (Vector< FE_VDIM, F32 > &r, T x, U y, V z) |
| Set components. More... | |
| Vector< FE_VDIM, F32 > & | set (Vector< FE_VDIM, F32 > &r, T x, U y, V z, W w) |
| Set components. More... | |
| Vector< N, T > & | setAll (Vector< N, T > &lhs, const U value) |
| Set all the elements to the given value. More... | |
| Vector< FE_VDIM, F32 > & | setAll (Vector< FE_VDIM, F32 > &lhs, T value) |
| Set all components to the same value. More... | |
| Vector< N, T > & | setAt (Vector< N, T > &lhs, U32 index, const U value) |
| Set the value at the index. More... | |
| Vector< 4, T > & | setAt (Vector< 4, T > &lhs, U32 index, U value) |
| Set indexed component. More... | |
| Vector< FE_VDIM, F32 > & | setAt (Vector< FE_VDIM, F32 > &lhs, U32 index, T value) |
| Set indexed component. More... | |
| U32 | size (const Vector< N, T > &lhs) |
| Return the number of elements. More... | |
| U32 | size (const Vector< 4, T > &lhs) |
| Return the number of elements. More... | |
| U32 | size (const Vector< FE_VDIM, F32 > &lhs) |
| Return the number of elements. More... | |
| Vector< N, T > & | operator+= (Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| In place add operator. More... | |
| Vector< N, T > & | operator+= (Vector< N, T > &lhs, const Vector< M, T > &rhs) |
| In place add operator. More... | |
| Vector< 4, T > & | operator+= (Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Add to Vector in place. More... | |
| Vector< FE_VDIM, F32 > & | operator+= (Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Add to Vector in place. More... | |
| Vector< N, T > & | operator-= (Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| In place subtract operator. More... | |
| Vector< N, T > & | operator-= (Vector< N, T > &lhs, const Vector< M, T > &rhs) |
| In place subtract operator. More... | |
| Vector< 4, T > & | operator-= (Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Subtract from Vector in place. More... | |
| Vector< FE_VDIM, F32 > & | operator-= (Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Subtract from Vector in place. More... | |
| Vector< N, T > | operator- (const Vector< N, T > &rhs) |
| Negate operation. More... | |
| Vector< N, T > | operator- (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| subtract operation More... | |
| Vector< N, T > | operator- (const Vector< N, T > &lhs, const Vector< M, T > &rhs) |
| subtract operation More... | |
| Vector< 4, T > | operator- (const Vector< 4, T > &rhs) |
| Negate the Vector. More... | |
| Vector< 4, T > | operator- (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Return difference of Vectors. More... | |
| Vector< FE_VDIM, F32 > | operator- (const Vector< FE_VDIM, F32 > &rhs) |
| Negate the Vector. More... | |
| Vector< FE_VDIM, F32 > | operator- (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Return difference of Vectors. More... | |
| Vector< N, T > & | operator*= (Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| In place piecewise multiply operator. More... | |
| Vector< N, T > & | operator*= (Vector< N, T > &lhs, const Vector< M, T > &rhs) |
| In place piecewise multiply operator. More... | |
| Vector< N, T > & | operator*= (Vector< N, T > &lhs, U scale) |
| In place piecewise scale operator. More... | |
| Vector< 4, T > & | operator*= (Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Independently scale components in place. More... | |
| Vector< 4, T > & | operator*= (Vector< 4, T > &lhs, U scale) |
| Uniformly scale components in place. More... | |
| Vector< FE_VDIM, F32 > & | operator*= (Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Independently scale components in place. More... | |
| Vector< FE_VDIM, F32 > & | operator*= (Vector< FE_VDIM, F32 > &lhs, T rhs) |
| Uniformly scale components in place. More... | |
| T | dot (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| Dot (inner) product. More... | |
| T | dot (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Return dot product. More... | |
| F32 | dot (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Return dot product. More... | |
| T | magnitude (const Vector< N, T > &rhs) |
| Frobenius norm operation. More... | |
| T | magnitude (const Vector< 4, T > &rhs) |
| Return the Vector length. More... | |
| F32 | magnitude (const Vector< FE_VDIM, F32 > &rhs) |
| Return the Vector length. More... | |
| T | magnitudeSquared (const Vector< N, T > &rhs) |
| Square of the length. More... | |
| T | magnitudeSquared (const Vector< 4, T > &rhs) |
| Return square of the Vector length. More... | |
| F32 | magnitudeSquared (const Vector< FE_VDIM, F32 > &rhs) |
| Return square of the Vector length. More... | |
| Vector< N, T > | unit (const Vector< N, T > &vec) |
| Return vector scaled to unit length. More... | |
| Vector< 4, T > | unit (const Vector< 4, T > &vector) |
| Return the Vector direction scaled to unit length. More... | |
| Vector< FE_VDIM, F32 > | unit (const Vector< FE_VDIM, F32 > &rhs) |
| Return the Vector direction scaled to unit length. More... | |
| Vector< N, T > | unitSafe (const Vector< N, T > &vec) |
| Return vector scaled to unit length with zero check. More... | |
| Vector< 4, T > | unitSafe (const Vector< 4, T > &vector) |
| Return the Vector direction scaled to unit length with zero check. More... | |
| Vector< FE_VDIM, F32 > | unitSafe (const Vector< FE_VDIM, F32 > &rhs) |
| Return the Vector direction scaled to unit length with zero check. More... | |
| Vector< N, T > & | normalize (Vector< N, T > &vec) |
| In place normalize operator. More... | |
| Vector< 4, T > & | normalize (Vector< 4, T > &vector) |
| Scale Vector to unit length. More... | |
| Vector< FE_VDIM, F32 > & | normalize (Vector< FE_VDIM, F32 > &rhs) |
| Scale Vector to unit length. More... | |
| Vector< N, T > & | normalizeSafe (Vector< N, T > &vec) |
| In place normalize operator with zero length check. More... | |
| Vector< 4, T > & | normalizeSafe (Vector< 4, T > &vector) |
| Scale Vector to unit length with zero check. More... | |
| Vector< FE_VDIM, F32 > & | normalizeSafe (Vector< FE_VDIM, F32 > &rhs) |
| Scale Vector to unit length. More... | |
| String | print (const Vector< N, T > &vec) |
| Print to a string. More... | |
| String | print (const Vector< 4, T > &vector) |
| Return text describing the Vector's state. More... | |
| String | print (const Vector< FE_VDIM, F32 > &rhs) |
| Return text describing the Vector's state. More... | |
| Vector< N, T > | operator+ (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| add operation More... | |
| Vector< N, T > | operator+ (const Vector< N, T > &lhs, const Vector< M, T > &rhs) |
| add operation More... | |
| Vector< 4, T > | operator+ (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Return sum of Vectors. More... | |
| Vector< FE_VDIM, F32 > | operator+ (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Return sum of Vectors. More... | |
| Vector< N, T > | operator/ (const Vector< N, T > &lhs, const U &rhs) |
| Inverse Scale operation. More... | |
| Vector< N, T > & | addScaled (Vector< N, T > &lhs, U scalar, const Vector< N, T > &rhs) |
| Add with scaling. More... | |
| Vector< N, T > & | scaleAndAdd (Vector< N, T > &lhs, U scalar, const Vector< N, T > &rhs) |
| Scale then add. More... | |
| Vector< 4, T > & | cross3 (Vector< 4, T > &r, const Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Return a cross product of Vectors. More... | |
| Vector< 4, T > | cross3 (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs) |
| Set the Vector as a cross product of Vectors. More... | |
| Vector< FE_VDIM, F32 > & | cross3 (Vector< FE_VDIM, F32 > &r, const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Return a cross product of Vectors. More... | |
| Vector< FE_VDIM, F32 > | cross3 (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs) |
| Set the Vector as a cross product of Vectors. More... | |
Barycentric coordinates for a triangle.
b2 is not stored, but implied as (1 - b0 - b1)
Usually, b0 >= 0, b1 >= 0, and b0 + b1 <= 1, but this is not a restriction.
coincident point = vert0 * b0 + vert1 * b1 + vert2 * b2
1.8.13