raisim::PolyLine
struct · #include <raisim/server/Visuals.hpp>
Visual-only polyline streamed by RaisimServer. Consecutive points are connected by straight segments of thickness width. Create with RaisimServer::addVisualPolyLine(); the server owns it.
Public member functions
setColor
void setColor(double r, double g, double b, double a)Parameters
| Parameter | Description |
|---|---|
r (in) | red value of the color (max=1). |
g (in) | green value of the color (max=1). |
b (in) | blue value of the color (max=1). |
a (in) | alpha value of the color (max=1). set the color of the polyline. |
addPoint
void addPoint(const Eigen::Vector3d &point)Parameters
| Parameter | Description |
|---|---|
point (in) | new polyline point. append a new point to the polyline. |
clearPoints
void clearPoints()clear all polyline points.
lockMutex
void lockMutex()Lock this polyline's mutex. The server holds it while serializing this polyline, so lock it while modifying the polyline from another thread. Same as lock().
lock
void lock()Lock the mutex (BasicLockable interface for std::lock_guard / std::unique_lock).
try_lock
bool try_lock()Returns true if the mutex was acquired without blocking (Lockable interface).
unlockMutex
void unlockMutex()Unlock the mutex locked by lockMutex(). Same as unlock().
unlock
void unlock()Unlock the mutex (BasicLockable interface).
Public attributes
name
std::string namePolyline name for lookup in the server.
color
Vec<4> colorRGBA color (0-1 range).
points
std::vector<Vec<3>> pointsOrdered polyline points in world coordinates.
width
double widthPolyline width in meters.