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

#include <drawables.h>

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

Public Member Functions

 DrawTexturedQuad ()
 
 ~DrawTexturedQuad ()
 
 DrawTexturedQuad (const DrawTexturedQuad &d)
 
void resize (size_t nx, size_t nY, unsigned int nChannels)
 
void draw () const
 Draw the triangle. More...
 
void setData (size_t x, size_t y, unsigned char *entry)
 
void rebindTexture (unsigned int mode=GL_RGB) const
 
void setUseColouring (bool useColouring)
 
- Public Member Functions inherited from DrawQuad
 DrawQuad ()
 Constructor. More...
 
virtual ~DrawQuad ()
 Destructor. More...
 
virtual DrawableObjclone () const
 
virtual unsigned int getType () const
 
virtual void getBoundingBox (BoundCube &b) const
 Get bounding cube. More...
 
void colourVerticies ()
 sets the vertices to defautl colours (r g b and white ) for each vertex respectively More...
 
void setVertex (unsigned int, const Point3D &)
 Set vertex's location. More...
 
void setVertices (const Point3D *)
 
void setColour (unsigned int, float r, float g, float b, float a)
 Set the colour of a vertex. More...
 
void setColour (float r, float g, float b, float a)
 Set the colour of all vertices. More...
 
void calcNormal ()
 Update the normal to the surface from vertices. More...
 
Point3D getOrigin () const
 Gets the arrow axis direction. 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...
 
- 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...
 

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 ()
 
- Protected Attributes inherited from DrawQuad
Point3D vertices [4]
 Vertices of the quad. More...
 
Point3D normal
 
float r [4]
 Colours of the vertices (rgba colour model) More...
 
float g [4]
 
float b [4]
 
float a [4]
 
- Protected Attributes inherited from DrawableObj
bool active
 Is the drawable active? More...
 
bool haveChanged
 Is the object changed since last set? More...
 
- 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

◆ DrawTexturedQuad() [1/2]

DrawTexturedQuad::DrawTexturedQuad ( )

◆ ~DrawTexturedQuad()

DrawTexturedQuad::~DrawTexturedQuad ( )

◆ DrawTexturedQuad() [2/2]

DrawTexturedQuad::DrawTexturedQuad ( const DrawTexturedQuad d)

References ASSERT.

Member Function Documentation

◆ draw()

void DrawTexturedQuad::draw ( ) const
virtual

Draw the triangle.

Reimplemented from DrawQuad.

References DrawQuad::a, ASSERT, DrawQuad::b, DrawQuad::g, DrawQuad::r, rebindTexture(), and DrawQuad::vertices.

◆ rebindTexture()

void DrawTexturedQuad::rebindTexture ( unsigned int  mode = GL_RGB) const

References ASSERT, TexturePool::genTexID(), and DrawableObj::texPool.

Referenced by draw().

Here is the caller graph for this function:

◆ resize()

void DrawTexturedQuad::resize ( size_t  nx,
size_t  nY,
unsigned int  nChannels 
)

Referenced by VoxeliseFilter::getRefreshUseMask().

Here is the caller graph for this function:

◆ setData()

void DrawTexturedQuad::setData ( size_t  x,
size_t  y,
unsigned char *  entry 
)

References ASSERT.

Referenced by VoxeliseFilter::getRefreshUseMask().

Here is the caller graph for this function:

◆ setUseColouring()

void DrawTexturedQuad::setUseColouring ( bool  useColouring)
inline

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