Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.imp3d
Class CameraBase

    java.lang.Object
      de.grogra.imp3d.CameraBase

Direct Known Subclasses:
  Camera, CanvasCamera

    public abstract class CameraBase

extends java.lang.Object

Constructor Summary
`CameraBase()`

Method Summary
`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` | `getWorldToViewTransformation()` Returns the world-to-view transformation of this camera.
`abstract float` | `getZFar()`
`abstract float` | `getZNear()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CameraBase

    public CameraBase()

Method Detail

### 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

### 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

### 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

### getZFar

    public abstract float getZFar()

### getZNear

    public abstract float getZNear()

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD