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

Ray class. More...

#include <geomc/linalg/Ray.h>

Public Types

typedef PointType< T, N >::point_t point_t
 The type of a point with the same dimension as this ray; a Vec<T,N> if N is greater than 1; or a T if N is 1.
 

Public Member Functions

 Ray ()
 Construct a ray through the origin directed along the +x axis.
 
 Ray (point_t o, point_t v)
 Construct a ray through the point o with direction v.
 
Ray< T, N > operator- () const
 Return a ray pointing in the opposite direction.
 
template<index_t M>
Ray< T, M > resized () const
 Change the dimensionality of this Ray.
 
point_t at_distance (T d) const
 Return the point along this ray's direction, at distance d from the ray origin.
 
point_t at_multiple (T s) const
 Return the point origin + s * direction.
 
point_t neg () const
 Return ray pointing in the opposite direction.
 
point_t project (point_t p) const
 Find the point on the ray nearest to p by orhtogonally projecting p onto it.
 
sdf (point_t p) const
 Signed distance from p to the nearest point on the ray.
 
dist2 (point_t p) const
 Compute the square of the distance from p to the nearest point on the ray.
 

Public Attributes

point_t origin
 Origin of ray.
 
point_t direction
 Direction of ray.
 

Related Functions

(Note that these are not member functions.)

template<typename T , index_t N>
PointType< T, N >::point_t operator* (const Ray< T, N > r, T s)
 
template<typename T , index_t N>
PointType< T, N >::point_t operator* (T s, const Ray< T, N > r)
 

Detailed Description

template<typename T, index_t N>
class geom::Ray< T, N >

Ray class.

Template Parameters
TCoordinate type.
NDimensionality.

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