Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: mappingdev
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (15 sloc) 1.16 KB



A lightweight set of tools for intersection testings (e.g. does a ray intersect a plane).



A Ray is defined by the starting point s and the transmission vector t . Check equation (5) at

We define a ray as an infinite line (continuing infinitely forwards and backwards along the line t and -t starting at s .

The line is defined by points s + u * t , where {-inf < u < +inf}.

A Line segment is a line which has finite length. We denote a line segment as a ofRay between s and t where infinite is set to false , i.e. a Line segment is a finite section along a ray


A Plane is defined by a position on the plane c and a normal vector n .

We can also define the plane using the notation a x + b y + c z + d = 0 (by using the appropriate constructor).

For a non-infinite plane, we define the bounds of the Plane segment with the 2D vector bounds, and the up vector up. We presume that the up vector and n vectors are perpendicular.


All objects within ofxRay inherit from ofGeometric.

Jump to Line
Something went wrong with that request. Please try again.