Q3DLight Class | Qt Data Visualization 5.9

Qt 5.9 | Qt Data Visualization | C++ Classes | Q3DLight

Qt 5.9.3 Reference Documentation

# Q3DLight Class

Representation of a light source in 3D space. More...

Header: | #include <Q3DLight>
Since: | QtDataVisualization 1.0
Instantiated By: | Light3D
Inherits: | Q3DObject

- List of all members, including inherited members

## Properties

- autoPosition : bool

- 2 properties inherited from Q3DObject
- 1 property inherited from QObject

## Public Functions

| Q3DLight(QObject *parent = Q_NULLPTR)
virtual | ~Q3DLight()
bool | isAutoPosition()
void | setAutoPosition(bool enabled)

- 4 public functions inherited from Q3DObject
- 32 public functions inherited from QObject

## Signals

void | autoPositionChanged(bool autoPosition)

- 1 signal inherited from Q3DObject
- 2 signals inherited from QObject

### Additional Inherited Members

- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected functions inherited from Q3DObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

Representation of a light source in 3D space.

Q3DLight represents a monochrome light source in 3D space.

Note: Default light has isAutoPosition() `true`.

## Property Documentation

### autoPosition : bool

This property holds whether the light position follows the camera automatically.

Note: Has no effect if shadows are enabled. Remember to disable shadows before setting light's position, or it will be overwritten by automatic positioning if `isAutoPosition()` is `false`.

This property was introduced in QtDataVisualization 5.9.

Access functions:

bool | isAutoPosition()
void | setAutoPosition(bool enabled)

Notifier signal:

void | autoPositionChanged(bool autoPosition)

## Member Function Documentation

### Q3DLight::Q3DLight(QObject *parent = Q_NULLPTR)

Constructs a new 3D light located at origin. An optional parent parameter can be given and is then passed to QObject constructor.

### `[virtual]` Q3DLight::~Q3DLight()

Destroys the light object.