cajun::draw_rndf_t Class Reference

#include <draw_rndf.H>

Inheritance diagram for cajun::draw_rndf_t:
cajun::component_interface_t

List of all members.

Classes

struct  crosswalk_t
class  intersection_vertex_t
class  lane_id_t
class  lane_marking_waypoint_t
class  point_t
struct  stripe_t
struct  texture_t

Public Member Functions

 draw_rndf_t (double cbviz_origin[3], conf_t &conf, world_state_t *ws_, rndf_t const *rndf_, char const *lane_markings_file_)
virtual ~draw_rndf_t ()
void toggle_display ()
 Toggle displaying of the data.
void update_data (double bot_pos_[3])
 Function called for idle loop.
void display (double bot_pos_[3])
 Function called during display loop.
void init_data ()
 Initialization of display lists, etc.
void load_textures ()
void dump_waypoint (rndf_t::waypoint_t const &w_)
void dump_boundary (char const *name_, rndf_t::lane_t::boundary_t boundary_)
void dump_stop_line (rndf_t::waypoint_t const &w_)
void dump_arrow (rndf_t::waypoint_t const &w_, int &type_, double &dx_, double &dy_, double &rot_)
void dump_sign (rndf_t::waypoint_t const &w_, int &type_, double &dx_, double &dy_, double &rot_, double scale_, double height_)
void dump_lane (rndf_t::lane_t const &l_)
 Dump an rndf lane to display list.
void dump_segment (rndf_t::segment_t const &s_)
void dump_segment_filling (rndf_t::segment_t const &s_)
 Draws road color between lanes 1 and n in a segment.
void dump_perimeter (rndf_t::zone_t const &z_)
void dump_spot (rndf_t::spot_t const &s_)
void dump_zone (rndf_t::zone_t const &z_)
void dump_intersection (rndf_t::intersection_t const &it_)

Private Types

enum  {
  TEX_STOP_SIGN, TEX_YIELD_SIGN, TEX_CURVED_ROAD_SIGN, TEX_BUS_STOP_SIGN,
  TEX_LAST_ITEM
}
enum  {
  LEFT_RECT_ARROW, LEFT_CURVED_ARROW, STRAIGHT_RECT_ARROW, RIGHT_RECT_ARROW,
  RIGHT_CURVED_ARROW, LEFT_BOUNDARY_OFF, RIGHT_BOUNDARY_OFF, LEFT_BOUNDARY_HIGH,
  RIGHT_BOUNDARY_HIGH, STOP_SIGN, LEFT_YIELD_SIGN, RIGHT_YIELD_SIGN,
  CURVED_ROAD_SIGN, BUS_STOP_SIGN, POLE, CROSSWALK
}

Private Member Functions

void draw_park_lines (rndf_t::waypoint_t const &w1_, rndf_t::waypoint_t const &w2_, double width_)
void draw_crosswalk (crosswalk_t const &cw_, double stroke_width_, double stroke_separation_)
void load_lane_markings (char const *lane_markings_file_)
bool parse_lane_marking (char *read_str, lane_marking_waypoint_t &lm_)
void draw_double_yellow_lines (rndf_t::lane_t const &l_)
 Draw double yellow lane markings between two opposite lanes by averaging their points.
void draw_single_white_lines (rndf_t::lane_t const &l_, rndf_t::lane_t::side_t side_)
 Draw single white lane markings between two lanes by averaging their points.
void draw_striped_white_lines (rndf_t::lane_t const &l_)
void draw_straight_arrow (double lane_width, double thickness, int type)
void draw_left_arrow (double lane_width, double thickness, int type)
void draw_right_arrow (double lane_width_, double thickness_, int type_)
void draw_stop_sign (double lane_width_, double scale_, double height_)
void draw_yield_sign (double lane_width_, double scale_, double height_)
void draw_curved_road_sign (double lane_width_, double scale_, double height_)
void draw_bus_stop_sign (double lane_width_, double scale_, double height_)
void draw_pole (double lane_width_, double scale_, double height_)
bool is_arrow_type (int type_)
 Test if a lane marking is an arrow type.
bool is_sign_type (int type_)
 Test if a lane marking is a sign.
bool is_matching_lane_marking (rndf_t::lane_t const &l1_, rndf_t::lane_t const &l2_, rndf_t::lane_t::side_t side_wrt_l1_, bool same_dir_)
 Test if two (assumed) neighboring lanes have same lane markings.
bool is_same_direction (rndf_t::lane_t const &l1_, rndf_t::lane_t const &l2_)
 Test if lanes are in same direction within same segment.
