| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
| <title>make (3 coordinate values)</title> |
| <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> |
| <link rel="home" href="../../../../index.html" title="Chapter 1. Geometry 1.0"> |
| <link rel="up" href="../make.html" title="make"> |
| <link rel="prev" href="make_2_2_coordinate_values.html" title="make (2 coordinate values)"> |
| <link rel="next" href="make_inverse.html" title="make_inverse"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table cellpadding="2" width="100%"><tr> |
| <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> |
| <td align="center"><a href="../../../../../../../../index.html">Home</a></td> |
| <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> |
| <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> |
| <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> |
| <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="make_2_2_coordinate_values.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../make.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_inverse.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| <div class="section"> |
| <div class="titlepage"><div><div><h5 class="title"> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values"></a><a class="link" href="make_3_3_coordinate_values.html" title="make (3 coordinate values)">make |
| (3 coordinate values)</a> |
| </h5></div></div></div> |
| <p> |
| <a class="indexterm" name="id879785"></a> |
| Construct a geometry. |
| </p> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.synopsis"></a><h6> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.synopsis-heading"></a> |
| <a class="link" href="make_3_3_coordinate_values.html#geometry.reference.algorithms.make.make_3_3_coordinate_values.synopsis">Synopsis</a> |
| </h6> |
| <p> |
| |
| </p> |
| <pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Geometry</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Type</span><span class="special">></span> |
| <span class="identifier">Geometry</span> <span class="identifier">make</span><span class="special">(</span><span class="identifier">Type</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">c1</span><span class="special">,</span> <span class="identifier">Type</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">c2</span><span class="special">,</span> <span class="identifier">Type</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">c3</span><span class="special">)</span></pre> |
| <p> |
| </p> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.parameters"></a><h6> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.parameters-heading"></a> |
| <a class="link" href="make_3_3_coordinate_values.html#geometry.reference.algorithms.make.make_3_3_coordinate_values.parameters">Parameters</a> |
| </h6> |
| <div class="informaltable"><table class="table"> |
| <colgroup> |
| <col> |
| <col> |
| <col> |
| <col> |
| </colgroup> |
| <thead><tr> |
| <th> |
| <p> |
| Type |
| </p> |
| </th> |
| <th> |
| <p> |
| Concept |
| </p> |
| </th> |
| <th> |
| <p> |
| Name |
| </p> |
| </th> |
| <th> |
| <p> |
| Description |
| </p> |
| </th> |
| </tr></thead> |
| <tbody> |
| <tr> |
| <td> |
| <p> |
| Geometry |
| </p> |
| </td> |
| <td> |
| <p> |
| Any type fulfilling a Geometry Concept |
| </p> |
| </td> |
| <td> |
| <p> |
| - |
| </p> |
| </td> |
| <td> |
| <p> |
| Must be specified |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| Type const & |
| </p> |
| </td> |
| <td> |
| <p> |
| numerical type (int, double, ttmath, ...) to specify the coordinates |
| </p> |
| </td> |
| <td> |
| <p> |
| c1 |
| </p> |
| </td> |
| <td> |
| <p> |
| First coordinate (usually x-coordinate) |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| Type const & |
| </p> |
| </td> |
| <td> |
| <p> |
| numerical type (int, double, ttmath, ...) to specify the coordinates |
| </p> |
| </td> |
| <td> |
| <p> |
| c2 |
| </p> |
| </td> |
| <td> |
| <p> |
| Second coordinate (usually y-coordinate) |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| Type const & |
| </p> |
| </td> |
| <td> |
| <p> |
| numerical type (int, double, ttmath, ...) to specify the coordinates |
| </p> |
| </td> |
| <td> |
| <p> |
| c3 |
| </p> |
| </td> |
| <td> |
| <p> |
| Third coordinate (usually z-coordinate) |
| </p> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.returns"></a><h6> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.returns-heading"></a> |
| <a class="link" href="make_3_3_coordinate_values.html#geometry.reference.algorithms.make.make_3_3_coordinate_values.returns">Returns</a> |
| </h6> |
| <p> |
| The constructed geometry, here: a 3D point |
| </p> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.header"></a><h6> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.header-heading"></a> |
| <a class="link" href="make_3_3_coordinate_values.html#geometry.reference.algorithms.make.make_3_3_coordinate_values.header">Header</a> |
| </h6> |
| <p> |
| Either |
| </p> |
| <p> |
| <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> |
| </p> |
| <p> |
| Or |
| </p> |
| <p> |
| <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">algorithms</span><span class="special">/</span><span class="identifier">make</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> |
| </p> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.example"></a><h6> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.example-heading"></a> |
| <a class="link" href="make_3_3_coordinate_values.html#geometry.reference.algorithms.make.make_3_3_coordinate_values.example">Example</a> |
| </h6> |
| <p> |
| Using make to construct a three dimensional point |
| </p> |
| <p> |
| |
| </p> |
| <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span> |
| |
| <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> |
| <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">point</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> |
| |
| <span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> |
| <span class="special">{</span> |
| <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">point</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">3</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">cs</span><span class="special">::</span><span class="identifier">cartesian</span><span class="special">></span> <span class="identifier">point_type</span><span class="special">;</span> |
| <span class="identifier">point_type</span> <span class="identifier">p</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">make</span><span class="special"><</span><span class="identifier">point_type</span><span class="special">>(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> |
| <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">dsv</span><span class="special">(</span><span class="identifier">p</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> |
| <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span> |
| <span class="special">}</span> |
| |
| </pre> |
| <p> |
| </p> |
| <p> |
| Output: |
| </p> |
| <pre class="programlisting">(1, 2, 3) |
| </pre> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.see_also"></a><h6> |
| <a name="geometry.reference.algorithms.make.make_3_3_coordinate_values.see_also-heading"></a> |
| <a class="link" href="make_3_3_coordinate_values.html#geometry.reference.algorithms.make.make_3_3_coordinate_values.see_also">See |
| also</a> |
| </h6> |
| <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> |
| <a class="link" href="../assign/assign_values_4_3_coordinate_values.html" title="assign_values (3 coordinate values)">assign</a> |
| </li></ul></div> |
| </div> |
| <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> |
| <td align="left"></td> |
| <td align="right"><div class="copyright-footer">Copyright © 2011 Barend Gehrels, Bruno Lalande, Mateusz Loskot<p> |
| Distributed under the Boost Software License, Version 1.0. (See accompanying |
| file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) |
| </p> |
| </div></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="make_2_2_coordinate_values.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../make.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_inverse.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| </body> |
| </html> |