Lugre::cSpriteList::cSprite Struct Reference

#include <lugre_spritelist.h>

Collaboration diagram for Lugre::cSpriteList::cSprite:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cSprite ()
void Set (const float x, const float y, const float _w, const float _h, const Ogre::Vector2 &uv_0, const Ogre::Vector2 &uv_x, const Ogre::Vector2 &uv_y, const float z=0.0, const Ogre::ColourValue &vCol=Ogre::ColourValue::White)
void Set (const float x, const float y, const float _w, const float _h, const Ogre::Vector2 &uv_0, const float uv_w, const float uv_h, const float z=0.0, const Ogre::ColourValue &vCol=Ogre::ColourValue::White)
 simpler form without rotation
void SetCol (const Ogre::ColourValue &col)
void WriteGeometry (cRobRenderOp &pGeometry, const bool bVertexCol)
bool WriteGeometryClipped (cRobRenderOp &pGeometry, const bool bVertexCol, const Ogre::Rectangle &rClip)
 returns false if sprite was skipped for being outside

Public Attributes

Ogre::Vector3 p
float w
float h
Ogre::Vector2 mvTexCoord0
Ogre::Vector2 mvTexCoordX
 right vector, might be used for rotated sprites
Ogre::Vector2 mvTexCoordY
Ogre::ColourValue mvCol
 only a single colour per sprite supported so far, as colour-transitions are tricky with clipping


Detailed Description

Definition at line 196 of file lugre_spritelist.h.


Constructor & Destructor Documentation

Lugre::cSpriteList::cSprite::cSprite (  )  [inline]

Definition at line 205 of file lugre_spritelist.h.


Member Function Documentation

void Lugre::cSpriteList::cSprite::Set ( const float  x,
const float  y,
const float  _w,
const float  _h,
const Ogre::Vector2 &  uv_0,
const Ogre::Vector2 &  uv_x,
const Ogre::Vector2 &  uv_y,
const float  z = 0.0,
const Ogre::ColourValue &  vCol = Ogre::ColourValue::White 
) [inline]

lt=left,top wh=width,height uv_0 : texcoords at left,top vertex uv_0+uv_x = texcoords at right,top vertex (two coordinates to allow rotation in atlas etc) uv_0+uv_y = texcoords at left,bottom vertex (two coordinates to allow rotation in atlas etc)

Definition at line 211 of file lugre_spritelist.h.

References h, mvCol, mvTexCoord0, mvTexCoordX, mvTexCoordY, p, and w.

Referenced by Set().

void Lugre::cSpriteList::cSprite::Set ( const float  x,
const float  y,
const float  _w,
const float  _h,
const Ogre::Vector2 &  uv_0,
const float  uv_w,
const float  uv_h,
const float  z = 0.0,
const Ogre::ColourValue &  vCol = Ogre::ColourValue::White 
) [inline]

simpler form without rotation

Definition at line 224 of file lugre_spritelist.h.

References Set().

void Lugre::cSpriteList::cSprite::SetCol ( const Ogre::ColourValue &  col  )  [inline]

Definition at line 228 of file lugre_spritelist.h.

References mvCol.

void Lugre::cSpriteList::cSprite::WriteGeometry ( cRobRenderOp pGeometry,
const bool  bVertexCol 
)

Definition at line 248 of file lugre_spritelist.cpp.

References SPRITE_VERTEX, and SPRITE_VERTEX_COL.

bool Lugre::cSpriteList::cSprite::WriteGeometryClipped ( cRobRenderOp pGeometry,
const bool  bVertexCol,
const Ogre::Rectangle &  rClip 
)

returns false if sprite was skipped for being outside

Definition at line 262 of file lugre_spritelist.cpp.

References h, Lugre::mymax(), Lugre::mymin(), p, SPRITE_VERTEX, SPRITE_VERTEX_COL, and w.


Member Data Documentation

Definition at line 200 of file lugre_spritelist.h.

Referenced by Set().

right vector, might be used for rotated sprites

Definition at line 201 of file lugre_spritelist.h.

Referenced by Set().

Definition at line 202 of file lugre_spritelist.h.

Referenced by Set().

only a single colour per sprite supported so far, as colour-transitions are tricky with clipping

Definition at line 203 of file lugre_spritelist.h.

Referenced by Set(), and SetCol().


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

Generated on Wed May 23 06:00:23 2012 for cpp by  doxygen 1.5.6