-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObject3D.java
More file actions
62 lines (57 loc) · 1.63 KB
/
Object3D.java
File metadata and controls
62 lines (57 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import java.awt.Color;
import java.util.ArrayList;
/**
* Interface to define 3D objects to put into the scene
*
*/
public interface Object3D {
/**
* Returns the distance from the object to the vertex
*
* @param vertex
* - the vertex to calculate distance from
* @return - the distance between this object and the vertex
*/
public double distanceFrom(Vertex vertex);
/**
* Translates the object by the amount of the params
*
* @param xAmt
* - the x amount to translate this object by
* @param yAmt
* - the y amount to translate this object by
* @param zAmt
* - the z amount to translate this object by
*/
public void translateXYZ(double xAmt, double yAmt, double zAmt);
/**
* Rotates this object around the vector and the angle amount
*
* @param a
* - the vector to rotate around
* @param angle
* - the angle amount to rotate by
*/
public void rotate(Vector a, double angle);
/**
* Returns color of the point toColor on the object
*
* @param toColor
* - the point on the object to return the color of
* @param position
* - the position of the camera
* @param lightSource
* - the position of the lightsource
* @param objects
* - a list of all the objects in the scene
* @return - the color of toColor on the object
*/
public Color getColor(Vertex toColor, Vertex position, Vertex lightSource, ArrayList<Object3D> objects);
/**
* Sets the material of the object
*
* @param material
* - the material to set
*/
public void setMaterial(Material material);
}