java.lang.Object
de.grogra.imp3d.CameraBase
- Direct Known Subclasses:
Camera,CanvasCamera
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidDetermines the ray which starts at the camera and goes through the specified point on the image plane of the camera.abstract floatgetScaleAt(double x, double y, double z) Computes an estimate for the scaling factor from 3D world coordinates at(x, y, z)to 2D coordinates on the camera plane.abstract floatgetScaleAt(float z) Computes an estimate for the scaling factor from view coordinates around a depth ofzto 2D coordinates on the camera plane.abstract Matrix4dReturns the world-to-view transformation of this camera.abstract floatgetZFar()abstract floatgetZNear()
-
Constructor Details
-
CameraBase
public CameraBase()
-
-
Method Details
-
getScaleAt
public abstract float getScaleAt(double x, double y, double z) Computes an estimate for the scaling factor from 3D world coordinates at(x, y, z)to 2D coordinates on the camera plane.- Parameters:
x- x world coordinatey- y world coordinatez- z world coordinate- Returns:
- scaling factor of camera projection at location
-
getScaleAt
public abstract float getScaleAt(float z) Computes an estimate for the scaling factor from view coordinates around a depth ofzto 2D coordinates on the camera plane.- Parameters:
z- z view coordinate- Returns:
- scaling factor of camera projection at location
-
getRay
Determines the ray which starts at the camera and goes through the specified point on the image plane of the camera.- Parameters:
x- the x-coordinate on the image planey- the y-coordinate on the image planeorigin- the origin of the ray, in world coordinatesdirection- the direction of the ray, in world coordinates
-
getZNear
public abstract float getZNear() -
getZFar
public abstract float getZFar() -
getWorldToViewTransformation
Returns the world-to-view transformation of this camera. It transforms world coordinates to view coordinates (= camera coordinates).- Returns:
- world-to-view transformation
-