edu.utexas.cs.sdao.reyes.render

Projection

abstract class Projection extends AnyRef

Projects world coordinates into camera and screen coordinates. Does not contain any apparatus for rendering images.

Points in the 3D scene can exist in one of three coordinate systems: world space, camera space, and screen space. World space and camera space are both in 3D coordinates; camera space is just a transformation of the world space to the camera's point of view. Screen space is in 2D coordinates, corresponding to the image plane; the third coordinate is commonly used to represent the z-depth from the camera.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Projection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Projection(cameraTransform: Matrix4 = ..., fieldOfView: Float = ..., width: Int = 800, height: Int = 600)

    cameraTransform

    a transformation matrix that represents how the camera has been transformed in the world space

    fieldOfView

    the camera's horizontal field of view in radians, measured as the angle from the left of the visible screen to the right; acceptable values are 0 < fieldOfView < Pi

    width

    the width of the output image plane

    height

    the height of the output image plane

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def containsScreenBoundingBox(boundingBox: BoundingBox): Boolean

    Determines if a certain screen-space bounding box is contained within the camera's view frustum, at least partially.

    Determines if a certain screen-space bounding box is contained within the camera's view frustum, at least partially. The bounding box's x- and y-components should be in screen space, whereas the z-component should be the z-depth of the box. This will also cull objects behind the camera (positive z-depth).

    boundingBox

    the bounding box to check

    returns

    the visibility of the bounding box

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. val focalLength: Float

    The length from the camera pinhole to the image plane.

  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def projectToScreen(u: Vector3): Vector3

    Transforms a point from world space into camera space, and then projects it into the screen space defined by u=0.

    Transforms a point from world space into camera space, and then projects it into the screen space defined by u=0..width and v=0..height, with the origin at the lower-left corner of the screen. The z-component is the z-depth of the point.

    To transform without projecting, use transformToCamera instead.

    u

    the vector to project

    returns

    the projected vector

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toCamera: Camera

    Creates a camera from this projection.

    Creates a camera from this projection.

    returns

    the new camera

  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. def transformToCamera(u: Vector3): Vector3

    Transforms a point from world space into camera space.

    Transforms a point from world space into camera space. However, the function does not then transform the point into the 2D screen space; the resultant coordinate is still in a 3D space.

    To also project the point into screen space, use projectToScreen instead.

    u

    the world space point to transform

    returns

    the transformed vector in camera space

  24. def transformToCameraNorm(u: Vector3): Vector3

    Like transformToCamera, but normalizes the resulting vector.

    Like transformToCamera, but normalizes the resulting vector. This is useful for obtaining the vector from the focal point to the given point.

    u

    the world space point to transform

    returns

    the transformed and normalized vector in camera space

  25. def transformToWorld(u: Vector3): Vector3

    Transforms a point from camera space back into world space.

    Transforms a point from camera space back into world space.

    u

    the camera space point to transform

    returns

    the transformed vector in world space

  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. val worldToCamera: Matrix4

    The transformation matrix that converts world to camera coordinates.

    The transformation matrix that converts world to camera coordinates. This is the same as the inverse of the cameraTransform parameter.

Inherited from AnyRef

Inherited from Any

Ungrouped