objects
Class Assembly

java.lang.Object
  extended by objects.Object
      extended by objects.Assembly
All Implemented Interfaces:
IObject
Direct Known Subclasses:
Chair, CornellBox, Table

public class Assembly
extends Object

a unit of objects


Field Summary
 java.util.ArrayList<IObject> list
           
 
Fields inherited from class objects.Object
trans
 
Constructor Summary
Assembly()
          constructor
 
Method Summary
 void addObject(IObject o)
          adds a object
 void assignBoundingObject(IObject o)
          assigns the bounding object
 void assignMap(Map bumpmap_)
           
 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
 IObject getBoundingObject()
           
 IObject getCopy()
           
 boolean isInside(Point3D p)
           
 Vector3D normal(Point3D p)
          calculate normal via gradient
 double q(Point3D p)
          calculate the value of the quadric at point p
 void transform(TransformationMatrix4x4 m)
          transforms the object with the matrix m
 
Methods inherited from class objects.Object
getArea, getMap, getMaterial, getTransformationMatrix, move, rotate, rotateAroundX, rotateAroundY, rotateAroundZ, scale, scale, setTransformationMatrix, UniformRandomPoint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

public java.util.ArrayList<IObject> list
Constructor Detail

Assembly

public Assembly()
constructor

Method Detail

q

public double q(Point3D p)
Description copied from interface: IObject
calculate the value of the quadric at point p

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

addObject

public void addObject(IObject o)
adds a object

Parameters:
o - object to add

assignBoundingObject

public void assignBoundingObject(IObject o)
assigns the bounding object

Parameters:
o - the bounding object

getBoundingObject

public IObject getBoundingObject()
Returns:
the bounding object

calcIntersection

public IntersectionInfo calcIntersection(Ray ray)
Description copied from interface: IObject
calculates the intersection with an ray

Returns:
the intersection info

isInside

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

normal

public Vector3D normal(Point3D p)
Description copied from interface: IObject
calculate normal via gradient

Parameters:
p - the point
Returns:
normal at p

transform

public void transform(TransformationMatrix4x4 m)
Description copied from interface: IObject
transforms the object with the matrix m

Parameters:
m - the transformation matrix

assignMaterial

public void assignMaterial(IMaterial material_)
Description copied from interface: IObject
assigns the material to the object

Specified by:
assignMaterial in interface IObject
Overrides:
assignMaterial in class Object

calculateTextureCoordinates

public void calculateTextureCoordinates(IntersectionInfo ri)
Description copied from interface: IObject
calculates the coordinates at ri.nextPosition

Parameters:
ri - intersection information

getCopy

public IObject getCopy()
Returns:
the area of the object

assignMap

public void assignMap(Map bumpmap_)
Specified by:
assignMap in interface IObject
Overrides:
assignMap in class Object
Parameters:
bumpmap_ - the bump or normal map