MixingCameraExtension
Last updated
Last updated
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
Target
A MixingCameraExtension
target object.
Camera Class
The desired camera class you want to extract.
Output
Return Value
A camera object with your specified class. Can be nullptr.
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
Target
A MixingCameraExtension
target 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.
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
Target
A MixingCameraExtension
target 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.
Set weights by given input weights.
Input
Target
A MixingCameraExtension
target object.
In Weights
Input weights. Make sure their sum is 1.