bool is_on_left_side (rndf_t::lane_t const &l1_, rndf_t::lane_t const &l2_)
 See if l2 is on the left side of l1.
double trans_x (double x)
double trans_y (double y)
void set_glColor (chart_color_t color_)
double wp_dist (rndf_t::waypoint_t const &w1_, rndf_t::waypoint_t const &w2_)
double pt_dist (point_t const &p1_, point_t const &p2_)
double orientation (point_t const &p1_, point_t const &p2_)

Private Attributes

char m_lane_marker [20]
rndf_t const * m_rndf
std::vector< unsigned > m_display_lists
unsigned m_tmp_dl
unsigned m_points_per_dl
unsigned m_point_count
double m_cbviz_origin [3]
 Offset used for drawing coordinates.
double m_ground_ref_height
std::vector
< lane_marking_waypoint_t
m_lane_markings
std::vector< crosswalk_tm_crosswalks
std::vector< lane_id_tm_striped_lanes
std::vector< stripe_tm_stripe_pts
bool m_display_checkpoint
bool m_display_exit
bool m_display_entry
bool m_display_waypoint
bool m_display_boundary
bool m_display_stop
bool m_display_stop_line
double m_stop_line_thickness
double m_dist_to_stop_line
bool m_display_lane
bool m_display_lane_number
bool m_display_segment
bool m_display_segment_filling
bool m_display_intersection_filling
bool m_display_perimeter
bool m_display_spot
bool m_display_zone
bool m_display_arrow
double m_dist_to_arrow
bool m_display_sign
bool m_use_old_lane_boundary_drawing
bool m_fill_between_lanes
double m_fill_dist_tolerance
bool m_print_lm_load_info
double m_sign_thickness
double m_sign_step_val
double m_waypoint_number_height
double m_waypoint_height
double m_waypoint_radius
double m_entryexit_line_height
chart_color_t m_checkpoint_color
chart_color_t m_checkpoint_text_color
chart_color_t m_stoppoint_color
chart_color_t m_exitpoint_color
chart_color_t m_entrypoint_color
chart_color_t m_waypoint_color
chart_color_t m_waypoint_text_color
std::string m_textures_name [TEX_LAST_ITEM]
texture_t m_textures_info [TEX_LAST_ITEM]
GLuint m_textures [TEX_LAST_ITEM]

Member Enumeration Documentation

anonymous enum [private]
Enumerator:
TEX_STOP_SIGN 
TEX_YIELD_SIGN 
TEX_CURVED_ROAD_SIGN 
TEX_BUS_STOP_SIGN 
TEX_LAST_ITEM 
anonymous enum [private]
Enumerator:
LEFT_RECT_ARROW 
LEFT_CURVED_ARROW 
STRAIGHT_RECT_ARROW 
RIGHT_RECT_ARROW 
RIGHT_CURVED_ARROW 
LEFT_BOUNDARY_OFF 
RIGHT_BOUNDARY_OFF 
LEFT_BOUNDARY_HIGH 
RIGHT_BOUNDARY_HIGH 
STOP_SIGN 
LEFT_YIELD_SIGN 
RIGHT_YIELD_SIGN 
CURVED_ROAD_SIGN 
BUS_STOP_SIGN 
POLE 
CROSSWALK 

Constructor & Destructor Documentation

draw_rndf_t::draw_rndf_t ( double  cbviz_origin[3],
conf_t &  conf,
world_state_t *  ws_,
rndf_t const *  rndf_,
char const *  lane_markings_file_ 
)
draw_rndf_t::~draw_rndf_t (  )  [virtual]

Member Function Documentation

void draw_rndf_t::display ( double  bot_bos_[3]  )  [virtual]

Function called during display loop.

Implements cajun::component_interface_t.

References cajun::component_interface_t::m_display, m_display_lists, and m_tmp_dl.

void draw_rndf_t::draw_bus_stop_sign ( double  lane_width_,
double  scale_,
double  height_ 
) [private]
void draw_rndf_t::draw_crosswalk ( crosswalk_t const &  cw_,
double  stroke_width_,
double  stroke_separation_ 
) [private]
void draw_rndf_t::draw_curved_road_sign ( double  lane_width_,
double  scale_,
double  height_ 
) [private]
void draw_rndf_t::draw_double_yellow_lines ( rndf_t::lane_t const &  l_  )  [private]

Draw double yellow lane markings between two opposite lanes by averaging their points.

Parameters:
l_ Base lane used, plus next lane of l_.id()+1.

References is_matching_lane_marking(), is_same_direction(), m_rndf, trans_x(), trans_y(), wp_dist(), cajun::draw_rndf_t::point_t::x, and cajun::draw_rndf_t::point_t::y.

Referenced by dump_segment().

void draw_rndf_t::draw_left_arrow ( double  lane_width,
double  thickness,
int  type 
) [private]

Referenced by dump_arrow().

void draw_rndf_t::draw_park_lines ( rndf_t::waypoint_t const &  w1_,
rndf_t::waypoint_t const &  w2_,
double  width_ 
) [private]

References m_waypoint_height, R2D, trans_x(), and trans_y().

Referenced by dump_spot().

void draw_rndf_t::draw_pole ( double  lane_width_,
double  scale_,
double  height_ 
) [private]

References m_sign_step_val, and m_sign_thickness.

Referenced by dump_sign().

void draw_rndf_t::draw_right_arrow ( double  lane_width_,
double  thickness_,
int  type_ 
) [private]

Referenced by dump_arrow().

void draw_rndf_t::draw_single_white_lines ( rndf_t::lane_t const &  l_,
rndf_t::lane_t::side_t  side_ 
) [private]

Draw single white lane markings between two lanes by averaging their points.

Parameters:
l_ Base lane used.
side_ Which side of road to draw on.

References is_same_direction(), m_rndf, trans_x(), trans_y(), wp_dist(), cajun::draw_rndf_t::point_t::x, and cajun::draw_rndf_t::point_t::y.

Referenced by dump_segment().

void draw_rndf_t::draw_stop_sign ( double  lane_width_,
double  scale_,
double  height_ 
) [private]
void draw_rndf_t::draw_straight_arrow ( double  lane_width,
double  thickness,
int  type 
) [private]

Referenced by dump_arrow().

void draw_rndf_t::draw_striped_white_lines ( rndf_t::lane_t const &  l_  )  [private]
void draw_rndf_t::draw_yield_sign ( double  lane_width_,
double  scale_,
double  height_ 
) [private]
void draw_rndf_t::dump_arrow ( rndf_t::waypoint_t const &  w_,
int &  type_,
double &  dx_,
double &  dy_,
double &  rot_ 
)
void draw_rndf_t::dump_boundary ( char const *  name_,
rndf_t::lane_t::boundary_t  boundary_ 
)

References m_display_boundary.

void draw_rndf_t::dump_intersection ( rndf_t::intersection_t const &  it_  ) 
void draw_rndf_t::dump_lane ( rndf_t::lane_t const &  l_  ) 
void draw_rndf_t::dump_perimeter ( rndf_t::zone_t const &  z_  ) 
void draw_rndf_t::dump_segment ( rndf_t::segment_t const &  s_  ) 
void draw_rndf_t::dump_segment_filling ( rndf_t::segment_t const &  s_  ) 

Draws road color between lanes 1 and n in a segment.

Parameters:
s_ Segment to fill.

References m_display_segment_filling, m_fill_dist_tolerance, trans_x(), trans_y(), and wp_dist().

Referenced by dump_segment().

void draw_rndf_t::dump_sign ( rndf_t::waypoint_t const &  w_,
int &  type_,
double &  dx_,
double &  dy_,
double &  rot_,
double  scale_,
double  height_ 
)
void draw_rndf_t::dump_spot ( rndf_t::spot_t const &  s_  ) 
void draw_rndf_t::dump_stop_line ( rndf_t::waypoint_t const &  w_  ) 
void draw_rndf_t::dump_waypoint ( rndf_t::waypoint_t const &  w_  ) 
void draw_rndf_t::dump_zone ( rndf_t::zone_t const &  z_  ) 

References dump_perimeter(), dump_spot(), and m_display_zone.

Referenced by init_data().

void draw_rndf_t::init_data (  )  [virtual]
bool draw_rndf_t::is_arrow_type ( int  type_  )  [private]

Test if a lane marking is an arrow type.

Parameters:
type_ The lane marking type to check.
Returns:
True if type is an arrow type.

References LEFT_CURVED_ARROW, LEFT_RECT_ARROW, RIGHT_CURVED_ARROW, RIGHT_RECT_ARROW, and STRAIGHT_RECT_ARROW.

Referenced by init_data().

bool draw_rndf_t::is_matching_lane_marking ( rndf_t::lane_t const &  l1_,
rndf_t::lane_t const &  l2_,
rndf_t::lane_t::side_t  side_wrt_l1_,
bool  same_dir_ 
) [private]

Test if two (assumed) neighboring lanes have same lane markings.

Parameters:
l1_ Base lane to compare.
l2_ Lane to compare against l1_, greater in id.
side_wrt_l1_ Side with respect to lane 1 to check against.
same_dir_ Are the lanes going in the same direction.
Returns:
True if both lanes have the same lane marking on the corresponding side

