API Documentation
Loading...
Searching...
No Matches
Bounds< t_dims, t_type, t_vertex > Class Template Reference

A specification of upper and lower bounds in N-dimensions. More...

#include <Bounds.hpp>

Inheritance diagram for Bounds< t_dims, t_type, t_vertex >:
[legend]
Collaboration diagram for Bounds< t_dims, t_type, t_vertex >:
[legend]

Public Member Functions

constexpr Bounds ()
 
constexpr Bounds (const t_vertex &vertex)
 Given the vector, creates bounds of size 0 where max and min are both equal to the vertex.
 
constexpr Bounds (const t_vertex &center, t_type size)
 Given the center, creates bounds of size where max and min are both equal to the vertex + size and.
 
constexpr Bounds (const t_vertex &min, const t_vertex &max)
 
constexpr Bounds (const t_type &min_scaler, const t_type &max_scaler)
 
constexpr Bounds (const Vector< 2, t_vertex > &bounds)
 
constexpr Bounds (const Bounds &bounds_a, const Bounds &bounds_b)
 
constexpr Bounds (const Bounds &bounds, const t_vertex &vector)
 
constexpr Bounds (const LineSegment< t_dims, t_type, t_vertex > &line)
 
constexpr Bounds (const Triangle< t_dims, t_type, t_vertex > &tri)
 
constexpr Bounds (const RadialObject< t_dims, t_type, t_vertex > &radial)
 
constexpr Ray< t_dims, t_type > span () const
 The side lengths of these bounds. For each dimension, the span is max - min.
 
constexpr t_vertex center () const
 Returns the center of the bounds.
 
constexpr t_type volume () const
 Returns the volume of the bounds. This is defined as length in 1 dimension, area in 2 dimensions.
 
constexpr t_type surfaceArea () const
 The surface area of the shape. This is defined as the area between internal space and non-internal space.
 
constexpr void expand (const t_type &expansion_scaler)
 Expands the given expansion scaler. such that max and min are both expanded outward from the center by the given expansion scaler.
 
constexpr void expand (const t_vertex &expansion_vector)
 Expands the given expansion scaler. such that max and min are both expanded outward from the center by the given expansion vector. That is that each dimension may be scaled out differently.
 
constexpr Bounds< t_dims, t_type > scale (const Vector< t_dims, t_type > &scale, const Vector< t_dims, t_type > &center) const
 Scales this geometry about a center point.
 
constexpr Bounds< t_dims, t_type > scale (const Vector< t_dims, t_type > &center_scale) const
 
constexpr Bounds< t_dims, t_type > scale (const t_type &scale, const Vector< t_dims, t_type > &center) const
 
constexpr Bounds< t_dims, t_type > scale (const t_type &center_scale) const
 
template<uint01 t_new_dims, class t_new_type , class t_new_vertex = Vertex<t_new_dims, t_new_type>>
constexpr Bounds< t_new_dims, t_new_type, t_new_vertex > as (t_new_type extra_fill_value=t_new_type(0)) const
 Casts this object into an object of different dimension or precision.
 
template<bool t_allow_bounds = true, uint01 tdims = t_dims, typename = typename std::enable_if<tdims == 1>::type>
constexpr bool contains (const t_type &value) const
 Query if this object contains the given value.
 
template<bool t_allow_bounds = true>
constexpr bool contains (const t_vertex &vector) const
 Query if this object contains the given vector.
 
template<bool t_allow_bounds = true>
constexpr bool contains (const Bounds &bounds) const
 Query if this object contains the given bounds.
 
template<bool t_allow_bounds = true>
constexpr bool contains (const LineSegment< t_dims, t_type, t_vertex > &line) const
 Author: Tyler Parke.
 
template<bool t_allow_bounds = true>
constexpr bool contains (const Triangle< t_dims, t_type, t_vertex > &tri) const
 Fully contains.
 
constexpr void addToBounds (const t_vertex &vector)
 Adds to the bounds such that the new bounds fully encompasses the argument.
 
