3Depict
|
A point drawing class - for many points of same size & colour. More...
#include <drawables.h>
Public Member Functions | |
DrawManyPoints () | |
Constructor. More... | |
virtual | ~DrawManyPoints () |
Destructor. More... | |
virtual unsigned int | getType () const |
virtual DrawableObj * | clone () const |
void | swap (std::vector< Point3D > &) |
Swap out the internal vector with an extenal one. More... | |
void | clear () |
Remove all points. More... | |
void | addPoints (const std::vector< Point3D > &) |
Add points into the drawing vector. More... | |
void | setPoint (size_t offset, const Point3D &) |
Add a single point into the drawing vector, at a particular offset. More... | |
void | resize (size_t newSize) |
Reset the number of many points to draw. More... | |
void | setColour (float r, float g, float b, float alpha) |
set the color of the points to be drawn More... | |
void | setSize (float) |
Set the display size of the drawn poitns. More... | |
void | draw () const |
Draw the points. More... | |
void | shuffle () |
Shuffle the points to remove anisotropic drawing effects. Thus must be done prior to draw call. More... | |
void | getBoundingBox (BoundCube &b) const |
Get the bounding box that encapuslates this object. More... | |
size_t | getNumPts () const |
return number of points More... | |
![]() | |
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 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 | |
std::vector< Point3D > | pts |
Vector of points to draw. More... | |
float | r |
Point colours (r,g,b,a) range: [0.0f,1.0f]. More... | |
float | g |
float | b |
float | a |
float | size |
Size of the point. More... | |
bool | haveCachedBounds |
BoundCube | cachedBounds |
![]() | |
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 |
A point drawing class - for many points of same size & colour.
DrawManyPoints::DrawManyPoints | ( | ) |
Constructor.
References DrawableObj::wantsLight.
Referenced by clone().
|
virtual |
Destructor.
void DrawManyPoints::addPoints | ( | const std::vector< Point3D > & | vp | ) |
Add points into the drawing vector.
References haveCachedBounds, and pts.
void DrawManyPoints::clear | ( | ) |
Remove all points.
References pts.
|
virtual |
Reimplemented from DrawableObj.
References DrawManyPoints().
|
virtual |
|
virtual |
Get the bounding box that encapuslates this object.
Implements DrawableObj.
References cachedBounds, haveCachedBounds, pts, and BoundCube::setBounds().
|
inline |
return number of points
|
inlinevirtual |
Implements DrawableObj.
References DRAW_TYPE_MANYPOINT.
void DrawManyPoints::resize | ( | size_t | newSize | ) |
Reset the number of many points to draw.
References haveCachedBounds, and pts.
Referenced by VisController::updateScene().
void DrawManyPoints::setColour | ( | float | r, |
float | g, | ||
float | b, | ||
float | alpha | ||
) |
set the color of the points to be drawn
Referenced by VisController::updateScene().
void DrawManyPoints::setPoint | ( | size_t | offset, |
const Point3D & | p | ||
) |
Add a single point into the drawing vector, at a particular offset.
References ASSERT, haveCachedBounds, and pts.
Referenced by VisController::updateScene().
void DrawManyPoints::setSize | ( | float | f | ) |
Set the display size of the drawn poitns.
References size.
Referenced by VisController::updateScene().
void DrawManyPoints::shuffle | ( | ) |
Shuffle the points to remove anisotropic drawing effects. Thus must be done prior to draw call.
References pts.
Referenced by VisController::updateScene().
void DrawManyPoints::swap | ( | std::vector< Point3D > & | ) |
Swap out the internal vector with an extenal one.
|
protected |
Referenced by draw(), and setColour().
|
protected |
Referenced by draw(), and setColour().
|
mutableprotected |
Referenced by getBoundingBox().
|
protected |
Referenced by draw(), and setColour().
|
mutableprotected |
Referenced by addPoints(), getBoundingBox(), resize(), and setPoint().
|
protected |
Vector of points to draw.
Referenced by addPoints(), clear(), draw(), getBoundingBox(), resize(), setPoint(), and shuffle().
|
protected |
Point colours (r,g,b,a) range: [0.0f,1.0f].
Referenced by draw(), and setColour().