INFO702 - TPs
|
A class to store master shapes and to test their possible collisions with a randomized algorithm. More...
#include <objects.hpp>
Public Member Functions | |
LogicalScene (int n) | |
bool | intersect (MasterShape *f1, MasterShape *f2) |
bool | intersect (MasterShape *f1) |
Public Attributes | |
std::vector< MasterShape * > | formes |
int | nb_tested |
A class to store master shapes and to test their possible collisions with a randomized algorithm.
Definition at line 89 of file objects.hpp.
LogicalScene::LogicalScene | ( | int | n | ) |
Builds a logical scene where collisions are detected by checking n random points within shapes.
n | any positive integer. |
Definition at line 186 of file objects.cpp.
bool LogicalScene::intersect | ( | MasterShape * | f1 | ) |
f1 | any master shape. |
Definition at line 202 of file objects.cpp.
bool LogicalScene::intersect | ( | MasterShape * | f1, |
MasterShape * | f2 | ||
) |
Given two shapes f1 and f2, returns if they collide.
f1 | any master shape. |
f2 | any different master shape. |
Definition at line 190 of file objects.cpp.
std::vector< MasterShape*> LogicalScene::formes |
Definition at line 90 of file objects.hpp.
int LogicalScene::nb_tested |
Definition at line 91 of file objects.hpp.