Removed unnecessary \bug declarations.
[blaRAY.git] / World / Sphere.hh
blob1aca5cc27b88bfd828e6416072b22ba43dff9564
1 /**********************************************************************
2 * blaRAY -- photon mapper/raytracer
3 * (C) 2008 by Tomasz bla Fortuna <bla@thera.be>, <bla@af.gliwice.pl>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * any later version.
10 * See Docs/LICENSE
11 *********************/
13 #ifndef _SPHERE_H_
14 #define _SPHERE_H_
16 #include <iostream>
17 #include <string>
19 #include "World/Object.hh"
21 namespace World {
22 /** \brief
23 * Mathematical sphere (ball rather)
25 * Implements collisions, UV coordinates and normal
26 * calculations for spheres.
28 class Sphere : public Object {
29 protected:
30 /** Sphere center */
31 Math::Vector Center;
33 /** Sphere radius */
34 Double Radius;
36 virtual std::string Dump() const;
37 public:
38 /** Construct sphere object */
39 Sphere(const Math::Vector &Center,
40 Double Radius,
41 const Material &M = MatLib::Red(),
42 Bool Visible = true)
43 : Object(M, Visible),
44 Center(Center), Radius(Radius)
48 virtual Bool Collide(const Render::Ray &R, Double &RayPos) const;
49 virtual Math::Vector NormalAt(const Math::Vector &Point) const;
50 virtual Math::Point UVAt(const Math::Vector &Point) const;
55 #endif