template<uint01 tdims = t_dims>
constexpr void addToBounds (typename std::enable_if< tdims==1, const t_type & >::type scaler)
 
constexpr void addToBounds (const Bounds &bounds)
 Adds to the bounds such that the new bounds fully encompasses the argument.
 
constexpr void addToBounds (const LineSegment< t_dims, t_type, t_vertex > &line_segment)
 Adds to the bounds such that the new bounds fully encompasses the argument.
 
constexpr void addToBounds (const Triangle< t_dims, t_type, t_vertex > &triangle)
 Adds to the bounds such that the new bounds fully encompesses the argument.
 
template<bool t_allow_bounds = true>
constexpr bool contains (const RadialObject< t_dims, t_type > &radial_object) const
 Query if this object contains the given radial_object.
 
constexpr t_vertex closestEdge (const t_vertex &vertex) const
 Closest edge.
 
constexpr t_vertex closestValue (const t_vertex &vertex) const
 Closest value.
 
constexpr t_vertex furthestValue (const t_vertex &vertex) const
 Furthest value.
 
constexpr bool doesIntersect (t_type distance_a, t_type distance_b, const t_vertex &origin, const Vector< t_dims, t_type > &ray, uint01 exclusion_axis) const
 Checks for intersection of the ray from a given distance, excluding one axis.
 
template<class t_other_vertex_type >
constexpr bool intersects (const Bounds< t_dims, t_type, t_other_vertex_type > &bounds) const
 Query if this object intersects the given pair.
 
template<class t_other_vertex_type >
constexpr bool intersects (const LineSegment< t_dims, t_type, t_other_vertex_type > &seg) const
 
template<bool t_allow_bounds = true>
constexpr bool intersects (const RadialObject< t_dims, t_type > &circle) const
 Query if this object contains the given circle.
 
constexpr bool validate () const
 
void ensureValid ()
 Ensures that this is a valid bounds object. Values are swapped within the structure to ensure that MAX >= MIN.
 
Bounds< t_dims, t_type > & operator-= (const t_type &center_scale)
 
- Public Member Functions inherited from Vector< t_dims, t_type >
constexpr Vector () noexcept
 
template<class t_vec_type >
constexpr Vector (const Vector< t_dims, t_vec_type > &vector) noexcept
 
constexpr Vector (const t_type &scaler) noexcept
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &x, typename std::enable_if< tdims==2, const t_type & >::type y)
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &x, const t_type &y, const typename std::enable_if< tdims==3, const t_type & >::type z)
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, typename std::enable_if< tdims==4, const t_type & >::type w)
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, const t_type &w, typename std::enable_if< tdims==5, const t_type & >::type v)
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, const t_type &w, const t_type &v, typename std::enable_if< tdims==6, const t_type & >::type u)
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, const t_type &w, const t_type &v, const t_type &u, const t_type &t, const t_type &s, typename std::enable_if< tdims==9, const t_type & >::type r)
 
constexpr Vector (const t_type(&vector)[t_dims])
 
template<uint01 tdims = t_dims>
constexpr Vector (const Vector< tdims - 1, t_type > &vector, typename std::enable_if< tdims >=2, const t_type & >::type suffix)
 
template<uint01 tdims = t_dims>
constexpr Vector (const Vector< getMax(tdims - 2, 0), t_type > &vector, const t_type &suffix_a, typename std::enable_if< tdims >=3, const t_type & >::type suffix_b)
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &prefix, typename std::enable_if< tdims >=2, const Vector< t_dims - 1, t_type > & >::type vector)
 
template<uint01 tdims = t_dims>
constexpr Vector (const t_type &prefix_a, const t_type &prefix_b, typename std::enable_if< tdims >=3, const Vector< tdims - 1, t_type > & >::type vector)
 
template<class t_new_type >
constexpr Vector< t_dims, t_new_type > as () const
 
template<uint01 t_new_dim, class t_new_type >
constexpr Vector< t_new_dim, t_new_type > as () const
 
template<uint01 t_new_dim, class t_new_type >
constexpr Vector< t_new_dim, t_new_type > as (t_new_type extra_fill_value) const
 
