v_sim.GlLights¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class v_sim.GlLights¶
A short way to access #_VisuGlLights objects.
- classmethod new()¶
- Returns:
a newly created
v_sim.GlLights. Usev_sim.GlLights.free() to free such an object.- Return type:
Create a new
v_sim.GlLightsobject. It contains no light when created. Usev_sim.GlLights.add() to add new lights andv_sim.GlLights.remove() to remove others.
- add(light)¶
- Parameters:
light (
v_sim.GlLight) – av_sim.GlLightobject.- Returns:
Trueif visu_gl_lights_apply() should be called.- Return type:
This method adds the given light to the list of known lights declared in the given environnement. The light is not copied and should not be freed when stored in the environnement.
- available()¶
- Returns:
Trueif the maximum number of lights allowed by OpenGL implementation is not reached yet.- Return type:
Inquire if one can add more lights to the scene.
New in version 3.8.
- free()¶
Free memory occupied by the given environnement.
- getList()¶
- Returns:
a list of
v_sim.GlLightobjects. Should not be freed.- Return type:
Retrieve the list of known
v_sim.GlLightused by the given environnement.
- ref()¶
- Returns:
itself.
- Return type:
Increase the ref counter.
New in version 3.7.
- remove(light)¶
- Parameters:
light (
v_sim.GlLight) – av_sim.GlLightobject.- Returns:
Trueif visu_gl_lights_apply() should be called.- Return type:
This method removes the given light from the list of known lights declared in the given environnement. The light argument is first removed and then freed by a call to
GLib.free().
- removeAll()¶
-
Empty the list of stored lights. All stored lights objects are freed.
- unref()¶
Decrease the ref counter, free all memory if counter reachs zero.
New in version 3.7.