3Depict
|
A smooth coloured quad. More...
#include <drawables.h>
Public Member Functions | |
DrawQuad () | |
Constructor. More... | |
virtual | ~DrawQuad () |
Destructor. More... | |
virtual DrawableObj * | clone () const |
virtual unsigned int | getType () const |
virtual void | getBoundingBox (BoundCube &b) const |
Get bounding cube. More... | |
void | colourVerticies () |
sets the vertices to defautl colours (r g b and white ) for each vertex respectively More... | |
void | setVertex (unsigned int, const Point3D &) |
Set vertex's location. More... | |
void | setVertices (const Point3D *) |
void | setColour (unsigned int, float r, float g, float b, float a) |
Set the colour of a vertex. More... | |
void | setColour (float r, float g, float b, float a) |
Set the colour of all vertices. More... | |
void | calcNormal () |
Update the normal to the surface from vertices. More... | |
void | draw () const |
Draw the triangle. More... | |
Point3D | getOrigin () const |
Gets the arrow axis direction. 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... | |
![]() | |
virtual bool | isOverlay () const |
Is this an overlay? By default, no. More... | |
DrawableObj () | |
Constructor. More... | |
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 | |
Point3D | vertices [4] |
Vertices of the quad. More... | |
Point3D | normal |
float | r [4] |
Colours of the vertices (rgba colour model) More... | |
float | g [4] |
float | b [4] |
float | a [4] |
![]() | |
bool | active |
Is the drawable active? More... | |
bool | haveChanged |
Is the object changed since last set? More... | |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
bool | canSelect |
Can be selected from openGL viewport interactively? More... | |
bool | wantsLight |
Wants lighting calculations active during render? More... | |
![]() | |
static float | getHighContrastValue () |
![]() | |
static const Camera * | curCamera = 0 |
Pointer to current scene camera. More... | |
static float | backgroundR |
static float | backgroundG |
static float | backgroundB |
static TexturePool * | texPool =0 |
static bool | useAlphaBlend |
static unsigned int | winX |
static unsigned int | winY |
A smooth coloured quad.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
void DrawQuad::calcNormal | ( | ) |
Update the normal to the surface from vertices.
Uses the first 3 vertices to calculate the normal.
|
virtual |
Reimplemented from DrawableObj.
void DrawQuad::colourVerticies | ( | ) |
sets the vertices to defautl colours (r g b and white ) for each vertex respectively
|
virtual |
|
virtual |
Get bounding cube.
Implements DrawableObj.
References BoundCube::setBounds(), and DrawTriangle::vertices.
Referenced by DrawTriangleMesh::setData().
Point3D DrawQuad::getOrigin | ( | ) | const |
Gets the arrow axis direction.
References Point3D::centroid(), and DrawTriangle::vertices.
Referenced by VoxeliseFilter::refresh().
|
inlinevirtual |
Implements DrawableObj.
References DRAW_TYPE_QUAD.
|
virtual |
Recompute the internal parameters using the input vector information.
Reimplemented from DrawableObj.
References ASSERT, DRAW_QUAD_BIND_ORIGIN, and DrawTriangle::vertices.
void DrawQuad::setColour | ( | unsigned | int, |
float | r, | ||
float | g, | ||
float | b, | ||
float | a | ||
) |
Set the colour of a vertex.
Referenced by VoxeliseFilter::refresh().
void DrawQuad::setColour | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Set the colour of all vertices.
References DrawTriangle::a, ASSERT, DrawTriangle::b, DrawTriangle::g, and DrawTriangle::r.
void DrawQuad::setVertex | ( | unsigned int | v, |
const Point3D & | p | ||
) |
Set vertex's location.
References ASSERT, and DrawTriangle::vertices.
void DrawQuad::setVertices | ( | const Point3D * | v | ) |
References DrawTriangle::vertices.
Referenced by VoxeliseFilter::getRefreshUseMask().
|
protected |
Referenced by DrawPolygon::clone(), DrawTexturedQuad::draw(), DrawPolygon::draw(), and DrawPolygon::setColour().
|
protected |
Referenced by DrawPolygon::clone(), DrawTexturedQuad::draw(), DrawPolygon::draw(), and DrawPolygon::setColour().
|
protected |
Referenced by DrawPolygon::clone(), DrawTexturedQuad::draw(), DrawPolygon::draw(), and DrawPolygon::setColour().
|
protected |
Colour data for the quad The lighting normal of the triangle
Lighting for this class is per triangle only no per vertex lighting
Referenced by DrawPolygon::clone().
|
protected |
Colours of the vertices (rgba colour model)
Referenced by DrawPolygon::clone(), DrawTexturedQuad::draw(), DrawPolygon::draw(), and DrawPolygon::setColour().
|
protected |
Vertices of the quad.
Referenced by DrawPolygon::clone(), DrawTexturedQuad::draw(), DrawPolygon::draw(), DrawPolygon::getBoundingBox(), and DrawPolygon::setVertices().