For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Add lights in a viewer

Hugues Delorme's picture
Forums: 

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.

Neil'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