template<LocationValues t_max_min>
constexpr t_type dimensionalValue () const
 
template<LocationValues t_max_min>
constexpr uint01 dimensionalIndex () const
 
template<uint01 tdims = t_dims, typename = typename std::enable_if<tdims == 1>::type>
constexpr operator t_type & ()
 
template<uint01 tdims = t_dims, typename = typename std::enable_if<tdims == 1>::type>
constexpr operator const t_type & () const
 
constexpr t_type magnitudeSquared () const
 
template<class t_magnitude_type = t_type>
constexpr t_magnitude_type magnitude () const
 
template<class t_norm_type = t_type>
constexpr Vector< t_dims, t_norm_type > normalized (Vector< t_dims, t_norm_type > value_if_nan=Constant< Vector< t_dims, t_norm_type > >::NaN) const
 
constexpr t_type product () const
 
constexpr t_type sum () const
 
constexpr t_type & operator[] (uint01 dimension_index)
 
constexpr const t_type & operator[] (const uint01 dimension_index) const
 
constexpr Vector< t_dims, t_type > operator- () const
 
constexpr Vector< t_dims, t_type > & operator= (const t_type &scaler)
 

Additional Inherited Members

- Static Public Member Functions inherited from Vector< t_dims, t_type >
static constexpr uint01 NumberOfDimensions ()
 
static constexpr t_type Type ()
 
- Protected Attributes inherited from Vector< t_dims, t_type >
t_type m_values [t_dims]
 

Detailed Description

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
class NDEVR::Bounds< t_dims, t_type, t_vertex >

A specification of upper and lower bounds in N-dimensions.


Class: Bounds

Author: Tyler Parke

Date: 2017-11-17

Constructor & Destructor Documentation

