17 static const int NLAT = 16;
18 static const int NLON = 24;
float Real
the type for representing a real number.
A sphere is a concrete GraphicalObject that represents a sphere in 3D space.
static const int NLAT
number of different latitudes for display
Point3 center
The center of the sphere.
Vector3 getNormal(Point3 p)
void draw(Viewer &viewer)
Point3 localize(Real latitude, Real longitude) const
Real rayIntersection(const Ray &ray, Point3 &p)
Real radius
The radius of the sphere.
Sphere(Point3 xc, Real r, const Material &m)
Creates a sphere of center xc and radius r.
virtual ~Sphere()
Virtual destructor since object contains virtual methods.
Material material
The material (global to the sphere).
Material getMaterial(Point3 p)
static const int NLON
number of different longitudes for display