34 package eu.mihosoft.vrl.v3d;
36 import java.util.ArrayList;
37 import java.util.List;
39 import eu.mihosoft.vrl.v3d.parametrics.LengthParameter;
96 parametrics.add(size);
100 parametrics.add(size);
153 theta *= Math.PI * 2;
156 Math.cos(theta) * Math.sin(phi),
158 Math.sin(theta) * Math.sin(phi)
169 throw new NumberFormatException(
"radius can not be negative");
170 List<Polygon> polygons =
new ArrayList<>();
174 final List<Vertex> vertices =
new ArrayList<>();
236 this.radius =
radius;
return this;
Sphere(Vector3d center, double radius, int numSlices, int numStacks)
static final int NUM_SLICES
Sphere(LengthParameter size, int numSlices, int numStacks)
Sphere setNumStacks(int numStacks)
Sphere setNumSlices(int numSlices)
List< Polygon > toPolygons()
Sphere(LengthParameter size)
Sphere setRadius(double radius)
final PropertyStorage properties
Vertex sphereVertex(Vector3d c, double r, double theta, double phi)
Sphere setCenter(Vector3d center)
PropertyStorage getProperties()
static final int NUM_STACKS
Sphere(double radius, int numSlices, int numStacks)
Vector3d plus(Vector3d v)