35 #ifndef IECOREGL_CAMERA_H
36 #define IECOREGL_CAMERA_H
38 #include "IECoreGL/Export.h"
39 #include "IECoreGL/Renderable.h"
41 #include "OpenEXR/ImathVec.h"
42 #include "OpenEXR/ImathMatrix.h"
47 class IECOREGL_API Camera :
public Renderable
55 Camera(
const Imath::M44f &transform = Imath::M44f(),
56 const Imath::V2i &resolution = Imath::V2i( 640, 480 ),
57 const Imath::Box2f &screenWindow = Imath::Box2f(),
58 const Imath::V2f &clippingPlanes = Imath::V2f( 0.1, 1000 )
61 IE_CORE_DECLARERUNTIMETYPEDEXTENSION( IECoreGL::Camera, CameraTypeId, Renderable );
64 void setTransform(
const Imath::M44f &transform );
65 const Imath::M44f &getTransform()
const;
67 void setResolution(
const Imath::V2i &resolution );
68 const Imath::V2i &getResolution()
const;
70 void setScreenWindow(
const Imath::Box2f &screenWindow );
71 const Imath::Box2f &getScreenWindow()
const;
73 void setClippingPlanes(
const Imath::V2f &clippingPlanes );
74 const Imath::V2f &getClippingPlanes()
const;
77 Imath::Box3f bound()
const override;
85 static Imath::M44f matrix();
89 static Imath::M44f projectionMatrix();
91 static bool perspectiveProjection();
94 static Imath::V3f positionInObjectSpace();
97 static Imath::V3f viewDirectionInObjectSpace();
100 static Imath::V3f upInObjectSpace();
105 void setModelViewMatrix()
const;
107 Imath::M44f m_transform;
108 Imath::V2i m_resolution;
109 Imath::Box2f m_screenWindow;
110 Imath::V2f m_clippingPlanes;
114 IE_CORE_DECLAREPTR( Camera );
118 #endif // IECOREGL_CAMERA_H
The namespace within which all CoreGL functionality is defined.
Definition: AlphaTexture.h:41