-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGeometry.java
More file actions
38 lines (30 loc) · 822 Bytes
/
Copy pathGeometry.java
File metadata and controls
38 lines (30 loc) · 822 Bytes
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
package geometries;
import primitives.*;
public abstract class Geometry implements Intersectable {
protected Color _emmission;
protected Material _material;
// ***************** Constructors ********************** //
public Geometry(Color color, Material material) {
_emmission = color;
_material = material;
}
public Geometry(Geometry other) {
_emmission = other._emmission;
_material = other._material;
}
// ***************** Operations ******************** //
/**
* abstract method
*
* @param other
* - Point_3D
* @return the vector normal to the geometry in point other
*/
public abstract Vector getNormal(Point_3D other);
public Color emmission() {
return _emmission;
}
public Material material() {
return _material;
}
}