World::Plane Class Reference

#include <Plane.hh>

Inheritance diagram for World::Plane:

Inheritance graph
[legend]
Collaboration diagram for World::Plane:

Collaboration graph
[legend]

List of all members.


Detailed Description

Object abstracting infinite plane.

Plane is described by it's normal and a distance along this normal from point (0,0,0).

Definition at line 32 of file Plane.hh.


Public Member Functions

 Plane (const Math::Vector &Normal, Double Distance, const Material &M=MatLib::Red(), Bool Visible=true)
virtual Bool Collide (const Render::Ray &R, Double &RayPos) const
virtual Math::Vector NormalAt (const Math::Vector &Point) const
virtual Math::Point UVAt (const Math::Vector &Point) const

Protected Member Functions

virtual std::string Dump () const

Protected Attributes

const Math::Vector Normal
const Double Distance

Constructor & Destructor Documentation

World::Plane::Plane ( const Math::Vector Normal,
Double  Distance,
const Material M = MatLib::Red(),
Bool  Visible = true 
) [inline]

Construct plane

Definition at line 44 of file Plane.hh.


Member Function Documentation

std::string World::Plane::Dump (  )  const [protected, virtual]

Debug function

Reimplemented from World::Object.

Definition at line 62 of file Plane.cc.

References Distance, World::Object::M, and Normal.

Bool World::Plane::Collide ( const Render::Ray R,
Double &  RayPos 
) const [virtual]

Find a collision point with a ray

Implements World::Object.

Definition at line 23 of file Plane.cc.

References Render::Ray::Direction(), Distance, Math::Vector::Dot(), World::NearestCollision(), Normal, and Render::Ray::Start().

Referenced by Testcases::Scene().

Here is the call graph for this function:

Here is the caller graph for this function:

Math::Vector World::Plane::NormalAt ( const Math::Vector Point  )  const [virtual]

Find a normal to the object at it's surface

Implements World::Object.

Definition at line 52 of file Plane.cc.

References Normal.

Math::Point World::Plane::UVAt ( const Math::Vector Point  )  const [virtual]

Bug:
Current implementation will only work for horizontal plane

Implements World::Object.

Definition at line 57 of file Plane.cc.


Member Data Documentation

Plane normal

Definition at line 35 of file Plane.hh.

Referenced by Collide(), Dump(), and NormalAt().

const Double World::Plane::Distance [protected]

Distance of plane to point (0,0,0) along the normal vector

Definition at line 39 of file Plane.hh.

Referenced by Collide(), and Dump().


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

Generated on Wed Mar 12 00:36:33 2008 for blaRAY by  doxygen 1.5.5