MRPT  1.9.9
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 84 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_tvertices
 Vector of indices to the vertex list. More...
 
double normal [3]
 Normal vector. More...
 

Constructor & Destructor Documentation

◆ TPolyhedronFace()

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

Fast default constructor.

Initializes to garbage.

Definition at line 91 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 476 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 499 of file CPolyhedron.cpp.

Member Data Documentation

◆ normal

double mrpt::opengl::CPolyhedron::TPolyhedronFace::normal[3]

Normal vector.

Definition at line 89 of file CPolyhedron.h.

Referenced by mrpt::opengl::operator<<(), mrpt::opengl::operator>>(), and mrpt::opengl::CPolyhedron::setNormal().

◆ vertices




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019