22 #ifndef TraCIServerAPI_Lane_h 23 #define TraCIServerAPI_Lane_h 91 const SUMOReal range,
const int domain)
126 #define LANE_RTREE_QUAL RTree<MSLane*, MSLane, float, 2, TraCIServerAPI_Lane::StoringVisitor> 129 inline float LANE_RTREE_QUAL::RectSphericalVolume(Rect* a_rect) {
131 const float extent0 = a_rect->m_max[0] - a_rect->m_min[0];
132 const float extent1 = a_rect->m_max[1] - a_rect->m_min[1];
133 return .78539816f * (extent0 * extent0 + extent1 * extent1);
137 inline LANE_RTREE_QUAL::Rect LANE_RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB) {
138 ASSERT(a_rectA && a_rectB);
140 newRect.m_min[0] =
rtree_min(a_rectA->m_min[0], a_rectB->m_min[0]);
141 newRect.m_max[0] =
rtree_max(a_rectA->m_max[0], a_rectB->m_max[0]);
142 newRect.m_min[1] =
rtree_min(a_rectA->m_min[1], a_rectB->m_min[1]);
143 newRect.m_max[1] =
rtree_max(a_rectA->m_max[1], a_rectB->m_max[1]);
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa3: Get Lane Variable)
StoringVisitor(std::set< std::string > &ids, const PositionVector &shape, const SUMOReal range, const int domain)
Constructor.
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc3: Change Lane State)
StoringVisitor & operator=(const StoringVisitor &src)
invalidated assignment operator
std::set< std::string > & myIDs
The container.
Allows to store the object; used as context while traveling the rtree in TraCI.
void add(const MSLane *const l) const
Adds the given object to the container.
TraCI server used to control sumo by a remote TraCI client.
~StoringVisitor()
Destructor.
const PositionVector & myShape
TraCIServerAPI_Lane(const TraCIServerAPI_Lane &s)
invalidated copy constructor
Representation of a lane in the micro simulation.
APIs for getting/setting lane values via TraCI.
static bool getShape(const std::string &id, PositionVector &shape)
Returns the named lane's shape.