41 #define GUI_RTREE_QUAL RTree<GUIGlObject*, GUIGlObject, float, 2, GUIVisualizationSettings>
46 inline float GUI_RTREE_QUAL::RectSphericalVolume(Rect* a_rect) {
48 const float extent0 = a_rect->m_max[0] - a_rect->m_min[0];
49 const float extent1 = a_rect->m_max[1] - a_rect->m_min[1];
50 return .78539816f * (extent0 * extent0 + extent1 * extent1);
54 inline GUI_RTREE_QUAL::Rect GUI_RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB) {
55 ASSERT(a_rectA && a_rectB);
57 newRect.m_min[0] =
rtree_min(a_rectA->m_min[0], a_rectB->m_min[0]);
58 newRect.m_max[0] =
rtree_max(a_rectA->m_max[0], a_rectB->m_max[0]);
59 newRect.m_min[1] =
rtree_min(a_rectA->m_min[1], a_rectB->m_min[1]);
60 newRect.m_max[1] =
rtree_max(a_rectA->m_max[1], a_rectB->m_max[1]);
95 GUI_RTREE_QUAL::Insert(a_min, a_max, a_dataId);
107 GUI_RTREE_QUAL::Remove(a_min, a_max, a_dataId);
122 return GUI_RTREE_QUAL::Search(a_min, a_max, c);
MFXMutex myLock
A mutex avoiding parallel change and traversal of the tree.
SUMOReal ymin() const
Returns minimum y-coordinate.
Stores the information about how to visualize structures.
SUMOReal xmin() const
Returns minimum x-coordinate.
void removeAdditionalGLObject(GUIGlObject *o)
Removes an additional object (detector/shape/trigger) from being visualised.
virtual Boundary getCenteringBoundary() const =0
Returns the boundary to which the view shall be centered in order to show the object.
A RT-tree for efficient storing of SUMO's GL-objects.
SUMOReal xmax() const
Returns maximum x-coordinate.
A class that stores a 2D geometrical boundary.
virtual void Insert(const float a_min[2], const float a_max[2], GUIGlObject *a_dataId)
Insert entry.
void addAdditionalGLObject(GUIGlObject *o)
Adds an additional object (detector/shape/trigger) for visualisation.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
virtual void Remove(const float a_min[2], const float a_max[2], GUIGlObject *a_dataId)
Remove entry.
virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
Find all within search rectangle.
SUMOReal ymax() const
Returns maximum y-coordinate.
virtual ~SUMORTree()
Destructor.