A Direction_d is a vector in the $$ddimensional vector space where we forget about its length. We represent directions in $$ddimensional space as a tuple $$(h_{0},...,h_{d}) of variables of type RT which we call the homogeneous coordinates of the direction. The coordinate $$h_{d} must be positive. The Cartesian coordinates of a direction are $$c_{i} = h_{i}/h_{d} for $$0 i < d, which are of type FT. Two directions are equal if their Cartesian coordinates are positive multiples of each other. Directions are in onetoone correspondence to points on the unit sphere.
 
the ring type.
 
 
the field type.
 
 
the linear algebra layer.
 
 
a readonly iterator for the deltas of dir.
 
 
construction tag.

 
introduces a variable dir of
type Direction_d<Kernel>.
 
 
introduces a variable dir of type Direction_d<Kernel>
initialized to the direction of v.
 
 
 
introduces a variable dir of type Direction_d<Kernel> in
dimension d with representation tuple set [first,last). Precondition: d is nonnegative, [first,last) has d elements. Requirement: The value type of InputIterator is RT.
 
 
returns
a variable dir of type Direction_d<Kernel> initialized to the
direction of the $$ith base vector of dimension $$d. Precondition: $$0 i < d.
 
 
introduces a variable dir of type Direction_d<Kernel> in
$$2dimensional space.
 
 
introduces a variable dir of type Direction_d<Kernel> in
$$3dimensional space.


 returns the dimension of dir. 


returns the $$ith component of dir. Precondition: $$0 i < d. 


returns the $$ith delta of dir. Precondition: $$0 i < d. 
 
 
returns an iterator pointing to the first delta of dir.  
 
 returns an iterator pointing beyond the last delta of dir.  

 returns a vector pointing in direction dir. 

 
returns true iff dir.delta(i)==0 for all $$0 i < d.  
 
 
returns $$t(p).  
 
 returns the direction opposite to dir.  
 
 returns the direction opposite to dir. 
Directions are implemented by arrays of integers as an item type. All operations like creation, initialization, tests, inversion, input and output on a direction $$d take time $$O(d.dimension()). dimension(), coordinate access and conversion take constant time. The space requirement is $$O(d.dimension()).