All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LxS::CoreGraphics::LineSegment Class Reference

class representing line segment More...

#include <linesegment.hpp>

Inheritance diagram for LxS::CoreGraphics::LineSegment:
Inheritance graph
Collaboration diagram for LxS::CoreGraphics::LineSegment:
Collaboration graph

Public Types

enum  Rendermode { ForReal, ForCoords3D, ForCoordsGame }
 purpose of rendering. ForReal is "to display", ForCoords3D is "to determine where user has clicked" More...

Public Member Functions

void SetColor (float _r, float _g, float _b)
 set colour of line segment
virtual void Initialize ()
 set up resources. (this is to facilitate late (delayed) initialization.
virtual void Render (Rendermode mode)
 render something
virtual void UnloadResources ()
 free up consumed resources while (possibly temporarily) object is not critical
virtual void Animate (float dt)
 move contents dt=delta time in seconds since last call to animate;
virtual unsigned long GetTexelsCount ()
 sum of dimensionsxdepths of all textures
virtual unsigned long GetFacesCount ()
 all 3D faces
virtual void SetA (float x, float y, float z)
 set coordinates of first end
virtual void SetB (float x, float y, float z)
 set coordinates of second end
float GetInitializedPercentage ()
 0= uninitialized; 100=ready; other? for progress bars
virtual void RefreshAssets ()
 To facilitate refreshing app after switching OpenGL Context (as in Android lifecycle)

Protected Member Functions

void InitColor ()
 initialize colour

Protected Attributes

boost::shared_ptr< Shaderp_ShaderForReal
 display shader
std::vector< GLfloat > vertices
 vertices (two of them)
std::vector< GLshort > indices
 vertex indices
float r
 color (red channel)
float g
 color (green channel)
float b
 color (blue channel)
float initialized_percentage
 0-100; 0- just constructed; 100 - redy to render; 0-100 - for progressbar

Detailed Description

class representing line segment

Member Enumeration Documentation

purpose of rendering. ForReal is "to display", ForCoords3D is "to determine where user has clicked"


proper rendering for display


rendering for coordinate detection


for detection of ingame coordinate system - unused

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