111 virtual void zoom(
const Pixel fixedPoint,
const float magnitude) = 0;
200 virtual void zoom(
const Pixel fixedPoint,
const float magnitude)
override;
208 virtual void pan(
const Pixel offset)
override;
213 return makeAuto<OrthoCamera>(*
this);
221 float estimateFov(
const Storage& storage)
const;
266 virtual void zoom(
const Pixel UNUSED(fixedPoint),
const float magnitude)
override;
274 virtual void pan(
const Pixel offset)
override;
279 return makeAuto<PerspectiveCamera>(*
this);
313 virtual void zoom(
const Pixel UNUSED(fixedPoint),
const float magnitude)
override;
321 virtual void pan(
const Pixel offset)
override;
344 return makeAuto<FisheyeCamera>(*
this);
348 virtual void update()
override;
359 return makeAuto<SphericalCamera>(*
this);
Three-dimensional affine matrix.
Smart pointer performing cloning of stored resource rather than copying pointer.
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
constexpr Float PI
Mathematical constants.
#define NAMESPACE_SPH_END
Wrapper of type value of which may or may not be present.
const NothingType NOTHING
BasicVector< Float > Vector
virtual AutoPtr< ICamera > clone() const override
virtual Optional< CameraRay > unproject(const Coords &coords) const override
Returns a ray in particle coordinates corresponding to given coordinates in the image plane.
FisheyeCamera(const CameraParams &data)
Interface defining a camera or view, used by a renderer.
virtual Optional< float > getCutoff() const =0
Returns the clipping distance from plane passing through origin, perpendicular to camera direction.
virtual Pixel getSize() const =0
Returns the current resolution of the camera.
virtual AffineMatrix getFrame() const =0
Returns the transformation matrix converting camera space to world space.
virtual Optional< float > getWorldToPixel() const =0
Returns the world-to-pixel ratio.
virtual void autoSetup(const Storage &storage)=0
Initializes the camera, using the provided particle storage.
virtual void pan(const Pixel offset)=0
Moves the camera by relative offset in image space.
virtual Vector getTarget() const =0
Returns the current target point of the camera.
virtual Optional< ProjectedPoint > project(const Vector &r) const =0
Returns projected position of particle on the image.
virtual void zoom(const Pixel fixedPoint, const float magnitude)=0
virtual AutoPtr< ICamera > clone() const =0
virtual void setCutoff(const Optional< float > newCutoff)=0
Modifies the clipping distance of the camera.
virtual void transform(const AffineMatrix &matrix)=0
Transforms the current view by given matrix.
virtual void setTarget(const Vector &newTarget)=0
virtual void resize(const Pixel newSize)=0
Changes the image size.
virtual void setPosition(const Vector &newPosition)=0
Moves the camera to new position in world space.
virtual Optional< CameraRay > unproject(const Coords &coords) const =0
Returns a ray in particle coordinates corresponding to given coordinates in the image plane.
virtual Vector getUpVector() const =0
Returns the reference "up" direction of the camera.
virtual Pair< Vector > getTrackedPoint(const Storage &storage) const =0
Object representing a 1D interval of real numbers.
Wrapper of type value of which may or may not be present.
virtual AutoPtr< ICamera > clone() const override
virtual Optional< float > getCutoff() const override
Returns the clipping distance from plane passing through origin, perpendicular to camera direction.
virtual AffineMatrix getFrame() const override
Returns the transformation matrix converting camera space to world space.
virtual void transform(const AffineMatrix &matrix) override
Transforms the current view by given matrix.
virtual void resize(const Pixel newSize) override
Changes the image size.
virtual Optional< float > getWorldToPixel() const override
Returns the world-to-pixel ratio.
virtual void zoom(const Pixel fixedPoint, const float magnitude) override
virtual void setPosition(const Vector &newPosition) override
Moves the camera to new position in world space.
virtual Pixel getSize() const override
Returns the current resolution of the camera.
virtual Vector getUpVector() const override
Returns the reference "up" direction of the camera.
OrthoCamera(const CameraParams &data)
virtual void setCutoff(const Optional< float > newCutoff) override
Modifies the clipping distance of the camera.
virtual void autoSetup(const Storage &storage) override
Initializes the camera, using the provided particle storage.
virtual Vector getTarget() const override
Returns the current target point of the camera.
virtual void setTarget(const Vector &newTarget) override
virtual Optional< ProjectedPoint > project(const Vector &r) const override
Returns projected position of particle on the image.
virtual Optional< CameraRay > unproject(const Coords &coords) const override
Returns a ray in particle coordinates corresponding to given coordinates in the image plane.
virtual void pan(const Pixel offset) override
Moves the camera by relative offset in image space.
Common base for panoramic cameras.
virtual Vector getUpVector() const override
Returns the reference "up" direction of the camera.
virtual Optional< float > getCutoff() const override
Returns the clipping distance from plane passing through origin, perpendicular to camera direction.
virtual void setPosition(const Vector &newPosition) override
Moves the camera to new position in world space.
virtual void pan(const Pixel offset) override
Moves the camera by relative offset in image space.
virtual Optional< ProjectedPoint > project(const Vector &r) const override
Returns projected position of particle on the image.
virtual void setTarget(const Vector &newTarget) override
virtual Pixel getSize() const override
Returns the current resolution of the camera.
virtual void autoSetup(const Storage &storage) override
Initializes the camera, using the provided particle storage.
virtual Optional< float > getWorldToPixel() const override
Returns the world-to-pixel ratio.
virtual AffineMatrix getFrame() const override
Returns the transformation matrix converting camera space to world space.
virtual void setCutoff(const Optional< float > newCutoff) override
Modifies the clipping distance of the camera.
virtual void zoom(const Pixel UNUSED(fixedPoint), const float magnitude) override
virtual void transform(const AffineMatrix &matrix) override
Transforms the current view by given matrix.
PanoCameraBase(const CameraParams &data)
virtual Vector getTarget() const override
Returns the current target point of the camera.
virtual void resize(const Pixel newSize) override
Changes the image size.
virtual Pair< Vector > getTrackedPoint(const Storage &storage) const override
ParticleTracker(const Size index)
Vector dir
Unit direction of the camera.
virtual Pixel getSize() const override
Returns the current resolution of the camera.
virtual AffineMatrix getFrame() const override
Returns the transformation matrix converting camera space to world space.
virtual void setCutoff(const Optional< float > newCutoff) override
Modifies the clipping distance of the camera.
virtual Vector getUpVector() const override
Returns the reference "up" direction of the camera.
virtual Optional< ProjectedPoint > project(const Vector &r) const override
Returns projected position of particle on the image.
virtual void setTarget(const Vector &newTarget) override
virtual Optional< float > getWorldToPixel() const override
Returns the world-to-pixel ratio.
virtual void transform(const AffineMatrix &matrix) override
Transforms the current view by given matrix.
virtual void setPosition(const Vector &newPosition) override
Moves the camera to new position in world space.
virtual void autoSetup(const Storage &storage) override
Initializes the camera, using the provided particle storage.
Vector left
Left vector of the camera, size of which of represents the image size at unit distance.
virtual Vector getTarget() const override
Returns the current target point of the camera.
virtual void resize(const Pixel newSize) override
Changes the image size.
virtual void pan(const Pixel offset) override
Moves the camera by relative offset in image space.
virtual Optional< float > getCutoff() const override
Returns the clipping distance from plane passing through origin, perpendicular to camera direction.
virtual AutoPtr< ICamera > clone() const override
Vector up
Up vector of the camera, size of which of represents the image size at unit distance.
virtual void zoom(const Pixel UNUSED(fixedPoint), const float magnitude) override
virtual Optional< CameraRay > unproject(const Coords &coords) const override
Returns a ray in particle coordinates corresponding to given coordinates in the image plane.
PerspectiveCamera(const CameraParams &data)
SphericalCamera(const CameraParams &data)
virtual Optional< CameraRay > unproject(const Coords &coords) const override
Returns a ray in particle coordinates corresponding to given coordinates in the image plane.
virtual AutoPtr< ICamera > clone() const override
Array with fixed number of allocated elements.
Container storing all quantities used within the simulations.
Simple 2D vector with integer coordinates. Provides conversion from and to wxPoint.
struct CameraParams::@20 perspective
Pixel imageSize
Size of the image.
struct CameraParams::@21 ortho
Float fov
Field of view (angle)
Vector position
Camera position in space.
Optional< float > cutoff
Cutoff distance of the camera.
Interval clipping
Defines the clipping planes of the camera.
Vector target
Look-at point in space.
Vector up
Up vector of the camera (direction)
Ray given by origin and target point.
Base class for all polymorphic objects.
Represents a particle projected onto image plane.
float radius
Projected radius of the particle.
Coords coords
Point in image coordinates.