objects
Interface IObject

All Known Implementing Classes:
Assembly, Box, Chair, Cone, CornellBox, Ellipsoid, HalfSpace, Intersection, Lens, Object, Quadric, Table, Tube, UnitCone, UnitSphere, UnitTube

public interface IObject


Method Summary
 void assignMap(Map map_)
           
 void assignMaterial(IMaterial material)
          assigns the material to the object
 IntersectionInfo calcIntersection(Ray ray)
          calculates the intersection with an ray
 void calculateTextureCoordinates(IntersectionInfo ri)
          calculates the coordinates at ri.nextPosition
 double getArea()
           
 IObject getCopy()
           
 Map getMap()
           
 IMaterial getMaterial()
           
 boolean isInside(Point3D p)
           
 void move(Vector3D v)
          translate the object with vector v
 Vector3D normal(Point3D p)
          calculate normal via gradient
 double q(Point3D p)
          calculate the value of the quadric at point p
 void rotate(Vector3D v, double alpha)
          rotate around vector v with angle alpha
 void rotateAroundX(double alpha)
          rotate around the x axis with angle alpha
 void rotateAroundY(double beta)
          rotate around the y axis with angle beta
 void rotateAroundZ(double gamma)
          rotate around the z axis with angle gamma
 void scale(double s)
          scale with factor s
 void scale(double sx, double sy, double sz)
          scale each axis
 void transform(TransformationMatrix4x4 m)
          transforms the object with the matrix m
 void UniformRandomPoint(Point3D point, Vector3D normal, Point3D prand)
          creates a random point on the surface of the object
 

Method Detail

isInside

boolean isInside(Point3D p)
Parameters:
p -
Returns:
is the point inside the object

q

double q(Point3D p)
calculate the value of the quadric at point p

Parameters:
p - point
Returns:
the value at point p, q(p)<=0 -> inside

normal

Vector3D normal(Point3D p)
calculate normal via gradient

Parameters:
p - the point
Returns:
normal at p

calcIntersection

IntersectionInfo calcIntersection(Ray ray)
calculates the intersection with an ray

Parameters:
ray -
Returns:
the intersection info

transform

void transform(TransformationMatrix4x4 m)
transforms the object with the matrix m

Parameters:
m - the transformation matrix

assignMaterial

void assignMaterial(IMaterial material)
assigns the material to the object

Parameters:
material -

getMaterial

IMaterial getMaterial()
Returns:
material of the object

calculateTextureCoordinates

void calculateTextureCoordinates(IntersectionInfo ri)
calculates the coordinates at ri.nextPosition

Parameters:
ri - intersection information

move

void move(Vector3D v)
translate the object with vector v

Parameters:
v - translation vector

rotate

void rotate(Vector3D v,
            double alpha)
rotate around vector v with angle alpha

Parameters:
v - vector
alpha - angle

rotateAroundX

void rotateAroundX(double alpha)
rotate around the x axis with angle alpha

Parameters:
alpha - angle

rotateAroundY

void rotateAroundY(double beta)
rotate around the y axis with angle beta

Parameters:
beta - angle

rotateAroundZ

void rotateAroundZ(double gamma)
rotate around the z axis with angle gamma

Parameters:
gamma - angle

scale

void scale(double s)
scale with factor s

Parameters:
s - scale factor

scale

void scale(double sx,
           double sy,
           double sz)
scale each axis

Parameters:
sx - x scale
sy - y scale
sz - z scale

UniformRandomPoint

void UniformRandomPoint(Point3D point,
                        Vector3D normal,
                        Point3D prand)
creates a random point on the surface of the object

Parameters:
point - [out] point on the surface
normal - [out] normal at the point on the surface
prand - [in] prand variables used in point generation

getArea

double getArea()
Returns:
the area of the object

getCopy

IObject getCopy()
Returns:
the area of the object

getMap

Map getMap()
Returns:
the used map or null if not used

assignMap

void assignMap(Map map_)
Parameters:
map_ - the bump or normal map