#include <TableBorder.h>
Inherits Object.
Inheritance diagram for TableBorder:
Public Member Functions | |
TableBorder (const std::string &name, float dist, bool xAligned, const Vec3f &norm) | |
virtual Object * | createCopy () |
virtual void | setShader (Shader *) |
float | dist () const |
bool | xAligned () const |
const Vec3f & | normal () |
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. |
Definition at line 14 of file TableBorder.h.
TableBorder::TableBorder | ( | const std::string & | name, | |
float | dist, | |||
bool | xAligned, | |||
const Vec3f & | norm | |||
) | [inline] |
Init constructor
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.
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
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.
float TableBorder::mDistance [protected] |
bool TableBorder::mXAligned [protected] |
Vec3f TableBorder::mNormal [protected] |
Border normal.
Definition at line 81 of file TableBorder.h.
Referenced by normal(), and TableBorder().