The class Graphics_scene stores points, segments, triangles, rays, and lines.
Elements can be added, possibly with associated colors. Non triangular faces can be directly added and are triangulated internally.
- Examples
- Basic_viewer/draw_mesh_and_points.cpp, Basic_viewer/draw_several_windows.cpp, and Basic_viewer/draw_surface_mesh_small_faces.cpp.
|
| template<typename KPoint > |
| void | add_point (const KPoint &p) |
| | adds the given point in the scene.
|
| |
| template<typename KPoint > |
| void | add_point (const KPoint &p, const CGAL::IO::Color &color) |
| | adds the given colored point in the scene.
|
| |
| template<typename KPoint > |
| void | add_segment (const KPoint &p1, const KPoint &p2) |
| | adds the given segment in the scene.
|
| |
| template<typename KPoint > |
| void | add_segment (const KPoint &p1, const KPoint &p2, const CGAL::IO::Color &color) |
| | adds the given colored segment in the scene.
|
| |
| template<typename KPoint , typename KVector > |
| void | add_ray (const KPoint &p, const KVector &v) |
| | adds the given ray in the scene: a half line starting from p and having v as direction.
|
| |
| template<typename KPoint , typename KVector > |
| void | add_ray (const KPoint &p, const KVector &v, const CGAL::IO::Color &color) |
| | adds the given colored ray in the scene: a half line starting from p and having v as direction.
|
| |
| template<typename KPoint , typename KVector > |
| void | add_line (const KPoint &p, const KVector &v) |
| | adds the given line in the scene, defined by p and v as direction.
|
| |
| template<typename KPoint , typename KVector > |
| void | add_line (const KPoint &p, const KVector &v, const CGAL::IO::Color &color) |
| | adds the given colored line in the scene, defined by p and v as direction.
|
| |
|
void | face_begin () |
| | starts a new face.
|
| |
|
void | face_begin (const CGAL::IO::Color &color) |
| | starts a new colored face.
|
| |
|
bool | a_face_started () const |
| | return true iff a face is started.
|
| |
| template<typename KPoint > |
| bool | add_point_in_face (const KPoint &kp) |
| | adds the given point in the current face.
|
| |
| template<typename KPoint , typename KVector > |
| bool | add_point_in_face (const KPoint &kp, const KVector &p_normal) |
| | adds the given point in the current face, having the vertex normal.
|
| |
| void | face_end () |
| | ends the current face.
|
| |
| template<typename KPoint > |
| void | add_text (const KPoint &kp, const char *txt) |
| | adds the given text at the given position in the scene.
|
| |
| template<typename KPoint > |
| void | add_text (const KPoint &kp, const std::string &txt) |
| | adds the given text at the given position in the scene.
|
| |
|
bool | empty () const |
| | returns true iff the scene has no element.
|
| |
|
void | clear () |
| | clears the scene, i.e., removes all points, segments, triangles, and text.
|
| |
|
const CGAL::Bbox_3 & | bounding_box () const |
| | returns the bounding box of all the elements in the scene.
|
| |
|
bool | is_two_dimensional () const |
| | returns true if the scene is in 2D, i.e., lies on the XY or XZ or YZ plane.
|
| |
|
void | set_default_color_face (const CGAL::IO::Color &c) |
| | set the default color of faces
|
| |
|
void | set_default_color_point (const CGAL::IO::Color &c) |
| | set the default color of points
|
| |
|
void | set_default_color_segment (const CGAL::IO::Color &c) |
| | set the default color of segments
|
| |
|
void | set_default_color_ray (const CGAL::IO::Color &c) |
| | set the default color of rays
|
| |
|
void | set_default_color_line (const CGAL::IO::Color &c) |
| | set the default color of lines
|
| |
|
const CGAL::IO::Color & | get_default_color_face () const |
| | returns the default color of faces
|
| |
|
const CGAL::IO::Color & | get_default_color_point () const |
| | returns the default color of points
|
| |
|
const CGAL::IO::Color & | get_default_color_segment () const |
| | returns the default color of segments
|
| |
|
const CGAL::IO::Color & | get_default_color_ray () const |
| | returns the default color of rays
|
| |
|
const CGAL::IO::Color & | get_default_color_line () const |
| | returns the default color of lines
|
| |