Beispiel #1
0
 public Sphere(Vector position, double radius, MaterialFunc materialFunc)
     : base(materialFunc)
 {
     this.Position = position;
     this.Radius = radius;
     box = createBoundingBox();
 }
Beispiel #2
0
 public Plane(Vector[] vertices, MaterialFunc materialFunc)
     : base(materialFunc)
 {
     initFromVertices(vertices);
 }
Beispiel #3
0
 public Plane(Vector normal, double d, MaterialFunc materialFunc)
     : base(materialFunc)
 {
     this.Normal = normal;
     this.D = d;
 }
Beispiel #4
0
 public BoxPrimitive(Vector leftTopFront, Vector rightBottomBack, MaterialFunc matFunc)
     : base(matFunc)
 {
     box = new BoundingBox(leftTopFront, rightBottomBack);
     center = Vector.Combine(leftTopFront, 1.0, (rightBottomBack - leftTopFront), 0.5);
 }
Beispiel #5
0
 public Primitive(MaterialFunc materialFunc)
 {
     this.materialFunc = materialFunc;
 }