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

A class to draw rectangluar prisms. More...

#include <drawables.h>

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

Public Member Functions

 DrawRectPrism ()
 
 ~DrawRectPrism ()
 
virtual unsigned int getType () const
 
virtual DrawableObjclone () const
 
void draw () const
 Draw object. More...
 
void setDrawMode (unsigned int n)
 Set the draw mode. More...
 
void setColour (float rnew, float gnew, float bnew, float anew=1.0f)
 Set colour of box. More...
 
void setLineWidth (float lineWidth)
 Set thickness of box. More...
 
void setAxisAligned (const Point3D &p1, const Point3D &p2)
 Set up box as axis-aligned rectangle using two points. More...
 
void setAxisAligned (const BoundCube &b)
 Set up box as axis-aligned rectangle using bounding box. More...
 
void getBoundingBox (BoundCube &b) const
 
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...
 
- Public Member Functions inherited from DrawableObj
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...
 

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 class to draw rectangluar prisms.

Constructor & Destructor Documentation

◆ DrawRectPrism()

DrawRectPrism::DrawRectPrism ( )

Referenced by clone().

Here is the caller graph for this function:

◆ ~DrawRectPrism()

DrawRectPrism::~DrawRectPrism ( )

Member Function Documentation

◆ clone()

DrawableObj * DrawRectPrism::clone ( ) const
virtual

Reimplemented from DrawableObj.

References DrawRectPrism().

◆ draw()

void DrawRectPrism::draw ( ) const
virtual

Draw object.

Implements DrawableObj.

References DrawableObj::active, ASSERT, DRAW_FLAT, DRAW_WIREFRAME, and drawBox().

Referenced by Scene::draw().

Here is the caller graph for this function:

◆ getBoundingBox()

void DrawRectPrism::getBoundingBox ( BoundCube b) const
virtual

Implements DrawableObj.

References BoundCube::setBounds().

◆ getType()

virtual unsigned int DrawRectPrism::getType ( ) const
inlinevirtual

Implements DrawableObj.

References DRAW_TYPE_RECTPRISM.

◆ recomputeParams()

void DrawRectPrism::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, DRAW_RECT_BIND_CORNER_MOVE, and DRAW_RECT_BIND_TRANSLATE.

◆ setAxisAligned() [1/2]

void DrawRectPrism::setAxisAligned ( const Point3D p1,
const Point3D p2 
)

Set up box as axis-aligned rectangle using two points.

Referenced by Scene::draw(), BoundingBoxFilter::numBytesForCache(), IonClipFilter::refresh(), BoundingBoxFilter::refresh(), and SpatialAnalysisFilter::setPropFromBinding().

Here is the caller graph for this function:

◆ setAxisAligned() [2/2]

void DrawRectPrism::setAxisAligned ( const BoundCube b)

Set up box as axis-aligned rectangle using bounding box.

References BoundCube::getBounds().

◆ setColour()

void DrawRectPrism::setColour ( float  rnew,
float  gnew,
float  bnew,
float  anew = 1.0f 
)

Set colour of box.

Referenced by Scene::draw(), BoundingBoxFilter::numBytesForCache(), BoundingBoxFilter::refresh(), and SpatialAnalysisFilter::setPropFromBinding().

Here is the caller graph for this function:

◆ setDrawMode()

void DrawRectPrism::setDrawMode ( unsigned int  n)
inline

Set the draw mode.

◆ setLineWidth()

void DrawRectPrism::setLineWidth ( float  lineWidth)

Set thickness of box.

References ASSERT.

Referenced by BoundingBoxFilter::numBytesForCache(), BoundingBoxFilter::refresh(), and SpatialAnalysisFilter::setPropFromBinding().

Here is the caller graph for this function:

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