The spica renderer
orthographic.h
1 #ifdef _MSC_VER
2 #pragma once
3 #endif
4 
5 #ifndef _SPICA_ORTHOGRAPHIC_CAMERA_H_
6 #define _SPICA_ORTHOGRAPHIC_CAMERA_H_
7 
8 #include "core/core.hpp"
9 #include "core/cobject.h"
10 #include "core/common.h"
11 #include "core/camera.h"
12 
13 namespace spica {
14 
18 class SPICA_EXPORTS OrthographicCamera : public Camera {
19 public:
20  // Public methods
23  OrthographicCamera(const Transform& cameraToWorld,
24  const Bounds2d& screen, double lensRadius,
25  double focalLength, std::shared_ptr<Film> film);
26  OrthographicCamera(const OrthographicCamera&) = default;
27  ~OrthographicCamera() = default;
28 
29  OrthographicCamera& operator=(const OrthographicCamera&) = default;
30 
31  Ray spawnRay(const Point2i& pixel, const Point2d& randFilm,
32  const Point2d& randLens, double* pdfPos = nullptr,
33  double* pdfDir = nullptr) const override;
34 
35  Spectrum We(const Ray& ray, Point2d* pRaster = nullptr) const override;
36  void pdfWe(const Ray& ray, double* pdfPos, double* pdfDir) const override;
37  Spectrum sampleWi(const Interaction& ref, const Point2d& rand,
38  Vector3d* wi, double* pdf, Point2d* pRaster,
39  VisibilityTester* vis) const override;
40 
41 private:
42  // Private fields
43  Vector3d uCamera_, vCamera_;
44  double areaWorld_;
45 
46 }; // class OrthographicCamera
47 
48 SPICA_EXPORT_PLUGIN(OrthographicCamera, "Orthographic camera");
49 
50 } // namespace spica
51 
52 #endif // _SPICA_ORTHOGRAPHIC_CAMERA_H_
Orthographic camera.
Definition: orthographic.h:18
RGB spectrum.
Definition: spectrum.h:18
Ray class.
Definition: ray.h:24
The transformation operator class.
Definition: transform.h:17
Definition: renderparams.h:27
Definition: bounds2d.h:16
Definition: visibility_tester.h:15
Definition: camera.h:16
Definition: interaction.h:23