3Depict
|
A sphere drawing. More...
#include <drawables.h>
Public Member Functions | |
DrawSphere () | |
Default Constructor. More... | |
virtual | ~DrawSphere () |
Destructor. More... | |
virtual DrawableObj * | clone () const |
virtual unsigned int | getType () const |
void | setOrigin (const Point3D &p) |
Sets the location of the sphere's origin. More... | |
Point3D | getOrigin () const |
Gets the location of the sphere's origin. More... | |
void | setLatSegments (unsigned int) |
Set the number of lateral segments. More... | |
void | setLongSegments (unsigned int) |
Set the number of longitudinal segments. More... | |
void | setRadius (float) |
Set the radius. More... | |
float | getRadius () const |
get the radius More... | |
void | setColour (float r, float g, float b, float a) |
Set the colour (rgba) of the object. More... | |
void | draw () const |
Draw the sphere. More... | |
void | getBoundingBox (BoundCube &b) const |
Get the bounding box that encapuslates this object. More... | |
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... | |
![]() | |
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... | |
Protected Attributes | |
GLUquadricObj * | q |
Pointer to the GLU quadric doohicker. More... | |
Point3D | origin |
Origin of the object. More... | |
float | r |
Colour data - rgba. More... | |
float | g |
float | b |
float | a |
float | radius |
Sphere radius. More... | |
unsigned int | latSegments |
Number of lateral and longitudinal segments. More... | |
unsigned int | longSegments |
![]() | |
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 sphere drawing.
DrawSphere::DrawSphere | ( | ) |
|
virtual |
Destructor.
References q.
|
virtual |
Reimplemented from DrawableObj.
References a, b, DrawSphere(), g, latSegments, longSegments, origin, q, r, and radius.
|
virtual |
Draw the sphere.
Implements DrawableObj.
References a, b, g, latSegments, longSegments, origin, q, r, and radius.
|
virtual |
Get the bounding box that encapuslates this object.
Implements DrawableObj.
References origin, radius, and BoundCube::setBound().
|
inline |
Gets the location of the sphere's origin.
Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), and ProfileFilter::refresh().
|
inline |
get the radius
Referenced by IonClipFilter::refresh(), AnnotateFilter::refresh(), and ProfileFilter::refresh().
|
inlinevirtual |
Implements DrawableObj.
References DRAW_TYPE_SPHERE.
|
virtual |
Recompute the internal parameters using the input vector information.
Reimplemented from DrawableObj.
References ASSERT, DRAW_SPHERE_BIND_ORIGIN, DRAW_SPHERE_BIND_RADIUS, origin, and radius.
void DrawSphere::setColour | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Set the colour (rgba) of the object.
Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), and ProfileFilter::refresh().
void DrawSphere::setLatSegments | ( | unsigned int | ui | ) |
Set the number of lateral segments.
References latSegments.
Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), and ProfileFilter::refresh().
void DrawSphere::setLongSegments | ( | unsigned int | ui | ) |
Set the number of longitudinal segments.
References longSegments.
Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), and ProfileFilter::refresh().
void DrawSphere::setOrigin | ( | const Point3D & | p | ) |
Sets the location of the sphere's origin.
References origin.
Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), and ProfileFilter::refresh().
void DrawSphere::setRadius | ( | float | rad | ) |
Set the radius.
References radius.
Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), and ProfileFilter::refresh().
|
protected |
Referenced by clone(), draw(), and setColour().
|
protected |
Referenced by clone(), draw(), and setColour().
|
protected |
Referenced by clone(), draw(), and setColour().
|
protected |
Number of lateral and longitudinal segments.
Referenced by clone(), draw(), and setLatSegments().
|
protected |
Referenced by clone(), draw(), and setLongSegments().
|
protected |
Origin of the object.
Referenced by clone(), draw(), getBoundingBox(), recomputeParams(), and setOrigin().
|
protected |
Pointer to the GLU quadric doohicker.
Referenced by clone(), draw(), DrawSphere(), and ~DrawSphere().
|
protected |
Colour data - rgba.
Referenced by clone(), draw(), and setColour().
|
protected |
Sphere radius.
Referenced by clone(), draw(), getBoundingBox(), recomputeParams(), and setRadius().