OESphere

OESphere class represents a sphere.

Constructor

OESphere()
OESphere& operator=(const OESphere&)
OESphere(const float x, const float y, const float z, const float rad)

Default and copy constructors. The third overload requires the center of the sphere, specified by x, y, and z, and the radius.

operator=

OESphere& operator=(const OESphere& rhs)

Assignment operator.

GetArea

float GetArea() const

Returns the surface area of the sphere

GetVolume

float GetVolume() const

Returns the volume of the sphere

GetX

float GetX() const

Returns the X coordinate of the center of the sphere

GetY

float GetY() const

Returns the Y coordinate of the center of the sphere

GetZ

float GetZ() const

Return the Z coordinate of the center of the sphere

GetRad

float GetRad() const

Returns the radius of the sphere

IsInside

bool IsInside(const float x, const float y, const float z) const

Returns if the specified point is inside the sphere

SetRad

bool SetRad(const float rad)

Sets the radius of the sphere to rad. Will fail and return false if rad < 0.

SetCenter

bool SetCenter(const float x, const float y, const float z)

Sets the center of the sphere.