Public Member Functions

HPS_INLINE bool Contains (Cuboid_3D const &contained) const
 
HPS_INLINE bool Contains (Point_3D< F > const &contained) const
 
HPS_INLINE bool Contains (Point_3D< F > const &contained, F epsilon) const
 
HPS_INLINE Cuboid_3DContract (F border)
 
 Cuboid_3D ()
 
template<typename D >
 Cuboid_3D (Cuboid_3D< D > const &that)
 
 Cuboid_3D (Sphere_3D< F > const &that)
 
 Cuboid_3D (Point_3D< F > const &in_min, Point_3D< F > const &in_max)
 
 Cuboid_3D (size_t count, Point_3D< F > const *points)
 
template<typename T >
 Cuboid_3D (size_t count, T const *indices, Point_3D< F > const *points)
 
 Cuboid_3D (Rectangle const &that)
 
HPS_INLINE Vector_3D< F > Diagonal () const
 
HPS_INLINE Cuboid_3DExpand (F border)
 
HPS_INLINE void Generate_Cuboid_Points (Point_3D< F > *points) const
 
HPS_INLINE Cuboid_3DIntersect (Cuboid_3D const &cuboid)
 
HPS_INLINE bool Intersecting (Cuboid_3D const &cuboid) const
 
HPS_INLINE bool Intersecting (Cuboid_3D const &cuboid, F const allowance) const
 
HPS_INLINE bool Intersecting (int dimension, Cuboid_3D const &cuboid) const
 
HPS_INLINE bool Intersecting (int dimension, Cuboid_3D const &cuboid, F const allowance) const
 
HPS_INLINE bool Intersecting (Point_3D< F > const &start, Vector_3D< F > const &direction) const
 
HPS_INLINE bool Intersecting (Point_3D< F > const &point1, Point_3D< F > const &point2) const
 
void Invalidate ()
 
HPS_INLINE bool IsValid () const
 
HPS_INLINE void Merge (Cuboid_3D const &cuboid)
 
HPS_INLINE void Merge (Sphere_3D< F > const &sphere)
 
HPS_INLINE void Merge (Point_3D< F > const &point)
 
void Merge (size_t count, Point_3D< F > const *points)
 
template<typename T >
void Merge (size_t count, T const *indices, Point_3D< F > const *points)
 
HPS_INLINE bool operator!= (Cuboid_3D const &cuboid) const
 
HPS_INLINE bool operator== (Cuboid_3D const &cuboid) const
 
HPS_INLINE Cuboid_3DUnion (Cuboid_3D const &cuboid)
 
HPS_INLINE F Volume () const
 

Static Public Member Functions

static HPS_INLINE Cuboid_3D Invalid ()
 

Public Attributes

Point_3D< F > max
 
Point_3D< F > min
 

Constructor & Destructor Documentation

◆ Cuboid_3D() [1/7]

template<typename F>
HPS::Cuboid_3D< F >::Cuboid_3D ( )
inline

Creates an invalid cuboid.

◆ Cuboid_3D() [2/7]

template<typename F>
template<typename D >
HPS::Cuboid_3D< F >::Cuboid_3D ( Cuboid_3D< D > const &  that)
inlineexplicit

Creates a cuboid equal to another cuboid.

Parameters
thatThe other cuboid

◆ Cuboid_3D() [3/7]

template<typename F>
HPS_INLINE HPS::Cuboid_3D< F >::Cuboid_3D ( Sphere_3D< F > const &  that)

Creates a cuboid that will fit tightly around a sphere.

Parameters
thatThe sphere to fit

◆ Cuboid_3D() [4/7]

template<typename F>
HPS::Cuboid_3D< F >::Cuboid_3D ( Point_3D< F > const &  in_min,
Point_3D< F > const &  in_max 
)
inline

Creates a cuboid based on two points, which become opposite corners of the cuboid.

Parameters
in_minThe first point of the cuboid
in_maxThe second point of the cuboid

◆ Cuboid_3D() [5/7]

template<typename F>
HPS::Cuboid_3D< F >::Cuboid_3D ( size_t  count,
Point_3D< F > const *  points 
)
inline

Creates a cuboid based on an array of points. Only the minimum and maximum points are used, which become opposite corners of the cuboid. If count is 0, then an invalid cuboid is returned.

Parameters
countThe size of points
pointsAn array of points

◆ Cuboid_3D() [6/7]

template<typename F>
template<typename T >
HPS::Cuboid_3D< F >::Cuboid_3D ( size_t  count,
T const *  indices,
Point_3D< F > const *  points 
)
inline

Creates a cuboid based on an array of points. Only the minimum and maximum points are used, which become opposite corners of the cuboid. If count is 0, then an invalid cuboid is returned.

Parameters
countThe number of index values in indices
indicesthe index values used to select points
pointsAn array of points

◆ Cuboid_3D() [7/7]

template<typename F>
HPS::Cuboid_3D< F >::Cuboid_3D ( Rectangle const &  that)
inline

Creates a cuboid with the same dimensions as a rectangle.

Parameters
thatThe rectangle to create the cuboid from

Member Function Documentation

◆ Contains() [1/3]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Contains ( Cuboid_3D< F > const &  contained) const
inline

Returns true if the cuboid completely contains the parameter cuboid.

Parameters
containedThe other cuboid

◆ Contains() [2/3]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Contains ( Point_3D< F > const &  contained) const
inline

Returns true if the cuboid completely contains a cuboid based on the parameter points.

Parameters
containedThe points to compare against

◆ Contains() [3/3]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Contains ( Point_3D< F > const &  contained,
epsilon 
) const
inline

Returns true if the cuboid completely contains a cuboid based on the parameter points, with a tolerance value.

Parameters
containedThe points to compare against
epsilonThe tolerance value

◆ Contract()

template<typename F>
HPS_INLINE Cuboid_3D& HPS::Cuboid_3D< F >::Contract ( border)
inline

Contracts both corners of this cuboid.

Parameters
borderAmount to contract

◆ Diagonal()

template<typename F>
HPS_INLINE Vector_3D<F> HPS::Cuboid_3D< F >::Diagonal ( ) const
inline

Returns the diagonal vector of the cuboid.

◆ Expand()

template<typename F>
HPS_INLINE Cuboid_3D& HPS::Cuboid_3D< F >::Expand ( border)
inline

Expands both corners of this cuboid.

Parameters
borderAmount to expand

◆ Generate_Cuboid_Points()

template<typename F>
HPS_INLINE void HPS::Cuboid_3D< F >::Generate_Cuboid_Points ( Point_3D< F > *  points) const
inline

Assigns the eight corners of the cuboid based on the points in the parameter array. The array must contain at least eight points.

Parameters
pointsThe array which contains points

◆ Intersect()

template<typename F>
HPS_INLINE Cuboid_3D& HPS::Cuboid_3D< F >::Intersect ( Cuboid_3D< F > const &  cuboid)
inline

Replaces this cuboid with the intersection of this cuboid and the parameter cuboid.

Parameters
cuboidThe cuboid to compute intersection against

◆ Intersecting() [1/6]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Intersecting ( Cuboid_3D< F > const &  cuboid) const
inline

Determines whether this cuboid intersects with another cuboid.

Parameters
cuboidThe other cuboid

◆ Intersecting() [2/6]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Intersecting ( Cuboid_3D< F > const &  cuboid,
F const  allowance 
) const
inline

Determines whether this cuboid intersects with another cuboid. Allows for a tolerance value to be considered.

Parameters
cuboidThe other cuboid

◆ Intersecting() [3/6]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Intersecting ( int  dimension,
Cuboid_3D< F > const &  cuboid 
) const
inline

Returns true if this cuboid intersects with the parameter cuboid along a certain axis.

Parameters
dimensionMust be either 0, 1, or 2. Corresponds to the X, Y, and Z axes.
cuboidThe cuboid to test against

◆ Intersecting() [4/6]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Intersecting ( int  dimension,
Cuboid_3D< F > const &  cuboid,
F const  allowance 
) const
inline

Returns true if this cuboid intersects with the parameter cuboid along a certain axis, and considers a tolerance value.

