# Class Sphere¶

## Class Documentation¶

class Sphere : public Surface

Public Functions

Sphere(const Vector3d &_center, double _radius)
double distance(const Vector3d &point) const

Returns the distance of a point to the surface. Negative on the one side, positive on the other. For closed surfaces it is negative on the inside.

Vector3d normal(const Vector3d &point) const

Returns the normal to the surface at a point. Negative on the one side, positive on the other. For closed surfaces it is negative on the inside.

std::string getDescription() const
size_t addReference() const
size_t removeReference() const
int removeReferenceNoDelete() const
size_t getReferenceCount() const

Protected Attributes

size_t _referenceCount