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

An abstract bas class for drawing primitives. More...

#include <drawables.h>

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

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 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...
 
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 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
 

Detailed Description

An abstract bas class for drawing primitives.

Constructor & Destructor Documentation

◆ DrawableObj()

DrawableObj::DrawableObj ( )

Constructor.

◆ ~DrawableObj()

DrawableObj::~DrawableObj ( )
virtual

Drawable destructor.

Member Function Documentation

◆ clearTexPool()

void DrawableObj::clearTexPool ( )
static

References ASSERT, and texPool.

Referenced by Scene::~Scene().

Here is the caller graph for this function:

◆ clone()

virtual DrawableObj* DrawableObj::clone ( ) const
inlinevirtual

◆ draw()

virtual void DrawableObj::draw ( ) const
pure virtual

◆ explode()

void DrawableObj::explode ( std::vector< DrawableObj *> &  simpleObjects)
virtual

Break object down into simple elements.

References ASSERT, and isExplodable().

◆ getBoundingBox()

virtual void DrawableObj::getBoundingBox ( BoundCube b) const
pure virtual

◆ getCentroid()

Point3D DrawableObj::getCentroid ( ) const
virtual

Get the centre of the object. Only valid if object is simple.

Reimplemented in DrawPoint.

References ASSERT, and isExplodable().

◆ getHighContrastValue()

float DrawableObj::getHighContrastValue ( )
staticprotected

References backgroundB, backgroundG, and backgroundR.

Referenced by DrawColourBarOverlay::draw(), DrawProgressCircleOverlay::draw(), and DrawPointLegendOverlay::draw().

Here is the caller graph for this function:

◆ getType()

virtual unsigned int DrawableObj::getType ( ) const
pure virtual

◆ hasChanged()

virtual bool DrawableObj::hasChanged ( ) const
inlinevirtual

◆ isExplodable()

virtual bool DrawableObj::isExplodable ( ) const
inlinevirtual

Can we break this object down into constituent elements?

Referenced by explode(), and getCentroid().

Here is the caller graph for this function:

◆ isOverlay()

virtual bool DrawableObj::isOverlay ( ) const
inlinevirtual

Is this an overlay? By default, no.

Reimplemented in DrawableOverlay.

◆ needsDepthSorting()

virtual bool DrawableObj::needsDepthSorting ( ) const
inlinevirtual

Do we need to do element based depth sorting?

Reimplemented in DrawIsoSurface, and DrawCylinder.

◆ recomputeParams()

virtual void DrawableObj::recomputeParams ( const std::vector< Point3D > &  vecs,
const std::vector< float > &  scalars,
unsigned int  mode 
)
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.

◆ setActive()

void DrawableObj::setActive ( bool  active)

Set the active state of the object.

◆ setBackgroundColour()

static void DrawableObj::setBackgroundColour ( float  r,
float  g,
float  b 
)
inlinestatic

Referenced by Scene::draw().

Here is the caller graph for this function:

◆ setCurCamera()

static void DrawableObj::setCurCamera ( const Camera c)
inlinestatic

Set the current camera.

Referenced by Scene::draw().

Here is the caller graph for this function:

◆ setInteract()

void DrawableObj::setInteract ( bool  canAct)
inline

Set if user can interact with object, needed for opengl hit testing.

◆ setTexPool()

void DrawableObj::setTexPool ( TexturePool t)
static

Set the current camera.

References texPool.

Referenced by Scene::Scene().

Here is the caller graph for this function:

◆ setUseAlphaBlending()

static void DrawableObj::setUseAlphaBlending ( bool  willBlend)
inlinestatic

Referenced by Scene::~Scene().

Here is the caller graph for this function:

◆ setWindowSize()

static void DrawableObj::setWindowSize ( unsigned int  x,
unsigned int  y 
)
inlinestatic

Referenced by Scene::draw().

Here is the caller graph for this function:

Member Data Documentation

◆ active

bool DrawableObj::active
protected

Is the drawable active?

Referenced by DrawRectPrism::draw().

◆ backgroundB

float DrawableObj::backgroundB
staticprotected

Referenced by getHighContrastValue().

◆ backgroundG

float DrawableObj::backgroundG
staticprotected

Referenced by getHighContrastValue().

◆ backgroundR

float DrawableObj::backgroundR
staticprotected

Referenced by getHighContrastValue().

◆ canSelect

bool DrawableObj::canSelect

◆ curCamera

const Camera * DrawableObj::curCamera = 0
staticprotected

Pointer to current scene camera.

Referenced by DrawGLText::draw(), DrawField3D::draw(), and DrawIsoSurface::draw().

◆ haveChanged

bool DrawableObj::haveChanged
protected

Is the object changed since last set?

◆ texPool

TexturePool * DrawableObj::texPool =0
staticprotected

◆ useAlphaBlend

bool DrawableObj::useAlphaBlend
staticprotected

◆ wantsLight

bool DrawableObj::wantsLight

◆ winX

unsigned int DrawableObj::winX
staticprotected

◆ winY

unsigned int DrawableObj::winY
staticprotected

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