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 Visualize is infinitely small, omni-directional source, occupying only a point in space and radiates in all directions equally. 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 HOOPS Visualize, light intenity does not attenuate with distance.
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.
This function's double parameters are internally truncated to float. If you require extra precision, use this function's double-precision variant, DInsert_Local_Light.
HC_KEY DInsert_Local_Light | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Similar to Insert_Local_Light(), but accepts parameters of type double for increased precision. Unlike Insert_Local_Light, the parameters are not truncated.
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. |