Public Member Functions
sal3d::Geometric::Sphere Class Reference

Class that represents a sphere in 3D space. More...

#include <Geometric.hpp>

List of all members.

Public Member Functions

 Sphere ()
 Default constructor.
 Sphere (const sal3d_geometric_sphere &sphere)
 Constructor from a C sal3d_geometric_sphere.
 Sphere (const Sphere &sphere)
 Copy Constructor.
 Sphere (const Point3D &centre, float r)
 Constructor from values.
const sal3d_geometric_sphere & c_sphere () const
 Get a C sphere structure with the Sphere values.
Point3D centre () const
 Gets the center of the Sphere.
void setCentre (const Point3D &centre)
 Sets the center of the Sphere.
const float & radius () const
 Gets a const reference to the radius of the Sphere.
float & radius ()
 Gets a reference to the radius of the Sphere.

Detailed Description

Class that represents a sphere in 3D space.

This class requires linking with geometric.lib (import library for geometric.dll).


Constructor & Destructor Documentation

Default constructor.

Creates an uninitialized Sphere.

sal3d::Geometric::Sphere::Sphere ( const sal3d_geometric_sphere &  sphere) [inline, explicit]

Constructor from a C sal3d_geometric_sphere.

Cretes a C++ Sphere object that copies the values from the C sal3d_geometric_sphere.

Parameters:
[in]sphereThe C sphere struct.
sal3d::Geometric::Sphere::Sphere ( const Sphere sphere) [inline]

Copy Constructor.

Cretes a copy of the Sphere passed as parameter.

Parameters:
[in]sphereThe Sphere from where to copy the values.
sal3d::Geometric::Sphere::Sphere ( const Point3D centre,
float  r 
) [inline]

Constructor from values.

Parameters:
[in]centreCentre point of the sphere.
[in]rRadius of the sphere.

References sal3d::Point3D::x(), sal3d::Point3D::y(), and sal3d::Point3D::z().


Member Function Documentation

const sal3d_geometric_sphere& sal3d::Geometric::Sphere::c_sphere ( ) const [inline]

Get a C sphere structure with the Sphere values.

Returns:
The C structure of a Sphere.

Gets the center of the Sphere.

Returns:
A Point3D marking the center of the Sphere.
const float& sal3d::Geometric::Sphere::radius ( ) const [inline]

Gets a const reference to the radius of the Sphere.

Returns:
The const reference to theradius of the Sphere.
float& sal3d::Geometric::Sphere::radius ( ) [inline]

Gets a reference to the radius of the Sphere.

Returns:
The reference to the radius of the Sphere.
void sal3d::Geometric::Sphere::setCentre ( const Point3D centre) [inline]

Sets the center of the Sphere.

Parameters:
[in]centrePoint3D with the new Sphere's centre value.

References sal3d::Point3D::x(), sal3d::Point3D::y(), and sal3d::Point3D::z().


The documentation for this class was generated from the following file: