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

This class allows for the visualisation of 3D scalar fields. More...

#include <drawables.h>

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

Public Member Functions

 DrawField3D ()
 Default Constructor. More...
 
virtual ~DrawField3D ()
 Destructor. More...
 
virtual unsigned int getType () const
 
void getBoundingBox (BoundCube &b) const
 Get the bounding box for this object. More...
 
void setRenderMode (unsigned int)
 Set the render mode (see volumeRenderMode variable for details) More...
 
void setField (const Voxels< float > *field)
 Set the field pointer. More...
 
void setAlpha (float alpha)
 Set the alpha value for elemnts. More...
 
void setColourMinMax ()
 Set the colour bar minima and maxima from current field values. More...
 
void setColourMapID (unsigned int i)
 Set the colourMap ID. More...
 
void draw () const
 Render the field. More...
 
void setPointSize (float size)
 Set the size of points. More...
 
void setMapColours (unsigned int map)
 Set the colours that ar ebeing used in the tempMap. More...
 
void setBoxColours (float r, float g, float b, float a)
 Set the coour of the bounding box. 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...
 

Protected Attributes

float alphaVal
 Alpha transparancy of objects in field. More...
 
float pointSize
 Size of points in the field -. More...
 
bool drawBoundBox
 True if the scalar field's bounding box is to be drawn. More...
 
float boxColourR
 Colours for the bounding boxes. More...
 
float boxColourG
 
float boxColourB
 
float boxColourA
 
bool volumeGrid
 True if volume grid is enabled. More...
 
float colourMapBound [2]
 Colour map lower and upper bounds. More...
 
unsigned int colourMapID
 Which colourmap to use. More...
 
unsigned int volumeRenderMode
 Sets the render mode for the 3D volume. More...
 
const Voxels< float > * field
 The scalar field - used to store data values. More...
 
- Protected Attributes inherited from DrawableObj
bool active
 Is the drawable active? More...
 
bool haveChanged
 Is the object changed since last set? 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 ()
 
- 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

This class allows for the visualisation of 3D scalar fields.

Constructor & Destructor Documentation

◆ DrawField3D()

DrawField3D::DrawField3D ( )

Default Constructor.

◆ ~DrawField3D()

DrawField3D::~DrawField3D ( )
virtual

Destructor.

References field.

Member Function Documentation

◆ draw()

void DrawField3D::draw ( ) const
virtual

◆ getBoundingBox()

void DrawField3D::getBoundingBox ( BoundCube b) const
virtual

Get the bounding box for this object.

Implements DrawableObj.

References ASSERT, field, Voxels< T >::getMaxBounds(), Voxels< T >::getMinBounds(), and BoundCube::setBounds().

◆ getType()

virtual unsigned int DrawField3D::getType ( ) const
inlinevirtual

Implements DrawableObj.

References DRAW_TYPE_FIELD3D.

◆ setAlpha()

void DrawField3D::setAlpha ( float  alpha)

Set the alpha value for elemnts.

References alphaVal.

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ setBoxColours()

void DrawField3D::setBoxColours ( float  r,
float  g,
float  b,
float  a 
)

Set the coour of the bounding box.

References boxColourA, boxColourB, boxColourG, and boxColourR.

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ setColourMapID()

void DrawField3D::setColourMapID ( unsigned int  i)
inline

Set the colourMap ID.

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ setColourMinMax()

void DrawField3D::setColourMinMax ( )

Set the colour bar minima and maxima from current field values.

References ASSERT, colourMapBound, field, Voxels< T >::max(), and Voxels< T >::min().

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ setField()

void DrawField3D::setField ( const Voxels< float > *  field)

Set the field pointer.

References field.

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ setMapColours()

void DrawField3D::setMapColours ( unsigned int  map)

Set the colours that ar ebeing used in the tempMap.

References ASSERT, COLOURMAP_ENUM_END, and colourMapID.

◆ setPointSize()

void DrawField3D::setPointSize ( float  size)

Set the size of points.

References pointSize.

Referenced by VisController::updateScene().

Here is the caller graph for this function:

◆ setRenderMode()

void DrawField3D::setRenderMode ( unsigned int  mode)

Set the render mode (see volumeRenderMode variable for details)

References volumeRenderMode.

Member Data Documentation

◆ alphaVal

float DrawField3D::alphaVal
protected

Alpha transparancy of objects in field.

Referenced by draw(), and setAlpha().

◆ boxColourA

float DrawField3D::boxColourA
protected

Referenced by draw(), and setBoxColours().

◆ boxColourB

float DrawField3D::boxColourB
protected

Referenced by draw(), and setBoxColours().

◆ boxColourG

float DrawField3D::boxColourG
protected

Referenced by draw(), and setBoxColours().

◆ boxColourR

float DrawField3D::boxColourR
protected

Colours for the bounding boxes.

Referenced by draw(), and setBoxColours().

◆ colourMapBound

float DrawField3D::colourMapBound[2]
protected

Colour map lower and upper bounds.

Referenced by draw(), and setColourMinMax().

◆ colourMapID

unsigned int DrawField3D::colourMapID
protected

Which colourmap to use.

Referenced by draw(), and setMapColours().

◆ drawBoundBox

bool DrawField3D::drawBoundBox
protected

True if the scalar field's bounding box is to be drawn.

Referenced by draw().

◆ field

const Voxels<float>* DrawField3D::field
protected

The scalar field - used to store data values.

Referenced by draw(), getBoundingBox(), setColourMinMax(), setField(), and ~DrawField3D().

◆ pointSize

float DrawField3D::pointSize
protected

Size of points in the field -.

Referenced by draw(), and setPointSize().

◆ volumeGrid

bool DrawField3D::volumeGrid
protected

True if volume grid is enabled.

◆ volumeRenderMode

unsigned int DrawField3D::volumeRenderMode
protected

Sets the render mode for the 3D volume.

Referenced by draw(), and setRenderMode().


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