Functions | |
HC_KEY | Insert_Local_Light (double x, double y, double z) |
HC_KEY | DInsert_Local_Light (double x, double y, double z) |
HC_KEY Insert_Local_Light | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Inserts an omni-directional "point" source of light into your scene.
x | - The x-position of the point light in object space. | |
y | - The y-position of the point light in object space. | |
z | - The z-position of the point light in object space. |
A local light is similar to a tiny light bulb. The "light bulb" in HOOPS is infinitely small---it occupies only a point in space and radiates in all directions equally (omni-directional). Important considerations are the light's location and color---not its direction. The location of the light is defined by Insert_Local_Light() . The light's location can be modified by the modelling transformations. The light's intensity is defined by the "lights" option of Set_Color() .
In the current version of HOOPS, the intensity of a local light does not decrease as you get further away from it.
If the light is shining on one side of a given face and you're looking at the other side, the side you're looking at is in the shadow of the face and is not lit by the light. Beyond this effect, shadows are not computed by the standard shaders.
The number of lights you can have in a scene is almost unlimited. The screen isn't able to keep getting brighter and brighter as additional lights are inserted, so HOOPS scales the total brightness by the total brightness of all the light sources. See the "light scaling" Driver Option for a means of overriding this calculation.
Turning off the visibility of a light makes that light cease to exist for purposes of performing a lighting calculation. This might be a convenient way to enter and leave "lighted" mode in your program.
Turning off the light visibility also keeps a light placed elsewhere in the segment tree (but within the same window) from shining onto the local geometry. This might be useful for inserting things that don't need to be or shouldn't be lighted, such as annotations, into a lighted window.
HC_KEY DInsert_Local_Light | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Similar to Insert_Local_Light() but accepts and/or returns double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.
x | - The x-position of the point light in object space. | |
y | - The y-position of the point light in object space. | |
z | - The z-position of the point light in object space. |