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

Triangle facet. triangle class that stores one normal for each vertex in the triangle. More...

#include <Triangle.hpp>

Public Types

typedef T value_type
 value type of vertices
 

Public Member Functions

 TriangleN3 (const rw::math::Vector3D< T > &p1, const rw::math::Vector3D< T > &p2, const rw::math::Vector3D< T > &p3, const rw::math::Vector3D< T > &n1, const rw::math::Vector3D< T > &n2, const rw::math::Vector3D< T > &n3)
 constructor, with all input defined
 
 TriangleN3 (const Triangle< T > &t, const rw::math::Vector3D< T > &n1, const rw::math::Vector3D< T > &n2, const rw::math::Vector3D< T > &n3)
 constructor from triangle and normals
 
rw::math::Vector3D< T > & getNormal (size_t i)
 get normal of vertice i More...
 
const rw::math::Vector3D< T > & getNormal (size_t i) const
 return vertex normal of the vertex specified by i
 
virtual rw::math::Vector3D< T > & getVertex (size_t i)
 get vertex at index i More...
 
virtual const rw::math::Vector3D< T > & getVertex (size_t i) const
 get vertex at index i More...
 
rw::math::Vector3D< T > & operator[] (size_t i)
 get vertex at index i More...
 
const rw::math::Vector3D< T > & operator[] (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...
 
TriangleN3< T > transform (const rw::math::Transform3D< T > &t3d) const
 Returns TriangleN2 transformed by t3d.
 
const Triangle< T > & getTriangle () const
 
Triangle< T > & getTriangle ()
 

Detailed Description

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

Triangle facet. triangle class that stores one normal for each vertex in the triangle.

Member Function Documentation

◆ 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.

◆ getNormal()

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

get normal of vertice i

Parameters
i[in] index of vertice
Returns
normal of the i'th vertice

◆ getVertex() [1/2]

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

get vertex at index i

◆ getVertex() [2/2]

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

get vertex at index i

◆ operator[]() [1/2]

rw::math::Vector3D<T>& operator[] ( size_t  i)
inline

get vertex at index i

◆ operator[]() [2/2]

const rw::math::Vector3D<T>& operator[] ( size_t  i) const
inline

get vertex at index i


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