Main Page | Class Hierarchy | Class List | File List | Class Members

Sphere Class Reference

#include <sphere.h>

Inheritance diagram for Sphere:

Object3D SurfacePatch3D TransparentTransformatable Transformatable List of all members.

Public Member Functions

 Sphere (DBL r)
 Sphere (DBL r, Vector3 l)
Object3Dduplicate () const
void rotateRad (const Vector3 &v)
void rotateDeg (const Vector3 &v)
void scale (const Vector3 &v)
IntersectionintersectLocal (const Ray &r) const
IntersectionintersectLocalLimitedTime (const Ray &r, DBL maxtime) const
bool isInsideAt (const Vector3 &locallocation) const
bool hasFinitBounding () const
Vector3 getBoundingMin () const
Vector3 getBoundingMax () const
PatchObject * toPatch (double precision) const

Detailed Description

Sphere object.
Author:
Micha Riser


Constructor & Destructor Documentation

Sphere::Sphere DBL  r  )  [inline]
 

Create sphere at origin.

Parameters:
r radius

Sphere::Sphere DBL  r,
Vector3  l
[inline]
 

Create sphere.

Parameters:
r radius
l midpoint


Member Function Documentation

Object3D* Sphere::duplicate  )  const [inline, virtual]
 

Create a duplicate of the object. Must be of the same type!

Returns:
An exact duplicate of the object.

Implements SurfacePatch3D.

Vector3 Sphere::getBoundingMax  )  const [virtual]
 

Get bounding dimension (maximum edge).

Reimplemented from Object3D.

Vector3 Sphere::getBoundingMin  )  const [virtual]
 

Get bounding dimension (minimum edge).

Reimplemented from Object3D.

bool Sphere::hasFinitBounding  )  const [virtual]
 

Returns true if the surface can be enclosed by a finit box.

Reimplemented from Object3D.

bool Sphere::isInsideAt const Vector3 locallocation  )  const [virtual]
 

Test point for insideness.

Parameters:
locallocation point in object space to test
Returns:
true if point is inside the object else false

Implements Object3D.

void Sphere::rotateDeg const Vector3 v  )  [virtual]
 

Rotate around x,y and z axis.

Parameters:
v vector holding the rotation angles in degrees

Reimplemented from Object3D.

void Sphere::rotateRad const Vector3 v  )  [virtual]
 

Rotate around x,y and z axis.

Parameters:
v vector holding the rotation angles in radians

Reimplemented from Object3D.

void Sphere::scale const Vector3 v  )  [virtual]
 

Scale by x,y,z factor from vector.

Reimplemented from Object3D.

PatchObject * Sphere::toPatch double  precision  )  const [virtual]
 

Creates an approximatly equivalent object out of 'patches'. Returns

Parameters:
precision max tolerance for the surface to be away from the original
Returns:
pointer to approximated object, 0 if method not implemented

Reimplemented from Object3D.


The documentation for this class was generated from the following files:
Generated on Thu Jan 27 12:16:07 2005 for raytracer.kdevelop by doxygen 1.3.8