Add lights in a viewer

Hi,

How do we add lights(V3d_Light instances) in a V3d_Viewer?
I saw the feature 'DelLight' attached on the V3d_Viewer class, but 'AddLight' is a private feature.
When we activate a light in a V3d_Viewer instance, does it activate the light for all the V3d_Wiew managed by a V3d_Viewer?
How can we query that a particular light is activated in a viewer or in a view?
Can you explain the relationships between a V3d_Viewer and V3d_View classes?

Thanks.

n-southall's picture

Try:

Handle(V3d_SpotLight) myNewSpotLight = new V3d_SpotLight(...)

myView->SetLightOn();

As well as spotlights there are classes for ambient, directional and positional lights

Neil

MBD's picture

Hi,

have a look at SampleViewer3D.

mbd