RobWorkProject
Public Types | Public Member Functions | List of all members
TriangleN1< T > Class Template Reference

Triangle facet. triangle class of type N1, which means that beside the plain triangle the face normal of the triangle is saved with the facenormal. More...

#include <Triangle.hpp>

Public Types

typedef T value_type
 value type of vertices
 

Public Member Functions

 TriangleN1 (const rw::math::Vector3D< T > &p1, const rw::math::Vector3D< T > &p2, const rw::math::Vector3D< T > &p3)
 constructor, calculates the face normal from vertex data
 
 TriangleN1 (const rw::math::Vector3D< T > &p1, const rw::math::Vector3D< T > &p2, const rw::math::Vector3D< T > &p3, const rw::math::Vector3D< T > &n)
 constructor
 
 TriangleN1 (const Triangle< T > &t, const rw::math::Vector3D< T > &n)
 constructor
 
virtual ~TriangleN1 ()
 destructor
 
rw::math::Vector3D< T > & getFaceNormal ()
 returns the facenormal of this triangle
 
const rw::math::Vector3D< T > & getFaceNormal () const
 returns the facenormal of this triangle
 
halfSpaceDist (const rw::math::Vector3D< T > &x) const
 calculates the distance to the halfspace of the triangle
 
rw::math::Vector3D< T > & getVertex (size_t i)
 get vertex at index i More...
 
const rw::math::Vector3D< T > & getVertex (size_t i) const
 get vertex at index i More...
 
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. More...
 
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
 
bool isInside (const rw::math::Vector3D< T > &x)
 tests wheather the point x is inside the triangle
 
void applyTransform (const rw::math::Transform3D< T > &t3d)
 apply a transformation to this triangle More...
 
TriangleN1< T > transform (const rw::math::Transform3D< T > &t3d) const
 Returns Triangle transformed by t3d. More...
 
const Triangle< T > & getTriangle () const
 
Triangle< T > & getTriangle ()
 

Detailed Description

template<class T = double>
class rw::geometry::TriangleN1< T >

Triangle facet. triangle class of type N1, which means that beside the plain triangle the face normal of the triangle is saved with the facenormal.

Member Function Documentation

◆ applyTransform()

void applyTransform ( const rw::math::Transform3D< T > &  t3d)
inline

apply a transformation to this triangle

Parameters
t3d[in] transform that is to be applied

◆ calcFaceNormal()

rw::math::Vector3D<T> calcFaceNormal ( ) const
inline

calculates the face normal of this triangle. It is assumed that the triangle vertices are arranged counter clock wise.

◆ getVertex() [1/2]

rw::math::Vector3D<T>& getVertex ( size_t  i)
inline

get vertex at index i

◆ getVertex() [2/2]

const rw::math::Vector3D<T>& getVertex ( size_t  i) const
inline

get vertex at index i

◆ transform()

TriangleN1<T> transform ( const rw::math::Transform3D< T > &  t3d) const
inline

Returns Triangle transformed by t3d.


The documentation for this class was generated from the following file: