make (3 coordinate values)

| Home | Libraries | People | FAQ | More

##### make (3 coordinate values)

Construct a geometry.

###### Synopsis

    template<typename Geometry, typename Type>
    Geometry make(Type const & c1, Type const & c2, Type const & c3)

###### Parameters

Type | Concept | Name | Description
--- | --- | --- | ---
Geometry | Any type fulfilling a Geometry Concept | - | Must be specified
Type const & | numerical type (int, double, ttmath, ...) to specify the coordinates | c1 | First coordinate (usually x-coordinate)
Type const & | numerical type (int, double, ttmath, ...) to specify the coordinates | c2 | Second coordinate (usually y-coordinate)
Type const & | numerical type (int, double, ttmath, ...) to specify the coordinates | c3 | Third coordinate (usually z-coordinate)

###### Returns

The constructed geometry, here: a 3D point

###### Header

Either

`#include <boost/geometry.hpp>`

Or

`#include <boost/geometry/algorithms/make.hpp>`

###### Example

Using make to construct a three dimensional point

    #include <iostream>

    #include <boost/geometry.hpp>
    #include <boost/geometry/geometries/point.hpp>

    int main()
    {
        typedef boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> point_type;
        point_type p = boost::geometry::make<point_type>(1, 2, 3);
        std::cout << boost::geometry::dsv(p) << std::endl;
        return 0;
    }

Output:

    (1, 2, 3)

###### See also

- assign