RenderTools::Camera Class Reference

#include <Camera.h>

Inheritance diagram for RenderTools::Camera:

RenderTools::BindingInterface RenderTools::TransformNode RenderTools::AbstractPropertyContainer RenderTools::ContainerProperty RenderTools::AbstractProperty RenderTools::InitializeInterface

List of all members.

Public Types

enum  CamMode {
  NONE = 0x00, ORBIT = 0x01, DRAG = 0x02, DOLLY = 0x04,
  TRACK = 0x08, ZOOM = 0x10, ROLL = 0x20
}
enum  CamType { ORTHO, PERSPECTIVE }

Public Member Functions

 Camera (void)
virtual ~Camera (void)
 standard destructor
virtual void createProperties (void)
virtual const string getTypeName (bool ofComponent=false) const
virtual void onPropertyEvent (const PropertyEvent &e)
virtual void onInitialize (void)
virtual void onBind (int unit)
virtual void onUnbind (int unit)
void setMode (CamMode mode, bool send=true)
const int getMode (void) const
void setType (CamType type, bool send=true)
const CamType getType (void) const
void setFOV (float s, bool send=true)
const float getFOV (void) const
void setNear (float s, bool send=true)
const float getNear (void) const
void setFar (float s, bool send=true)
const float getFar (void) const
void setEye (const Vec3 &v, bool send=true)
const Vec3getEye (void) const
void setCenter (const Vec3 &v, bool send=true)
const Vec3getCenter (void) const
void setRoll (float deg, bool send=true)
const float getRoll (void) const
void setZoom (float f, bool send=true)
const float getZoom (void) const
void setFlip (bool state, bool send=true)
const bool getFlip (void) const
void setFlop (bool state, bool send=true)
const bool getFlop (void) const
void setViewport (const Vec4 &, bool send=true)
const Vec4getViewport (void) const
void setScreen (const Vec2 &, bool send=true)
const Vec2getScreen (void) const
void pushMode (void)
void popMode (void)
void initViewport (const Vec2 &, bool send=true)
void setDistance (float dist, bool send=true)
float getDistance (void) const
void frame (const NAABB &b, float scale=1.0f, bool send=true)
void reshape (int w, int h, bool send=true)
void move (const Vec3 &v, bool send=true)
void rectZoom (const Vec2 &p1, const Vec2 &p2, bool send=true)
Vec3 global2Screen (const Vec3 &global)
Vec3 screen2Global (const Vec3 &screen)
void getProjectionPyramid (Vec3 &p1, Vec3 &p2, Vec3 &p3, Vec3 &p4, Vec3 &apex, Vec3 &m1, Vec3 &m2)
Rectangle project (const NAABB &box)
Rectangle project (const AABB &box, const Mat4 &mat)
Rectangle project (const Vec3 &p, float r)
bool clipNear (Vec3 &l1, Vec3 &l2)
float getOrthoWidth (void) const
float getOrthoHeight (void) const
float getOrthoWidthZoomed (void) const
float getOrthoHeightZoomed (void) const
Vec4 getOrthoZoomed (void) const
void setOrtho (const Vec4 &, bool send=true)
const Vec4getOrtho (void) const
Vec4getOrtho (void)
void setOrthoHeight (float x, float y, float h, bool send=true)
void setOrthoWidth (float x, float y, float w, bool send=true)
Cameraoperator= (const Camera &c)
Cameraoperator+= (const Camera &c)
Cameraoperator*= (const float f)
 multiplies the basis by the given amount

Static Public Member Functions

static PropertyPtr create (const XMLNodePtr &xml=XMLNodePtr())
static void drawGrid (int size=100, int stp=10)
static CameraPtr getCurrent (void)


Detailed Description

Definition at line 11 of file Camera.h.


Member Enumeration Documentation

Enumerator:
NONE 
ORBIT 
DRAG 
DOLLY 
TRACK 
ZOOM 
ROLL 

Definition at line 14 of file Camera.h.

Enumerator:
ORTHO 
PERSPECTIVE 

Definition at line 24 of file Camera.h.


Constructor & Destructor Documentation

RenderTools::Camera::Camera ( void   ) 

Definition at line 24 of file Camera.cpp.

RenderTools::Camera::~Camera ( void   )  [virtual]

standard destructor

Definition at line 67 of file Camera.cpp.


Member Function Documentation

bool RenderTools::Camera::clipNear ( Vec3 l1,
Vec3 l2 
)

Definition at line 616 of file Camera.cpp.

