|
Bugzilla – Full Text Bug Listing |
| Summary: | Add the possibility of changing the z coordinate in GridPositionAllocator, RandomRectanglePositionAllocator, RandomDiscPositionAllocator, UniformDiscPositionAllocator | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Michele Polese <michele.polese> |
| Component: | mobility models | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | michele.polese, natale.patriciello |
| Priority: | P3 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Possible patch | ||
*** Bug 2892 has been marked as a duplicate of this bug. *** I agree with the patch, if no comments arise, I will push the patch after the 3.28 release. Added in 13824:d5e4627b7502, thanks Michele. |
Created attachment 3019 [details] Possible patch Unless randomly extracted (as in RandomBoxPositionAllocator), the z coordinate in the position-allocator classes is always set to 0. Therefore, it is not "user-friendly" to use a z coordinate different from 0 on nodes whose position is set using the MobilityHelper APIs (one would need to cycle through the nodes and change the z coordinate one by one, I guess). The proposed patch adds the possibility of setting a common z coordinate (in case different from 0) to all the position extracted from GridPositionAllocator, RandomRectanglePositionAllocator, RandomDiscPositionAllocator, UniformDiscPositionAllocator. This can be done using an attribute or the SetZ method. The default value of the Attribute is set to 0 so that it does not change the current behavior unless the user wants to explicitly set it to a different value.