|
|
Unless otherwise noted all functions in this class section are callable from:
|
| virtual void | set_line_width (float width) |
| | Sets the current width of lines drawn by the painter. More...
|
| |
| virtual void | set_pen_color (float red, float green, float blue, float alpha=1.0f) |
| | Sets the color of the default pen. More...
|
| |
| virtual void | set_pen2_color (float red, float green, float blue, float alpha=1.0f) |
| | Sets the color of the secondary pen. More...
|
| |
| virtual void | set_brush_color (float red, float green, float blue, float alpha=1.0f) |
| | Sets the color of the brush. More...
|
| |
|
| virtual void | get_viewport_size (float *width, float *height) |
| | Fills out the width and height arguments with the dimensions of the primary 3D view. More...
|
| |
| virtual void | world_to_screen (float world_x, float world_y, float world_z, float *view_x, float *view_y, float *view_z) |
| | This function converts a world (x, y, z) coordinate into a view (x, y, z) coordinate. More...
|
| |
|
In all 3D draw functions, if there are edges to be drawn they are drawn with the current pen color as set by set_pen_color().
If there is an area to be filled it will be filled with the current brush color, as set by set_brush_color().
Unless otherwise noted all functions in this class section are callable from:
|
| virtual void | draw_line (float x1, float y1, float z1, float x2, float y2, float z2) |
| | Draws a line from (x1, y1, z1) to (x2, y2, z2) using the pen color. More...
|
| |
| virtual void | draw_line_2c (float x1, float y1, float z1, float x2, float y2, float z2) |
| | Draws a line from (x1, y1, z1) to (x2, y2, z2) using both of the pen colors. More...
|
| |
| virtual void | draw_sphere (float x, float y, float z, float radius, int draw_edges=1, int draw_fill=1) |
| | Draws a sphere with its center at (x, y, z), with radius radius. More...
|
| |
| virtual void | draw_box (float x1, float y1, float z1, float x2, float y2, float z2, int draw_edges=1, int draw_fill=1) |
| | Draws an axis aligned bounding box with one corner at (x1, y1, z1), the other at (x2, y2, z2). More...
|
| |
| virtual void | draw_rotated_box (float x1, float y1, float z1, float x2, float y2, float z2, float yaw, float roll, float pitch, float xc, float yc, float zc, int edges=1, int fill=1) |
| | Draws a rotated bounding box with one corner at unrotated (x1, y1, z1), and another at unrotated (x2, y2, z2), applying the rotation Euler angles (given in BDI_EULER_ANGLE_ORDER_ZXY order in degrees). More...
|
| |
| virtual void | draw_arrow (float x1, float y1, float z1, float x2, float y2, float z2, float shaft_width=0.02, float arrow_width=0.05, int draw_edges=1, int draw_fill=1) |
| | Draws an arrow from (x1, y1, z1) to (x2, y2, z2). More...
|
| |
| virtual void | draw_disc (float x, float y, float z, float radius, int draw_edges=1, int draw_fill=1, int num_sides=12) |
| | Draws a disc with its center at (x, y, z), and the given radius. More...
|
| |
| virtual void | draw_circle (float x, float y, float z, float normal_x, float normal_y, float normal_z, float radius, int draw_edges=1, int draw_fill=1, int num_sides=12) |
| | Draws a circle at (x, y, z), with normal (normal_x, normal_y, normal_z), and the given radius. More...
|
| |
| virtual void | draw_torus (float x, float y, float z, float inner_radius, float outer_radius, int draw_edges=1, int draw_fill=1, int num_sides=12) |
| | Draws a torus at (x, y, z), with normal (normal_x, normal_y, normal_z), and the given radius. More...
|
| |
| virtual void | draw_cylinder (float x, float y, float z, float radius, float height, int draw_edges=1, int draw_fill=1) |
| | Draws a Z-axis-up cylinder, with its bottom cap centered at (x1, y1, z). More...
|
| |
| virtual void | draw_wedge (float x, float y, float z, float target_x, float target_y, float target_z, float inner_radius, float width, int draw_edges=1, int draw_fill=1) |
| | Draws wedge. More...
|
| |
| virtual void | draw_wedge_with_normal (float x, float y, float z, float target_x, float target_y, float target_z, float nx, float ny, float nz, float inner_radius, float width, int draw_edges=1, int draw_fill=1) |
| |
|
Before 2D drawing functions are called the view must be put into a 2D drawing state by calling begin_2d_text_mode().
Unless otherwise noted all functions in this class section are callable from:
|
| virtual void | begin_2d_mode () |
| | Puts the OpenGL view matrix into a 2D orthogonal state so that 2D primitives will be drawn in 2D view coordinates rather than in 3D world coordinates. More...
|
| |
| virtual void | begin_2d_text_mode () |
| | same as begin_2d_mode() but also binds font texture More...
|
| |
| virtual void | end_2d_text_mode () |
| | Returns the OpenGL view matrix back into a 3D perspective state. More...
|
| |
| virtual void | draw_text (float screen_x, float screen_y, const char *text) |
| | Draws the passed text string at view coordinates (x, y). More...
|
| |
| virtual void | draw_2d_rect (float x0, float y0, float x1, float y1, float z0=0.0f, int draw_edges=1, int draw_fill=1) |
| | Draws a 2D rectangle with the given points as the corners. More...
|
| |
| virtual void | draw_buffered_data () |
| | draws queued up buffer of data More...
|
| |
| virtual void | draw_private_path_shape (diguyCharacter *diguy_character, int include_waypoints=0) |
| | Draws a character's private path shape, typically generated from path planner. More...
|
| |
| virtual void | debug_pa_add_2d_point (const char *name, float x, float y) |
| |
| virtual void | debug_pa_add_3d_point (const char *name, float x, float y, float z) |
| |
| virtual void | debug_pa_set_param_color (const char *name, float r, float g, float b, float a=1.0f) |
| |
| virtual void | debug_pa_set_param_style (const char *name, const char *param, int value) |
| |
| virtual void | debug_pa_reset (const char *name) |
| | reset point array More...
|
| |
| virtual void | draw_point_arrays () |
| |
| virtual void | draw_opengl_primitive (diguyGraphicsShaderProgram *shader, int primitive_type, int vertex_count, float *verts, float *colors=NULL, float *normals=NULL, float *uvs=NULL) |
| |
| virtual void | draw_opengl_primitive (int primative_type, int vertex_count, float *verts, float *colors=NULL, float *normals=NULL, float *uvs=NULL) |
| |
The diguyViewPainter class acts as a helper for drawing various graphics primitives in DI-Guy Scenario 3D views.
Currently this class is only supported in DI-Guy Scenario, and should be utilized only inside of a diguyScenario::CALLBACK_ID_POST_DRAW callback, or inside of a mind draw function.
There is only one diguyViewPainter. Retrieve a pointer to it by calling diguyApp::get_view_painter().
Link against: libdiguy