InfinitePlane Class Reference

#include <InfinitePlane.h>

Inherits Primitive.

Inheritance diagram for InfinitePlane:

Inheritance graph
[legend]
Collaboration diagram for InfinitePlane:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InfinitePlane (Vec3f origin, Vec3f normal)
 ~InfinitePlane ()
bool intersect (Ray &ray) const
virtual Vec3f normal (const Ray &) const
void axes (const Ray &, Vec3f &, Vec3f &) const

Private Member Functions

void calcBounds ()

Private Attributes

Vec3f mNormal
 the normal of the plane
Vec3f mOrigin
 a point on the plane

Detailed Description

An class for an Infinite plane

Author:
Alex Busenius

Christian Engels

Definition at line 10 of file InfinitePlane.h.


Constructor & Destructor Documentation

InfinitePlane::InfinitePlane ( Vec3f  origin,
Vec3f  normal 
) [inline]

Constructor

Parameters:
origin A point on the plane
normal The plane normal

Definition at line 17 of file InfinitePlane.h.

References calcBounds().

InfinitePlane::~InfinitePlane (  )  [inline]

Destructor

Definition at line 26 of file InfinitePlane.h.


Member Function Documentation

bool InfinitePlane::intersect ( Ray ray  )  const [inline, virtual]

Intersects the ray. And sets ray.hit and ray.t to the appropiate values

Parameters:
ray The ray we test for intersection
Returns:
true if something hit, false if not

Implements Primitive.

Definition at line 34 of file InfinitePlane.h.

References Ray::dir(), Vec3f::dot(), mNormal, mOrigin, Ray::org(), Ray::setHit(), and Ray::t().

Referenced by DepthOfFieldCamera::initRay().

virtual Vec3f InfinitePlane::normal ( const Ray  )  const [inline, virtual]

Calculate a normal in global coordinates given barycentric coordinates of the hitpoint

Returns:
the normal of the ray with the apropiate position

Implements Primitive.

Definition at line 44 of file InfinitePlane.h.

References mNormal.

void InfinitePlane::axes ( const Ray ,
Vec3f ,
Vec3f  
) const [inline, virtual]

gives axis of the plane (perpenticular to the normal) this is used in bum mapping (not implemented because not needed at the moment)

See also:
Shader::normal()

Implements Primitive.

Definition at line 55 of file InfinitePlane.h.

void InfinitePlane::calcBounds (  )  [inline, private, virtual]

A function calculating the bounding box. This may not be useful and calculates no useful result at the moment

Implements Primitive.

Definition at line 67 of file InfinitePlane.h.

References Box::extend(), and Primitive::mBounds.

Referenced by InfinitePlane().


Member Data Documentation

Vec3f InfinitePlane::mNormal [private]

the normal of the plane

Definition at line 61 of file InfinitePlane.h.

Referenced by intersect(), and normal().

Vec3f InfinitePlane::mOrigin [private]

a point on the plane

Definition at line 62 of file InfinitePlane.h.

Referenced by intersect().


The documentation for this class was generated from the following file:
Generated on Fri Feb 1 00:02:18 2008 for Grayfall by  doxygen 1.5.1