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 () | |
| Vector | CalculateIntersection (const Vector ¤t, const Vector &speed) const |
| Side | GetClosestSide (const Vector &position) const |
| bool | IsInside (const Vector &position) const |
Public Attributes | |
| double | xMax |
| double | xMin |
| double | yMax |
| double | yMin |
| double | zMax |
| double | zMin |
| ns3::Box::Box | ( | double | _xMin, |
| double | _xMax, | ||
| double | _yMin, | ||
| double | _yMax, | ||
| double | _zMin, | ||
| double | _zMax | ||
| ) |
| ns3::Box::Box | ( | ) |
| 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.
Definition at line 110 of file box.cc.
References IsInside(), NS_ASSERT, ns3::Vector3D::x, and ns3::Vector3D::y.
| Box::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.
Definition at line 63 of file box.cc.
References ns3::Vector3D::x, ns3::Vector3D::y, and ns3::Vector3D::z.
| 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.
Definition at line 54 of file box.cc.
References ns3::Vector3D::x, ns3::Vector3D::y, and ns3::Vector3D::z.
Referenced by CalculateIntersection(), and ns3::Building::IsInside().