Overseer.World.Ray Object

This is a service object that allows for simple ray-casting inside a 3D map.

Properties (Methods)

(intersection, intersectTag, finish, start)

 

Vector intersection

   

Following a call to the Intersect() method, this will contain the point at which the ray intersected a 3D Entity, including the Overseer® table.

 

long intersectTag

   

Following a call to the Intersect() method, this will contain the tag number of the 3D object intersected by the ray.

 

Vector finish

   

Use this to input the value for the endpoint of the ray.

 

Vector start

   

Use this to input the value for the start of the ray.

Methods (Properties)

(Intersect , MouseRay)

 

bool Intersect(void)

   

Call this function to calculate where a ray intersects with the 3D map. First set the start and finish Vector values, then call the method. It will return true if the ray intersects anything on the map, including the Overseer® table. The point of intersection will then be stored in intersection, while the tag of the object intersected can be found in intersectTag.

 

void MouseRay(long mouseX, long mouseY)

    Fills start and finish based on 2D mouse coordinate on screen. Designed to be used together with Overseer.Window object as source of mouse coordinates.


Copyright© 2001 Thought Guild Inc.