zenilib: Zeni::Triangle< VERTEX > Class Template Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
Zeni::Triangle< VERTEX > Class Template Reference
Zenilib

An Abstraction of a Triangle. More...

`#include <Triangle.h>`

Inherits Zeni::Renderable.

## Public Member Functions

| Triangle ()
| Triangle (const VERTEX &vertex0, const VERTEX &vertex1, const VERTEX &vertex2)
| Triangle (const Triangle< VERTEX > &rhs)
Triangle< VERTEX > * | get_duplicate () const
| Get a duplicate of the Triangle. More...
Triangle< VERTEX > * | get_duplicate_subt0 () const
| Get quarter 0 of the Triangle; Can be used for software LOD increase. More...
Triangle< VERTEX > * | get_duplicate_subt1 () const
| Get quarter 1 of the Triangle; Can be used for software LOD increase. More...
Triangle< VERTEX > * | get_duplicate_subt2 () const
| Get quarter 2 of the Triangle; Can be used for software LOD increase. More...
Triangle< VERTEX > * | get_duplicate_subt3 () const
| Get quarter 3 of the Triangle; Can be used for software LOD increase. More...
virtual bool | is_3d () const
| Tell the rendering system if we're using 3D coordinates. More...
Triangle< VERTEX > & | operator= (const Triangle< 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 Material * | get_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...
Renderable & | operator= (const Renderable &rhs)
virtual void | post_render () const
virtual void | pre_render () const

## Public Attributes

VERTEX | a
VERTEX | b
VERTEX | c

## Detailed Description

### template<typename VERTEX>
class Zeni::Triangle< VERTEX >

An Abstraction of a Triangle.

Author
  bazald

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

Definition at line 36 of file Triangle.h.

## Constructor & Destructor Documentation

template<typename VERTEX >

Zeni::Triangle< VERTEX >::Triangle | ( |  | ) |

Definition at line 43 of file Triangle.hxx.

template<typename VERTEX>

Zeni::Triangle< VERTEX >::Triangle | ( | const VERTEX & | vertex0,
|  | const VERTEX & | vertex1,
|  | const VERTEX & | vertex2
| ) |  |

Definition at line 51 of file Triangle.hxx.

template<typename VERTEX>

Zeni::Triangle< VERTEX >::Triangle | ( | const Triangle< VERTEX > & | rhs | ) |

Definition at line 59 of file Triangle.hxx.

## Member Function Documentation

template<typename VERTEX >

Triangle< VERTEX > * Zeni::Triangle< VERTEX >::get_duplicate | ( |  | ) | const

Get a duplicate of the Triangle.

Definition at line 102 of file Triangle.hxx.

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

template<typename VERTEX >

Triangle< VERTEX > * Zeni::Triangle< VERTEX >::get_duplicate_subt0 | ( |  | ) | const

Get quarter 0 of the Triangle; Can be used for software LOD increase.

Definition at line 107 of file Triangle.hxx.

template<typename VERTEX >

Triangle< VERTEX > * Zeni::Triangle< VERTEX >::get_duplicate_subt1 | ( |  | ) | const

Get quarter 1 of the Triangle; Can be used for software LOD increase.

Definition at line 116 of file Triangle.hxx.

template<typename VERTEX >

Triangle< VERTEX > * Zeni::Triangle< VERTEX >::get_duplicate_subt2 | ( |  | ) | const

Get quarter 2 of the Triangle; Can be used for software LOD increase.

Definition at line 125 of file Triangle.hxx.

template<typename VERTEX >

Triangle< VERTEX > * Zeni::Triangle< VERTEX >::get_duplicate_subt3 | ( |  | ) | const

Get quarter 3 of the Triangle; Can be used for software LOD increase.

Definition at line 134 of file Triangle.hxx.

template<typename VERTEX >

bool Zeni::Triangle< VERTEX >::is_3d | ( |  | ) | const

virtual

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

Implements Zeni::Renderable.

Definition at line 79 of file Triangle.hxx.

template<typename VERTEX>

Triangle< VERTEX > & Zeni::Triangle< VERTEX >::operator= | ( | const Triangle< VERTEX > & | rhs | ) |

Definition at line 68 of file Triangle.hxx.

References Zeni::Triangle< VERTEX >::a, Zeni::Triangle< VERTEX >::b, and Zeni::Triangle< VERTEX >::c.

template<typename VERTEX >

const VERTEX & Zeni::Triangle< VERTEX >::operator[] | ( | const int & | index | ) | const

Get 'index'.

Definition at line 144 of file Triangle.hxx.

References assert.

template<typename VERTEX >

VERTEX & Zeni::Triangle< VERTEX >::operator[] | ( | const int & | index | ) |

Get 'index'.

Definition at line 151 of file Triangle.hxx.

References assert.

template<typename VERTEX >

void Zeni::Triangle< VERTEX >::render_to | ( | Video_GL_Fixed & | screen | ) | const

virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

Definition at line 85 of file Triangle.hxx.

References GL_TRIANGLES, glBegin, and glEnd.

template<typename VERTEX>

virtual void Zeni::Triangle< VERTEX >::render_to | ( | Video_GL_Shader & | screen | ) | const

virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

template<typename VERTEX >

void Zeni::Triangle< VERTEX >::render_to | ( | Video_DX9 & | screen | ) | const

virtual

Overridden for Direct3D9 rendering.

Implements Zeni::Renderable.

Definition at line 96 of file Triangle.hxx.

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

template<>

void Zeni::Triangle< Vertex2f_Color >::render_to | ( | Video_GL_Shader & | screen | ) | const

virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

Definition at line 128 of file Vertex2f.cpp.

References GL_COLOR_ARRAY, GL_FLOAT, GL_TRIANGLES, GL_UNSIGNED_BYTE, GL_VERTEX_ARRAY, glColorPointer, glDisableClientState, glDrawArrays, glEnableClientState, and glVertexPointer.

template<>

void Zeni::Triangle< Vertex3f_Color >::render_to | ( | Video_GL_Shader & | screen | ) | const

virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

Definition at line 142 of file Vertex3f.cpp.

References GL_COLOR_ARRAY, GL_FLOAT, GL_TRIANGLES, GL_UNSIGNED_BYTE, GL_VERTEX_ARRAY, glColorPointer, glDisableClientState, glDrawArrays, glEnableClientState, and glVertexPointer.

template<>

void Zeni::Triangle< Vertex2f_Texture >::render_to | ( | Video_GL_Shader & | screen | ) | const

virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

Definition at line 238 of file Vertex2f.cpp.

References GL_FLOAT, GL_TEXTURE_COORD_ARRAY, GL_TRIANGLES, GL_VERTEX_ARRAY, glDisableClientState, glDrawArrays, glEnableClientState, glTexCoordPointer, and glVertexPointer.

template<>

void Zeni::Triangle< Vertex3f_Texture >::render_to | ( | Video_GL_Shader & | screen | ) | const

virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

Definition at line 260 of file Vertex3f.cpp.

References GL_FLOAT, GL_TEXTURE_COORD_ARRAY, GL_TRIANGLES, GL_VERTEX_ARRAY, glDisableClientState, glDrawArrays, glEnableClientState, glTexCoordPointer, and glVertexPointer.

## Member Data Documentation

template<typename VERTEX>

VERTEX Zeni::Triangle< VERTEX >::a

Definition at line 72 of file Triangle.h.

Referenced by Zeni::Vertex_Buffer::fax_Triangle(), and Zeni::Triangle< VERTEX >::operator=().

template<typename VERTEX>

VERTEX Zeni::Triangle< VERTEX >::b

Definition at line 73 of file Triangle.h.

Referenced by Zeni::Vertex_Buffer::fax_Triangle(), and Zeni::Triangle< VERTEX >::operator=().

template<typename VERTEX>

VERTEX Zeni::Triangle< VERTEX >::c

Definition at line 74 of file Triangle.h.

Referenced by Zeni::Vertex_Buffer::fax_Triangle(), and Zeni::Triangle< VERTEX >::operator=().

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

- zenilib/jni/external/zenilib/zeni_graphics/Zeni/Triangle.h
- zenilib/jni/external/zenilib/zeni_graphics/Zeni/Triangle.hxx