zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Quadrilateral< VERTEX > Class Template Reference

An Abstraction of a Quadrilateral. More...

#include <Quadrilateral.h>

Inherits Zeni::Renderable.

Public Member Functions

 Quadrilateral ()
 
 Quadrilateral (const VERTEX &vertex0, const VERTEX &vertex1, const VERTEX &vertex2, const VERTEX &vertex3)
 
 Quadrilateral (const Quadrilateral< VERTEX > &rhs)
 
Quadrilateral< VERTEX > * get_duplicate () const
 Get a duplicate of the Quadrilateral. More...
 
Triangle< VERTEX > * get_duplicate_t0 () const
 Get the first half of the Quadrilateral. More...
 
Triangle< VERTEX > * get_duplicate_t1 () const
 Get the second half of the Quadrilateral. More...
 
virtual bool is_3d () const
 Tell the rendering system if we're using 3D coordinates. More...
 
Quadrilateral< VERTEX > & operator= (const Quadrilateral< VERTEX > &rhs)
 
const VERTEX & operator[] (const int &index) const
 Get 'index'. More...
 
VERTEX & operator[] (const int &index)
 Get 'index'. More...
 
virtual void render_to (Video_GL_Fixed &screen) const
 Overridden for OpenGL rendering. More...
 
virtual void render_to (Video_GL_Shader &screen) const
 Overridden for OpenGL rendering. More...
 
virtual void render_to (Video_DX9 &screen) const
 Overridden for Direct3D9 rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
- Public Member Functions inherited from Zeni::Renderable
 Renderable ()
 
 Renderable (const Renderable &rhs)
 
virtual ~Renderable ()
 
void fax_Material (const Material *const &material)
 Set the Material, giving the Renderable a copy. More...
 
const Materialget_Material () const
 Get the Material. More...
 
void give_Material (Material *const &material)
 Set the Material, giving the Renderable ownership. More...
 
void lend_Material (const Material *const &material)
 Set the Material, giving the Renderable no ownership. More...
 
Renderableoperator= (const Renderable &rhs)
 
virtual void post_render () const
 
virtual void pre_render () const
 

Public Attributes

VERTEX a
 
VERTEX b
 
VERTEX c
 
VERTEX d
 

Detailed Description

template<typename VERTEX>
class Zeni::Quadrilateral< VERTEX >

An Abstraction of a Quadrilateral.

Author
bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 37 of file Quadrilateral.h.

Constructor & Destructor Documentation

template<typename VERTEX >
Zeni::Quadrilateral< VERTEX >::Quadrilateral ( )

Definition at line 39 of file Quadrilateral.hxx.

template<typename VERTEX>
Zeni::Quadrilateral< VERTEX >::Quadrilateral ( const VERTEX &  vertex0,
const VERTEX &  vertex1,
const VERTEX &  vertex2,
const VERTEX &  vertex3 
)

Definition at line 48 of file Quadrilateral.hxx.

template<typename VERTEX>
Zeni::Quadrilateral< VERTEX >::Quadrilateral ( const Quadrilateral< VERTEX > &  rhs)

Definition at line 57 of file Quadrilateral.hxx.

Member Function Documentation

template<typename VERTEX >
Quadrilateral< VERTEX > * Zeni::Quadrilateral< VERTEX >::get_duplicate ( ) const

Get a duplicate of the Quadrilateral.

Definition at line 103 of file Quadrilateral.hxx.

template<typename VERTEX >
Triangle< VERTEX > * Zeni::Quadrilateral< VERTEX >::get_duplicate_t0 ( ) const

Get the first half of the Quadrilateral.

Definition at line 108 of file Quadrilateral.hxx.

References Zeni::Renderable::fax_Material().

Referenced by Zeni::Vertex_Buffer::fax_Quadrilateral().

template<typename VERTEX >
Triangle< VERTEX > * Zeni::Quadrilateral< VERTEX >::get_duplicate_t1 ( ) const

Get the second half of the Quadrilateral.

Definition at line 115 of file Quadrilateral.hxx.

References d, and Zeni::Renderable::fax_Material().

Referenced by Zeni::Vertex_Buffer::fax_Quadrilateral().

template<typename VERTEX >
bool Zeni::Quadrilateral< VERTEX >::is_3d ( ) const
virtual

Tell the rendering system if we're using 3D coordinates.

Implements Zeni::Renderable.

Definition at line 79 of file Quadrilateral.hxx.

template<typename VERTEX>
Quadrilateral< VERTEX > & Zeni::Quadrilateral< VERTEX >::operator= ( const Quadrilateral< VERTEX > &  rhs)
template<typename VERTEX >
const VERTEX & Zeni::Quadrilateral< VERTEX >::operator[] ( const int index) const

Get 'index'.

Definition at line 122 of file Quadrilateral.hxx.

References assert.

template<typename VERTEX >
VERTEX & Zeni::Quadrilateral< VERTEX >::operator[] ( const int index)

Get 'index'.

Definition at line 129 of file Quadrilateral.hxx.

References assert.

template<typename VERTEX >
void Zeni::Quadrilateral< VERTEX >::render_to ( Video_GL_Fixed screen) const
virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

Definition at line 85 of file Quadrilateral.hxx.

References d, GL_TRIANGLE_FAN, glBegin, and glEnd.

template<typename VERTEX>
virtual void Zeni::Quadrilateral< VERTEX >::render_to ( Video_GL_Shader screen) const
virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

template<typename VERTEX >
void Zeni::Quadrilateral< VERTEX >::render_to ( Video_DX9 screen) const
virtual

Overridden for Direct3D9 rendering.

Implements Zeni::Renderable.

Definition at line 97 of file Quadrilateral.hxx.

References D3DPT_TRIANGLEFAN, and Zeni::Video_DX9::get_d3d_device().

template<>
void Zeni::Quadrilateral< Vertex2f_Color >::render_to ( Video_GL_Shader screen) const
virtual
template<>
void Zeni::Quadrilateral< Vertex3f_Color >::render_to ( Video_GL_Shader screen) const
virtual
template<>
void Zeni::Quadrilateral< Vertex2f_Texture >::render_to ( Video_GL_Shader screen) const
virtual
template<>
void Zeni::Quadrilateral< Vertex3f_Texture >::render_to ( Video_GL_Shader screen) const
virtual

Member Data Documentation

template<typename VERTEX>
VERTEX Zeni::Quadrilateral< VERTEX >::a

Definition at line 72 of file Quadrilateral.h.

Referenced by Zeni::Quadrilateral< VERTEX >::operator=().

template<typename VERTEX>
VERTEX Zeni::Quadrilateral< VERTEX >::b

Definition at line 73 of file Quadrilateral.h.

Referenced by Zeni::Quadrilateral< VERTEX >::operator=().

template<typename VERTEX>
VERTEX Zeni::Quadrilateral< VERTEX >::c

Definition at line 74 of file Quadrilateral.h.

Referenced by Zeni::Quadrilateral< VERTEX >::operator=().

template<typename VERTEX>
VERTEX Zeni::Quadrilateral< VERTEX >::d

Definition at line 75 of file Quadrilateral.h.

Referenced by Zeni::Quadrilateral< VERTEX >::operator=().


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