Parameters
dimensionMust be 0, 1, or 2. Corresponds to the X, Y, and Z axes.
cuboidThe cuboid to test against
allowanceThe tolerance value

◆ Intersecting() [5/6]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Intersecting ( Point_3D< F > const &  start,
Vector_3D< F > const &  direction 
) const
inline

Determines whether this cuboid intersects with a ray.

Parameters
startThe start point of the ray.
directionThe direction of the ray.

◆ Intersecting() [6/6]

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::Intersecting ( Point_3D< F > const &  point1,
Point_3D< F > const &  point2 
) const
inline

Determines whether this cuboid intersects with an infinite line.

Parameters
point1A point on the line.
point2A different point on the line.

◆ Invalid()

template<typename F>
static HPS_INLINE Cuboid_3D HPS::Cuboid_3D< F >::Invalid ( )
inlinestatic

Creates an invalid cuboid.

◆ Invalidate()

template<typename F>
void HPS::Cuboid_3D< F >::Invalidate ( )
inline

Invalidates this cuboid.

◆ IsValid()

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::IsValid ( ) const
inline

Tests whether this cuboid is valid. The cuboid is considered valid if the minimum point is less than or equal to the maximum point.

◆ Merge() [1/5]

template<typename F>
HPS_INLINE void HPS::Cuboid_3D< F >::Merge ( Cuboid_3D< F > const &  cuboid)
inline

Merges this cuboid with another cuboid. Only the smallest and largest values of the cuboids are retained.

Parameters
cuboidThe other cuboid

◆ Merge() [2/5]

template<typename F>
HPS_INLINE void HPS::Cuboid_3D< F >::Merge ( Sphere_3D< F > const &  sphere)
inline

Merges this cuboid with another cuboid created from a sphere. Only the smallest and largest values of the cuboids are retained.

Parameters
cuboidThe other cuboid

◆ Merge() [3/5]

template<typename F>
HPS_INLINE void HPS::Cuboid_3D< F >::Merge ( Point_3D< F > const &  point)
inline

Expands the cuboid to include a point.

Parameters
pointThe point to include

◆ Merge() [4/5]

template<typename F>
void HPS::Cuboid_3D< F >::Merge ( size_t  count,
Point_3D< F > const *  points 
)
inline

Expands this cuboid to include a set of points.

Parameters
countThe number of points in points
pointsThe array of points

◆ Merge() [5/5]

template<typename F>
template<typename T >
void HPS::Cuboid_3D< F >::Merge ( size_t  count,
T const *  indices,
Point_3D< F > const *  points 
)
inline

Expands this cuboid to include a set of indexed points.

Parameters
countThe number of index values in indices
indicesthe index values used to select points
pointsThe array of points

◆ operator!=()

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::operator!= ( Cuboid_3D< F > const &  cuboid) const
inline

Determines if the maximum and minimum points of this cuboid are not equal to the maximum and minimum points of another cuboid.

Parameters
cuboidThe other cuboid

◆ operator==()

template<typename F>
HPS_INLINE bool HPS::Cuboid_3D< F >::operator== ( Cuboid_3D< F > const &  cuboid) const
inline

Determines if the maximum and minimum points of this cuboid are equal to the maximum and minimum points of another cuboid.

Parameters
cuboidThe other cuboid

◆ Union()

template<typename F>
HPS_INLINE Cuboid_3D& HPS::Cuboid_3D< F >::Union ( Cuboid_3D< F > const &  cuboid)
inline

Replaces this cuboid with the union of this cuboid and the parameter cuboid.

Parameters
cuboidThe cuboid to compute union against

◆ Volume()

template<typename F>
HPS_INLINE F HPS::Cuboid_3D< F >::Volume ( ) const
inline

Returns the volume of this cuboid.

Member Data Documentation

◆ max

template<typename F>
Point_3D<F> HPS::Cuboid_3D< F >::max

The maximum point of this cuboid

◆ min

template<typename F>
Point_3D<F> HPS::Cuboid_3D< F >::min

The minimum point of this cuboid


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