STATE_engine_3D_point_to_2D

 

 



   Gets a point in the world and returns the 
   matching point on the screen.
   Arguments:
  	p2D
  		On call p2D[2] has no meaning
  		on exit it will contain the 2D point.
  
  	p3D
  		on call p3D[3] should be the 3D point in the world.
  
   Return value:
   returns -1 if an error occurred. p2D contains 0,0
   returns 0 if every thing is OK. p2D contains a valid result
   returns 1 if the point is out of the window. p2D contains a valid result.
   returns 2 if the point is behind the camera. p2D contains a valid result though  not accurate
   returns 3 if both: behind the camera and out of the window. p2D contains a valid result though  not accurate
  
  	Remark:
  		Note that this function doesn't take a camera handle as one of its parameters.
  		Note also that the result of the operation is dependent on the current camera that is used.
  		The engine will use the current camera (The camera that was used in the last render)
  		In most of the cases this is the right thing to do. In the case when you want
  		to use a different camera for the calculation then use STATE_camera_set_current()
  		Before calling this function.
  

 

 

Go to page 1      Select API

 

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