Referenced by draw_double_yellow_lines().

bool draw_rndf_t::is_on_left_side ( rndf_t::lane_t const &  l1_,
rndf_t::lane_t const &  l2_ 
) [private]

See if l2 is on the left side of l1.

References is_same_direction(), orientation(), and wp_dist().

Referenced by draw_striped_white_lines().

bool draw_rndf_t::is_same_direction ( rndf_t::lane_t const &  l1_,
rndf_t::lane_t const &  l2_ 
) [private]

Test if lanes are in same direction within same segment.

Parameters:
l1_ Base lane to compare.
l2_ Lane to compare against l1_, different in id, same segment.
Returns:
True if both lanes are determined to be going in same direction.

References orientation().

Referenced by draw_double_yellow_lines(), draw_single_white_lines(), draw_striped_white_lines(), and is_on_left_side().

bool draw_rndf_t::is_sign_type ( int  type_  )  [private]

Test if a lane marking is a sign.

Parameters:
type_ The lane marking type to check.
Returns:
True if type is a sign type.

References BUS_STOP_SIGN, CURVED_ROAD_SIGN, LEFT_YIELD_SIGN, POLE, RIGHT_YIELD_SIGN, and STOP_SIGN.

Referenced by init_data().

void draw_rndf_t::load_lane_markings ( char const *  lane_markings_file_  )  [private]
void draw_rndf_t::load_textures (  ) 
double draw_rndf_t::orientation ( point_t const &  p1_,
point_t const &  p2_ 
) [private]
bool draw_rndf_t::parse_lane_marking ( char *  read_str,
lane_marking_waypoint_t lm_ 
) [private]
double draw_rndf_t::pt_dist ( point_t const &  p1_,
point_t const &  p2_ 
) [private]
void draw_rndf_t::set_glColor ( chart_color_t  color_  )  [private]
void draw_rndf_t::toggle_display (  )  [virtual]

Toggle displaying of the data.

Implements cajun::component_interface_t.

References cajun::component_interface_t::m_display, and m_rndf.

Referenced by cajun::simulation_draw_t::normalKey_callback().

double draw_rndf_t::trans_x ( double  x  )  [private]
double draw_rndf_t::trans_y ( double  y  )  [private]
void draw_rndf_t::update_data ( double  bot_pos_[3]  )  [virtual]

Function called for idle loop.

Implements cajun::component_interface_t.

double draw_rndf_t::wp_dist ( rndf_t::waypoint_t const &  w1_,
rndf_t::waypoint_t const &  w2_ 
) [private]

Member Data Documentation

Offset used for drawing coordinates.

Reimplemented from cajun::component_interface_t.

Referenced by draw_rndf_t(), trans_x(), and trans_y().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by dump_lane(), and load_lane_markings().

Referenced by draw_rndf_t(), and dump_arrow().

Referenced by draw_rndf_t(), and dump_boundary().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_intersection().

Referenced by draw_rndf_t(), and dump_lane().

std::vector<unsigned> cajun::draw_rndf_t::m_display_lists [private]

Referenced by display(), dump_waypoint(), and init_data().

Referenced by draw_rndf_t(), and dump_perimeter().

Referenced by draw_rndf_t(), and dump_segment().

Referenced by draw_rndf_t(), and dump_sign().

Referenced by draw_rndf_t(), and dump_spot().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_stop_line().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_zone().

Referenced by draw_rndf_t(), and dump_arrow().

Referenced by draw_rndf_t(), and dump_stop_line().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and init_data().

Referenced by init_data(), and load_lane_markings().

Referenced by dump_waypoint(), and init_data().

Referenced by draw_rndf_t(), and load_lane_markings().

rndf_t const* cajun::draw_rndf_t::m_rndf [private]

Referenced by draw_rndf_t(), and dump_stop_line().

Referenced by draw_rndf_t(), and dump_waypoint().

GLuint cajun::draw_rndf_t::m_textures[TEX_LAST_ITEM] [private]

Referenced by draw_rndf_t(), and load_textures().

std::string cajun::draw_rndf_t::m_textures_name[TEX_LAST_ITEM] [private]

Referenced by draw_rndf_t(), and load_textures().

unsigned cajun::draw_rndf_t::m_tmp_dl [private]

Referenced by display(), dump_waypoint(), and init_data().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_waypoint().

Referenced by draw_rndf_t(), and dump_waypoint().


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

Generated on Fri Apr 9 10:45:18 2010 for Visualizer by  doxygen 1.6.1