Файловый менеджер - Редактировать - /usr/share/doc/imath-devel/html/classes/Box.html
�азад
<!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Box — Imath Documentation</title> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/bizstyle.css" type="text/css" /> <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <script src="../_static/bizstyle.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Color3" href="Color3.html" /> <link rel="prev" title="Floating Point Representation" href="../float.html" /> <meta name="viewport" content="width=device-width,initial-scale=1.0" /> <!--[if lt IE 9]> <script src="_static/css3-mediaqueries.js"></script> <![endif]--> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="Color3.html" title="Color3" accesskey="N">next</a> |</li> <li class="right" > <a href="../float.html" title="Floating Point Representation" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Imath</a> »</li> <li class="nav-item nav-item-this"><a href="">Box</a></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="box"> <h1>Box<a class="headerlink" href="#box" title="Permalink to this headline">¶</a></h1> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#include <Imath/ImathBox.h></span> </pre></div> </div> <p>The <code class="docutils literal notranslate"><span class="pre">Box</span></code> class template represents 2D and 3D axis-aligned bounding boxes, with predefined typedefs for boxes of type <code class="docutils literal notranslate"><span class="pre">short</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">int64_t</span></code>, <code class="docutils literal notranslate"><span class="pre">float</span></code>, and <code class="docutils literal notranslate"><span class="pre">double</span></code>.</p> <p>The box is defined by minimum and maximum values along each axis, represented by <code class="docutils literal notranslate"><span class="pre">Vec2<T></span></code> for the <code class="docutils literal notranslate"><span class="pre">Box2</span></code> types and by <code class="docutils literal notranslate"><span class="pre">Vec3<T></span></code> for <code class="docutils literal notranslate"><span class="pre">Box3</span></code> types.</p> <p>There are also various utility functions that operate on bounding boxes defined in <code class="docutils literal notranslate"><span class="pre">ImathBoxAlgo.h</span></code> and described in <a class="reference internal" href="../functions/box.html#box-functions"><span class="std std-ref">Box Functions</span></a>.</p> <p>Example:</p> <div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="cp">#include</span> <span class="cpf"><Imath/ImathBox.h></span><span class="cp"></span> <span class="kt">void</span> <span class="nf">box_example</span><span class="p">()</span> <span class="p">{</span> <span class="n">Imath</span><span class="o">::</span><span class="n">V3f</span> <span class="n">a</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span> <span class="n">Imath</span><span class="o">::</span><span class="n">V3f</span> <span class="n">b</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span> <span class="n">Imath</span><span class="o">::</span><span class="n">V3f</span> <span class="n">c</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">2</span><span class="p">);</span> <span class="n">Imath</span><span class="o">::</span><span class="n">Box3f</span> <span class="n">box</span> <span class="p">(</span><span class="n">a</span><span class="p">);</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">isEmpty</span><span class="p">());</span> <span class="n">assert</span> <span class="p">(</span><span class="o">!</span><span class="n">box</span><span class="p">.</span><span class="n">isInfinite</span><span class="p">());</span> <span class="n">assert</span> <span class="p">(</span><span class="o">!</span><span class="n">box</span><span class="p">.</span><span class="n">hasVolume</span><span class="p">());</span> <span class="n">box</span><span class="p">.</span><span class="n">extendBy</span> <span class="p">(</span><span class="n">c</span><span class="p">);</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">size</span><span class="p">()</span> <span class="o">==</span> <span class="p">(</span><span class="n">c</span><span class="o">-</span><span class="n">a</span><span class="p">));</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">intersects</span> <span class="p">(</span><span class="n">b</span><span class="p">));</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">max</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">></span> <span class="n">box</span><span class="p">.</span><span class="n">min</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">max</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">></span> <span class="n">box</span><span class="p">.</span><span class="n">min</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">max</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">></span> <span class="n">box</span><span class="p">.</span><span class="n">min</span><span class="p">[</span><span class="mi">2</span><span class="p">]);</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">hasVolume</span><span class="p">());</span> <span class="n">assert</span> <span class="p">(</span><span class="n">box</span><span class="p">.</span><span class="n">majorAxis</span><span class="p">()</span> <span class="o">==</span> <span class="mi">1</span><span class="p">);</span> <span class="p">}</span> </pre></div> </div> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box2sE"> <span id="_CPPv3N5Imath5Box2sE"></span><span id="_CPPv2N5Imath5Box2sE"></span><span id="Imath::Box2s"></span><span class="target" id="_imath_box_8h_1a57703beab0354e4e66e091df0860b127"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4N5Imath3V2sE" title="Imath::V2s">V2s</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box2s</code><a class="headerlink" href="#_CPPv4N5Imath5Box2sE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>2D box of base type <code class="docutils literal notranslate"><span class="pre">short</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box2iE"> <span id="_CPPv3N5Imath5Box2iE"></span><span id="_CPPv2N5Imath5Box2iE"></span><span id="Imath::Box2i"></span><span class="target" id="_imath_box_8h_1adcce6d5d95603d8126abc2535a225c07"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4N5Imath3V2iE" title="Imath::V2i">V2i</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box2i</code><a class="headerlink" href="#_CPPv4N5Imath5Box2iE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>2D box of base type <code class="docutils literal notranslate"><span class="pre">int</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath7Box2i64E"> <span id="_CPPv3N5Imath7Box2i64E"></span><span id="_CPPv2N5Imath7Box2i64E"></span><span id="Imath::Box2i64"></span><span class="target" id="_imath_box_8h_1a562abdf9b347da198e1c792b30623cf5"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4N5Imath5V2i64E" title="Imath::V2i64">V2i64</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box2i64</code><a class="headerlink" href="#_CPPv4N5Imath7Box2i64E" title="Permalink to this definition">¶</a><br /></dt> <dd><p>2D box of base type <code class="docutils literal notranslate"><span class="pre">int64_t</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box2fE"> <span id="_CPPv3N5Imath5Box2fE"></span><span id="_CPPv2N5Imath5Box2fE"></span><span id="Imath::Box2f"></span><span class="target" id="_imath_box_8h_1a31faf787d87e034be7a0291518308029"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4N5Imath3V2fE" title="Imath::V2f">V2f</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box2f</code><a class="headerlink" href="#_CPPv4N5Imath5Box2fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>2D box of base type <code class="docutils literal notranslate"><span class="pre">float</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box2dE"> <span id="_CPPv3N5Imath5Box2dE"></span><span id="_CPPv2N5Imath5Box2dE"></span><span id="Imath::Box2d"></span><span class="target" id="_imath_box_8h_1aa2cce1f329668cbcebbbb8b28431895a"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4N5Imath3V2dE" title="Imath::V2d">V2d</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box2d</code><a class="headerlink" href="#_CPPv4N5Imath5Box2dE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>2D box of base type <code class="docutils literal notranslate"><span class="pre">double</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box3sE"> <span id="_CPPv3N5Imath5Box3sE"></span><span id="_CPPv2N5Imath5Box3sE"></span><span id="Imath::Box3s"></span><span class="target" id="_imath_box_8h_1a92c416a7971d2c6b7b5eae64cad47a5f"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4N5Imath3V3sE" title="Imath::V3s">V3s</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box3s</code><a class="headerlink" href="#_CPPv4N5Imath5Box3sE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>3D box of base type <code class="docutils literal notranslate"><span class="pre">short</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box3iE"> <span id="_CPPv3N5Imath5Box3iE"></span><span id="_CPPv2N5Imath5Box3iE"></span><span id="Imath::Box3i"></span><span class="target" id="_imath_box_8h_1a4daac4516c0544b3df4ef03b581ca5a3"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4N5Imath3V3iE" title="Imath::V3i">V3i</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box3i</code><a class="headerlink" href="#_CPPv4N5Imath5Box3iE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>3D box of base type <code class="docutils literal notranslate"><span class="pre">int</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath7Box3i64E"> <span id="_CPPv3N5Imath7Box3i64E"></span><span id="_CPPv2N5Imath7Box3i64E"></span><span id="Imath::Box3i64"></span><span class="target" id="_imath_box_8h_1a14baa1c54f517c5723adfa423be81a50"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4N5Imath5V3i64E" title="Imath::V3i64">V3i64</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box3i64</code><a class="headerlink" href="#_CPPv4N5Imath7Box3i64E" title="Permalink to this definition">¶</a><br /></dt> <dd><p>3D box of base type <code class="docutils literal notranslate"><span class="pre">int64_t</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box3fE"> <span id="_CPPv3N5Imath5Box3fE"></span><span id="_CPPv2N5Imath5Box3fE"></span><span id="Imath::Box3f"></span><span class="target" id="_imath_box_8h_1a75fd63cabf8400a7c793a5d884fa30a2"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4N5Imath3V3fE" title="Imath::V3f">V3f</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box3f</code><a class="headerlink" href="#_CPPv4N5Imath5Box3fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>3D box of base type <code class="docutils literal notranslate"><span class="pre">float</span></code>. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5Box3dE"> <span id="_CPPv3N5Imath5Box3dE"></span><span id="_CPPv2N5Imath5Box3dE"></span><span id="Imath::Box3d"></span><span class="target" id="_imath_box_8h_1ae4a96869d25989017a917b361ec2c399"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4N5Imath3V3dE" title="Imath::V3d">V3d</a>> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box3d</code><a class="headerlink" href="#_CPPv4N5Imath5Box3dE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>3D box of base type <code class="docutils literal notranslate"><span class="pre">double</span></code>. </p> </dd></dl> <dl class="cpp class"> <dt id="_CPPv4I0EN5Imath3BoxE"> <span id="_CPPv3I0EN5Imath3BoxE"></span><span id="_CPPv2I0EN5Imath3BoxE"></span>template<class <code class="sig-name descname">V</code>><br /><span class="target" id="class_imath_1_1_box"></span><em class="property">class </em><code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box</code><a class="headerlink" href="#_CPPv4I0EN5Imath3BoxE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The <code class="docutils literal notranslate"><a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref"><span class="pre">Box</span></span></a><span class="pre"><V></span></code> template represents an axis-aligned bounding box defined by minimum and maximum values of type <code class="docutils literal notranslate"><span class="pre">V</span></code>. </p> <p>The <code class="docutils literal notranslate"><span class="pre">min</span></code> and <code class="docutils literal notranslate"><span class="pre">max</span></code> members are public.</p> <p>The type <code class="docutils literal notranslate"><span class="pre">V</span></code> is typically an Imath vector (i.e. <code class="docutils literal notranslate"><span class="pre">V2i</span></code>, <code class="docutils literal notranslate"><span class="pre">V3f</span></code>, etc) and must implement an index <code class="docutils literal notranslate"><span class="pre">operator[]</span></code> that returns a type (typically as scalar) that supports assignment, comparison, and arithmetic operators.</p> <p><code class="docutils literal notranslate"><span class="pre">V</span></code> must also provide a constructor that takes a float and/or double for use in initializing the box.</p> <p><code class="docutils literal notranslate"><span class="pre">V</span></code> must also provide a function <code class="docutils literal notranslate"><span class="pre">V::dimensions()</span></code> which returns the number of dimensions in the class (since its assumed its a vector) preferably, this returns a constant expression, typically 2 or 3. </p> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Direct access to bounds</p> <dl class="cpp var"> <dt id="_CPPv4N5Imath3Box3minE"> <span id="_CPPv3N5Imath3Box3minE"></span><span id="_CPPv2N5Imath3Box3minE"></span><span id="Imath::Box::min__V"></span><span class="target" id="class_imath_1_1_box_1add0750b2e5c9aca196ed029b28ac8575"></span><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> <code class="sig-name descname">min</code><a class="headerlink" href="#_CPPv4N5Imath3Box3minE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The minimum value of the box. </p> </dd></dl> <dl class="cpp var"> <dt id="_CPPv4N5Imath3Box3maxE"> <span id="_CPPv3N5Imath3Box3maxE"></span><span id="_CPPv2N5Imath3Box3maxE"></span><span id="Imath::Box::max__V"></span><span class="target" id="class_imath_1_1_box_1a91a2038daa06439c0ede66c98ac47186"></span><a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> <code class="sig-name descname">max</code><a class="headerlink" href="#_CPPv4N5Imath3Box3maxE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The maximum value of the box. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Constructors</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath3Box3BoxEv"> <span id="_CPPv3N5Imath3Box3BoxEv"></span><span id="_CPPv2N5Imath3Box3BoxEv"></span><span id="Imath::Box::BoxCE"></span><span class="target" id="class_imath_1_1_box_1adf0d7c515326d6efcd2b7654edca1e3e"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3Box3BoxEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct an empty bounding box. </p> <p>This initializes the mimimum to <code class="docutils literal notranslate"><span class="pre">std::numeric_limits<V::baseType>::max()</span></code> and the maximum to <code class="docutils literal notranslate"><span class="pre">std::numeric_limits<V::baseType>::lowest()</span></code>. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3Box3BoxERK1V"> <span id="_CPPv3N5Imath3Box3BoxERK1V"></span><span id="_CPPv2N5Imath3Box3BoxERK1V"></span><span id="Imath::Box::Box__VCRCE"></span><span class="target" id="class_imath_1_1_box_1a3d867c26d5026c27cb72377133b1611c"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> &<em>point</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3Box3BoxERK1V" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct a bounding box that contains a single point. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3Box3BoxERK1VRK1V"> <span id="_CPPv3N5Imath3Box3BoxERK1VRK1V"></span><span id="_CPPv2N5Imath3Box3BoxERK1VRK1V"></span><span id="Imath::Box::Box__VCR.VCRCE"></span><span class="target" id="class_imath_1_1_box_1a7a1928306d6e35c053440a5739ba0da3"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> &<em>minV</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> &<em>maxV</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3Box3BoxERK1VRK1V" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct a bounding box with the given minimum and maximum values. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Comparison</p> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxeqERK3BoxI1VE"> <span id="_CPPv3NK5Imath3BoxeqERK3BoxI1VE"></span><span id="_CPPv2NK5Imath3BoxeqERK3BoxI1VE"></span><span id="Imath::Box::eq-operator__Box:V:CRCCE"></span><span class="target" id="class_imath_1_1_box_1ab2fff67c7d1566a5dc1abd2ac7546237"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator==</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a>> &<em>src</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxeqERK3BoxI1VE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Equality. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxneERK3BoxI1VE"> <span id="_CPPv3NK5Imath3BoxneERK3BoxI1VE"></span><span id="_CPPv2NK5Imath3BoxneERK3BoxI1VE"></span><span id="Imath::Box::neq-operator__Box:V:CRCCE"></span><span class="target" id="class_imath_1_1_box_1a3a6b2710214e86ce72cb00817f765c0a"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator!=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a>> &<em>src</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxneERK3BoxI1VE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Inequality. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Manipulation</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath3Box9makeEmptyEv"> <span id="_CPPv3N5Imath3Box9makeEmptyEv"></span><span id="_CPPv2N5Imath3Box9makeEmptyEv"></span><span id="Imath::Box::makeEmpty"></span><span class="target" id="class_imath_1_1_box_1abad336813c67605736401b6a07dfc474"></span><em class="property">inline</em> void <code class="sig-name descname">makeEmpty</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3Box9makeEmptyEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Set the box to be empty. </p> <p>A box is empty if the mimimum is greater than the maximum. <a class="reference internal" href="#class_imath_1_1_box_1abad336813c67605736401b6a07dfc474"><span class="std std-ref">makeEmpty()</span></a> sets the mimimum to <code class="docutils literal notranslate"><span class="pre">V::baseTypeMax()</span></code> and the maximum to <code class="docutils literal notranslate"><span class="pre">V::baseTypeLowest()</span></code>. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3Box8extendByERK1V"> <span id="_CPPv3N5Imath3Box8extendByERK1V"></span><span id="_CPPv2N5Imath3Box8extendByERK1V"></span><span id="Imath::Box::extendBy__VCR"></span><span class="target" id="class_imath_1_1_box_1a1f4132f453bebec749f1de24a7158cd7"></span><em class="property">inline</em> void <code class="sig-name descname">extendBy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> &<em>point</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3Box8extendByERK1V" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Extend the box to include the given point. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3Box8extendByERK3BoxI1VE"> <span id="_CPPv3N5Imath3Box8extendByERK3BoxI1VE"></span><span id="_CPPv2N5Imath3Box8extendByERK3BoxI1VE"></span><span id="Imath::Box::extendBy__Box:V:CR"></span><span class="target" id="class_imath_1_1_box_1a36d5ad660d7c910a7ab3676a64b770ba"></span><em class="property">inline</em> void <code class="sig-name descname">extendBy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a>> &<em>box</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3Box8extendByERK3BoxI1VE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Extend the box to include the given box. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3Box12makeInfiniteEv"> <span id="_CPPv3N5Imath3Box12makeInfiniteEv"></span><span id="_CPPv2N5Imath3Box12makeInfiniteEv"></span><span id="Imath::Box::makeInfinite"></span><span class="target" id="class_imath_1_1_box_1ab21019346305b0a0ddcaac7c17bb7baa"></span><em class="property">inline</em> void <code class="sig-name descname">makeInfinite</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3Box12makeInfiniteEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Make the box include the entire range of <code class="docutils literal notranslate"><span class="pre">V</span></code>. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Query</p> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box4sizeEv"> <span id="_CPPv3NK5Imath3Box4sizeEv"></span><span id="_CPPv2NK5Imath3Box4sizeEv"></span><span id="Imath::Box::sizeCCE"></span><span class="target" id="class_imath_1_1_box_1a20cd8221b4162c9fb444a6579358a63f"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> <code class="sig-name descname">size</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box4sizeEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the size of the box. </p> <p>The size is of type <code class="docutils literal notranslate"><span class="pre">V</span></code>, defined as <code class="docutils literal notranslate"><span class="pre">(max-min)</span></code>. An empty box has a size of <code class="docutils literal notranslate"><span class="pre">V(0)</span></code>, i.e. 0 in each dimension. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box6centerEv"> <span id="_CPPv3NK5Imath3Box6centerEv"></span><span id="_CPPv2NK5Imath3Box6centerEv"></span><span id="Imath::Box::centerCCE"></span><span class="target" id="class_imath_1_1_box_1a16090457da328b4a8bc3f1db1ac6f76c"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> <code class="sig-name descname">center</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box6centerEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the center of the box. </p> <p>The center is defined as <code class="docutils literal notranslate"><span class="pre">(max+min)/2</span></code>. The center of an empty box is undefined. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box10intersectsERK1V"> <span id="_CPPv3NK5Imath3Box10intersectsERK1V"></span><span id="_CPPv2NK5Imath3Box10intersectsERK1V"></span><span id="Imath::Box::intersects__VCRCCE"></span><span class="target" id="class_imath_1_1_box_1a4db26cb372ad5d814f2f80bc23c37ecb"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">intersects</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a> &<em>point</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box10intersectsERK1V" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the given point is inside the box, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box10intersectsERK3BoxI1VE"> <span id="_CPPv3NK5Imath3Box10intersectsERK3BoxI1VE"></span><span id="_CPPv2NK5Imath3Box10intersectsERK3BoxI1VE"></span><span id="Imath::Box::intersects__Box:V:CRCCE"></span><span class="target" id="class_imath_1_1_box_1a1d29d6e7427c97c2da4efffc33cb21c4"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">intersects</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box">Box</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxE" title="Imath::Box::V">V</a>> &<em>box</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box10intersectsERK3BoxI1VE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the given box is inside the box, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box9majorAxisEv"> <span id="_CPPv3NK5Imath3Box9majorAxisEv"></span><span id="_CPPv2NK5Imath3Box9majorAxisEv"></span><span id="Imath::Box::majorAxisCCE"></span><span class="target" id="class_imath_1_1_box_1a2fbfe41363fdef307ab114ef0577c22c"></span><em class="property">inline</em> <em class="property">constexpr</em> unsigned int <code class="sig-name descname">majorAxis</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box9majorAxisEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the major axis of the box. </p> <p>The major axis is the dimension with the greatest difference between maximum and minimum. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box7isEmptyEv"> <span id="_CPPv3NK5Imath3Box7isEmptyEv"></span><span id="_CPPv2NK5Imath3Box7isEmptyEv"></span><span id="Imath::Box::isEmptyCCE"></span><span class="target" id="class_imath_1_1_box_1a12c3cfc1eb51aacb93c67d18eb2cc3cb"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">isEmpty</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box7isEmptyEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box is empty, false otherwise. </p> <p>An empty box’s minimum is greater than its maximum. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box9hasVolumeEv"> <span id="_CPPv3NK5Imath3Box9hasVolumeEv"></span><span id="_CPPv2NK5Imath3Box9hasVolumeEv"></span><span id="Imath::Box::hasVolumeCCE"></span><span class="target" id="class_imath_1_1_box_1ad5b6c13e883603836ddc379281114263"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">hasVolume</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box9hasVolumeEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box is larger than a single point, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3Box10isInfiniteEv"> <span id="_CPPv3NK5Imath3Box10isInfiniteEv"></span><span id="_CPPv2NK5Imath3Box10isInfiniteEv"></span><span id="Imath::Box::isInfiniteCCE"></span><span class="target" id="class_imath_1_1_box_1adaf9dd3dfda07bd4a734cc7c6296bf75"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">isInfinite</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3Box10isInfiniteEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box contains all points, false otherwise. </p> <p>An infinite box has a mimimum of<code class="docutils literal notranslate"><span class="pre">V::baseTypeLowest()</span></code> and a maximum of <code class="docutils literal notranslate"><span class="pre">V::baseTypeMax()</span></code>. </p> </dd></dl> </div> </dd></dl> <dl class="cpp class"> <dt id="_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE"> <span id="_CPPv3I0EN5Imath3BoxI4Vec2I1TEEE"></span><span id="_CPPv2I0EN5Imath3BoxI4Vec2I1TEEE"></span>template<class <code class="sig-name descname">T</code>><br /><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4"></span><em class="property">class </em><code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box</code><<a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>>><a class="headerlink" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a><Vec2<T>> template represents a 2D bounding box defined by minimum and maximum values of type Vec2<T>. </p> <p>The min and max members are public. </p> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Direct access to bounds</p> <dl class="cpp var"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE3minE"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE3minE"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE3minE"></span><span id="Imath::Box:Vec2:T::::min__Vec2:T:"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a6c9057bec519eff836d0665b2a2dafd8"></span><a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> <code class="sig-name descname">min</code><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3minE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The minimum value of the box. </p> </dd></dl> <dl class="cpp var"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE3maxE"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE3maxE"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE3maxE"></span><span id="Imath::Box:Vec2:T::::max__Vec2:T:"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a5993bd39f1128bebe5d5d50c9dd9927d"></span><a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> <code class="sig-name descname">max</code><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3maxE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The maximum value of the box. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Constructors and Assignment</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxEv"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE3BoxEv"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE3BoxEv"></span><span id="Imath::Box:Vec2:T::::BoxCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a1593cd00578fd31644ef904a6e1bc0bf"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Empty by default. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TE"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TE"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TE"></span><span id="Imath::Box:Vec2:T::::Box__Vec2:T:CRCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a973f71d27f55e903eebb4ce0791a7e60"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> &<em>point</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct a bounding box that contains a single point. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TERK4Vec2I1TE"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TERK4Vec2I1TE"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TERK4Vec2I1TE"></span><span id="Imath::Box:Vec2:T::::Box__Vec2:T:CR.Vec2:T:CRCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a40ded2b124b893e899130b285c63a048"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> &<em>minT</em>, <em class="property">const</em> <a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> &<em>maxT</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxERK4Vec2I1TERK4Vec2I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct a bounding box with the given minimum and maximum points. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Comparison</p> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEEeqERK3BoxI4Vec2I1TEE"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEEeqERK3BoxI4Vec2I1TEE"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEEeqERK3BoxI4Vec2I1TEE"></span><span id="Imath::Box:Vec2:T::::eq-operator__Box:Vec2:T::CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a9b5d4c7ecb653eba483836c69a801bed"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator==</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxEv" title="Imath::Box<Vec2<T>>::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>>> &<em>src</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEEeqERK3BoxI4Vec2I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Equality. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEEneERK3BoxI4Vec2I1TEE"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEEneERK3BoxI4Vec2I1TEE"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEEneERK3BoxI4Vec2I1TEE"></span><span id="Imath::Box:Vec2:T::::neq-operator__Box:Vec2:T::CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a296e47d2cc2412c5326441fb27b1174b"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator!=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxEv" title="Imath::Box<Vec2<T>>::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>>> &<em>src</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEEneERK3BoxI4Vec2I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Inequality. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Manipulation</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE9makeEmptyEv"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE9makeEmptyEv"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE9makeEmptyEv"></span><span id="Imath::Box:Vec2:T::::makeEmpty"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a4f7db0978fd45c2acf6305436ffb016c"></span><em class="property">inline</em> void <code class="sig-name descname">makeEmpty</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE9makeEmptyEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Set the <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> to be empty. </p> <p>A <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> is empty if the mimimum is greater than the maximum. <a class="reference internal" href="#class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a4f7db0978fd45c2acf6305436ffb016c"><span class="std std-ref">makeEmpty()</span></a> sets the mimimum to numeric_limits<T>::max() and the maximum to <code class="docutils literal notranslate"><span class="pre">numeric_limits<T>::lowest()</span></code>. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE8extendByERK4Vec2I1TE"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE8extendByERK4Vec2I1TE"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE8extendByERK4Vec2I1TE"></span><span id="Imath::Box:Vec2:T::::extendBy__Vec2:T:CR"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1acc52a67406086817e74a261e8a112772"></span><em class="property">inline</em> void <code class="sig-name descname">extendBy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> &<em>point</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE8extendByERK4Vec2I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Extend the <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> to include the given point. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE8extendByERK3BoxI4Vec2I1TEE"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE8extendByERK3BoxI4Vec2I1TEE"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE8extendByERK3BoxI4Vec2I1TEE"></span><span id="Imath::Box:Vec2:T::::extendBy__Box:Vec2:T::CR"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a78ef68f7315357eedcb4f60f46b0a391"></span><em class="property">inline</em> void <code class="sig-name descname">extendBy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxEv" title="Imath::Box<Vec2<T>>::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>>> &<em>box</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE8extendByERK3BoxI4Vec2I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Extend the <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> to include the given box. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec2I1TEE12makeInfiniteEv"> <span id="_CPPv3N5Imath3BoxI4Vec2I1TEE12makeInfiniteEv"></span><span id="_CPPv2N5Imath3BoxI4Vec2I1TEE12makeInfiniteEv"></span><span id="Imath::Box:Vec2:T::::makeInfinite"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a3b6438bfa84c8f15d43151645f8d8b3e"></span><em class="property">inline</em> void <code class="sig-name descname">makeInfinite</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE12makeInfiniteEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Make the box include the entire range of T. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Query</p> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE4sizeEv"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE4sizeEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE4sizeEv"></span><span id="Imath::Box:Vec2:T::::sizeCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1aa674f5cde580007049776024508ae3a2"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> <code class="sig-name descname">size</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE4sizeEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the size of the box. </p> <p>The size is of type <code class="docutils literal notranslate"><span class="pre">V</span></code>, defined as <code class="docutils literal notranslate"><span class="pre">(max-min)</span></code>. An empty box has a size of <code class="docutils literal notranslate"><span class="pre">V(0)</span></code>, i.e. 0 in each dimension. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE6centerEv"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE6centerEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE6centerEv"></span><span id="Imath::Box:Vec2:T::::centerCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a943e17789d911e2d9da484cc13f93358"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> <code class="sig-name descname">center</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE6centerEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the center of the box. </p> <p>The center is defined as <code class="docutils literal notranslate"><span class="pre">(max+min)/2</span></code>. The center of an empty box is undefined. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE10intersectsERK4Vec2I1TE"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE10intersectsERK4Vec2I1TE"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE10intersectsERK4Vec2I1TE"></span><span id="Imath::Box:Vec2:T::::intersects__Vec2:T:CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a98d812ddde614f4b2a80a2db2022f3c7"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">intersects</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>> &<em>point</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE10intersectsERK4Vec2I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the given point is inside the box, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE10intersectsERK3BoxI4Vec2I1TEE"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE10intersectsERK3BoxI4Vec2I1TEE"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE10intersectsERK3BoxI4Vec2I1TEE"></span><span id="Imath::Box:Vec2:T::::intersects__Box:Vec2:T::CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1afbda2808f98a30edb540887b27d5d085"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">intersects</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec2I1TEE3BoxEv" title="Imath::Box<Vec2<T>>::Box">Box</a><<a class="reference internal" href="Vec2.html#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec2I1TEEE" title="Imath::Box<Vec2<T>>::T">T</a>>> &<em>box</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE10intersectsERK3BoxI4Vec2I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the given box is inside the box, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE9majorAxisEv"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE9majorAxisEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE9majorAxisEv"></span><span id="Imath::Box:Vec2:T::::majorAxisCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a9059f48061cd06eea04d355b2b9aa731"></span><em class="property">inline</em> <em class="property">constexpr</em> unsigned int <code class="sig-name descname">majorAxis</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE9majorAxisEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the major axis of the box. </p> <p>The major axis is the dimension with the greatest difference between maximum and minimum. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE7isEmptyEv"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE7isEmptyEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE7isEmptyEv"></span><span id="Imath::Box:Vec2:T::::isEmptyCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a5f90efaa69b39d3639d8933b74fe66b2"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">isEmpty</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE7isEmptyEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box is empty, false otherwise. </p> <p>An empty box’s minimum is greater than its maximum. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE9hasVolumeEv"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE9hasVolumeEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE9hasVolumeEv"></span><span id="Imath::Box:Vec2:T::::hasVolumeCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a366741beaece0ac283ddfce5c7f1957f"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">hasVolume</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE9hasVolumeEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box is larger than a single point, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec2I1TEE10isInfiniteEv"> <span id="_CPPv3NK5Imath3BoxI4Vec2I1TEE10isInfiniteEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec2I1TEE10isInfiniteEv"></span><span id="Imath::Box:Vec2:T::::isInfiniteCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec2_3_01_t_01_4_01_4_1a987d25ca0202c2104785575ac7118e6a"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">isInfinite</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec2I1TEE10isInfiniteEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box contains all points, false otherwise. </p> <p>An infinite box has a mimimum of <code class="docutils literal notranslate"><span class="pre">V::baseTypeMin()</span></code> and a maximum of <code class="docutils literal notranslate"><span class="pre">V::baseTypeMax()</span></code>. </p> </dd></dl> </div> </dd></dl> <dl class="cpp class"> <dt id="_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE"> <span id="_CPPv3I0EN5Imath3BoxI4Vec3I1TEEE"></span><span id="_CPPv2I0EN5Imath3BoxI4Vec3I1TEEE"></span>template<class <code class="sig-name descname">T</code>><br /><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4"></span><em class="property">class </em><code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Box</code><<a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>>><a class="headerlink" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The Box<Vec3> template represents a 3D bounding box defined by minimum and maximum values of type <a class="reference internal" href="Vec3.html#class_imath_1_1_vec3"><span class="std std-ref">Vec3</span></a>. </p> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Direct access to bounds</p> <dl class="cpp var"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE3minE"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE3minE"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE3minE"></span><span id="Imath::Box:Vec3:T::::min__Vec3:T:"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1af47b211ac817af3f2997903707e6d732"></span><a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> <code class="sig-name descname">min</code><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3minE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The minimum value of the box. </p> </dd></dl> <dl class="cpp var"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE3maxE"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE3maxE"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE3maxE"></span><span id="Imath::Box:Vec3:T::::max__Vec3:T:"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a4a6fbdc880e0c28a36889cd71900378a"></span><a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> <code class="sig-name descname">max</code><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3maxE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The maximum value of the box. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Constructors</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxEv"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE3BoxEv"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE3BoxEv"></span><span id="Imath::Box:Vec3:T::::BoxCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a31efe8ae05d323dde4880eb9935e3842"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Empty by default. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TE"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TE"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TE"></span><span id="Imath::Box:Vec3:T::::Box__Vec3:T:CRCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a6e62743ee545f62aa69934c6eda0c5fe"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> &<em>point</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct a bounding box that contains a single point. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TERK4Vec3I1TE"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TERK4Vec3I1TE"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TERK4Vec3I1TE"></span><span id="Imath::Box:Vec3:T::::Box__Vec3:T:CR.Vec3:T:CRCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a3be72b03fb9e89befc732a24e55fcb20"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Box</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> &<em>minT</em>, <em class="property">const</em> <a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> &<em>maxT</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxERK4Vec3I1TERK4Vec3I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct a bounding box with the given minimum and maximum points. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Public Functions</p> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEEeqERK3BoxI4Vec3I1TEE"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEEeqERK3BoxI4Vec3I1TEE"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEEeqERK3BoxI4Vec3I1TEE"></span><span id="Imath::Box:Vec3:T::::eq-operator__Box:Vec3:T::CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a7a27f4cd7b40648437f3bffbd6ba171e"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator==</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxEv" title="Imath::Box<Vec3<T>>::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>>> &<em>src</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEEeqERK3BoxI4Vec3I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Equality. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEEneERK3BoxI4Vec3I1TEE"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEEneERK3BoxI4Vec3I1TEE"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEEneERK3BoxI4Vec3I1TEE"></span><span id="Imath::Box:Vec3:T::::neq-operator__Box:Vec3:T::CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a00e75db7ce7558bd3863c4985751e0be"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator!=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxEv" title="Imath::Box<Vec3<T>>::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>>> &<em>src</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEEneERK3BoxI4Vec3I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Inequality. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE9makeEmptyEv"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE9makeEmptyEv"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE9makeEmptyEv"></span><span id="Imath::Box:Vec3:T::::makeEmpty"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a03fa58a4a89c7fb52b2dc1ac4594a849"></span><em class="property">inline</em> void <code class="sig-name descname">makeEmpty</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE9makeEmptyEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Set the <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> to be empty. </p> <p>A <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> is empty if the mimimum is greater than the maximum. <a class="reference internal" href="#class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a03fa58a4a89c7fb52b2dc1ac4594a849"><span class="std std-ref">makeEmpty()</span></a> sets the mimimum to <code class="docutils literal notranslate"><span class="pre">numeric_limits<T>::max()</span></code> and the maximum to <code class="docutils literal notranslate"><span class="pre">numeric_limits<T>::lowest()</span></code>. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE8extendByERK4Vec3I1TE"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE8extendByERK4Vec3I1TE"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE8extendByERK4Vec3I1TE"></span><span id="Imath::Box:Vec3:T::::extendBy__Vec3:T:CR"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a20b9c28e47a97fb68672657766eee1a9"></span><em class="property">inline</em> void <code class="sig-name descname">extendBy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> &<em>point</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE8extendByERK4Vec3I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Extend the <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> to include the given point. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE8extendByERK3BoxI4Vec3I1TEE"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE8extendByERK3BoxI4Vec3I1TEE"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE8extendByERK3BoxI4Vec3I1TEE"></span><span id="Imath::Box:Vec3:T::::extendBy__Box:Vec3:T::CR"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1ad9006c82c63032c54c6b8cd35b985bca"></span><em class="property">inline</em> void <code class="sig-name descname">extendBy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxEv" title="Imath::Box<Vec3<T>>::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>>> &<em>box</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE8extendByERK3BoxI4Vec3I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Extend the <a class="reference internal" href="#class_imath_1_1_box"><span class="std std-ref">Box</span></a> to include the given box. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath3BoxI4Vec3I1TEE12makeInfiniteEv"> <span id="_CPPv3N5Imath3BoxI4Vec3I1TEE12makeInfiniteEv"></span><span id="_CPPv2N5Imath3BoxI4Vec3I1TEE12makeInfiniteEv"></span><span id="Imath::Box:Vec3:T::::makeInfinite"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a923e5a96a876494fc7a5dcd14546c955"></span><em class="property">inline</em> void <code class="sig-name descname">makeInfinite</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE12makeInfiniteEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Make the box include the entire range of T. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE4sizeEv"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE4sizeEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE4sizeEv"></span><span id="Imath::Box:Vec3:T::::sizeCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a6037a24a0929d4cf37657b374356ce51"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> <code class="sig-name descname">size</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE4sizeEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the size of the box. </p> <p>The size is of type <code class="docutils literal notranslate"><span class="pre">V</span></code>, defined as (max-min). An empty box has a size of V(0), i.e. 0 in each dimension. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE6centerEv"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE6centerEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE6centerEv"></span><span id="Imath::Box:Vec3:T::::centerCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a42614ca5ead5180223a6f0d038d938e0"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> <code class="sig-name descname">center</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE6centerEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the center of the box. </p> <p>The center is defined as (max+min)/2. The center of an empty box is undefined. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE10intersectsERK4Vec3I1TE"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE10intersectsERK4Vec3I1TE"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE10intersectsERK4Vec3I1TE"></span><span id="Imath::Box:Vec3:T::::intersects__Vec3:T:CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a3fffaa5275d73b351d310d082c315de8"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">intersects</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>> &<em>point</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE10intersectsERK4Vec3I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the given point is inside the box, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE10intersectsERK3BoxI4Vec3I1TEE"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE10intersectsERK3BoxI4Vec3I1TEE"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE10intersectsERK3BoxI4Vec3I1TEE"></span><span id="Imath::Box:Vec3:T::::intersects__Box:Vec3:T::CRCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a0210a068aa76ae4dad3f942e2f133e48"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">intersects</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath3BoxI4Vec3I1TEE3BoxEv" title="Imath::Box<Vec3<T>>::Box">Box</a><<a class="reference internal" href="Vec3.html#_CPPv4I0EN5Imath4Vec3E" title="Imath::Vec3">Vec3</a><<a class="reference internal" href="#_CPPv4I0EN5Imath3BoxI4Vec3I1TEEE" title="Imath::Box<Vec3<T>>::T">T</a>>> &<em>box</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE10intersectsERK3BoxI4Vec3I1TEE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the given box is inside the box, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE9majorAxisEv"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE9majorAxisEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE9majorAxisEv"></span><span id="Imath::Box:Vec3:T::::majorAxisCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1adef074624d9281dec15c7d877576660b"></span><em class="property">inline</em> <em class="property">constexpr</em> unsigned int <code class="sig-name descname">majorAxis</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE9majorAxisEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the major axis of the box. </p> <p>The major axis is the dimension with the greatest difference between maximum and minimum. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE7isEmptyEv"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE7isEmptyEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE7isEmptyEv"></span><span id="Imath::Box:Vec3:T::::isEmptyCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1a9767d8eddc19c1a69fdaea98f53a53f3"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">isEmpty</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE7isEmptyEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box is empty, false otherwise. </p> <p>An empty box’s minimum is greater than its maximum. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE9hasVolumeEv"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE9hasVolumeEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE9hasVolumeEv"></span><span id="Imath::Box:Vec3:T::::hasVolumeCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1ac1c3fe88d1acfc43dcf9b6a787993e7c"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">hasVolume</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE9hasVolumeEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box is larger than a single point, false otherwise. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath3BoxI4Vec3I1TEE10isInfiniteEv"> <span id="_CPPv3NK5Imath3BoxI4Vec3I1TEE10isInfiniteEv"></span><span id="_CPPv2NK5Imath3BoxI4Vec3I1TEE10isInfiniteEv"></span><span id="Imath::Box:Vec3:T::::isInfiniteCCE"></span><span class="target" id="class_imath_1_1_box_3_01_vec3_3_01_t_01_4_01_4_1aced07bc410b11bd6a548653c8823c2ad"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">isInfinite</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath3BoxI4Vec3I1TEE10isInfiniteEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return true if the box contains all points, false otherwise. </p> <p>An infinite box has a mimimum of<code class="docutils literal notranslate"><span class="pre">V::baseTypeMin()</span></code> and a maximum of <code class="docutils literal notranslate"><span class="pre">V::baseTypeMax()</span></code>. </p> </dd></dl> </div> </dd></dl> </div> <div class="clearer"></div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="../index.html"> <img class="logo" src="../_static/imath-logo-blue.png" alt="Logo"/> </a></p> <h4>Previous topic</h4> <p class="topless"><a href="../float.html" title="previous chapter">Floating Point Representation</a></p> <h4>Next topic</h4> <p class="topless"><a href="Color3.html" title="next chapter">Color3</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/classes/Box.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script>$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="Color3.html" title="Color3" >next</a> |</li> <li class="right" > <a href="../float.html" title="Floating Point Representation" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Imath</a> »</li> <li class="nav-item nav-item-this"><a href="">Box</a></li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2021, Contributors to the OpenEXR Project. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3. </div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генераци� �траницы: 0 |
proxy
|
phpinfo
|
�а�тройка