MRPT logo

mrpt::opengl::CSetOfTriangles Class Reference

A set of colored triangles. More...

#include <mrpt/opengl/CSetOfTriangles.h>

Inheritance diagram for mrpt::opengl::CSetOfTriangles:

mrpt::opengl::CRenderizable mrpt::utils::CSerializable

List of all members.

Classes

struct  TTriangle

Public Member Functions

void clearTriangles ()
size_t getTrianglesCount () const
void getTriangle (size_t idx, TTriangle &t) const
void insertTriangle (const TTriangle &t)
template<class InputIterator >
void insertTriangles (const InputIterator &begin, const InputIterator &end)
void insertTriangles (const CSetOfTrianglesPtr &p)
void enableTransparency (bool v)
virtual void setColor (double R, double G, double B, double A)
 Set the color components of this object (R,G,B,Alpha, in the range 0-1).
virtual void setColor (const mrpt::utils::TColorf &c)
 Changes the default object color.
virtual void setColorR (const double r)
virtual void setColorG (const double g)
virtual void setColorB (const double b)
virtual void setColorA (const double a)
void render () const
 Render.
virtual bool traceRay (const mrpt::poses::CPose3D &o, float &dist) const
 Ray tracing.

Static Public Member Functions

static CSetOfTrianglesPtr Create ()
 Class factory.
static bool traceRayTriangle (const mrpt::poses::CPose3D &o, float &dist, const float xb[3], const float yb[3], const float zb[3])

Protected Attributes

std::vector< TTrianglem_triangles
bool m_enableTransparency

Private Member Functions

 CSetOfTriangles (bool enableTransparency=false)
 Constructor.
virtual ~CSetOfTriangles ()
 Private, virtual destructor: only can be deleted from smart pointers.


Detailed Description

A set of colored triangles.

This class can be used to draw any solid, arbitrarily complex object (without textures).

See also:
opengl::COpenGLScene, CSetOfTexturedTriangles

Definition at line 46 of file CSetOfTriangles.h.


Constructor & Destructor Documentation

mrpt::opengl::CSetOfTriangles::CSetOfTriangles ( bool  enableTransparency = false  )  [inline, private]

Constructor.

Definition at line 98 of file CSetOfTriangles.h.

virtual mrpt::opengl::CSetOfTriangles::~CSetOfTriangles (  )  [inline, private, virtual]

Private, virtual destructor: only can be deleted from smart pointers.

Definition at line 105 of file CSetOfTriangles.h.


Member Function Documentation

void mrpt::opengl::CSetOfTriangles::clearTriangles (  )  [inline]

Definition at line 56 of file CSetOfTriangles.h.

static CSetOfTrianglesPtr mrpt::opengl::CSetOfTriangles::Create (  )  [inline, static]

Class factory.

Definition at line 77 of file CSetOfTriangles.h.

References mrpt::opengl::CSetOfTriangles.

void mrpt::opengl::CSetOfTriangles::enableTransparency ( bool  v  )  [inline]

Definition at line 68 of file CSetOfTriangles.h.

void mrpt::opengl::CSetOfTriangles::getTriangle ( size_t  idx,
TTriangle t 
) const [inline]

Definition at line 58 of file CSetOfTriangles.h.

References ASSERT_.

size_t mrpt::opengl::CSetOfTriangles::getTrianglesCount (  )  const [inline]

Definition at line 57 of file CSetOfTriangles.h.

void mrpt::opengl::CSetOfTriangles::insertTriangle ( const TTriangle t  )  [inline]

Definition at line 59 of file CSetOfTriangles.h.

void mrpt::opengl::CSetOfTriangles::insertTriangles ( const CSetOfTrianglesPtr &  p  )  [inline]

Definition at line 64 of file CSetOfTriangles.h.

template<class InputIterator >
void mrpt::opengl::CSetOfTriangles::insertTriangles ( const InputIterator &  begin,
const InputIterator &  end 
) [inline]

Definition at line 61 of file CSetOfTriangles.h.

void mrpt::opengl::CSetOfTriangles::render (  )  const [virtual]

Render.

Implements mrpt::opengl::CRenderizable.

virtual void mrpt::opengl::CSetOfTriangles::setColor ( const mrpt::utils::TColorf c  )  [virtual]

Changes the default object color.

Reimplemented from mrpt::opengl::CRenderizable.

virtual void mrpt::opengl::CSetOfTriangles::setColor ( double  R,
double  G,
double  B,
double  A 
) [virtual]

Set the color components of this object (R,G,B,Alpha, in the range 0-1).

Reimplemented from mrpt::opengl::CRenderizable.

virtual void mrpt::opengl::CSetOfTriangles::setColorA ( const double  a  )  [virtual]

Reimplemented from mrpt::opengl::CRenderizable.

virtual void mrpt::opengl::CSetOfTriangles::setColorB ( const double  b  )  [virtual]

Reimplemented from mrpt::opengl::CRenderizable.

virtual void mrpt::opengl::CSetOfTriangles::setColorG ( const double  g  )  [virtual]

Reimplemented from mrpt::opengl::CRenderizable.

virtual void mrpt::opengl::CSetOfTriangles::setColorR ( const double  r  )  [virtual]

Reimplemented from mrpt::opengl::CRenderizable.

virtual bool mrpt::opengl::CSetOfTriangles::traceRay ( const mrpt::poses::CPose3D o,
float &  dist 
) const [virtual]

Ray tracing.

Reimplemented from mrpt::opengl::CRenderizable.

static bool mrpt::opengl::CSetOfTriangles::traceRayTriangle ( const mrpt::poses::CPose3D o,
float &  dist,
const float  xb[3],
const float  yb[3],
const float  zb[3] 
) [static]


Member Data Documentation

Definition at line 93 of file CSetOfTriangles.h.

Definition at line 92 of file CSetOfTriangles.h.




Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN:exported at Thu May 21 04:14:55 UTC 2009