|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--raytracer.objects.NamedObject | +--raytracer.objects.Surface
Field Summary | |
static Material |
DEFAULT_MATERIAL
The material every object gets when nothing else is specified. |
Constructor Summary | |
Surface()
|
Method Summary | |
abstract Surface |
apply(Transformation t)
Applies a given transformation to this object |
abstract Vector |
calcNormal(Point p)
Calculates the surface normal at the given point |
Color |
getDiffuseColor()
|
Color |
getReflection()
|
float |
getRefractionIndex()
|
Color |
getSpecularColor()
|
float |
getSpecularExponent()
|
Color |
getTransmission()
|
abstract float |
intersectRay(Ray ray)
Calculate the first intersection of a given ray with this object |
float |
intersectRay(Ray ray,
float t)
|
abstract boolean |
isInside(Point p)
Determines whether a given point is inside this object or not |
void |
setMaterial(Material m)
|
void |
setRotation(float x,
float y,
float z,
float angle)
Rotates counter-clockwise along the axis given by (0,0,0) and (x,y,z) |
void |
setScale(float sx,
float sy,
float sz)
|
void |
setTranslation(float tx,
float ty,
float tz)
|
Methods inherited from class raytracer.objects.NamedObject |
getName, setName, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Material DEFAULT_MATERIAL
Constructor Detail |
public Surface()
Method Detail |
public float intersectRay(Ray ray, float t)
public abstract float intersectRay(Ray ray)
ray
- Ray to calculate intersection with
public abstract boolean isInside(Point p)
p
- Query point
public abstract Vector calcNormal(Point p)
p
- Point to calculate the normal at
public abstract Surface apply(Transformation t)
t
- Transformation (matrix)
public Color getDiffuseColor()
public Color getReflection()
public float getRefractionIndex()
public Color getSpecularColor()
public float getSpecularExponent()
public Color getTransmission()
public void setMaterial(Material m)
public void setTranslation(float tx, float ty, float tz)
public void setScale(float sx, float sy, float sz)
public void setRotation(float x, float y, float z, float angle)
x
- y
- z
- angle
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |