STATE_engine_2D_point_to_3D_point_on_sphere

 

 


   This function is similar to STATE_engine_2D_point_to_3D() only that

   For the cases that we just need to know the direction in the world that our mouse (2d point)
   is pointing it is enough to call STATE_engine_2D_point_to_3D_point_on_sphere()
   If however we need to know the object or the polygon that is pointed by the 2D point then
   we should call STATE_engine_2D_point_to_3D() instead.
   Note that STATE_engine_2D_point_to_3D_point_on_sphere() is much faster then STATE_engine_2D_point_to_3D()
   An example:
  		A player in a game holds a shotgun. when the player moves the mouse we want to set the
  		direction of the shotgun accordingly. To do so it is enough to call STATE_engine_2D_point_to_3D_point_on_sphere()
  		and call the slower function STATE_engine_2D_point_to_3D() only when the player make a shot (only then we will need to know
  		what object / polygon in the world got hit.

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com