#include <Camera.h>

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 Vec3 & | getEye (void) const |
| void | setCenter (const Vec3 &v, bool send=true) |
| const Vec3 & | getCenter (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 Vec4 & | getViewport (void) const |
| void | setScreen (const Vec2 &, bool send=true) |
| const Vec2 & | getScreen (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 Vec4 & | getOrtho (void) const |
| Vec4 & | getOrtho (void) |
| void | setOrthoHeight (float x, float y, float h, bool send=true) |
| void | setOrthoWidth (float x, float y, float w, bool send=true) |
| Camera & | operator= (const Camera &c) |
| Camera & | operator+= (const Camera &c) |
| Camera & | operator*= (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) |
Definition at line 11 of file Camera.h.
| RenderTools::Camera::Camera | ( | void | ) |
Definition at line 24 of file Camera.cpp.
| RenderTools::Camera::~Camera | ( | void | ) | [virtual] |
Definition at line 616 of file Camera.cpp.
| PropertyPtr RenderTools::Camera::create | ( | const XMLNodePtr & | xml = XMLNodePtr() |
) | [static] |
| void RenderTools::Camera::createProperties | ( | void | ) | [virtual] |
| 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 | |||
| ) |
| 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] |
| const Vec4 & RenderTools::Camera::getViewport | ( | void | ) | const |
Definition at line 576 of file Camera.cpp.
| const float RenderTools::Camera::getZoom | ( | void | ) | const |
| 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 | |||
| ) |
| 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] |
| Camera & RenderTools::Camera::operator*= | ( | const float | f | ) |
Definition at line 85 of file Camera.cpp.
Definition at line 74 of file Camera.cpp.
| void RenderTools::Camera::popMode | ( | void | ) |
Definition at line 605 of file Camera.cpp.
Definition at line 816 of file Camera.cpp.
Definition at line 737 of file Camera.cpp.
Definition at line 652 of file Camera.cpp.
| void RenderTools::Camera::pushMode | ( | void | ) |
Definition at line 601 of file Camera.cpp.
| void RenderTools::Camera::reshape | ( | int | w, | |
| int | h, | |||
| bool | send = true | |||
| ) |
Definition at line 314 of file Camera.cpp.
Definition at line 940 of file Camera.cpp.
| void RenderTools::Camera::setCenter | ( | const Vec3 & | v, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setDistance | ( | float | dist, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setEye | ( | const Vec3 & | v, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setFar | ( | float | s, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setFlip | ( | bool | state, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setFlop | ( | bool | state, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setFOV | ( | float | s, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setMode | ( | CamMode | mode, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setNear | ( | float | s, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setOrtho | ( | const Vec4 & | ortho, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setOrthoHeight | ( | float | x, | |
| float | y, | |||
| float | h, | |||
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setOrthoWidth | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setRoll | ( | float | deg, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setScreen | ( | const Vec2 & | screen, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setType | ( | CamType | type, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setViewport | ( | const Vec4 & | vp, | |
| bool | send = true | |||
| ) |
| void RenderTools::Camera::setZoom | ( | float | f, | |
| bool | send = true | |||
| ) |
1.5.8