Main MRPT website > C++ reference for MRPT 1.5.5
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 72 of file CPolyhedron.h.

#include <mrpt/opengl/CPolyhedron.h>

Public Member Functions

 TPolyhedronFace ()
 Fast default constructor. More...
 
 ~TPolyhedronFace ()
 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

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

Fast default constructor.

Initializes to garbage.

Definition at line 76 of file CPolyhedron.h.

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

Destructor.

Definition at line 78 of file CPolyhedron.h.

Member Function Documentation

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 340 of file CPolyhedron.cpp.

References mrpt::math::square().

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 357 of file CPolyhedron.cpp.

References mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.

Member Data Documentation

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

Normal vector.

Definition at line 74 of file CPolyhedron.h.

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

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



Page generated by Doxygen 1.8.6 for MRPT 1.5.5 Git: e06b63d Fri Dec 1 14:41:11 2017 +0100 at sáb dic 2 13:00:21 CET 2017