nape.geom.Ray
Top
|
Static Methods
|
Constructor
|
Instance Properties
|
Instance Methods
Overview
nape
nape.callbacks
nape.constraint
nape.dynamics
nape.geom
nape.hacks
nape.phys
nape.shape
nape.space
nape.symbolic
nape.util
type
class
Parametrically defined ray used in ray casting functions.
Static Methods
static function
fromSegment
(start:
Vec2
, end:
Vec2
):
Ray
Create ray representing a line segment.
Constructor
function
new
(origin:
Vec2
, direction:
Vec2
)
Construct new Ray.
Instance Properties
var
direction
:
Vec2
Direction of ray.
var
maxDistance
:
Float
= infinity
The maximum distance for ray to be queried.
var
origin
:
Vec2
Origin of ray.
readonly var
userData
:
Dynamic
<
Dynamic
> = {}
Dynamic object for user to store additional data.
Instance Methods
function
aabb
():
AABB
Compute bounding box of ray.
function
at
(distance:
Float
, weak:
Bool
= false):
Vec2
Compute point along ray at given distance.
function
copy
():
Ray
Produce a copy of this ray.