3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
DrawTriangleMesh Class Reference

#include <drawables.h>

Inheritance diagram for DrawTriangleMesh:
Inheritance graph
[legend]
Collaboration diagram for DrawTriangleMesh:
Collaboration graph
[legend]

Public Member Functions

 DrawTriangleMesh ()
 
 ~DrawTriangleMesh ()
 
void setData (std::vector< Point3D > &pts, std::vector< TRI_IDX > &idx)
 
void setDrawMeshEdges (bool doDraw=true)
 
unsigned int getType () const
 
void draw () const
 Draws the triangle mesh. More...
 
void getBoundingBox (BoundCube &b) const
 Get the bounding box that encapulates this object. More...
 
void recomputeParams (const std::vector< Point3D > &vecs, const std::vector< float > &scalars, unsigned int mode)
 Recompute the internal parameters using the input vector information. More...
 
void setAlpha (float f)
 Set the opacity value (alpha) More...
 
- Public Member Functions inherited from DrawableObj
virtual bool isOverlay () const
 Is this an overlay? By default, no. More...
 
 DrawableObj ()
 Constructor. More...
 
virtual DrawableObjclone () const
 
virtual bool needsDepthSorting () const
 Do we need to do element based depth sorting? More...
 
virtual bool isExplodable () const
 Can we break this object down into constituent elements? More...
 
virtual void explode (std::vector< DrawableObj *> &simpleObjects)
 Break object down into simple elements. More...
 
virtual bool hasChanged () const
 
void setActive (bool active)
 Set the active state of the object. More...
 
void setInteract (bool canAct)
 Set if user can interact with object, needed for opengl hit testing. More...
 
virtual ~DrawableObj ()
 Drawable destructor. More...
 
virtual Point3D getCentroid () const
 Get the centre of the object. Only valid if object is simple. More...
 

Protected Attributes

std::vector< Point3Dpts
 Vector of points to draw. More...
 
std::vector< TRI_IDXtriIndices
 Indices of triangle vertices. More...
 
Point3D origCentroid
 
Point3D deltaOrigin
 
float alpha
 
bool drawDoubleSided
 
bool drawMeshEdges
 
unsigned int drawMode
 
bool haveCachedBounds
 
BoundCube cachedBounds
 
- Protected Attributes inherited from DrawableObj
bool active
 Is the drawable active? More...
 
bool haveChanged
 Is the object changed since last set? More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DrawableObj
static void setUseAlphaBlending (bool willBlend)
 
static void setCurCamera (const Camera *c)
 Set the current camera. More...
 
static void setTexPool (TexturePool *t)
 Set the current camera. More...
 
static void clearTexPool ()
 
static void setWindowSize (unsigned int x, unsigned int y)
 
static void setBackgroundColour (float r, float g, float b)
 
- Public Attributes inherited from DrawableObj
bool canSelect
 Can be selected from openGL viewport interactively? More...
 
bool wantsLight
 Wants lighting calculations active during render? More...
 
- Static Protected Member Functions inherited from DrawableObj
static float getHighContrastValue ()
 
- Static Protected Attributes inherited from DrawableObj
static const CameracurCamera = 0
 Pointer to current scene camera. More...
 
static float backgroundR
 
static float backgroundG
 
static float backgroundB
 
static TexturePooltexPool =0
 
static bool useAlphaBlend
 
static unsigned int winX
 
static unsigned int winY
 

Constructor & Destructor Documentation

◆ DrawTriangleMesh()

DrawTriangleMesh::DrawTriangleMesh ( )

References TRIMESH_DRAW_SURF.

◆ ~DrawTriangleMesh()

DrawTriangleMesh::~DrawTriangleMesh ( )

Member Function Documentation

◆ draw()

void DrawTriangleMesh::draw ( ) const
virtual

Draws the triangle mesh.

Implements DrawableObj.

References ASSERT, and TRIMESH_DRAW_SURF.

◆ getBoundingBox()

void DrawTriangleMesh::getBoundingBox ( BoundCube b) const
virtual

Get the bounding box that encapulates this object.

Implements DrawableObj.

References BoundCube::setBounds().

Referenced by VoxeliseFilter::refresh().

Here is the caller graph for this function:

◆ getType()

unsigned int DrawTriangleMesh::getType ( ) const
inlinevirtual

Implements DrawableObj.

References DRAW_TYPE_TRIANGLE_MESH.

◆ recomputeParams()

void DrawTriangleMesh::recomputeParams ( const std::vector< Point3D > &  vecs,
const std::vector< float > &  scalars,
unsigned int  mode 
)
virtual

Recompute the internal parameters using the input vector information.

Reimplemented from DrawableObj.

References ASSERT, and DRAW_TRIMESH_BIND_ORIGIN.

◆ setAlpha()

void DrawTriangleMesh::setAlpha ( float  f)
inline

Set the opacity value (alpha)

Referenced by VoxeliseFilter::refresh().

Here is the caller graph for this function:

◆ setData()

void DrawTriangleMesh::setData ( std::vector< Point3D > &  pts,
std::vector< TRI_IDX > &  idx 
)

References ASSERT, DrawQuad::getBoundingBox(), and BoundCube::getCentroid().

Referenced by VoxeliseFilter::refresh().

Here is the caller graph for this function:

◆ setDrawMeshEdges()

void DrawTriangleMesh::setDrawMeshEdges ( bool  doDraw = true)
inline

Member Data Documentation

◆ alpha

float DrawTriangleMesh::alpha
protected

◆ cachedBounds

BoundCube DrawTriangleMesh::cachedBounds
mutableprotected

◆ deltaOrigin

Point3D DrawTriangleMesh::deltaOrigin
protected

◆ drawDoubleSided

bool DrawTriangleMesh::drawDoubleSided
protected

◆ drawMeshEdges

bool DrawTriangleMesh::drawMeshEdges
protected

◆ drawMode

unsigned int DrawTriangleMesh::drawMode
protected

◆ haveCachedBounds

bool DrawTriangleMesh::haveCachedBounds
mutableprotected

◆ origCentroid

Point3D DrawTriangleMesh::origCentroid
protected

◆ pts

std::vector<Point3D> DrawTriangleMesh::pts
protected

Vector of points to draw.

◆ triIndices

std::vector<TRI_IDX> DrawTriangleMesh::triIndices
protected

Indices of triangle vertices.


The documentation for this class was generated from the following files: