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

dynamic 3D camera object for setting camera perspectives in 3D space and convenient maniputation of it (compare: GLCamera being lower level object) More...

#include <3dcamera.hpp>

Inheritance diagram for LxS::CoreGraphics::R3DCamera:
Inheritance graph
Collaboration diagram for LxS::CoreGraphics::R3DCamera:
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 SetPosition (float x, float y, float z)
 Set position in XYZ coordinate system. More...
 
void SetRotation (float x, float y)
 set angle at which target is viewed
 
void RotateX (float x)
 relative rotation around x axis
 
void RotateY (float y)
 relative rotation around y axis
 
float GetPositionX ()
 return current camera position
 
float GetPositionY ()
 return current camera position
 
float GetPositionZ ()
 return current camera position
 
void SetTargetPosition (float x, float y, float z)
 set target position; camera will pan to a position; velocity is auto-adjusted
 
void SetTargetRotation (float x, float y)
 set camera to rotate around focal point; angular velocity is auto-adjusted
 
virtual void Initialize ()
 set up default variables
 
virtual void Animate (float dt)
 animate camera movement
 
virtual void Render (Rendermode mode)
 render something
 
virtual void UnloadResources ()
 it is to fulfill gameobject API. actually no resources are allocated, so no resources to free
 
float GetRotationY ()
 get angle at which target is viewed
 
float GetRotationX ()
 get angle at which target is viewed
 
void SetPositionTarget ()
 
unsigned long GetTexelsCount ()
 sum of dimensionsxdepths of all textures
 
unsigned long GetFacesCount ()
 all 3D faces
 
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 Attributes

float initialized_percentage
 0-100; 0- just constructed; 100 - redy to render; 0-100 - for progressbar
 

Friends

class Map
 

Detailed Description

dynamic 3D camera object for setting camera perspectives in 3D space and convenient maniputation of it (compare: GLCamera being lower level object)

Member Enumeration Documentation

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

Enumerator
ForReal 

proper rendering for display

ForCoords3D 

rendering for coordinate detection

ForCoordsGame 

for detection of ingame coordinate system - unused

Member Function Documentation

void R3DCamera::SetPosition ( float  x,
float  y,
float  z 
)

Set position in XYZ coordinate system.

Parameters
xx coordinate (width)
yy coordinate (height)
zz coordinate (depth)
void LxS::CoreGraphics::R3DCamera::SetPositionTarget ( )
inline

Finish movement. (after setting target position by default camera will slowly start moving to achieve that position; by issuing this command one can move camera to target position immediately


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