Code archives/3D Graphics - Misc/Terrain cos_angle

This code has been declared by its author to be Public Domain code.

Download source code

Terrain cos_angle by elias_t2003
Get it Here:
http://www.freewebs.com/elias_t/tercosangle.zip
;Code to show how to get the cos angle between a 3dpoint
;and a specific triangle-part of a terrain

;mouselook and w,a,s,d,r,f move

;cursor keys move test triangle

;theta#=the angle between the line of the 3dpoint and the plane 
;defined by the triangle

;Use cos_angle(camera,check,s0,s1,s2,0) to compare with a moving point

;Or cos_angle(steady,check,s0,s1,s2,1) to compare with the ground


Use the link above /.

Comments

None.

Code Archives Forum