geomc 1.0
A c++ linear algebra template library
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Oriented< Rect< T, N > > Class Template Reference

Partial specialization of Oriented for Rects. More...

#include <geomc/shape/Oriented.h>

Inheritance diagram for Oriented< Rect< T, N > >:
Convex< T, N, Oriented< Rect< T, N > > > RayIntersectable< T, N, Oriented< Rect< T, N > > > Bounded< T, _N, Derived >

Public Types

typedef PointType< T, N >::point_t point_t
 
typedef T elem_t
 The coordinate type of this shape.
 

Public Member Functions

 Oriented ()
 Construct an empty axis-aligned box.
 
 Oriented (const Rect< T, N > &box)
 Construct an axis-aligned box from the given Rect.
 
 Oriented (const Rect< T, N > &box, const AffineTransform< T, N > &xf)
 Construct an oriented box from the given Rect and object-to-world transformation.
 
Rect< T, Nbounds () const
 Obtain an axis-aligned bounding box for this shape.
 
Oriented< Rect< T, N > > oriented_bounds () const
 Return this.
 
Vec< T, Nconvex_support (Vec< T, N > d) const
 
bool contains (Vec< T, N > p) const
 Returns true if and only if p is inside or on the surface of this shape.
 
bool intersects (const Rect< T, N > &r)
 
bool intersects (const Oriented< Rect< T, N > > &b1)
 
Rect< T, 1 > intersect (const Ray< T, N > &r) const
 Ray-shape intersection.
 
volume () const
 Compute the volume of this transformed Rect.
 
bool intersects (const Convex< T, N, Shape > &other) const
 Convex shape overlap test. More...
 

Public Attributes

Rect< T, Nshape
 Un-transformed extents.
 
AffineTransform< T, Nxf
 Transformation orienting shape.
 

Static Public Attributes

static constexpr size_t N = _N
 The dimension of this shape.
 

Detailed Description

template<typename T, index_t N>
class geom::Oriented< Rect< T, N > >

Partial specialization of Oriented for Rects.

Member Function Documentation

◆ intersects() [1/3]

bool intersects ( const Convex< T, N, Shape > &  other) const
inlineinherited

Convex shape overlap test.

Returns
True if and only if this convex shape overlaps other; false otherwise.

◆ intersects() [2/3]

bool intersects ( const Oriented< Rect< T, N > > &  b1)
inline

Test whether this Oriented<Rect> overlaps another.

Parameters
b1OritentedRect to test against.
Returns
true if and only if this overlaps with b1; false otherwise.

◆ intersects() [3/3]

bool intersects ( const Rect< T, N > &  r)
inline

Test whether this Oriented<Rect> overlaps an axis-aligned Rect.

Parameters
b1OritentedRect to test against.
Returns
true if and only if this overlaps with b1; false otherwise.

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