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

Draw a vector. More...

#include <drawables.h>

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

Public Member Functions

 DrawVector ()
 Constructor. More...
 
virtual ~DrawVector ()
 Destructor. More...
 
virtual DrawableObjclone () const
 
virtual unsigned int getType () const
 
void setDrawArrow (bool wantDraw)
 Set if we want to draw the arrow or not. More...
 
void setColour (float r, float g, float b, float alpha)
 Sets the color of the point to be drawn. More...
 
void draw () const
 Draws the points. More...
 
void setOrigin (const Point3D &)
 Sets the location of the poitns. More...
 
void setVector (const Point3D &)
 Sets the location of the poitns. More...
 
void setEnds (const Point3D &start, const Point3D &end)
 
void setDoubleEnded (bool wantDoubleEnd=true)
 
Point3D getVector () const
 Gets the arrow axis direction. More...
 
Point3D getOrigin () const
 Gets the arrow axis direction. More...
 
void setArrowSize (float size)
 Set the arrowhead size. More...
 
void setLineSize (float size)
 Set the "tail" line size. 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...
 

Protected Attributes

Point3D origin
 Vector origin. More...
 
Point3D vector
 
bool drawArrow
 Do we draw the arrow head? More...
 
float arrowSize
 Radius of tail of arrow. More...
 
bool scaleArrow
 Scale arrow head by vector size. More...
 
bool doubleEnded
 Whether to draw the arrow head at both ends. More...
 
float r
 Vector colour (r,g,b,a) range: [0.0f,1.0f]. More...
 
float g
 
float b
 
float a
 
float lineSize
 Size of "tail" line to draw. 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

Draw a vector.

Constructor & Destructor Documentation

◆ DrawVector()

DrawVector::DrawVector ( )

Constructor.

Referenced by clone().

Here is the caller graph for this function:

◆ ~DrawVector()

DrawVector::~DrawVector ( )
virtual

Destructor.

Member Function Documentation

◆ clone()

DrawableObj * DrawVector::clone ( ) const
virtual

Reimplemented from DrawableObj.

References DrawVector().

◆ draw()

void DrawVector::draw ( ) const
virtual

◆ getBoundingBox()

void DrawVector::getBoundingBox ( BoundCube b) const
virtual

Implements DrawableObj.

References origin, BoundCube::setBounds(), and vector.

◆ getOrigin()

Point3D DrawVector::getOrigin ( ) const
inline

Gets the arrow axis direction.

Referenced by AnnotateFilter::refresh(), and AnnotateFilter::setPropFromBinding().

Here is the caller graph for this function:

◆ getType()

virtual unsigned int DrawVector::getType ( ) const
inlinevirtual

Implements DrawableObj.

References DRAW_TYPE_VECTOR.

◆ getVector()

Point3D DrawVector::getVector ( ) const
inline

Gets the arrow axis direction.

Referenced by IonClipFilter::refresh(), and AnnotateFilter::refresh().

Here is the caller graph for this function:

◆ recomputeParams()

void DrawVector::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_VECTOR_BIND_ORIENTATION, DRAW_VECTOR_BIND_ORIGIN, DRAW_VECTOR_BIND_ORIGIN_ONLY, DRAW_VECTOR_BIND_TARGET, origin, and vector.

◆ setArrowSize()

void DrawVector::setArrowSize ( float  size)
inline

Set the arrowhead size.

Referenced by BoundingBoxFilter::numBytesForCache(), and AnnotateFilter::refresh().

Here is the caller graph for this function:

◆ setColour()

void DrawVector::setColour ( float  r,
float  g,
float  b,
float  alpha 
)

Sets the color of the point to be drawn.

References a, b, g, and r.

Referenced by BoundingBoxFilter::numBytesForCache(), AnnotateFilter::refresh(), and ClusterAnalysisFilter::refresh().

Here is the caller graph for this function:

◆ setDoubleEnded()

void DrawVector::setDoubleEnded ( bool  wantDoubleEnd = true)
inline

Referenced by BoundingBoxFilter::numBytesForCache().

Here is the caller graph for this function:

◆ setDrawArrow()

void DrawVector::setDrawArrow ( bool  wantDraw)
inline

Set if we want to draw the arrow or not.

Referenced by BoundingBoxFilter::numBytesForCache(), AnnotateFilter::refresh(), and ClusterAnalysisFilter::refresh().

Here is the caller graph for this function:

◆ setEnds()

void DrawVector::setEnds ( const Point3D start,
const Point3D end 
)

References origin, and vector.

◆ setLineSize()

void DrawVector::setLineSize ( float  size)
inline

Set the "tail" line size.

Referenced by AnnotateFilter::refresh().

Here is the caller graph for this function:

◆ setOrigin()

void DrawVector::setOrigin ( const Point3D pt)

Sets the location of the poitns.

References origin.

Referenced by BoundingBoxFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), VoxeliseFilter::refresh(), and ClusterAnalysisFilter::refresh().

Here is the caller graph for this function:

◆ setVector()

void DrawVector::setVector ( const Point3D pt)

Sets the location of the poitns.

References vector.

Referenced by BoundingBoxFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), VoxeliseFilter::refresh(), and ClusterAnalysisFilter::refresh().

Here is the caller graph for this function:

Member Data Documentation

◆ a

float DrawVector::a
protected

Referenced by setColour().

◆ arrowSize

float DrawVector::arrowSize
protected

Radius of tail of arrow.

Referenced by draw().

◆ b

float DrawVector::b
protected

Referenced by draw(), and setColour().

◆ doubleEnded

bool DrawVector::doubleEnded
protected

Whether to draw the arrow head at both ends.

Referenced by draw().

◆ drawArrow

bool DrawVector::drawArrow
protected

Do we draw the arrow head?

Referenced by draw().

◆ g

float DrawVector::g
protected

Referenced by draw(), and setColour().

◆ lineSize

float DrawVector::lineSize
protected

Size of "tail" line to draw.

Referenced by draw().

◆ origin

Point3D DrawVector::origin
protected

Vector origin.

Referenced by draw(), getBoundingBox(), recomputeParams(), setEnds(), and setOrigin().

◆ r

float DrawVector::r
protected

Vector colour (r,g,b,a) range: [0.0f,1.0f].

Referenced by draw(), and setColour().

◆ scaleArrow

bool DrawVector::scaleArrow
protected

Scale arrow head by vector size.

◆ vector

Point3D DrawVector::vector
protected

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