#include "opengl-precomp.h"
#include <mrpt/opengl/CPolyhedron.h>
#include <mrpt/math/CMatrixTemplate.h>
#include <mrpt/math/CMatrix.h>
#include <mrpt/poses/CPose3D.h>
#include <mrpt/math/geometry.h>
#include <mrpt/math/ops_containers.h>
#include <mrpt/random.h>
#include <mrpt/utils/CStream.h>
#include <mrpt/utils/stl_serialization.h>
#include "opengl_internals.h"
Go to the source code of this file.
Classes | |
class | FCreatePolygonFromFace< T > |
struct | SegmentVector |
Enumerations | |
enum | JohnsonBodyPart { INF_NO_BODY =-2, SUP_NO_BODY =-1, UPWARDS_PYRAMID =0, DOWNWARDS_PYRAMID =1, UPWARDS_CUPOLA =2, DOWNWARDS_CUPOLA =3, ROTATED_UPWARDS_CUPOLA =4, ROTATED_DOWNWARDS_CUPOLA =5, PRISM =6, ANTIPRISM =7, UPWARDS_ROTUNDA =8, DOWNWARDS_ROTUNDA =9, ROTATED_UPWARDS_ROTUNDA =10, ROTATED_DOWNWARDS_ROTUNDA =11 } |
Functions | |
bool | getVerticesAndFaces (const vector< math::TPolygon3D > &polys, vector< TPoint3D > &vertices, vector< CPolyhedron::TPolyhedronFace > &faces) |
bool | analyzeJohnsonPartsString (const std::string &components, uint32_t numBaseEdges, vector< JohnsonBodyPart > &parts) |
size_t | additionalVertices (JohnsonBodyPart j, uint32_t numBaseEdges) |
void | insertCupola (size_t numBaseEdges, double angleShift, double baseRadius, double edgeLength, bool isRotated, bool isUpwards, size_t base, vector< TPoint3D > &verts, vector< CPolyhedron::TPolyhedronFace > &faces) |
void | insertRotunda (double angleShift, double baseRadius, bool isRotated, bool isUpwards, size_t base, vector< TPoint3D > &verts, vector< CPolyhedron::TPolyhedronFace > &faces) |
size_t | additionalFaces (JohnsonBodyPart j, uint32_t numBaseEdges) |
bool | faceContainsEdge (const CPolyhedron::TPolyhedronFace &f, const CPolyhedron::TPolyhedronEdge &e) |
bool | getPlanesIntersection (const vector< const TPlane *> &planes, TPoint3D &pnt) |
bool | searchForFace (const vector< CPolyhedron::TPolyhedronFace > &fs, uint32_t v1, uint32_t v2, uint32_t v3) |
bool | searchForEdge (const vector< CPolyhedron::TPolyhedronEdge > &es, uint32_t v1, uint32_t v2, size_t &where) |
bool | searchForEdge (const vector< CPolyhedron::TPolyhedronFace >::const_iterator &begin, const vector< CPolyhedron::TPolyhedronFace >::const_iterator &end, uint32_t v1, uint32_t v2) |
double | getHeight (const TPolygon3D &p, const TPoint3D &c) |
enum JohnsonBodyPart |
Definition at line 65 of file CPolyhedron.cpp.
|
inline |
Definition at line 240 of file CPolyhedron.cpp.
References ANTIPRISM, INF_NO_BODY, PRISM, SUP_NO_BODY, and UPWARDS_CUPOLA.
Referenced by mrpt::opengl::CPolyhedron::CreateJohnsonSolidWithConstantBase().
|
inline |
Definition at line 149 of file CPolyhedron.cpp.
References INF_NO_BODY, PRISM, SUP_NO_BODY, UPWARDS_CUPOLA, and UPWARDS_ROTUNDA.
Referenced by mrpt::opengl::CPolyhedron::CreateJohnsonSolidWithConstantBase().
bool analyzeJohnsonPartsString | ( | const std::string & | components, |
uint32_t | numBaseEdges, | ||
vector< JohnsonBodyPart > & | parts | ||
) |
Definition at line 68 of file CPolyhedron.cpp.
References ANTIPRISM, DOWNWARDS_CUPOLA, DOWNWARDS_PYRAMID, DOWNWARDS_ROTUNDA, INF_NO_BODY, PRISM, ROTATED_DOWNWARDS_CUPOLA, ROTATED_DOWNWARDS_ROTUNDA, ROTATED_UPWARDS_CUPOLA, ROTATED_UPWARDS_ROTUNDA, SUP_NO_BODY, UPWARDS_CUPOLA, UPWARDS_PYRAMID, and UPWARDS_ROTUNDA.
Referenced by mrpt::opengl::CPolyhedron::CreateJohnsonSolidWithConstantBase().
|
inline |
Definition at line 249 of file CPolyhedron.cpp.
References mrpt::opengl::CPolyhedron::TPolyhedronEdge::v1, mrpt::opengl::CPolyhedron::TPolyhedronEdge::v2, and mrpt::opengl::CPolyhedron::TPolyhedronFace::vertices.
Referenced by mrpt::opengl::CPolyhedron::getDual().
double getHeight | ( | const TPolygon3D & | p, |
const TPoint3D & | c | ||
) |
Definition at line 315 of file CPolyhedron.cpp.
References mrpt::math::distance(), mrpt::math::geometryEpsilon, and mrpt::math::square().
Referenced by mrpt::opengl::CPolyhedron::augment().
Definition at line 255 of file CPolyhedron.cpp.
References mrpt::math::intersect().
Referenced by mrpt::opengl::CPolyhedron::getDual().
bool getVerticesAndFaces | ( | const vector< math::TPolygon3D > & | polys, |
vector< TPoint3D > & | vertices, | ||
vector< CPolyhedron::TPolyhedronFace > & | faces | ||
) |
Definition at line 45 of file CPolyhedron.cpp.
References mrpt::utils::find(), and mrpt::opengl::CPolyhedron::TPolyhedronFace::vertices.
Referenced by mrpt::opengl::CPolyhedron::Create(), and mrpt::opengl::CPolyhedron::makeConvexPolygons().
void insertCupola | ( | size_t | numBaseEdges, |
double | angleShift, | ||
double | baseRadius, | ||
double | edgeLength, | ||
bool | isRotated, | ||
bool | isUpwards, | ||
size_t | base, | ||
vector< TPoint3D > & | verts, | ||
vector< CPolyhedron::TPolyhedronFace > & | faces | ||
) |
Definition at line 156 of file CPolyhedron.cpp.
References M_PI, mrpt::math::square(), and mrpt::opengl::CPolyhedron::TPolyhedronFace::vertices.
Referenced by mrpt::opengl::CPolyhedron::CreateJohnsonSolidWithConstantBase().
void insertRotunda | ( | double | angleShift, |
double | baseRadius, | ||
bool | isRotated, | ||
bool | isUpwards, | ||
size_t | base, | ||
vector< TPoint3D > & | verts, | ||
vector< CPolyhedron::TPolyhedronFace > & | faces | ||
) |
Definition at line 194 of file CPolyhedron.cpp.
References M_PI, mrpt::opengl::CPolyhedron::TPolyhedronFace::vertices, mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Referenced by mrpt::opengl::CPolyhedron::CreateJohnsonSolidWithConstantBase().
bool searchForEdge | ( | const vector< CPolyhedron::TPolyhedronEdge > & | es, |
uint32_t | v1, | ||
uint32_t | v2, | ||
size_t & | where | ||
) |
Definition at line 297 of file CPolyhedron.cpp.
References mrpt::opengl::CPolyhedron::TPolyhedronEdge::v1, and mrpt::opengl::CPolyhedron::TPolyhedronEdge::v2.
Referenced by mrpt::opengl::CPolyhedron::cantellate(), and mrpt::opengl::CPolyhedron::truncate().
bool searchForEdge | ( | const vector< CPolyhedron::TPolyhedronFace >::const_iterator & | begin, |
const vector< CPolyhedron::TPolyhedronFace >::const_iterator & | end, | ||
uint32_t | v1, | ||
uint32_t | v2 | ||
) |
Definition at line 305 of file CPolyhedron.cpp.
References begin().
bool searchForFace | ( | const vector< CPolyhedron::TPolyhedronFace > & | fs, |
uint32_t | v1, | ||
uint32_t | v2, | ||
uint32_t | v3 | ||
) |
Definition at line 284 of file CPolyhedron.cpp.
Referenced by mrpt::opengl::CPolyhedron::truncate().
Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |