17 #ifndef IGNITION_RENDERING_CAMERA_HH_ 18 #define IGNITION_RENDERING_CAMERA_HH_ 25 #include "ignition/rendering/config.hh" 36 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
49 class IGNITION_RENDERING_VISIBLE
Camera :
61 public:
virtual unsigned int ImageWidth()
const = 0;
65 public:
virtual void SetImageWidth(
unsigned int _width) = 0;
69 public:
virtual unsigned int ImageHeight()
const = 0;
73 public:
virtual void SetImageHeight(
unsigned int _height) = 0;
78 public:
virtual PixelFormat ImageFormat()
const = 0;
82 public:
virtual void SetImageFormat(
PixelFormat _format) = 0;
86 public:
virtual unsigned int ImageMemorySize()
const = 0;
94 public:
virtual void SetHFOV(
const math::Angle &_hfov) = 0;
98 public:
virtual double AspectRatio()
const = 0;
104 public:
virtual void SetAspectRatio(
const double _ratio) = 0;
110 public:
virtual unsigned int AntiAliasing()
const = 0;
117 public:
virtual void SetAntiAliasing(
const unsigned int _aa) = 0;
121 public:
virtual double FarClipPlane()
const = 0;
125 public:
virtual void SetFarClipPlane(
const double _far) = 0;
129 public:
virtual double NearClipPlane()
const = 0;
133 public:
virtual void SetNearClipPlane(
const double _near) = 0;
138 public:
virtual void Render() = 0;
144 public:
virtual void PostRender() = 0;
157 public:
virtual void Update() = 0;
164 public:
virtual Image CreateImage()
const = 0;
172 public:
virtual void Capture(
Image &_image) = 0;
179 public:
virtual void Copy(
Image &_image)
const = 0;
186 public:
virtual bool SaveFrame(
const std::string &_name) = 0;
191 NewFrameListener _listener) = 0;
208 public:
virtual void SetProjectionMatrix(
const math::Matrix4d &_matrix)
243 public:
virtual void SetTrackTarget(
const NodePtr &_target,
245 const bool _worldFrame =
false) = 0;
249 public:
virtual NodePtr TrackTarget()
const = 0;
255 public:
virtual void SetTrackOffset(
const math::Vector3d &_offset) = 0;
265 public:
virtual void SetTrackPGain(
const double _pGain) = 0;
269 public:
virtual double TrackPGain()
const = 0;
282 public:
virtual void SetFollowTarget(
const NodePtr &_target,
284 const bool _worldFrame =
false) = 0;
288 public:
virtual NodePtr FollowTarget()
const = 0;
294 public:
virtual void SetFollowOffset(
const math::Vector3d &_offset) = 0;
304 public:
virtual void SetFollowPGain(
const double _pGain) = 0;
308 public:
virtual double FollowPGain()
const = 0;
312 public:
virtual void SetMaterial(
const MaterialPtr &_material) = 0;
318 public:
virtual unsigned int RenderTextureGLId()
const = 0;
322 public:
virtual void AddRenderPass(
const RenderPassPtr &_pass) = 0;
326 public:
virtual void RemoveRenderPass(
const RenderPassPtr &_pass) = 0;
330 public:
virtual unsigned int RenderPassCount()
const = 0;
334 public:
virtual RenderPassPtr RenderPassByIndex(
unsigned int _index)
339 public:
virtual void SetShadowsDirty() = 0;
Represents a scene sensor. The most obvious example is a camera, but it can be anything that generate...
Definition: Sensor.hh:32
CameraProjectionType
Enum for projection types.
Definition: Camera.hh:39
Perspective projection.
Definition: Camera.hh:42
Encapsulates a raw image buffer and relevant properties.
Definition: Image.hh:36
Orthographic projection.
Definition: Camera.hh:44
std::function< void(const void *, unsigned int, unsigned int, unsigned int, const std::string &)> NewFrameListener
Callback function for new frame render event listeners.
Definition: Camera.hh:54
PixelFormat
Image pixel format types.
Definition: PixelFormat.hh:32
virtual ~Camera()
Destructor.
Definition: Camera.hh:57
Posable camera used for rendering the scene graph.
Definition: Camera.hh:49
static const Vector3 Zero