MRPT  2.0.4
List of all members | Public Member Functions | Public Attributes
mrpt::opengl::CPolyhedron::TPolyhedronFace Struct Reference

Detailed Description

Struct used to store a polyhedron face.

Consists on a set of vertex indices and a normal vector.

Definition at line 105 of file CPolyhedron.h.

#include <mrpt/opengl/CPolyhedron.h>

Public Member Functions

 TPolyhedronFace ()
 Fast default constructor. More...
 
 ~TPolyhedronFace ()=default
 Destructor. More...
 
double area (const std::vector< mrpt::math::TPoint3D > &vertices) const
 Given a set of vertices, computes the area of this face. More...
 
void getCenter (const std::vector< mrpt::math::TPoint3D > &vertices, mrpt::math::TPoint3D &p) const
 Given a set of vertices, get this face's center. More...
 

Public Attributes

std::vector< uint32_t > vertices
 Vector of indices to the vertex list. More...
 
mrpt::math::TVector3D normal
 Normal vector. More...
 

Constructor & Destructor Documentation

◆ TPolyhedronFace()

mrpt::opengl::CPolyhedron::TPolyhedronFace::TPolyhedronFace ( )
inline

Fast default constructor.

Initializes to garbage.

Definition at line 112 of file CPolyhedron.h.

◆ ~TPolyhedronFace()

mrpt::opengl::CPolyhedron::TPolyhedronFace::~TPolyhedronFace ( )
default

Destructor.

Member Function Documentation

◆ area()

double CPolyhedron::TPolyhedronFace::area ( const std::vector< mrpt::math::TPoint3D > &  vertices) const

Given a set of vertices, computes the area of this face.

Definition at line 475 of file CPolyhedron.cpp.

References mrpt::square().

Here is the call graph for this function:

◆ getCenter()

void CPolyhedron::TPolyhedronFace::getCenter ( const std::vector< mrpt::math::TPoint3D > &  vertices,
mrpt::math::TPoint3D p 
) const

Given a set of vertices, get this face's center.

Definition at line 498 of file CPolyhedron.cpp.

References mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.

Member Data Documentation

◆ normal

mrpt::math::TVector3D mrpt::opengl::CPolyhedron::TPolyhedronFace::normal

◆ vertices

std::vector<uint32_t> mrpt::opengl::CPolyhedron::TPolyhedronFace::vertices



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020