29#define MAXIMUM_DOTTEDGEOMETRYLENGTH 500.0
179 segment.shape = segment.shape.resample(segmentLength,
true);
240 DottedGeometryColor& dottedGeometryColor,
const double lineWidth,
const bool addOffset)
const {
244 for (
int i = 0; i < ((int)segment.shape.size() - 1); i++) {
249 GLHelper::drawBoxLine(segment.shape[i], segment.rotations.at(i), segment.lengths.at(i), lineWidth, -lineWidth);
263 for (
int i = 0; i < ((int)segment.shape.size() - 1); i++) {
264 GLHelper::drawBoxLine(segment.shape[i], segment.rotations.at(i), segment.lengths.at(i), lineWidth, lineWidth);
274 segment.shape.move2side(value);
319 int numberOfSegments = (int)segment.shape.size() - 1;
321 if (numberOfSegments >= 0) {
323 segment.rotations.reserve(numberOfSegments);
324 segment.lengths.reserve(numberOfSegments);
326 for (
int i = 0; i < numberOfSegments; i++) {
#define MAXIMUM_DOTTEDGEOMETRYLENGTH
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
class for pack all variables related with GUIDottedGeometry color
const RGBColor getColor(const GUIVisualizationSettings &settings, DottedContourType type)
get inspected color (and change flag)
void changeColor()
change color
DottedGeometryColor()
constructor
void reset()
rest Dotted Geometry Color
void drawDottedGeometry(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, DottedGeometryColor &dottedGeometryColor, const double lineWidth, const bool addOffset) const
draw dotted geometry
std::vector< GUIDottedGeometry::Segment > myDottedGeometrySegments
dotted element shape (note: It's centered in 0,0 due scaling)
Position getFrontPosition() const
get front position
const PositionVector & getUnresampledShape() const
get simple shape (the shape without resampling)
void drawInnenGeometry(const double lineWidth) const
draw innen geometry
PositionVector myUnresampledShape
shape without resampling
void moveShapeToSide(const double value)
move shape to side
void calculateShapeRotationsAndLengths()
calculate shape rotations and lengths
void clearDottedGeometry()
clear dotted geometry
void updateDottedGeometry(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &laneShape)
update GUIDottedGeometry (using lane shape)
GUIDottedGeometry()
constructor
Position getBackPosition() const
get back position
static double calculateRotation(const Position &first, const Position &second)
return angle between two points (used in geometric calculations)
static double calculateLength(const Position &first, const Position &second)
return length between two points (used in geometric calculations)
Stores the information about how to visualize structures.
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
@ DottedContoursResampled
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
double length2D() const
Returns the length.
PositionVector resample(double maxLength, const bool adjustEnd) const
resample shape (i.e. transform to segments, equal spacing)
void closePolygon()
ensures that the last position equals the first
void move2side(double amount, double maxExtension=100)
move position vector to side using certain amount
static const RGBColor BLUE
static const RGBColor ORANGE
static const RGBColor CYAN
static const RGBColor GREEN
static const RGBColor BLACK
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
static const RGBColor MAGENTA
Segment()
default constructor
static const RGBColor firstFrontColor
first color of dotted front contour
static const RGBColor firstInspectedColor
first color of dotted inspected contour
static const RGBColor secondFrontColor
second color of dotted front contour
static const RGBColor secondInspectedColor
second color of dotted inspectedcontour
static const double segmentLength
length of dotted contour segments