bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
mcts_line_following::Trail Class Reference

A path drawn as a line: in the plane, just above the floor, where a robot has been or where it thinks it has been; or in space, where something has flown. More...

#include <irrlicht_scene.h>

Public Member Functions

 Trail (real_t min_step=0.02, real_t height=0.01)
void add (real_t x, real_t y)
 Add a point, if it is further than min_step from the last one.
void add (const chrono::ChVector3d &p)
 Add a point in space, at its own height, if it is further than min_step from the last one: the path of something that flies.
void draw (chrono::irrlicht::ChVisualSystemIrrlicht &vis, const chrono::ChColor &colour, real_t thickness=2.0) const
 Draw the path. Call this between Render() and EndScene().
std::size_t size () const noexcept
void clear ()

Detailed Description

A path drawn as a line: in the plane, just above the floor, where a robot has been or where it thinks it has been; or in space, where something has flown.

Constructor & Destructor Documentation

◆ Trail()

bitsim::utils::render::Trail::Trail ( real_t min_step = 0.02,
real_t height = 0.01 )
explicit
Parameters
min_stepPoints closer than this to the last one are not added [m]
heightHow high above z = 0 the path is drawn [m]

Member Function Documentation

◆ add() [1/2]

void bitsim::utils::render::Trail::add ( const chrono::ChVector3d & p)

Add a point in space, at its own height, if it is further than min_step from the last one: the path of something that flies.

◆ add() [2/2]

Add a point, if it is further than min_step from the last one.

◆ clear()

◆ draw()

void bitsim::utils::render::Trail::draw ( chrono::irrlicht::ChVisualSystemIrrlicht & vis,
const chrono::ChColor & colour,
real_t thickness = 2.0 ) const

Draw the path. Call this between Render() and EndScene().

◆ size()

std::size_t bitsim::utils::render::Trail::size ( ) const
inlinenoexcept

The documentation for this class was generated from the following files: