Class Index | File Index

Classes


Class R.struct.RayInfo


Extends R.engine.PooledObject.
An object which contains information about a ray. The values of the ray structure are read directly.
Defined in: rayinfo.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
R.struct.RayInfo(start, dir)
Creates a ray info data structure for ray casting.
Field Summary
Field Attributes Field Name and Description
 
A data object which can contain additional information about the ray
 
The time delta between the world time and the last time the engine was updated
 
The direction and magnitude of the ray
 
The point along the ray at which the collision occurred
 
The collision normal
 
The overlap in pixels
 
The object that was collided with
 
The starting point of the ray
 
The world time at the time of the collision
Method Summary
Method Attributes Method Name and Description
 
Destroy the collision data object.
 
Release the collision data object back into the pool for reuse.
 
set(impact, shape, data)
Set the point of impact along the ray.
Methods borrowed from class R.engine.PooledObject:
clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.struct.RayInfo(start, dir)
Creates a ray info data structure for ray casting.
Parameters:
start
{R.math.Point2D} The start point of the ray
dir
{R.math.Vector2D} The direction vector
Field Detail
data
A data object which can contain additional information about the ray

delta
The time delta between the world time and the last time the engine was updated

direction
The direction and magnitude of the ray

impactPoint
The point along the ray at which the collision occurred

normal
The collision normal

overlap
The overlap in pixels

shape
The object that was collided with

startPoint
The starting point of the ray

worldTime
The world time at the time of the collision
Method Detail
destroy()
Destroy the collision data object.

release()
Release the collision data object back into the pool for reuse.

set(impact, shape, data)
Set the point of impact along the ray.
Parameters:
impact
{R.math.Point2D} The impact point
shape
{R.engine.PooledObject} The object that was impacted
data Optional
{Object} Optional data object

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:21 GMT-0400 (EDT)