zenilib
0.5.3.0
|
#include <Projector.h>
Inherits Zeni::Projector.
Public Member Functions | |
Projector2D (const std::pair< Point2f, Point2f > &camera2d=std::make_pair(Point2f(0.0f, 0.0f), Point2f(float(get_Video().get_render_target_size().x), float(get_Video().get_render_target_size().y))), const std::pair< Point2i, Point2i > &viewport=std::make_pair(Point2i(), get_Video().get_render_target_size())) | |
Vector3f | project (const Vector3f &world_coord) const |
Map coordinates in the viewing area to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) More... | |
Point3f | project (const Point3f &world_coord) const |
Map coordinates in the viewing area to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) More... | |
Point2f | project (const Point2f &world_coord) const |
Map coordinates in the viewing area to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) More... | |
Vector3f | unproject (const Vector3f &screen_coord) const |
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) to coordinates in the viewing area. More... | |
Point3f | unproject (const Point3f &screen_coord) const |
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) to coordinates in the viewing area. More... | |
Point2f | unproject (const Point2f &screen_coord) const |
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) to coordinates in the viewing area. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Zeni::Projector | |
Projector (const std::pair< Point2i, Point2i > &viewport=std::make_pair(Point2i(), get_Video().get_render_target_size())) | |
~Projector () | |
void | init (const std::pair< Point2i, Point2i > &viewport) |
const Vector3f & | offset () const |
const Vector3f & | size () const |
The 2D Projector.
For converting between world and screen coordinates in 2D
Contact: bazal d@ze nipex .com
Definition at line 86 of file Projector.h.
|
inline |
Definition at line 55 of file Projector.hxx.
Map coordinates in the viewing area to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1])
Definition at line 62 of file Projector.hxx.
Referenced by project().
Map coordinates in the viewing area to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1])
Definition at line 66 of file Projector.hxx.
References project().
Map coordinates in the viewing area to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1])
Definition at line 70 of file Projector.hxx.
References project().
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) to coordinates in the viewing area.
Definition at line 74 of file Projector.hxx.
Referenced by Zeni::Widget::on_event(), and unproject().
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) to coordinates in the viewing area.
Definition at line 78 of file Projector.hxx.
References unproject().
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [-1, 1]) to coordinates in the viewing area.
Definition at line 82 of file Projector.hxx.
References unproject().