TableBorder Class Reference

#include <TableBorder.h>

Inherits Object.

Inheritance diagram for TableBorder:

Inheritance graph
[legend]
Collaboration diagram for TableBorder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TableBorder (const std::string &name, float dist, bool xAligned, const Vec3f &norm)
virtual ObjectcreateCopy ()
virtual void setShader (Shader *)
float dist () const
bool xAligned () const
const Vec3fnormal ()

Protected Member Functions

virtual bool doIntersect (Ray &) const
virtual void calcBounds ()
virtual void buildAccelStructure ()

Protected Attributes

float mDistance
 Border location.
bool mXAligned
 Border direction.
Vec3f mNormal
 Border normal.

Detailed Description

Represents border of the billiard table. Used in physics to calculate collisions

Author:
Alex Busenius

Definition at line 14 of file TableBorder.h.


Constructor & Destructor Documentation

TableBorder::TableBorder ( const std::string &  name,
float  dist,
bool  xAligned,
const Vec3f norm 
) [inline]

Init constructor

Parameters:
name Border name
dist Border location
xAligned Whether border is along X-axis
norm Border normal, should point inside game field

Definition at line 24 of file TableBorder.h.

References Vec3f::fabs(), Object::mName, and mNormal.


Member Function Documentation

virtual Object* TableBorder::createCopy (  )  [inline, virtual]

Creates a cheap copy of this object using reference counting. Both object will share the same primitives (and therefore shaders), but they can have different properties, (e.g. they can be transformed independently). Should be overwritten in all subclasses

Implements Object.

Definition at line 38 of file TableBorder.h.

virtual void TableBorder::setShader ( Shader  )  [inline, virtual]

Set a shader to all primitives of the object

Implements Object.

Definition at line 47 of file TableBorder.h.

float TableBorder::dist (  )  const [inline]

Get distance

Definition at line 54 of file TableBorder.h.

References mDistance.

Referenced by BorderCollision::collide(), and BilliardPhysics::willHitBorder().

bool TableBorder::xAligned (  )  const [inline]

Get alignment

Definition at line 61 of file TableBorder.h.

References mXAligned.

Referenced by BorderCollision::collide(), and BilliardPhysics::willHitBorder().

const Vec3f& TableBorder::normal (  )  [inline]

Get normal

Definition at line 68 of file TableBorder.h.

References mNormal.

Referenced by BorderCollision::collide().

virtual bool TableBorder::doIntersect ( Ray  )  const [inline, protected, virtual]

Do actual intersect with all primitives. Should be overwritten by all subclasses

Parameters:
localRay Ray to intersect with in local coordinates

Implements Object.

Definition at line 88 of file TableBorder.h.

virtual void TableBorder::calcBounds (  )  [inline, protected, virtual]

Calculate bounding box. Should be overwritten by all subclasses

Implements Object.

Definition at line 96 of file TableBorder.h.

virtual void TableBorder::buildAccelStructure (  )  [inline, protected, virtual]

Build acceleration structure to increase rendering performance. Should be overwritten by all subclasses

Implements Object.

Definition at line 104 of file TableBorder.h.


Member Data Documentation

float TableBorder::mDistance [protected]

Border location.

Definition at line 75 of file TableBorder.h.

Referenced by dist().

bool TableBorder::mXAligned [protected]

Border direction.

Definition at line 78 of file TableBorder.h.

Referenced by xAligned().

Vec3f TableBorder::mNormal [protected]

Border normal.

Definition at line 81 of file TableBorder.h.

Referenced by normal(), and TableBorder().


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