7 #ifndef __draw_ViewCommon_h__ 8 #define __draw_ViewCommon_h__ 27 { m_spWindowI=a_spWindowI; }
29 {
return m_spWindowI; }
32 { m_viewport=a_rect; }
33 virtual Box2i viewport(
void)
const 34 {
return m_viewport; }
38 {
return m_spCameraI; }
41 {
return m_projection; }
43 { m_projection=a_projection; }
47 virtual void screenInfo(Real &a_screenScale,
55 virtual void use(ViewI::Projection a_projection);
58 ViewI::Projection a_projection=
59 ViewI::e_current)
const;
62 ViewI::Projection a_projection=
63 ViewI::e_current)
const;
78 ViewI::Projection m_projection;
A rendering region.
Definition: ViewI.h:20
virtual void setViewport(const Box2i &a_rect)
Define region where to draw.
Definition: ViewCommon.h:31
void unproject(Vector< 4, T > &a_r, const Matrix< 4, 4, T > &a_m, const Vector< 4, T > &a_v)
reverse project vector through matrix. reverses w division
Definition: Matrix.h:1197
virtual ViewI::Projection projection(void) const
Get current projection.
Definition: ViewCommon.h:40
kernel
Definition: namespace.dox:3
virtual sp< CameraI > camera(void) const
Get current camera.
Definition: ViewCommon.h:37
general-implementation methods for ViewI
Definition: ViewCommon.h:20
void project(Vector< 4, T > &a_r, const Matrix< 4, 4, T > &a_m, const Vector< 4, T > &a_v)
project vector through matrix. divides by transformed w
Definition: Matrix.h:1182
virtual void setScissor(const Box2i *a_pBox)
Clip all drawing operations to a 2D box.
Definition: ViewCommon.h:52
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
virtual void setProjection(Projection a_projection)
Set whether ortho or perspective.
Definition: ViewCommon.h:42
virtual const Box2i * scissor(void) const
Get current scissor region.
Definition: ViewCommon.h:53
virtual void setWindow(sp< WindowI > a_spWindowI)
Specify window where to draw.
Definition: ViewCommon.h:26