#include <CollisionRectangle.h>
Inheritance diagram for ParticleSystems::CollisionRectangle:
Public Member Functions | |
CollisionRectangle (GraphicsLib::Point3 *c1, GraphicsLib::Point3 *c2, GraphicsLib::Point3 *c3, GraphicsLib::Point3 *c4) | |
The Constructor. | |
virtual | ~CollisionRectangle () |
The destructor. | |
virtual void | collide (Particle *p) |
A virtual function. | |
virtual void | draw () |
A virtual function. | |
virtual void | translate () |
A virtual function. | |
virtual void | rotate () |
A virtual function. | |
virtual void | scale () |
A virtual function. | |
GraphicsLib::Real | getDistance (GraphicsLib::Vector *v, GraphicsLib::Point3 *p) |
A member function. | |
void | calcCenter () |
A member function. | |
void | calculateNormal () |
A member function. | |
GraphicsLib::Real | BBheight () |
A member function. | |
GraphicsLib::Real | BBwidth () |
A member function. | |
GraphicsLib::Real | BBdepth () |
A member function. | |
float | max (float a, float b) |
A member Function. | |
float | min (float a, float b) |
A member Function. | |
Public Attributes | |
GraphicsLib::Point3 | corner1 |
A public variable. | |
GraphicsLib::Point3 | corner2 |
A public variable. | |
GraphicsLib::Point3 | corner3 |
A public variable. | |
GraphicsLib::Point3 | corner4 |
A public variable. | |
GraphicsLib::Point3 | center |
A public variable. | |
GraphicsLib::Vector | normal |
A public variable. |
A class to create a plane which can be used to make Particles collide against. This Class extends the CollisionObject
Definition at line 36 of file CollisionRectangle.h.
|
The Constructor. Constructs a new CollisionRectangle by passing the four corner points. Need to be in clockwise order!
Definition at line 11 of file CollisionRectangle.cpp. References center, corner1, corner2, corner3, corner4, and normal. |
|
The destructor. The Destructor of this CollisionRectangle Definition at line 27 of file CollisionRectangle.cpp. |
|
A member function. Calculate the depth of the bounding box for this Rectangle Definition at line 146 of file CollisionRectangle.cpp. References corner1, corner2, corner3, corner4, max(), and min(). Referenced by collide(). |
|
A member function. Calculate the height of the bounding box for this Rectangle Definition at line 128 of file CollisionRectangle.cpp. References corner1, corner2, corner3, corner4, max(), and min(). Referenced by collide(). |
|
A member function. Calculate the width of the bounding box for this Rectangle Definition at line 137 of file CollisionRectangle.cpp. References corner1, corner2, corner3, corner4, max(), and min(). Referenced by collide(). |
|
A member function. Calculates the center of this Rectangle and stores the result in the center point. Definition at line 85 of file CollisionRectangle.cpp. |
|
A member function. Calculates the normal of this CollisionRectangle and stores the result in the normal vector. |
|
A virtual function. Checks if a collision occured between the passed Particle and this CollisionRectangle
Implements ParticleSystems::CollisionObject. Definition at line 30 of file CollisionRectangle.cpp. References BBdepth(), BBheight(), BBwidth(), getDistance(), and normal. |
|
A virtual function. Draws this CollisionRectangle Implements ParticleSystems::CollisionObject. Definition at line 118 of file CollisionRectangle.cpp. |
|
A member function. Returns the distance between the given vector and the point
Definition at line 114 of file CollisionRectangle.cpp. Referenced by collide(). |
|
A member Function. The maximum of two Real numbers
Definition at line 154 of file CollisionRectangle.cpp. Referenced by BBdepth(), BBheight(), and BBwidth(). |
|
A member Function. The minimum of two Real numbers
Definition at line 162 of file CollisionRectangle.cpp. Referenced by BBdepth(), BBheight(), and BBwidth(). |
|
A virtual function. Translates this CollisionRectangle Implements ParticleSystems::CollisionObject. Definition at line 171 of file CollisionRectangle.cpp. |
|
A virtual function. Translates this CollisionSphere Implements ParticleSystems::CollisionObject. Definition at line 172 of file CollisionRectangle.cpp. |
|
A virtual function. Translates this CollisionRectangle Implements ParticleSystems::CollisionObject. Definition at line 170 of file CollisionRectangle.cpp. |
|
A public variable. The Center of the CollisionRectangle Definition at line 172 of file CollisionRectangle.h. Referenced by calcCenter(), and CollisionRectangle(). |
|
A public variable. Corner1 of the CollisionRectangle Definition at line 148 of file CollisionRectangle.h. Referenced by BBdepth(), BBheight(), BBwidth(), calcCenter(), CollisionRectangle(), and draw(). |
|
A public variable. Corner2 of the CollisionRectangle Definition at line 154 of file CollisionRectangle.h. Referenced by BBdepth(), BBheight(), BBwidth(), CollisionRectangle(), and draw(). |
|
A public variable. Corner3 of the CollisionRectangle Definition at line 160 of file CollisionRectangle.h. Referenced by BBdepth(), BBheight(), BBwidth(), calcCenter(), CollisionRectangle(), and draw(). |
|
A public variable. Corner4 of the CollisionRectangle Definition at line 166 of file CollisionRectangle.h. Referenced by BBdepth(), BBheight(), BBwidth(), CollisionRectangle(), and draw(). |
|
A public variable. The normal of the CollisionRectangle Definition at line 178 of file CollisionRectangle.h. Referenced by collide(), and CollisionRectangle(). |