a 3d box More...
#include <box.h>
Public Types | |
enum | Side { RIGHT, LEFT, TOP, BOTTOM, UP, DOWN } |
Public Member Functions | |
Box (double _xMin, double _xMax, double _yMin, double _yMax, double _zMin, double _zMax) | |
Box () | |
bool | IsInside (const Vector &position) const |
Side | GetClosestSide (const Vector &position) const |
Vector | CalculateIntersection (const Vector ¤t, const Vector &speed) const |
Public Attributes | |
double | xMin |
double | xMax |
double | yMin |
double | yMax |
double | zMin |
double | zMax |
a 3d box
ns3::Box::Box | ( | double | _xMin, | |
double | _xMax, | |||
double | _yMin, | |||
double | _yMax, | |||
double | _zMin, | |||
double | _zMax | |||
) |
_xMin | x coordinates of left boundary. | |
_xMax | x coordinates of right boundary. | |
_yMin | y coordinates of bottom boundary. | |
_yMax | y coordinates of top boundary. | |
_zMin | z coordinates of down boundary. | |
_zMax | z coordinates of up boundary. |
Create a box.
ns3::Box::Box | ( | ) |
Create a zero-sized box located at coordinates (0.0,0.0,0.0)
current | the current position | |
speed | the current speed |
This method assumes that the current position is located _inside_ the cube and checks for this with an assert. This method compares only the x and y coordinates of the input position and speed. It ignores the z coordinate.
Side ns3::Box::GetClosestSide | ( | const Vector & | position | ) | const |
position | the position to test. |
This method compares the x, y, and z coordinates of the input position.
bool ns3::Box::IsInside | ( | const Vector & | position | ) | const |
position | the position to test. |
This method compares the x, y, and z coordinates of the input position.