3Depict
|
An abstract bas class for drawing primitives. More...
#include <drawables.h>
Public Member Functions | |
virtual bool | isOverlay () const |
Is this an overlay? By default, no. More... | |
DrawableObj () | |
Constructor. More... | |
virtual unsigned int | getType () const =0 |
virtual DrawableObj * | clone () 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... | |
virtual void | draw () const =0 |
Pure virtual function - draw the object. More... | |
void | setInteract (bool canAct) |
Set if user can interact with object, needed for opengl hit testing. More... | |
virtual void | getBoundingBox (BoundCube &b) const =0 |
virtual | ~DrawableObj () |
Drawable destructor. More... | |
virtual void | recomputeParams (const std::vector< Point3D > &vecs, const std::vector< float > &scalars, unsigned int mode) |
If we offer any kind of external pointer interface; use this to do a recomputation as needed. This is needed for selection binding behaviour. More... | |
virtual Point3D | getCentroid () const |
Get the centre of the object. Only valid if object is simple. More... | |
Static Public Member Functions | |
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 | |
bool | canSelect |
Can be selected from openGL viewport interactively? More... | |
bool | wantsLight |
Wants lighting calculations active during render? More... | |
Static Protected Member Functions | |
static float | getHighContrastValue () |
Protected Attributes | |
bool | active |
Is the drawable active? More... | |
bool | haveChanged |
Is the object changed since last set? More... | |
Static Protected Attributes | |
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 |
An abstract bas class for drawing primitives.
DrawableObj::DrawableObj | ( | ) |
Constructor.
|
virtual |
Drawable destructor.
|
static |
References ASSERT, and texPool.
Referenced by Scene::~Scene().
|
inlinevirtual |
Reimplemented in Draw2DCircle, DrawAxis, DrawPointLegendOverlay, DrawColourBarOverlay, DrawRectPrism, DrawSphere, DrawPolygon, DrawQuad, DrawTriangle, DrawVector, DrawManyPoints, and DrawPoint.
References ASSERT.
|
pure virtual |
Pure virtual function - draw the object.
Implemented in Draw2DCircle, DrawAxis, DrawIsoSurface, DrawField3D, DrawPointLegendOverlay, DrawProgressCircleOverlay, DrawAnimatedOverlay, DrawTexturedQuadOverlay, DrawColourBarOverlay, DrawRectPrism, DrawGLText, DrawDispList, DrawCylinder, DrawSphere, DrawTriangleMesh, DrawPolygon, DrawTexturedQuad, DrawQuad, DrawTriangle, DrawVector, DrawManyPoints, and DrawPoint.
Referenced by DrawDispList::addDrawable().
|
virtual |
Break object down into simple elements.
References ASSERT, and isExplodable().
|
pure virtual |
Implemented in Draw2DCircle, DrawAxis, DrawIsoSurface, DrawField3D, DrawableOverlay, DrawRectPrism, DrawGLText, DrawDispList, DrawCylinder, DrawSphere, DrawTriangleMesh, DrawPolygon, DrawQuad, DrawTriangle, DrawVector, DrawManyPoints, and DrawPoint.
Referenced by Scene::addDrawable(), DrawDispList::addDrawable(), Scene::addRefDrawable(), and BoundingBoxFilter::getRefreshUseMask().
|
virtual |
Get the centre of the object. Only valid if object is simple.
Reimplemented in DrawPoint.
References ASSERT, and isExplodable().
|
staticprotected |
References backgroundB, backgroundG, and backgroundR.
Referenced by DrawColourBarOverlay::draw(), DrawProgressCircleOverlay::draw(), and DrawPointLegendOverlay::draw().
|
pure virtual |
Implemented in Draw2DCircle, DrawAxis, DrawIsoSurface, DrawField3D, DrawPointLegendOverlay, DrawProgressCircleOverlay, DrawAnimatedOverlay, DrawTexturedQuadOverlay, DrawColourBarOverlay, DrawRectPrism, DrawGLText, DrawDispList, DrawCylinder, DrawSphere, DrawTriangleMesh, DrawPolygon, DrawQuad, DrawTriangle, DrawVector, DrawManyPoints, and DrawPoint.
Referenced by BoundingBoxFilter::getRefreshUseMask().
|
inlinevirtual |
|
inlinevirtual |
Can we break this object down into constituent elements?
Referenced by explode(), and getCentroid().
|
inlinevirtual |
Is this an overlay? By default, no.
Reimplemented in DrawableOverlay.
|
inlinevirtual |
Do we need to do element based depth sorting?
Reimplemented in DrawIsoSurface, and DrawCylinder.
|
inlinevirtual |
If we offer any kind of external pointer interface; use this to do a recomputation as needed. This is needed for selection binding behaviour.
Reimplemented in DrawRectPrism, DrawGLText, DrawCylinder, DrawSphere, DrawTriangleMesh, DrawQuad, and DrawVector.
void DrawableObj::setActive | ( | bool | active | ) |
Set the active state of the object.
|
inlinestatic |
|
inlinestatic |
|
inline |
Set if user can interact with object, needed for opengl hit testing.
|
static |
Set the current camera.
References texPool.
Referenced by Scene::Scene().
|
inlinestatic |
|
inlinestatic |
|
protected |
Is the drawable active?
Referenced by DrawRectPrism::draw().
|
staticprotected |
Referenced by getHighContrastValue().
|
staticprotected |
Referenced by getHighContrastValue().
|
staticprotected |
Referenced by getHighContrastValue().
bool DrawableObj::canSelect |
Can be selected from openGL viewport interactively?
Referenced by DrawDispList::draw(), TransformFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), ProfileFilter::refresh(), and VoxeliseFilter::refresh().
|
staticprotected |
Pointer to current scene camera.
Referenced by DrawGLText::draw(), DrawField3D::draw(), and DrawIsoSurface::draw().
|
protected |
Is the object changed since last set?
|
staticprotected |
|
staticprotected |
Referenced by DrawField3D::draw(), and DrawIsoSurface::draw().
bool DrawableObj::wantsLight |
Wants lighting calculations active during render?
Referenced by DrawManyPoints::DrawManyPoints(), TransformFilter::numBytesForCache(), BoundingBoxFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), ProfileFilter::refresh(), VoxeliseFilter::refresh(), and VisController::updateScene().
|
staticprotected |
|
staticprotected |