MixingCameraExtension

GetSubCameraOfClass

Returns a sub-camera with given class. Returns nullptr if not found or invalid. Note that inherited classes will also be considered as desired. That is, if current sub-camera is B inherited from A, and your specified camera class is A, this function will return this sub-camera as it is a type of A.

Input / Output
Description

Input

Target

A MixingCameraExtensiontarget object.

Camera Class

The desired camera class you want to extract.

Output

Return Value

A camera object with your specified class. Can be nullptr.

GetSubCameraOfIndex

Returns a sub-camera at specified index. This function will check if it's valid. If the input index is out of range, it will return nullptr.

Input / Output
Description

Input

Target

A MixingCameraExtensiontarget object.

Index

Camera index, in the order of how you set it up.

Output

Return Value

A camera object at the given index. Can be nullptr.

NormalizeWeights

Normalize an array of input weights. Make sure the weight number is equal to the number of sub-cameras. Besides, this function will not take invalid cameras into account. If no valid camera is found, it will return the input weight array. If all input weights are zero, it will output an average weight array.

Input / Output
Description

Input

Target

A MixingCameraExtensiontarget object.

In Weights

Un-normalized weights. Make sure the number is equal to the number of sub-cameras.

Output

Return Value

A normalized weight array. Sum is 1.

SetWeights

Set weights by given input weights.

Input / Output
Description

Input

Target

A MixingCameraExtensiontarget object.

In Weights

Input weights. Make sure their sum is 1.

Last updated