Module imp3d

Class CameraBase

java.lang.Object
de.grogra.imp3d.CameraBase
Direct Known Subclasses:
Camera, CanvasCamera

public abstract class CameraBase extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    getRay(float x, float y, Point3d origin, Vector3d direction)
    Determines the ray which starts at the camera and goes through the specified point on the image plane of the camera.
    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.
    abstract float
    getScaleAt(float z)
    Computes an estimate for the scaling factor from view coordinates around a depth of z to 2D coordinates on the camera plane.
    abstract Matrix4d
    Returns the world-to-view transformation of this camera.
    abstract float
     
    abstract float
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 coordinate
      y - y world coordinate
      z - 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 of z to 2D coordinates on the camera plane.
      Parameters:
      z - z view coordinate
      Returns:
      scaling factor of camera projection at location
    • getRay

      public abstract void getRay(float x, float y, Point3d origin, Vector3d direction)
      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 plane
      y - the y-coordinate on the image plane
      origin - the origin of the ray, in world coordinates
      direction - the direction of the ray, in world coordinates
    • getZNear

      public abstract float getZNear()
    • getZFar

      public abstract float getZFar()
    • getWorldToViewTransformation

      public abstract Matrix4d getWorldToViewTransformation()
      Returns the world-to-view transformation of this camera. It transforms world coordinates to view coordinates (= camera coordinates).
      Returns:
      world-to-view transformation