3Depict
|
This class allows for the visualisation of 3D scalar fields. More...
#include <drawables.h>
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... | |
![]() | |
virtual bool | isOverlay () const |
Is this an overlay? By default, no. More... | |
DrawableObj () | |
Constructor. More... | |
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... | |
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... | |
![]() | |
bool | active |
Is the drawable active? More... | |
bool | haveChanged |
Is the object changed since last set? More... | |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
bool | canSelect |
Can be selected from openGL viewport interactively? More... | |
bool | wantsLight |
Wants lighting calculations active during render? More... | |
![]() | |
static float | getHighContrastValue () |
![]() | |
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 |
This class allows for the visualisation of 3D scalar fields.
DrawField3D::DrawField3D | ( | ) |
Default Constructor.
|
virtual |
Destructor.
References field.
|
virtual |
Render the field.
Implements DrawableObj.
References alphaVal, ASSERT, boxColourA, boxColourB, boxColourG, boxColourR, colourMapBound, colourMapID, colourMapWrap(), DrawableObj::curCamera, drawBoundBox, drawBox(), field, Voxels< T >::getData(), Voxels< T >::getMaxBounds(), Voxels< T >::getMinBounds(), Camera::getOrigin(), Voxels< T >::getPitch(), Voxels< T >::getPoint(), Voxels< T >::getSize(), pointSize, DrawableObj::useAlphaBlend, RGBThis::v, VOLUME_POINTS, and volumeRenderMode.
|
virtual |
Get the bounding box for this object.
Implements DrawableObj.
References ASSERT, field, Voxels< T >::getMaxBounds(), Voxels< T >::getMinBounds(), and BoundCube::setBounds().
|
inlinevirtual |
Implements DrawableObj.
References DRAW_TYPE_FIELD3D.
void DrawField3D::setAlpha | ( | float | alpha | ) |
Set the alpha value for elemnts.
References alphaVal.
Referenced by VisController::updateScene().
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().
|
inline |
Set the colourMap ID.
Referenced by VisController::updateScene().
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().
void DrawField3D::setField | ( | const Voxels< float > * | field | ) |
Set the field pointer.
References field.
Referenced by VisController::updateScene().
void DrawField3D::setMapColours | ( | unsigned int | map | ) |
Set the colours that ar ebeing used in the tempMap.
References ASSERT, COLOURMAP_ENUM_END, and colourMapID.
void DrawField3D::setPointSize | ( | float | size | ) |
Set the size of points.
References pointSize.
Referenced by VisController::updateScene().
void DrawField3D::setRenderMode | ( | unsigned int | mode | ) |
Set the render mode (see volumeRenderMode variable for details)
References volumeRenderMode.
|
protected |
Alpha transparancy of objects in field.
Referenced by draw(), and setAlpha().
|
protected |
Referenced by draw(), and setBoxColours().
|
protected |
Referenced by draw(), and setBoxColours().
|
protected |
Referenced by draw(), and setBoxColours().
|
protected |
Colours for the bounding boxes.
Referenced by draw(), and setBoxColours().
|
protected |
Colour map lower and upper bounds.
Referenced by draw(), and setColourMinMax().
|
protected |
Which colourmap to use.
Referenced by draw(), and setMapColours().
|
protected |
True if the scalar field's bounding box is to be drawn.
Referenced by draw().
|
protected |
The scalar field - used to store data values.
Referenced by draw(), getBoundingBox(), setColourMinMax(), setField(), and ~DrawField3D().
|
protected |
Size of points in the field -.
Referenced by draw(), and setPointSize().
|
protected |
True if volume grid is enabled.
|
protected |
Sets the render mode for the 3D volume.
Referenced by draw(), and setRenderMode().