![]() |
NDEVR
API Documentation
|
A specification of upper and lower bounds in N-dimensions. More...
Public Member Functions | |
| constexpr | Bounds (const t_vertex ¢er, 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 &vertex) |
| Given the vector, creates bounds of size 0 where max and min are both equal to the vertex. | |
| constexpr void | addToBounds (const Bounds &bounds) |
| constexpr void | addToBounds (const LineSegment< t_dims, t_type, t_vertex > &line_segment) |
| constexpr void | addToBounds (const t_vertex &vector) |
| constexpr void | addToBounds (const Triangle< t_dims, t_type, t_vertex > &triangle) |
| template<uint01 t_new_dims, class t_new_type, class t_new_vertex = Vertex<t_new_dims, t_new_type>> | |
| constexpr decltype(auto) | as (t_new_type extra_fill_value=t_new_type(0)) const |
| Casts this object into an object of different dimension or precision. | |
| constexpr t_vertex | center () const |
| Returns the center of the bounds. | |
| constexpr t_type | center (uint01 dim) const |
| Returns the center of the bounds in a single dimention. | |
| constexpr t_vertex | closestEdge (const t_vertex &vertex) const |
| constexpr t_vertex | closestValue (const t_vertex &vertex) const |
| template<bool t_allow_bounds = true> | |
| constexpr bool | contains (const Bounds &bounds) const |
| 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 RadialObject< t_dims, t_type > &radial_object) const |
| 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 Triangle< t_dims, t_type, t_vertex > &tri) const |
| 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. | |
| void | ensureValid () |
| Ensures that this is a valid bounds object. | |
| constexpr void | expand (const t_type &expansion_scaler) |
| Expands the given expansion scaler. | |
| constexpr void | expand (const t_vertex &expansion_vector) |
| Expands the given expansion scaler. | |
| constexpr t_vertex | furthestValue (const t_vertex &vertex) const |
| template<class t_other_vertex_type> | |
| constexpr bool | intersects (const Bounds< t_dims, t_type, t_other_vertex_type > &bounds) 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 Bounds< t_dims, t_type > | scale (const Vector< t_dims, t_type > &scale, const Vector< t_dims, t_type > ¢er) const |
| Scales this geometry about a center point. | |
| constexpr Ray< t_dims, t_type > | span () const |
| The side lengths of these bounds. | |
| constexpr t_type | span (uint01 dim) const |
| The side length of one axis of the bounds. | |
| constexpr t_type | surfaceArea () const |
| The surface area of the shape. | |
| constexpr bool | validate () const |
| Validates this object. | |
| constexpr t_type | volume () const |
| Returns the volume of the bounds. | |
| Public Member Functions inherited from Vector< t_dims, t_type > | |
| 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) |
| Creates a vector where the prefix scaler is combined with the suffix 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) |
| Creates a vector where the prefix scaler values are combined with the suffix vector. | |
| constexpr | Vector (const t_type &scaler) noexcept |
| 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) |
| Sets values in each dimension to the respective value in the passed in scaler. | |
| 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) |
| Sets values in each dimension to the respective value in the passed in scaler. | |
| template<uint01 tdims = t_dims> | |
| constexpr | Vector (const t_type &x, typename std::enable_if< tdims==2, const t_type & >::type y) |
| Sets values in each dimension to the respective value in the passed in scaler. | |
| constexpr | Vector (const t_type(&vector)[t_dims]) |
| Given a container of statically determined array, transforms it to a vector. | |
| 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) |
| Creates a vector where the prefix vector is combined with the suffix scalers. | |
| template<class t_vec_type> | |
| constexpr | Vector (const Vector< t_dims, t_vec_type > &vector) noexcept |
| 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) |
| Creates a vector where the prefix vector is combined with the suffix scalers. | |
| template<class t_new_type> | |
| constexpr decltype(auto) | as () const |
| Returns the vector as a new time of vector. | |
| template<LocationValues t_max_min> | |
| constexpr uint01 | dimensionalIndex () const |
| Used with template arguments MAX or MIN, Gets the dimensional index for the value that is either max or min. | |
| template<LocationValues t_max_min> | |
| constexpr t_type | dimensionalValue () const |
| Used with template arguments MAX or MIN, Gets the dimensional value for the value that is either max or min. | |
| template<class t_magnitude_type = t_type> | |
| constexpr t_magnitude_type | magnitude () const |
| Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism. | |
| constexpr t_type | magnitudeSquared () const |
| Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism. | |
| 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 > >::Invalid) const |
| Gets the normalized, or unit length representation of this vector. | |
| template<uint01 tdims = t_dims, typename = typename std::enable_if<tdims == 1>::type> | |
| constexpr | operator t_type & () |
| For Single dimensional objects, they may also be considered a scaler, thus allow implicit conversion from a vector to a scaler when the dimension of the vector is 1. | |
| constexpr Vector< t_dims, t_type > | operator- () const |
| Negation operator. | |
| constexpr Vector< t_dims, t_type > & | operator= (const t_type &scaler) |
| Assignment operator. | |
| constexpr t_type & | operator[] (uint01 dimension_index) |
| Accesses the value of a certain dimension. | |
| constexpr t_type | product () const |
| Returns the product, or value of each dimension multiplied together. | |
| constexpr t_type | sum () const |
| Returns the sum, or value of each dimension added together. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Vector< t_dims, t_type > | |
| static constexpr uint01 | NumberOfDimensions () |
| Number of dimensions in this vector class. | |
| static constexpr t_type | Type () |
| Returns the type of this class. | |
| Protected Attributes inherited from Vector< t_dims, t_type > | |
| t_type | m_values [t_dims] |
| The values[t dims]. | |
A specification of upper and lower bounds in N-dimensions.
Class: Bounds
Author: Tyler Parke
Date: 2017-11-17
Definition at line 53 of file Bounds.hpp.
|
inlineconstexpr |
Given the vector, creates bounds of size 0 where max and min are both equal to the vertex.
| [in] | vertex | The vertex around which a bounds of size 0 will be made. |
Definition at line 63 of file Bounds.hpp.
|
inlineconstexpr |
Given the center, creates bounds of size where max and min are both equal to the vertex + size and.
| [in] | center | - The center of the bounds. |
| [in] | size | - The size of the bounds. |
Definition at line 74 of file Bounds.hpp.
|
inlineconstexpr |
\brief Adds to the bounds such that the new bounds fully encompasses the argument.
Author: Tyler Parke.
Date: 2017-11-17.
Parameters:
| [in] | bounds | - The bounds to add to this bounds. |
Definition at line 449 of file Bounds.hpp.
|
inlineconstexpr |
\brief Adds to the bounds such that the new bounds fully encompasses the argument.
Author: Tyler Parke.
Date: 2017-11-17.
Parameters:
| [in] | line_segment | - The line segment. |
Definition at line 472 of file Bounds.hpp.
|
inlineconstexpr |
\brief Adds to the bounds such that the new bounds fully encompasses the argument.
Author: Tyler Parke.
Date: 2017 - 11-17.
Parameters:
| [in] | vector | - The vector. |
Definition at line 415 of file Bounds.hpp.
Referenced by Bounds< 3, fltp08 >::addToBounds(), Bounds< 3, fltp08 >::addToBounds(), ConcavePolygon< t_type, t_vertex >::convexDecomp(), TableColumnString::insertIndices(), TableVectorType< 1, T >::insertIndices(), operator*(), operator*(), operator*(), operator*(), TableColumnString::removeIndices(), TableVectorType< 1, T >::removeIndices(), TableVectorType< 1, T >::removeIndices(), and TransformBoundsAndClipNearPlane().
|
inlineconstexpr |
\brief Adds to the bounds such that the new bounds fully encompesses the argument.
Author: Tyler Parke.
Date: 2017-11-17.
Parameters:
| [in] | triangle | - The triangle. |
Definition at line 490 of file Bounds.hpp.
|
inlineconstexpr |
Casts this object into an object of different dimension or precision.
| [in] | extra_fill_value | (Optional) The extra fill value, or value to set dimensions extra that may be created when t_new_dim > t_dim. |
Definition at line 236 of file Bounds.hpp.
Referenced by TableVectorType< 1, T >::set(), and TableVectorType< 1, T >::set().
|
inlineconstexpr |
Returns the center of the bounds.
Definition at line 129 of file Bounds.hpp.
Referenced by GravityIntersection::FindGravityPoints(), and TreeBoundarySorter< t_dims, t_type >::getBounds().
|
inlineconstexpr |
Returns the center of the bounds in a single dimention.
Definition at line 137 of file Bounds.hpp.
|
inlineconstexpr |
\brief Closest edge.
Author: Tyler Parke.
Date: 2017 - 11-17.
Parameters:
| [in] | vertex | - The first t_vertex. |
Definition at line 532 of file Bounds.hpp.
Referenced by Bounds< 3, fltp08 >::contains().
|
inlineconstexpr |
\brief Closest value.
Author: Tyler Parke.
Date: 2017 - 11-17.
Parameters:
| [in] | vertex | - The first t_vertex. |
Definition at line 554 of file Bounds.hpp.
|
inlineconstexpr |
\brief Query if this object contains the given bounds.
Author: Tyler Parke
Date: 2017-11-17
Parameters: t_allow_bounds - whether or not to allow boundary cases to be considered valid.
| [in] | bounds | - The bounds to check if it is inside object. |
Definition at line 319 of file Bounds.hpp.
|
inlineconstexpr |
Author: Tyler Parke.
Fully contains.
Date: 2017-11-17
Parameters:
| [in] | line | - The vector. |
Definition at line 357 of file Bounds.hpp.
|
inlineconstexpr |
\brief Query if this object contains the given radial_object.
Author: Tyler Parke
Date: 2017-11-18
Parameters:
| [in] | radial_object | - The const RadialObject<t_dims,t_type>& to test for containment. |
Definition at line 510 of file Bounds.hpp.
|
inlineconstexpr |
Query if this object contains the given value.
t_allow_bounds - whether or not to allow boundary cases to be considered valid.
| [in] | value | The const t_vertex& to test for containment. |
Definition at line 262 of file Bounds.hpp.
|
inlineconstexpr |
Query if this object contains the given vector.
t_allow_bounds - whether or not to allow boundary cases to be considered valid.
| [in] | vector | - The const t_vertex& to test for containment. |
Definition at line 283 of file Bounds.hpp.
|
inlineconstexpr |
\brief Fully contains.
Author: Tyler Parke
Date: 2017-11-17
Parameters:
| [in] | tri | - The triangle. |
Definition at line 396 of file Bounds.hpp.
|
inlineconstexpr |
Checks for intersection of the ray from a given distance, excluding one axis.
Author: Tyler Parke
Date: 2017-11-18
Parameters:
| [in] | distance_a | - The distance a. |
| [in] | distance_b | - The distance b. |
| [in] | origin | - The origin. |
| [in] | ray | - The ray. |
| [in] | exclusion_axis | - The exclusion axis. |
< for Invalid
Definition at line 602 of file Bounds.hpp.
|
inline |
Ensures that this is a valid bounds object.
Values are swapped within the structure to ensure that MAX >= MIN
Definition at line 717 of file Bounds.hpp.
|
inlineconstexpr |
Expands the given expansion scaler.
such that max and min are both expanded outward from the center by the given expansion scaler
| [in] | expansion_scaler | - The expansion scaler. |
Definition at line 177 of file Bounds.hpp.
|
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.
| [in] | expansion_vector | - The expansion vector. |
Definition at line 189 of file Bounds.hpp.
|
inlineconstexpr |
\brief Furthest value.
Author: Tyler Parke.
Date: 2017 - 11-17.
Parameters:
| [in] | vertex | - The first t_vertex. |
Definition at line 576 of file Bounds.hpp.
|
inlineconstexpr |
\brief Query if this object intersects the given pair.
Author: Tyler Parke
Date: 2017-11-17
Parameters:
| [in] | bounds | - The pair. |
Definition at line 636 of file Bounds.hpp.
|
inlineconstexpr |
Query if this object contains the given circle.
| [in] | circle | - The const RadialObject<t_rad_dims,t_rad_type>& to test for containment. |
Definition at line 670 of file Bounds.hpp.
|
inlineconstexpr |
Scales this geometry about a center point.
Definition at line 201 of file Bounds.hpp.
|
inlineconstexpr |
The side lengths of these bounds.
For each dimension, the span is max - min.
Definition at line 113 of file Bounds.hpp.
Referenced by GravityIntersection::FindGravityPoints(), TableColumnString::insertIndices(), TableVectorType< 1, T >::insertIndices(), BinaryFile::readStringBuffer(), TableColumnString::removeIndices(), TableVectorType< 1, T >::removeIndices(), TableVectorType< 1, T >::removeIndices(), Bounds< 3, fltp08 >::surfaceArea(), and Bounds< 3, fltp08 >::volume().
|
inlineconstexpr |
The side length of one axis of the bounds.
The span is max[dim - min[dim].
Definition at line 121 of file Bounds.hpp.
|
inlineconstexpr |
The surface area of the shape.
This is defined as the area between internal space and non-internal space.
Definition at line 154 of file Bounds.hpp.
|
inlinenodiscardconstexpr |
Validates this object.
Returns true if the value at MIN is less than or equal the value at MAX in all dimensions.
Definition at line 704 of file Bounds.hpp.
|
inlineconstexpr |
Returns the volume of the bounds.
This is defined as length in 1 dimension, area in 2 dimensions.
Definition at line 146 of file Bounds.hpp.