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

#include <drawables.h>

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

Public Member Functions

 DrawPolygon ()
 Constructor. More...
 
virtual ~DrawPolygon ()
 Destructor. More...
 
virtual DrawableObjclone () const
 
virtual unsigned int getType () const
 
virtual void getBoundingBox (BoundCube &b) const
 Get bounding cube. More...
 
void setVertices (const vector< Point3D > &p)
 
void setColour (float r, float g, float b, float a)
 Set the colour of all vertices. More...
 
void draw () const
 Draw the triangle. More...
 
Point3D getOrigin () const
 Gets the arrow axis direction. 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...
 
virtual Point3D getCentroid () const
 Get the centre of the object. Only valid if object is simple. More...
 

Protected Attributes

vector< Point3Dvertices
 Vertices of the quad. More...
 
Point3D normal
 
float r
 Colours of polygon (rgba colour model) More...
 
float g
 
float b
 
float a
 
unsigned int drawMode
 The drawings style to use (eg filled, outline etc) 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

◆ DrawPolygon()

DrawPolygon::DrawPolygon ( )
inline

Constructor.

References POLYGON_DRAW_OUTLINE.

◆ ~DrawPolygon()

virtual DrawPolygon::~DrawPolygon ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ clone()

DrawableObj * DrawPolygon::clone ( ) const
virtual

◆ draw()

void DrawPolygon::draw ( ) const
virtual

◆ getBoundingBox()

void DrawPolygon::getBoundingBox ( BoundCube b) const
virtual

Get bounding cube.

Implements DrawableObj.

References BoundCube::setBounds(), and DrawQuad::vertices.

◆ getOrigin()

Point3D DrawPolygon::getOrigin ( ) const

Gets the arrow axis direction.

◆ getType()

virtual unsigned int DrawPolygon::getType ( ) const
inlinevirtual

Implements DrawableObj.

References DRAW_TYPE_POLYGON.

◆ setColour()

void DrawPolygon::setColour ( float  r,
float  g,
float  b,
float  a 
)

Set the colour of all vertices.

References DrawQuad::a, DrawQuad::b, DrawQuad::g, and DrawQuad::r.

◆ setVertices()

void DrawPolygon::setVertices ( const vector< Point3D > &  p)

References DrawQuad::vertices.

Member Data Documentation

◆ a

float DrawPolygon::a
protected

Referenced by clone().

◆ b

float DrawPolygon::b
protected

Referenced by clone().

◆ drawMode

unsigned int DrawPolygon::drawMode
protected

The drawings style to use (eg filled, outline etc)

◆ g

float DrawPolygon::g
protected

Referenced by clone().

◆ normal

Point3D DrawPolygon::normal
protected

Colour data for the quad The lighting normal of the triangle

Lighting for this class is per triangle only no per vertex lighting

Referenced by clone().

◆ r

float DrawPolygon::r
protected

Colours of polygon (rgba colour model)

Referenced by clone().

◆ vertices

vector<Point3D> DrawPolygon::vertices
protected

Vertices of the quad.

Referenced by clone().


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