Allocate positions on a rectangular 2d grid.
More...
#include <position-allocator.h>
List of all members.
Detailed Description
Allocate positions on a rectangular 2d grid.
Member Enumeration Documentation
Determine whether positions are allocated row first or column first.
- Enumerator:
ROW_FIRST |
In row-first mode, positions are allocated on the first row until N positions have been allocated. Then, the second row located a yMin + yDelta is used to allocate positions.
|
COLUMN_FIRST |
In column-first mode, positions are allocated on the first column until N positions have been allocated. Then, the second column located a xMin + xDelta is used to allocate positions.
|
Member Function Documentation
double ns3::GridPositionAllocator::GetDeltaX |
( |
void |
|
) |
const |
- Returns:
- the x interval between two x-consecutive positions.
double ns3::GridPositionAllocator::GetDeltaY |
( |
void |
|
) |
const |
- Returns:
- the y interval between two y-consecutive positions.
enum LayoutType ns3::GridPositionAllocator::GetLayoutType |
( |
void |
|
) |
const |
- Returns:
- the currently-selected layout type.
double ns3::GridPositionAllocator::GetMinX |
( |
void |
|
) |
const |
- Returns:
- the x coordinate of the first allocated position.
double ns3::GridPositionAllocator::GetMinY |
( |
void |
|
) |
const |
- Returns:
- the y coordinate of the first allocated position.
uint32_t ns3::GridPositionAllocator::GetN |
( |
void |
|
) |
const |
- Returns:
- the number of positions to allocate on each row or each column.
virtual Vector ns3::GridPositionAllocator::GetNext |
( |
void |
|
) |
const [virtual] |
- Returns:
- the next chosen position.
This method _must_ be implement in subclasses.
Implements ns3::PositionAllocator.
static TypeId ns3::GridPositionAllocator::GetTypeId |
( |
void |
|
) |
[static] |
void ns3::GridPositionAllocator::SetDeltaX |
( |
double |
deltaX |
) |
|
- Parameters:
-
| deltaX | the x interval between two x-consecutive positions. |
void ns3::GridPositionAllocator::SetDeltaY |
( |
double |
deltaY |
) |
|
- Parameters:
-
| deltaY | the y interval between two y-consecutive positions. |
void ns3::GridPositionAllocator::SetLayoutType |
( |
enum LayoutType |
layoutType |
) |
|
- Parameters:
-
| layoutType | the type of layout to use (row first or column first). |
void ns3::GridPositionAllocator::SetMinX |
( |
double |
xMin |
) |
|
- Parameters:
-
| xMin | the x coordinate where layout will start. |
void ns3::GridPositionAllocator::SetMinY |
( |
double |
yMin |
) |
|
- Parameters:
-
| yMin | the y coordinate where layout will start |
void ns3::GridPositionAllocator::SetN |
( |
uint32_t |
n |
) |
|
- Parameters:
-
| n | the number of positions allocated on each row (or each column) before switching to the next column (or row). |
The documentation for this class was generated from the following files:
- src/mobility/position-allocator.h
- doc/introspected-doxygen.h