Class Object3D

java.lang.Object
  |
  +--Object3D

public class Object3D
extends java.lang.Object

A class to represent a 3D object


Field Summary
 int count
          int count
purpose : total number of polygons in the object
 Polygon3D[] p
          Polygon3D[] p
purpose : store the polygons of the object
 
Constructor Summary
Object3D()
          Default constructor purpose : initialize an object with no polygons
Object3D(java.io.BufferedReader data)
          Constructor purpose : initialize an object by the data obtained from the input reader
Object3D(int total)
          Constructor purpose : initialize an object with some polygons
Object3D(Object3D x)
          Copy constructor purpose : initialize an object to an input Object3D x
 
Method Summary
static Object3D transformObject(Matrix m, Object3D obj)
          purpose : multiply each point of the Object3D by a matrix
static Object3D transformObjectQ(Matrix m, Object3D obj)
          purpose : multiply each point of the Object3D by a matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

public Polygon3D[] p
Polygon3D[] p
purpose : store the polygons of the object

count

public int count
int count
purpose : total number of polygons in the object
Constructor Detail

Object3D

public Object3D()
Default constructor purpose : initialize an object with no polygons

Object3D

public Object3D(int total)
Constructor purpose : initialize an object with some polygons
Parameters:
total - total number of polygons in the object

Object3D

public Object3D(java.io.BufferedReader data)
Constructor purpose : initialize an object by the data obtained from the input reader
Parameters:
data - BufferedReader which contains the data of the Object3D

Object3D

public Object3D(Object3D x)
Copy constructor purpose : initialize an object to an input Object3D x
Method Detail

transformObjectQ

public static Object3D transformObjectQ(Matrix m,
                                        Object3D obj)
purpose : multiply each point of the Object3D by a matrix
Parameters:
m - Matrix
obj - Object3D
Returns:
a new copy of the transformed Object3D

transformObject

public static Object3D transformObject(Matrix m,
                                       Object3D obj)
purpose : multiply each point of the Object3D by a matrix
Parameters:
m - Matrix
obj - Object3D
Returns:
a new copy of the transformed Object3D