Index: celengine/marker.h =================================================================== --- celengine/marker.h (revision 4110) +++ celengine/marker.h (working copy) @@ -33,6 +33,8 @@ void setSize(float); int getPriority() const; void setPriority(int); + bool isOccludable() const; + void setOccludable(bool); enum Symbol { @@ -65,6 +67,7 @@ int priority; Symbol symbol; string label; + bool occludable; }; typedef std::vector MarkerList; Index: celengine/universe.h =================================================================== --- celengine/universe.h (revision 4110) +++ celengine/universe.h (working copy) @@ -103,7 +103,8 @@ Color color, Marker::Symbol symbol, int priority, - string label); + string label, + bool occludable = true); void unmarkObject(const Selection&, int priority); void unmarkAll(); bool isMarked(const Selection&, int priority) const; Index: celengine/render.h =================================================================== --- celengine/render.h (revision 4110) +++ celengine/render.h (working copy) @@ -198,20 +198,23 @@ // Label related methods static const int MaxLabelLength = 32; - struct Label + struct Annotation { - char text[MaxLabelLength]; + char labelText[MaxLabelLength]; + const Marker* marker; Color color; Point3f position; - bool operator<(const Label&) const; + bool operator<(const Annotation&) const; }; + + void addForegroundAnnotation(const Marker*, const char* labelText, Color, const Point3f&, float depth = -1); + void addBackgroundAnnotation(const Marker*, const char* labelText, Color, const Point3f&, float depth = -1); + void addBackgroundAnnotation(const std::string&, Color, const Point3f&, float depth = -1); + void addSortedAnnotation(const Marker* marker, const std::string&, Color, const Point3f&); - void addLabel(const char* text, Color, const Point3f&, float depth = -1); - void addLabel(const std::string&, Color, const Point3f&, float depth = -1); - void addSortedLabel(const std::string&, Color, const Point3f&); - void clearLabels(); - void clearSortedLabels(); + void clearAnnotations(std::vector&); + void clearSortedAnnotations(); void invalidateOrbitCache(); @@ -517,11 +520,17 @@ const Observer& observer); void renderParticles(const std::vector& particles, Quatf orientation); - void renderLabels(FontStyle fs, LabelAlignment la); - std::vector