RobWorkProject
23.9.11-
|
plain triangle class. The second template argument specify the number of normals associated with the triangle. The triangle vertices should be arranged counter clock wise. More...
#include <Triangle.hpp>
Public Types | |
typedef T | value_type |
value type of vertices | |
Public Member Functions | |
Triangle () | |
default constructor | |
Triangle (const rw::math::Vector3D< T > &p1, const rw::math::Vector3D< T > &p2, const rw::math::Vector3D< T > &p3) | |
constructor More... | |
template<class R > | |
Triangle (const Triangle< R > &f) | |
copy constructor More... | |
virtual | ~Triangle () |
destructor | |
rw::math::Vector3D< T > & | getVertex (size_t i) |
get vertex at index i | |
const rw::math::Vector3D< T > & | getVertex (size_t i) const |
get vertex at index i | |
const rw::math::Vector3D< T > & | operator[] (size_t i) const |
get vertex at index i | |
rw::math::Vector3D< T > & | operator[] (size_t i) |
get vertex at index i | |
rw::math::Vector3D< T > | calcFaceNormal () const |
calculates the face normal of this triangle. It is assumed that the triangle vertices are arranged counter clock wise. | |
bool | isInside (const rw::math::Vector3D< T > &x) |
tests wheather the point x is inside the triangle | |
double | calcArea () const |
calculate the area of the triangle More... | |
void | applyTransform (const rw::math::Transform3D< T > &t3d) |
apply a transformation to this triangle More... | |
Triangle< T > | transform (const rw::math::Transform3D< T > &t3d) const |
Returns Triangle transformed by t3d. | |
const Triangle< T > & | getTriangle () const |
Triangle< T > & | getTriangle () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Triangle< T > &t) |
Outputs transform to stream. More... | |
plain triangle class. The second template argument specify the number of normals associated with the triangle. The triangle vertices should be arranged counter clock wise.
|
inline |
constructor
p1 | [in] vertice 1 |
p2 | [in] vertice 2 |
p3 | [in] vertice 3 |
copy constructor
f | [in] - The face that is to be copied. |
|
inline |
apply a transformation to this triangle
t3d | [in] transform that is to be applied |
|
inline |
calculate the area of the triangle
|
friend |
Outputs transform to stream.
os | [in/out] an output stream |
t | [in] the transform that is to be sent to the output stream |