PropertyPtr RenderTools::Camera::create ( const XMLNodePtr xml = XMLNodePtr()  )  [static]

Reimplemented from RenderTools::TransformNode.

Definition at line 35 of file Camera.cpp.

void RenderTools::Camera::createProperties ( void   )  [virtual]

Reimplemented from RenderTools::TransformNode.

Definition at line 43 of file Camera.cpp.

void RenderTools::Camera::drawGrid ( int  size = 100,
int  stp = 10 
) [static]

Definition at line 403 of file Camera.cpp.

void RenderTools::Camera::frame ( const NAABB b,
float  scale = 1.0f,
bool  send = true 
)

call propertyChanged

Definition at line 117 of file Camera.cpp.

const Vec3 & RenderTools::Camera::getCenter ( void   )  const

Definition at line 539 of file Camera.cpp.

CameraPtr RenderTools::Camera::getCurrent ( void   )  [static]

Definition at line 20 of file Camera.cpp.

float RenderTools::Camera::getDistance ( void   )  const

Definition at line 178 of file Camera.cpp.

const Vec3 & RenderTools::Camera::getEye ( void   )  const

Definition at line 528 of file Camera.cpp.

const float RenderTools::Camera::getFar ( void   )  const

Definition at line 517 of file Camera.cpp.

const bool RenderTools::Camera::getFlip ( void   )  const

Definition at line 561 of file Camera.cpp.

const bool RenderTools::Camera::getFlop ( void   )  const

Definition at line 572 of file Camera.cpp.

const float RenderTools::Camera::getFOV ( void   )  const

Definition at line 495 of file Camera.cpp.

const int RenderTools::Camera::getMode ( void   )  const

Definition at line 473 of file Camera.cpp.

const float RenderTools::Camera::getNear ( void   )  const

Definition at line 506 of file Camera.cpp.

Vec4 & RenderTools::Camera::getOrtho ( void   ) 

Definition at line 853 of file Camera.cpp.

const Vec4 & RenderTools::Camera::getOrtho ( void   )  const

Definition at line 849 of file Camera.cpp.

float RenderTools::Camera::getOrthoHeight ( void   )  const

Definition at line 877 of file Camera.cpp.

float RenderTools::Camera::getOrthoHeightZoomed ( void   )  const

Definition at line 885 of file Camera.cpp.

float RenderTools::Camera::getOrthoWidth ( void   )  const

Definition at line 873 of file Camera.cpp.

float RenderTools::Camera::getOrthoWidthZoomed ( void   )  const

Definition at line 881 of file Camera.cpp.

Vec4 RenderTools::Camera::getOrthoZoomed ( void   )  const

Definition at line 857 of file Camera.cpp.

void RenderTools::Camera::getProjectionPyramid ( Vec3 p1,
Vec3 p2,
Vec3 p3,
Vec3 p4,
Vec3 apex,
Vec3 m1,
Vec3 m2 
)

Definition at line 970 of file Camera.cpp.

const float RenderTools::Camera::getRoll ( void   )  const

Definition at line 550 of file Camera.cpp.

const Vec2 & RenderTools::Camera::getScreen ( void   )  const

Definition at line 597 of file Camera.cpp.

const Camera::CamType RenderTools::Camera::getType ( void   )  const

Definition at line 484 of file Camera.cpp.

const string RenderTools::Camera::getTypeName ( bool  ofComponent = false  )  const [virtual]

Reimplemented from RenderTools::TransformNode.

Definition at line 59 of file Camera.cpp.

const Vec4 & RenderTools::Camera::getViewport ( void   )  const

Definition at line 576 of file Camera.cpp.

const float RenderTools::Camera::getZoom ( void   )  const

Vec3 RenderTools::Camera::global2Screen ( const Vec3 global  ) 

void RenderTools::Camera::initViewport ( const Vec2 vp,
bool  send = true 
)

Definition at line 992 of file Camera.cpp.

void RenderTools::Camera::move ( const Vec3 v,
bool  send = true 
)

call propertyChanged

Definition at line 195 of file Camera.cpp.

void RenderTools::Camera::onBind ( int  unit  )  [virtual]

glViewport is also valid in OpenGL|ES, so we use it for both compiler-paths

Implements RenderTools::BindingInterface.

Definition at line 318 of file Camera.cpp.

void RenderTools::Camera::onInitialize ( void   )  [virtual]

Reimplemented from RenderTools::AbstractPropertyContainer.

Definition at line 462 of file Camera.cpp.

