CGAL 6.1 - CGAL and the Boost Graph Library
Loading...
Searching...
No Matches

Functions

template<typename Graph , typename P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_triangle (const P &p0, const P &p1, const P &p2, Graph &g)
 creates an isolated triangle with its vertices initialized to p0, p1 and p2, and adds it to the graph g.
 
template<typename Graph , typename P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_quad (const P &p0, const P &p1, const P &p2, const P &p3, Graph &g)
 creates an isolated quad with its vertices initialized to p0, p1, p2, and p3, and adds it to the graph g.
 
template<typename Graph , typename P , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_hexahedron (const P &p0, const P &p1, const P &p2, const P &p3, const P &p4, const P &p5, const P &p6, const P &p7, Graph &g, const NamedParameters &np=parameters::default_values())
 creates an isolated hexahedron with its vertices initialized to p0, p1, ... , and p7, and adds it to the graph g.
 
template<typename IsoCuboid , typename Graph , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_hexahedron (const IsoCuboid &c, Graph &g, const NamedParameters &np=parameters::default_values())
 creates an isolated hexahedron equivalent to c, and adds it to the graph g.
 
template<typename Graph , typename P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_tetrahedron (const P &p0, const P &p1, const P &p2, const P &p3, Graph &g)
 creates an isolated tetrahedron with its vertices initialized to p0, p1, p2, and p3, and adds it to the graph g.
 
template<class Graph , class P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_regular_prism (typename boost::graph_traits< Graph >::vertices_size_type nb_vertices, Graph &g, const P &base_center=P(0, 0, 0), typename CGAL::Kernel_traits< P >::Kernel::FT height=1.0, typename CGAL::Kernel_traits< P >::Kernel::FT radius=1.0, bool is_closed=true)
 creates a triangulated regular prism, outward oriented, having nb_vertices vertices in each of its bases and adds it to the graph g.
 
template<class Graph , class P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_pyramid (typename boost::graph_traits< Graph >::vertices_size_type nb_vertices, Graph &g, const P &base_center=P(0, 0, 0), typename CGAL::Kernel_traits< P >::Kernel::FT height=1.0, typename CGAL::Kernel_traits< P >::Kernel::FT radius=1.0, bool is_closed=true)
 creates a pyramid, outward oriented, having nb_vertices vertices in its base and adds it to the graph g.
 
template<class Graph , class P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_icosahedron (Graph &g, const P &center=P(0, 0, 0), typename CGAL::Kernel_traits< P >::Kernel::FT radius=1)
 creates an icosahedron, outward oriented, centered in center and adds it to the graph g.
 
template<class Graph , class CoordinateFunctor >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_grid (typename boost::graph_traits< Graph >::vertices_size_type i, typename boost::graph_traits< Graph >::vertices_size_type j, Graph &g, const CoordinateFunctor &calculator, bool triangulated=false)
 creates a row major ordered grid with i cells along the width and j cells along the height and adds it to the graph g.
 

Function Documentation

◆ make_grid()

template<class Graph , class CoordinateFunctor >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_grid ( typename boost::graph_traits< Graph >::vertices_size_type  i,
typename boost::graph_traits< Graph >::vertices_size_type  j,
Graph &  g,
const CoordinateFunctor &  calculator,
bool  triangulated = false 
)

#include <CGAL/boost/graph/generators.h>

creates a row major ordered grid with i cells along the width and j cells along the height and adds it to the graph g.

An internal property map for CGAL::vertex_point_t must be available in Graph.

Parameters
ithe number of cells along the width.
jthe number of cells along the height.
gthe graph in which the grid will be created.
calculatorthe functor that will assign coordinates to the grid vertices.
triangulateddecides if a cell is composed of one quad or two triangles. If triangulated is true, the diagonal of each cell is oriented from (0,0) to (1,1) in the cell coordinates.
Template Parameters
CoordinateFunctora function object providing: Point_3 operator()(size_type I, size_type J), with Point_3 being the value_type of the internal property_map for CGAL::vertex_point_t and outputs an object of type boost::property_traits<boost::property_map<Graph,CGAL::vertex_point_t>::type>::value_type. It will be called with arguments (w, h), with w in [0..i] and h in [0..j].
Default: a point with positive integer coordinates (w, h, 0), with w in [0..i] and h in [0..j]
Returns
the non-border non-diagonal halfedge that has the target vertex associated with the first point of the grid (default is (0,0,0) ).

◆ make_hexahedron() [1/2]

