net.sf.j3d.threeD.raytracer.primitives
Class Mesh.MeshFile

java.lang.Object
  extended by net.sf.j3d.threeD.raytracer.primitives.Mesh.MeshFile
All Implemented Interfaces:
Surface, SurfaceWrapper
Enclosing class:
Mesh

public static class Mesh.MeshFile
extends Object
implements SurfaceWrapper, Surface


Constructor Summary
Mesh.MeshFile()
           
 
Method Summary
 RGB getColorAt(Vector point)
          Returns the color of this Surface object at the specified point as an RGB object.
 String getFile()
           
 int getFormat()
           
 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.
 Surface getSurface()
           
 String getURL()
           
 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.
 void setFile(String f)
           
 void setFormat(int f)
           
 void setSurface(Surface s)
           
 void setURL(String url)
           
 RGB shade(ShaderParameters p)
          Returns an RGB object representing the color of this surface at the specified point based on the specified parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mesh.MeshFile

public Mesh.MeshFile()
Method Detail

setFile

public void setFile(String f)

getFile

public String getFile()

setFormat

public void setFormat(int f)

getFormat

public int getFormat()

setURL

public void setURL(String url)

getURL

public String getURL()

setSurface

public void setSurface(Surface s)

getSurface

public Surface getSurface()
Specified by:
getSurface in interface SurfaceWrapper

getShadeFront

public boolean getShadeFront()
Description copied from interface: Surface
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.

Specified by:
getShadeFront in interface Surface

getShadeBack

public boolean getShadeBack()
Description copied from interface: Surface
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.

Specified by:
getShadeBack in interface Surface

getColorAt

public RGB getColorAt(Vector point)
Description copied from interface: Surface
Returns the color of this Surface object at the specified point as an RGB object.

Specified by:
getColorAt in interface Surface

getNormalAt

public Vector getNormalAt(Vector point)
Description copied from interface: Surface
Returns a Vector object that represents the vector normal to the 3d surface at the point represented by the specified Vector object.

Specified by:
getNormalAt in interface Surface

intersect

public boolean intersect(Ray ray)
Description copied from interface: Surface
Returns true if the ray intersects the 3d surface in real space.

Specified by:
intersect in interface Surface

intersectAt

public Intersection intersectAt(Ray ray)
Description copied from interface: Surface
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.

Specified by:
intersectAt in interface Surface

shade

public RGB shade(ShaderParameters p)
Description copied from interface: Surface
Returns an RGB object representing the color of this surface at the specified point based on the specified parameters.

Specified by:
shade in interface Surface
See Also:
Shader