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

#include <drawables.h>

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

Public Member Functions

 DrawPoint ()
 Constructor. More...
 
 DrawPoint (float, float, float)
 Constructor that takes in positional augments. More...
 
 DrawPoint (const Point3D &p)
 Constructor that takes in positional augments. More...
 
virtual ~DrawPoint ()
 Destructor. More...
 
unsigned int getType () const
 
virtual DrawableObjclone () const
 
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 point. More...
 
void setSize (float s)
 Set the size of the point. More...
 
void getBoundingBox (BoundCube &b) const
 
Point3D getCentroid () const
 Get the centre of the object. Only valid if object is simple. 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 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...
 

Protected Attributes

Point3D origin
 Point origin. More...
 
float r
 Point colour (r,g,b,a) range: [0.0f,1.0f]. More...
 
float g
 
float b
 
float a
 
float size
 Size of point. 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
 

Constructor & Destructor Documentation

◆ DrawPoint() [1/3]

DrawPoint::DrawPoint ( )

Constructor.

Referenced by clone().

Here is the caller graph for this function:

◆ DrawPoint() [2/3]

DrawPoint::DrawPoint ( float  x,
float  y,
float  z 
)

Constructor that takes in positional augments.

◆ DrawPoint() [3/3]

DrawPoint::DrawPoint ( const Point3D p)

Constructor that takes in positional augments.

◆ ~DrawPoint()

DrawPoint::~DrawPoint ( )
virtual

Destructor.

Member Function Documentation

◆ clone()

DrawableObj * DrawPoint::clone ( ) const
virtual

Reimplemented from DrawableObj.

References DrawPoint().

◆ draw()

void DrawPoint::draw ( ) const
virtual

Draws the points.

Implements DrawableObj.

References a, b, g, Point3D::getValueArr(), origin, r, and size.

◆ getBoundingBox()

void DrawPoint::getBoundingBox ( BoundCube b) const
inlinevirtual

Implements DrawableObj.

References BoundCube::setInvalid().

◆ getCentroid()

Point3D DrawPoint::getCentroid ( ) const
inlinevirtual

Get the centre of the object. Only valid if object is simple.

Reimplemented from DrawableObj.

◆ getType()

unsigned int DrawPoint::getType ( ) const
inlinevirtual

Implements DrawableObj.

References DRAW_TYPE_POINT.

◆ setColour()

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

Sets the color of the point to be drawn.

References a, b, g, and r.

◆ setOrigin()

void DrawPoint::setOrigin ( const Point3D pt)

Sets the location of the point.

References origin.

◆ setSize()

void DrawPoint::setSize ( float  s)
inline

Set the size of the point.

Member Data Documentation

◆ a

float DrawPoint::a
protected

Referenced by draw(), and setColour().

◆ b

float DrawPoint::b
protected

Referenced by draw(), and setColour().

◆ g

float DrawPoint::g
protected

Referenced by draw(), and setColour().

◆ origin

Point3D DrawPoint::origin
protected

Point origin.

Referenced by draw(), and setOrigin().

◆ r

float DrawPoint::r
protected

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

Referenced by draw(), and setColour().

◆ size

float DrawPoint::size
protected

Size of point.

Referenced by draw().


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