zenilib
0.5.3.0
|
#include <Projector.h>
Inherits Zeni::Projector.
Public Member Functions | |
Projector3D (const Camera &camera3d=Camera(), 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 frustum to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1]) More... | |
Point3f | project (const Point3f &world_coord) const |
Map coordinates in the viewing frustum to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1]) More... | |
Vector3f | unproject (const Vector3f &screen_coord) const |
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1]) to coordinates in the viewing frustum. More... | |
Point3f | unproject (const Point3f &screen_coord) const |
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1]) to coordinates in the viewing frustum. 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 3D Projector.
For converting between world and screen coordinates in 3D
Contact: bazal d@ze nipex .com
Definition at line 109 of file Projector.h.
|
inline |
Definition at line 99 of file Projector.hxx.
Map coordinates in the viewing frustum to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1])
Definition at line 106 of file Projector.hxx.
References Zeni::Vector3f::divide_by(), k, Zeni::Projector::offset(), and Zeni::Projector::size().
Referenced by project().
Map coordinates in the viewing frustum to screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1])
Definition at line 112 of file Projector.hxx.
References project().
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1]) to coordinates in the viewing frustum.
Definition at line 116 of file Projector.hxx.
References Zeni::Vector3f::k, Zeni::Projector::offset(), and Zeni::Projector::size().
Referenced by unproject().
Map screen coordinates ([viewport.first.x, viewport.second.x], [viewport.first.y, viewport.second.y], [0, 1]) to coordinates in the viewing frustum.
Definition at line 121 of file Projector.hxx.
References unproject().