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

A display list generating class. More...

#include <drawables.h>

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

Public Member Functions

 DrawDispList ()
 Constructor. More...
 
virtual ~DrawDispList ()
 Destructor. More...
 
virtual unsigned int getType () const
 
void draw () const
 Execute the display list. More...
 
bool startList (bool execute)
 Set it such that many openGL calls map to the display list. More...
 
void addDrawable (const DrawableObj *)
 Add a drawable object - list MUST be active. More...
 
bool endList ()
 Close the list - this will clear the gl error system. More...
 
void getBoundingBox (BoundCube &b) const
 Get bounding cube. 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 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...
 

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 ()
 
- Protected Attributes inherited from DrawableObj
bool active
 Is the drawable active? More...
 
bool haveChanged
 Is the object changed since last set? More...
 
- 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
 

Detailed Description

A display list generating class.

This class allows for the creation of display lists for openGL objects You can use this class to create a display list which will allow you to reference cached openGL calls already stored in the video card. This can be used to reduce the overhead in the drawing routines

Constructor & Destructor Documentation

◆ DrawDispList()

DrawDispList::DrawDispList ( )

Constructor.

◆ ~DrawDispList()

DrawDispList::~DrawDispList ( )
virtual

Destructor.

References ASSERT.

Member Function Documentation

◆ addDrawable()

void DrawDispList::addDrawable ( const DrawableObj d)

Add a drawable object - list MUST be active.

References ASSERT, DrawableObj::draw(), BoundCube::expand(), and DrawableObj::getBoundingBox().

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ draw()

void DrawDispList::draw ( ) const
virtual

Execute the display list.

Implements DrawableObj.

References ASSERT, and DrawableObj::canSelect.

◆ endList()

bool DrawDispList::endList ( )

Close the list - this will clear the gl error system.

References ASSERT, and BoundCube::isValid().

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ getBoundingBox()

void DrawDispList::getBoundingBox ( BoundCube b) const
inlinevirtual

Get bounding cube.

Implements DrawableObj.

◆ getType()

virtual unsigned int DrawDispList::getType ( ) const
inlinevirtual

Implements DrawableObj.

References DRAW_TYPE_DISPLAYLIST.

◆ startList()

bool DrawDispList::startList ( bool  execute)

Set it such that many openGL calls map to the display list.

If "execute" is true, the commands will be excuted after accumulating the display list buffer For a complete list of which calls map to the dispaly list, see the openGL spec, "Display lists"

References ASSERT, and BoundCube::setInverseLimits().

Referenced by VisController::updateScene().

Here is the caller graph for this function:

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