Packageaway3d.tools.utils
Classpublic class Ray

Public Properties
 PropertyDefined by
  dir : Vector3D
Ray
  orig : Vector3D
Ray
  planeNormal : Vector3D
[read-only] Defines the directional normal of the Ray object
Ray
Public Methods
 MethodDefined by
  
Ray
()
Ray
  
getIntersect(p0:Vector3D, p1:Vector3D, v0:Vector3D, v1:Vector3D, v2:Vector3D):Vector3D
Returns a Vector3D where the ray intersects a plane inside a triangle Returns null if no hit is found.
Ray
  
intersectBoundingRadius(pos:Vector3D, radius:Number):Boolean
Checks ray intersection by mesh.boundingRadius
Ray
Property detail
dirproperty
dir:Vector3D  [read-write]Implementation
    public function get dir():Vector3D
    public function set dir(value:Vector3D):void
origproperty 
orig:Vector3D  [read-write]Implementation
    public function get orig():Vector3D
    public function set orig(value:Vector3D):void
planeNormalproperty 
planeNormal:Vector3D  [read-only]

Defines the directional normal of the Ray object

Implementation
    public function get planeNormal():Vector3D
Constructor detail
Ray()constructor
public function Ray() Init Parameters
Method detail
getIntersect()method
public function getIntersect(p0:Vector3D, p1:Vector3D, v0:Vector3D, v1:Vector3D, v2:Vector3D):Vector3D

Returns a Vector3D where the ray intersects a plane inside a triangle Returns null if no hit is found.

Parameters
p0:Vector3D
 
p1:Vector3D
 
v0:Vector3D
 
v1:Vector3D
 
v2:Vector3D

Returns
Vector3D — Vector3D The intersection point
intersectBoundingRadius()method 
public function intersectBoundingRadius(pos:Vector3D, radius:Number):Boolean

Checks ray intersection by mesh.boundingRadius

Parameters
pos:Vector3D
 
radius:Number

Returns
Boolean — Boolean If the ray intersect the mesh boundery
Wiki link
Click to go to the wiki page for 'away3d.tools.utils.Ray'

Code examples

Comments