template<typename IsoCuboid , typename Graph , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_hexahedron ( const IsoCuboid &  c,
Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/generators.h>

creates an isolated hexahedron equivalent to c, and adds it to the graph g.

Returns
the halfedge that has the target vertex associated with c.min(), aligned with x-axis, in the bottom face of the cuboid.
Template Parameters
IsoCuboida model of IsoCuboid_3
Grapha model of MutableFaceGraph
NamedParametersa sequence of Named Parameters
Parameters
cthe iso-cuboid describing the geometry of the hexahedron
gthe graph to which the hexahedron will be appended
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a Boolean used to specify whether the hexadron's faces should be triangulated or not. The default value is true, and faces are not triangulated.
  • Default: true
  • an instance of a geometric traits class model of Kernel.

◆ make_hexahedron() [2/2]

template<typename Graph , typename P , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_hexahedron ( const P &  p0,
const P &  p1,
const P &  p2,
const P &  p3,
const P &  p4,
const P &  p5,
const P &  p6,
const P &  p7,
Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/generators.h>

creates an isolated hexahedron with its vertices initialized to p0, p1, ... , and p7, and adds it to the graph g.

Returns
the halfedge that has the target vertex associated with p0, in the face with the vertices with the points p0, p1, p2, and p3 (or p0, p2 and p3 when do_not_triangulate is set to false).
Template Parameters
NamedParametersa sequence of Named Parameters
Parameters
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a Boolean used to specify whether the hexadron's faces should be triangulated or not. The default value is true, and faces are not triangulated.
  • Default: true
Examples
BGL_surface_mesh/gwdwg.cpp.

◆ make_icosahedron()

template<class Graph , class P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_icosahedron ( Graph &  g,
const P &  center = P(0,0,0),
typename CGAL::Kernel_traits< P >::Kernel::FT  radius = 1 
)

#include <CGAL/boost/graph/generators.h>

creates an icosahedron, outward oriented, centered in center and adds it to the graph g.

Parameters
gthe graph in which the icosahedron will be created.
centerthe center of the sphere in which the icosahedron is inscribed.
radiusthe radius of the sphere in which the icosahedron is inscribed.
Returns
the halfedge that has the target vertex associated with the first point in the first face.

◆ make_pyramid()

template<class Graph , class P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_pyramid ( typename boost::graph_traits< Graph >::vertices_size_type  nb_vertices,
Graph &  g,
const P &  base_center = P(0,0,0),
typename CGAL::Kernel_traits< P >::Kernel::FT  height = 1.0,
typename CGAL::Kernel_traits< P >::Kernel::FT  radius = 1.0,
bool  is_closed = true 
)

#include <CGAL/boost/graph/generators.h>

creates a pyramid, outward oriented, having nb_vertices vertices in its base and adds it to the graph g.

If center is (0, 0, 0), then the first point of the base is (radius, 0, 0)

Parameters
nb_verticesthe number of vertices in the base. It must be greater than or equal to 3.
gthe graph in which the pyramid will be created
base_centerthe center of the circle in which the base is inscribed.
heightthe distance between the base and the apex.
radiusthe radius of the circle in which the base is inscribed.
is_closeddetermines if the base must be created or not. If is_closed is true, center is a vertex.
Returns
the halfedge that has the target vertex associated with the apex point in the first face.

◆ make_quad()

template<typename Graph , typename P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_quad ( const P &  p0,
const P &  p1,
const P &  p2,
const P &  p3,
Graph &  g 
)

#include <CGAL/boost/graph/generators.h>

creates an isolated quad with its vertices initialized to p0, p1, p2, and p3, and adds it to the graph g.

Returns
the non-border halfedge that has the target vertex associated with p0.
Examples
BGL_surface_mesh/write_inp.cpp.

◆ make_regular_prism()

template<class Graph , class P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_regular_prism ( typename boost::graph_traits< Graph >::vertices_size_type  nb_vertices,
Graph &  g,
const P &  base_center = P(0,0,0),
typename CGAL::Kernel_traits< P >::Kernel::FT  height = 1.0,
typename CGAL::Kernel_traits< P >::Kernel::FT  radius = 1.0,
bool  is_closed = true 
)

#include <CGAL/boost/graph/generators.h>

creates a triangulated regular prism, outward oriented, having nb_vertices vertices in each of its bases and adds it to the graph g.

If center is (0, 0, 0), then the first point of the prism is (radius, height, 0)

Parameters
nb_verticesthe number of vertices per base. It must be greater than or equal to 3.
gthe graph in which the regular prism will be created.
base_centerthe center of the circle in which the lower base is inscribed.
heightthe distance between the two bases.
radiusthe radius of the circles in which the bases are inscribed.
is_closeddetermines if the bases must be created or not. If is_closed is true, center is a vertex.
Returns
the halfedge that has the target vertex associated with the first point in the first face.

◆ make_tetrahedron()

template<typename Graph , typename P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_tetrahedron ( const P &  p0,
const P &  p1,
const P &  p2,
const P &  p3,
Graph &  g 
)

#include <CGAL/boost/graph/generators.h>

creates an isolated tetrahedron with its vertices initialized to p0, p1, p2, and p3, and adds it to the graph g.

Returns
the halfedge that has the target vertex associated with p0, in the face with the vertices with the points p0, p1, and p2.

◆ make_triangle()

template<typename Graph , typename P >
boost::graph_traits< Graph >::halfedge_descriptor CGAL::make_triangle ( const P &  p0,
const P &  p1,
const P &  p2,
Graph &  g 
)

#include <CGAL/boost/graph/generators.h>

creates an isolated triangle with its vertices initialized to p0, p1 and p2, and adds it to the graph g.

Returns
the non-border halfedge that has the target vertex associated with p0.
Examples
Polyhedron/poly_derivation.cpp, Property_map/dynamic_properties.cpp, and Surface_mesh/sm_derivation.cpp.