void RenderTools::Camera::onPropertyEvent ( const PropertyEvent e  )  [virtual]

Reimplemented from RenderTools::AbstractPropertyContainer.

Definition at line 450 of file Camera.cpp.

void RenderTools::Camera::onUnbind ( int  unit  )  [virtual]

Implements RenderTools::BindingInterface.

Definition at line 457 of file Camera.cpp.

Camera & RenderTools::Camera::operator*= ( const float  f  ) 

multiplies the basis by the given amount

Definition at line 101 of file Camera.cpp.

Camera & RenderTools::Camera::operator+= ( const Camera c  ) 

Definition at line 85 of file Camera.cpp.

Camera & RenderTools::Camera::operator= ( const Camera c  ) 

Definition at line 74 of file Camera.cpp.

void RenderTools::Camera::popMode ( void   ) 

Definition at line 605 of file Camera.cpp.

Rectangle RenderTools::Camera::project ( const Vec3 p,
float  r 
)

Definition at line 816 of file Camera.cpp.

Rectangle RenderTools::Camera::project ( const AABB box,
const Mat4 mat 
)

Definition at line 737 of file Camera.cpp.

Rectangle RenderTools::Camera::project ( const NAABB box  ) 

Definition at line 652 of file Camera.cpp.

void RenderTools::Camera::pushMode ( void   ) 

Definition at line 601 of file Camera.cpp.

void RenderTools::Camera::rectZoom ( const Vec2 p1,
const Vec2 p2,
bool  send = true 
)

call propertyChanged

Definition at line 890 of file Camera.cpp.

void RenderTools::Camera::reshape ( int  w,
int  h,
bool  send = true 
)

Definition at line 314 of file Camera.cpp.

Vec3 RenderTools::Camera::screen2Global ( const Vec3 screen  ) 

Definition at line 940 of file Camera.cpp.

void RenderTools::Camera::setCenter ( const Vec3 v,
bool  send = true 
)

call propertyChanged

Definition at line 532 of file Camera.cpp.

void RenderTools::Camera::setDistance ( float  dist,
bool  send = true 
)

call propertyChanged

Definition at line 161 of file Camera.cpp.

void RenderTools::Camera::setEye ( const Vec3 v,
bool  send = true 
)

call propertyChanged

Definition at line 521 of file Camera.cpp.

void RenderTools::Camera::setFar ( float  s,
bool  send = true 
)

call propertyChanged

Definition at line 510 of file Camera.cpp.

void RenderTools::Camera::setFlip ( bool  state,
bool  send = true 
)

call propertyChanged

Definition at line 554 of file Camera.cpp.

void RenderTools::Camera::setFlop ( bool  state,
bool  send = true 
)

call propertyChanged

Definition at line 565 of file Camera.cpp.

void RenderTools::Camera::setFOV ( float  s,
bool  send = true 
)

call propertyChanged

Definition at line 488 of file Camera.cpp.

void RenderTools::Camera::setMode ( CamMode  mode,
bool  send = true 
)

call propertyChanged

Definition at line 466 of file Camera.cpp.

void RenderTools::Camera::setNear ( float  s,
bool  send = true 
)

call propertyChanged

Definition at line 499 of file Camera.cpp.

void RenderTools::Camera::setOrtho ( const Vec4 ortho,
bool  send = true 
)

call propertyChanged

Definition at line 842 of file Camera.cpp.

void RenderTools::Camera::setOrthoHeight ( float  x,
float  y,
float  h,
bool  send = true 
)

call propertyChanged

Definition at line 832 of file Camera.cpp.

void RenderTools::Camera::setOrthoWidth ( float  x,
float  y,
float  w,
bool  send = true 
)

call propertyChanged

Definition at line 822 of file Camera.cpp.

void RenderTools::Camera::setRoll ( float  deg,
bool  send = true 
)

call propertyChanged

Definition at line 543 of file Camera.cpp.

void RenderTools::Camera::setScreen ( const Vec2 screen,
bool  send = true 
)

call propertyChanged

Definition at line 589 of file Camera.cpp.

void RenderTools::Camera::setType ( CamType  type,
bool  send = true 
)

call propertyChanged

Definition at line 477 of file Camera.cpp.

void RenderTools::Camera::setViewport ( const Vec4 vp,
bool  send = true 
)

call propertyChanged

Definition at line 580 of file Camera.cpp.

void RenderTools::Camera::setZoom ( float  f,
bool  send = true 
)


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

Generated on Wed Jan 26 00:15:36 2011 for RenderTools by  doxygen 1.5.8