Other usage issues Fri, 07/25/2003 - 11:48

Add lights in a viewer

Author

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.

Discussion

Commenter-1 Fri, 07/25/2003 - 13:22

Try:

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

myView->SetLightOn();

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

Neil

Commenter-2 Fri, 07/25/2003 - 15:41

Hi,

have a look at SampleViewer3D.

Commenter-2