◆ Bounds() [1/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( )
inlineconstexpr

◆ Bounds() [2/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const t_vertex & vertex)
inlineconstexpr

Given the vector, creates bounds of size 0 where max and min are both equal to the vertex.


Fn: constexpr Bounds::Bounds(const t_vertex& vector) : Vector<2, t_vertex>(vector, vector)

Author: Tyler Parke

Date: 2017-11-17

Parameters:

vector - The vertex around which a bounds of size 0 will be made.

◆ Bounds() [3/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const t_vertex & center,
t_type size )
inlineconstexpr

Given the center, creates bounds of size where max and min are both equal to the vertex + size and.


Fn: constexpr Bounds::Bounds(const t_vertex& center, t_type size) : Vector<2, t_vertex>(center - size, center + size)

  • size respectively.

Author: Tyler Parke

Date: 2017-11-17

Parameters: center - The center of the bounds.

size - The size of the bounds.

◆ Bounds() [4/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const t_vertex & min,
const t_vertex & max )
inlineconstexpr

◆ Bounds() [5/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const t_type & min_scaler,
const t_type & max_scaler )
inlineconstexpr

◆ Bounds() [6/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const Vector< 2, t_vertex > & bounds)
inlineconstexpr

◆ Bounds() [7/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const Bounds< t_dims, t_type, t_vertex > & bounds_a,
const Bounds< t_dims, t_type, t_vertex > & bounds_b )
inlineconstexpr

◆ Bounds() [8/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const Bounds< t_dims, t_type, t_vertex > & bounds,
const t_vertex & vector )
inlineconstexpr

◆ Bounds() [9/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const LineSegment< t_dims, t_type, t_vertex > & line)
inlineconstexpr

◆ Bounds() [10/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const Triangle< t_dims, t_type, t_vertex > & tri)
inlineconstexpr

◆ Bounds() [11/11]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds ( const RadialObject< t_dims, t_type, t_vertex > & radial)
inlineconstexpr

Member Function Documentation

◆ addToBounds() [1/5]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
void addToBounds ( const Bounds< t_dims, t_type, t_vertex > & bounds)
inlineconstexpr

Adds to the bounds such that the new bounds fully encompasses the argument.


Fn: constexpr void Bounds::addToBounds(const Bounds& bounds)

Author: Tyler Parke.

Date: 2017-11-17.

Parameters:

bounds - The bounds to add to this bounds.

◆ addToBounds() [2/5]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
void addToBounds ( const LineSegment< t_dims, t_type, t_vertex > & line_segment)
inlineconstexpr

Adds to the bounds such that the new bounds fully encompasses the argument.


Fn: constexpr void Bounds::addToBounds(const LineSegment<t_dims, t_type, t_vertex>& line_segment)

Author: Tyler Parke.

Date: 2017-11-17.

Parameters:

line_segment - The line segment.

◆ addToBounds() [3/5]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
void addToBounds ( const t_vertex & vector)
inlineconstexpr

Adds to the bounds such that the new bounds fully encompasses the argument.


Fn: constexpr void Bounds::addToBounds(const t_vertex& vector)

Author: Tyler Parke.

Date: 2017 - 11-17.

Parameters:

vector - The vector.

◆ addToBounds() [4/5]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
void addToBounds ( const Triangle< t_dims, t_type, t_vertex > & triangle)
inlineconstexpr

Adds to the bounds such that the new bounds fully encompesses the argument.


Fn: constexpr void Bounds::addToBounds(const Triangle<t_dims, t_type, t_vertex>& triangle)

Author: Tyler Parke.

Date: 2017-11-17.

Parameters:

triangle - The triangle.

◆ addToBounds() [5/5]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<uint01 tdims = t_dims>
void addToBounds ( typename std::enable_if< tdims==1, const t_type & >::type scaler)
inlineconstexpr

◆ as()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<uint01 t_new_dims, class t_new_type , class t_new_vertex = Vertex<t_new_dims, t_new_type>>
Bounds< t_new_dims, t_new_type, t_new_vertex > as ( t_new_type extra_fill_value = t_new_type(0)) const
inlineconstexpr

Casts this object into an object of different dimension or precision.


Fn: constexpr Bounds<t_new_dims, t_new_type> Bounds::as() const

Author: Tyler Parke

Date: 2017-11-13

Parameters: extra_fill_value - (Optional) The extra fill value, or value to set dimensions extra that may be

created when t_new_dim > t_dim.

◆ center()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
t_vertex center ( ) const
inlineconstexpr

Returns the center of the bounds.


Fn: constexpr t_vertex Bounds::center() const

Author: Tyler Parke

Date: 2017-11-17

Returns: A t_vertex representing the center.

◆ closestEdge()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
t_vertex closestEdge ( const t_vertex & vertex) const
inlineconstexpr

Closest edge.


Fn: constexpr t_vertex Bounds::closestEdge(const t_vertex& vertex) const

Author: Tyler Parke.

Date: 2017 - 11-17.

Parameters: vertex - The first t_vertex.

Returns: The closest edge.

◆ closestValue()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
t_vertex closestValue ( const t_vertex & vertex) const
inlineconstexpr

Closest value.


Fn: constexpr t_vertex Bounds::closestValue(const t_vertex& vertex) const

Author: Tyler Parke.

Date: 2017 - 11-17.

Parameters: vertex - The first t_vertex.

Returns: The closest element.

◆ contains() [1/6]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<bool t_allow_bounds = true>
bool contains ( const Bounds< t_dims, t_type, t_vertex > & bounds) const
inlineconstexpr

Query if this object contains the given bounds.


Fn: constexpr bool Bounds::fullyContains(const Bounds<t_dims, t_type>& bounds) const

Author: Tyler Parke

Date: 2017-11-17

Parameters: t_allow_bounds - whether or not to allow boundary cases to be considered valid.

bounds - The bounds to check if it is inside object.

Returns: True if it succeeds, false if it fails.

◆ contains() [2/6]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<bool t_allow_bounds = true>
bool contains ( const LineSegment< t_dims, t_type, t_vertex > & line) const
inlineconstexpr

Author: Tyler Parke.


Fn: constexpr bool Bounds::fullyContains(const Vector<2, t_vertex, t_vertex>& line) const

Fully contains.

Date: 2017-11-17

Parameters: vector - The vector.

Returns: True if it succeeds, false if it fails.

◆ contains() [3/6]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<bool t_allow_bounds = true>
bool contains ( const RadialObject< t_dims, t_type > & radial_object) const
inlineconstexpr

Query if this object contains the given radial_object.


Fn: constexpr bool Bounds::contains(const RadialObject<t_dims, t_type>& radial_object) const

Author: Tyler Parke

Date: 2017-11-18

Parameters: radial_object - The const RadialObject<t_dims,t_type>& to test for containment.

Returns: True if the object is in this collection, false if not.

◆ contains() [4/6]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<bool t_allow_bounds = true, uint01 tdims = t_dims, typename = typename std::enable_if<tdims == 1>::type>
bool contains ( const t_type & value) const
inlineconstexpr

Query if this object contains the given value.


Fn: constexpr bool Bounds::contains(const t_type& vector) const

Author: Tyler Parke

Date: 2017-11-17

Parameters: t_allow_bounds - whether or not to allow boundary cases to be considered valid.

vector - The const t_vertex& to test for containment.

Returns: True if the object is in the bounds, false if not.

◆ contains() [5/6]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<bool t_allow_bounds = true>
bool contains ( const t_vertex & vector) const
inlineconstexpr

Query if this object contains the given vector.


Fn: constexpr bool Bounds::contains(const t_vertex& vector) const

Author: Tyler Parke

Date: 2017-11-17

Parameters: t_allow_bounds - whether or not to allow boundary cases to be considered valid.

vector - The const t_vertex& to test for containment.

Returns: True if the object is in the bounds, false if not.

◆ contains() [6/6]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<bool t_allow_bounds = true>
bool contains ( const Triangle< t_dims, t_type, t_vertex > & tri) const
inlineconstexpr

Fully contains.


Fn: constexpr bool Bounds::fullyContains(const Triangle<t_dims, t_type, t_vertex>& tri) const

Author: Tyler Parke

Date: 2017-11-17

Parameters: tri - The triangle.

Returns: True if it succeeds, false if it fails.

◆ doesIntersect()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
bool doesIntersect ( t_type distance_a,
t_type distance_b,
const t_vertex & origin,
const Vector< t_dims, t_type > & ray,
uint01 exclusion_axis ) const
inlineconstexpr

Checks for intersection of the ray from a given distance, excluding one axis.


Fn: constexpr bool Bounds::doesIntersect(t_type distance_a, t_type distance_b, const t_vertex& origin, const t_vertex& ray, uint01 exclusion_axis) const

Author: Tyler Parke

Date: 2017-11-18

Parameters: distance_a - The distance a. distance_b - The distance b. origin - The origin. ray - The ray. exclusion_axis - The exclusion axis.

Returns: True if it succeeds, false if it fails.

< for NaN

◆ ensureValid()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
void ensureValid ( )
inline

Ensures that this is a valid bounds object. Values are swapped within the structure to ensure that MAX >= MIN.


Fn: void Bounds::ensureValid() const

Author: Tyler Parke

Date: 2022-01-20

◆ expand() [1/2]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
void expand ( const t_type & expansion_scaler)
inlineconstexpr

Expands the given expansion scaler. such that max and min are both expanded outward from the center by the given expansion scaler.


Fn: constexpr void Bounds::expand(const t_type& expansion_scaler)

Author: Tyler Parke

Date: 2017-11-17

Parameters:

expansion_scaler - The expansion scaler.

◆ expand() [2/2]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
void expand ( const t_vertex & expansion_vector)
inlineconstexpr

Expands the given expansion scaler. such that max and min are both expanded outward from the center by the given expansion vector. That is that each dimension may be scaled out differently.


Fn: constexpr void Bounds::expand(const t_vertex& expansion_vector)

Author: Tyler Parke

Date: 2017-11-17

Parameters:

expansion_vector - The expansion vector.

◆ furthestValue()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
t_vertex furthestValue ( const t_vertex & vertex) const
inlineconstexpr

Furthest value.


Fn: constexpr t_vertex Bounds::furthestValue(const t_vertex& vertex) const

Author: Tyler Parke.

Date: 2017 - 11-17.

Parameters: vertex - The first t_vertex.

Returns: The furthest point.

◆ intersects() [1/3]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<class t_other_vertex_type >
bool intersects ( const Bounds< t_dims, t_type, t_other_vertex_type > & bounds) const
inlineconstexpr

Query if this object intersects the given pair.


Fn: constexpr bool Bounds::intersects(const Bounds<t_pair_2_dims, t_pair_2_type>& pair) const

Author: Tyler Parke

Date: 2017-11-17

Parameters: pair - The pair.

Returns: True if it succeeds, false if it fails.

◆ intersects() [2/3]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<class t_other_vertex_type >
bool intersects ( const LineSegment< t_dims, t_type, t_other_vertex_type > & seg) const
inlineconstexpr

◆ intersects() [3/3]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
template<bool t_allow_bounds = true>
bool intersects ( const RadialObject< t_dims, t_type > & circle) const
inlineconstexpr

Query if this object contains the given circle.


Fn: constexpr bool Bounds::contains(const RadialObject<t_rad_dims, t_rad_type>& circle) const

Author: Tyler Parke

Date: 2017-11-17

Parameters: circle - The const RadialObject<t_rad_dims,t_rad_type>& to test for containment.

Returns: True if the object is in this collection, false if not.

◆ operator-=()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds< t_dims, t_type > & operator-= ( const t_type & center_scale)
inline

◆ scale() [1/4]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds< t_dims, t_type > scale ( const t_type & center_scale) const
inlineconstexpr

◆ scale() [2/4]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds< t_dims, t_type > scale ( const t_type & scale,
const Vector< t_dims, t_type > & center ) const
inlineconstexpr

◆ scale() [3/4]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds< t_dims, t_type > scale ( const Vector< t_dims, t_type > & center_scale) const
inlineconstexpr

◆ scale() [4/4]

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Bounds< t_dims, t_type > scale ( const Vector< t_dims, t_type > & scale,
const Vector< t_dims, t_type > & center ) const
inlineconstexpr

Scales this geometry about a center point.


Fn: constexpr Bounds<t_dims, t_type> Bounds::scale(const Vector<t_dims, t_type>& scale , const Vector<t_dims, t_type>& center) const

Author: Tyler Parke

Date: 2017-11-17

Parameters: scale - The scale. center - The center.

Returns: A Bounds<t_dims,t_type>

◆ span()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
Ray< t_dims, t_type > span ( ) const
inlineconstexpr

The side lengths of these bounds. For each dimension, the span is max - min.


Fn: constexpr t_vertex Bounds::span() const

Author: Tyler Parke

Date: 2017-11-17

Returns: A t_vertex defining the span of the range in each dimension.

◆ surfaceArea()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
t_type surfaceArea ( ) const
inlineconstexpr

The surface area of the shape. This is defined as the area between internal space and non-internal space.


Fn: constexpr t_type Bounds::surfaceArea() const

Author: Tyler Parke

Date: 2017-11-17

Returns: A t_type representing the area of the surface created by the bounds.

◆ validate()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
bool validate ( ) const
inlinenodiscardconstexpr

Fn: constexpr bool Bounds::validate() const

Validates this object. Returns true if the value at MIN is less than or equal the value at MAX in all dimensions.

Author: Tyler Parke

Date: 2017-11-17

Returns: True if it succeeds, false if it fails.

◆ volume()

template<uint01 t_dims, class t_type , class t_vertex = Vertex<t_dims, t_type>>
t_type volume ( ) const
inlineconstexpr

Returns the volume of the bounds. This is defined as length in 1 dimension, area in 2 dimensions.


Fn: constexpr t_type Bounds::volume() const

Author: Tyler Parke

Date: 2017-11-17

Returns: A t_type giving the volume of the bounds.


The documentation for this class was generated from the following file: