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

## net.sf.j3d.threeD.raytracer.engine
Interface Surface

All Known Subinterfaces:
  SurfaceUI

All Known Implementing Classes:
  AbstractSurface, AbstractSurfaceUI, Cone, CSG, Cylinder, Mesh, Mesh.MeshFile, Plane, Plane, PointLightGrid, Polynomial, RectangularLight, SpacePartition, Sphere, Sphere, SphericalLight, SurfaceGroup, SurfaceUIFactory.SurfaceUIImpl, Triangle

    public interface Surface

The Surface interface is implemented by any 3d object which may be intersected by a 3d ray. These objects must supply methods for calculating ray-surface intersections.

Method Summary
`RGB` | `getColorAt(Vector point)` Returns the color of this Surface object at the specified point as an RGB object.
`Vector` | `getNormalAt(Vector point)` Returns a Vector object that represents the vector normal to the 3d surface at the point represented by the specified Vector object.
`boolean` | `getShadeBack()` Returns true if the back side of this Surface object should be shaded.
`boolean` | `getShadeFront()` Returns true if the front side of this Surface object should be shaded.
`boolean` | `intersect(Ray ray)` Returns true if the ray intersects the 3d surface in real space.
`Intersection` | `intersectAt(Ray ray)` Returns an Intersection object that represents the values for t that solve the vector equation p = o + t * d where p is a point of intersection of the specified ray and the surface.
`RGB` | `shade(ShaderParameters parameters)` Returns an RGB object representing the color of this surface at the specified point based on the specified parameters.

Method Detail

### getShadeFront

    boolean getShadeFront()

  Returns true if the front side of this Surface object should be shaded. The "front side" is the side that the Vector object returned by the getNormalAt() method for this Surface object points outward from.

### getShadeBack

    boolean getShadeBack()

  Returns true if the back side of this Surface object should be shaded. The "back side" is the side that the vector opposite the Vector object returned by the getNormalAt() method for this Surface object points outward from.

### getColorAt

    RGB getColorAt(Vector point)

  Returns the color of this Surface object at the specified point as an RGB object.

### getNormalAt

    Vector getNormalAt(Vector point)

  Returns a Vector object that represents the vector normal to the 3d surface at the point represented by the specified Vector object.

### intersect

    boolean intersect(Ray ray)

  Returns true if the ray intersects the 3d surface in real space.

### intersectAt

    Intersection intersectAt(Ray ray)

  Returns an Intersection object that represents the values for t that solve the vector equation p = o + t * d where p is a point of intersection of the specified ray and the surface.

### shade

    RGB shade(ShaderParameters parameters)

  Returns an RGB object representing the color of this surface at the specified point based on the specified parameters.

  See Also:
    `Shader`

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