CGAL 6.0.1 - CGAL Basic Viewer
|
#include <CGAL/Graphics_scene.h>
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.
Public Member Functions | |
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 CGAL::Graphics_scene::add_line | ( | const KPoint & | p, |
const KVector & | v | ||
) |
adds the given line in the scene, defined by p
and v
as direction.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
KVector | a model of Kernel::Vector_2 or Kernel::Vector_3 . |
void CGAL::Graphics_scene::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.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
KVector | a model of Kernel::Vector_2 or Kernel::Vector_3 . |
void CGAL::Graphics_scene::add_point | ( | const KPoint & | p | ) |
adds the given point in the scene.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
void CGAL::Graphics_scene::add_point | ( | const KPoint & | p, |
const CGAL::IO::Color & | color | ||
) |
adds the given colored point in the scene.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
bool CGAL::Graphics_scene::add_point_in_face | ( | const KPoint & | kp | ) |
adds the given point in the current face.
a_face_started()
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
bool CGAL::Graphics_scene::add_point_in_face | ( | const KPoint & | kp, |
const KVector & | p_normal | ||
) |
adds the given point in the current face, having the vertex normal.
a_face_started()
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
KVector | a model of Kernel::Vector_2 or Kernel::Vector_3 . |
void CGAL::Graphics_scene::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.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
KVector | a model of Kernel::Vector_2 or Kernel::Vector_3 . |
void CGAL::Graphics_scene::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.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
KVector | a model of Kernel::Vector_2 or Kernel::Vector_3 . |
void CGAL::Graphics_scene::add_segment | ( | const KPoint & | p1, |
const KPoint & | p2 | ||
) |
adds the given segment in the scene.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
void CGAL::Graphics_scene::add_segment | ( | const KPoint & | p1, |
const KPoint & | p2, | ||
const CGAL::IO::Color & | color | ||
) |
adds the given colored segment in the scene.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
void CGAL::Graphics_scene::add_text | ( | const KPoint & | kp, |
const char * | txt | ||
) |
adds the given text at the given position in the scene.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
void CGAL::Graphics_scene::add_text | ( | const KPoint & | kp, |
const std::string & | txt | ||
) |
adds the given text at the given position in the scene.
KPoint | a model of Kernel::Point_2 , Kernel::Point_3 , Kernel::WeightedPoint_2 or Kernel::WeightedPoint_3 . |
void CGAL::Graphics_scene::face_end | ( | ) |
ends the current face.
a_face_started()