1 /* $Id: lighting.h,v 1.3 2004-08-28 23:17:45 schaffner Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * Lighting system prototypes, structures, etc.
25 #define MAX_LIGHT 0x10000 // max value
27 #define MIN_LIGHT_DIST (F1_0*4)
29 extern fix Beam_brightness;
30 extern fix Dynamic_light[MAX_VERTICES];
32 extern void set_dynamic_light(void);
34 // Compute the lighting from the headlight for a given vertex on a face.
36 // point - the 3d coords of the point
37 // face_light - a scale factor derived from the surface normal of the face
38 // If no surface normal effect is wanted, pass F1_0 for face_light
39 fix compute_headlight_light(vms_vector *point,fix face_light);
41 // compute the average dynamic light in a segment. Takes the segment number
42 fix compute_seg_dynamic_light(int segnum);
44 // compute the lighting for an object. Takes a pointer to the object,
45 // and possibly a rotated 3d point. If the point isn't specified, the
46 // object's center point is rotated.
47 fix compute_object_light(object *obj,vms_vector *rotated_pnt);
49 // turn headlight boost on & off
50 void toggle_headlight_active(void);
52 #endif /* _LIGHTING_H */