#include <c4d_shader.h>
Class which transforms colors from one OCIO color space to another.
Public Member Functions | |
~OcioConverter () | |
Vector64 | TransformColor (const Vector64 &v, COLORSPACETRANSFORMATION colorSpaceTransformation) const |
Vector32 | TransformColor (const Vector32 &v, COLORSPACETRANSFORMATION colorSpaceTransformation) const |
void | TransformColors (Vector64 *v, Int count, COLORSPACETRANSFORMATION colorSpaceTransformation) const |
void | TransformColors (Vector32 *v, Int count, COLORSPACETRANSFORMATION colorSpaceTransformation) const |
void | GetConverter (COLORSPACETRANSFORMATION colorSpaceTransformation, maxon::ColorProfileConvert &converter) const |
Static Public Member Functions | |
static maxon::Result< OcioConverter * > | Init (const BaseDocument *doc, Int32 overrideViewTransform=-1) |
Private Member Functions | |
OcioConverter () | |
|
private |
~OcioConverter | ( | ) |
Destructor.
|
static |
Creates a new converter and Initializes it with the document settings.
[in] | doc | Document from which the OCIO settings are taken. |
[in] | overrideViewTransform | Index within the viewtransform array to override the view transform. Ignored, if the value is not a valid index. |
Vector64 TransformColor | ( | const Vector64 & | v, |
COLORSPACETRANSFORMATION | colorSpaceTransformation | ||
) | const |
Transforms a color.
[in] | v | Input color. |
[in] | colorSpaceTransformation | Specifies source and destination color space. |
Vector32 TransformColor | ( | const Vector32 & | v, |
COLORSPACETRANSFORMATION | colorSpaceTransformation | ||
) | const |
Transforms a color.
[in] | v | Input color. |
[in] | colorSpaceTransformation | Specifies source and destination color space. |
void TransformColors | ( | Vector64 * | v, |
Int | count, | ||
COLORSPACETRANSFORMATION | colorSpaceTransformation | ||
) | const |
Transforms multiple colors. The function overwrites the input colors.
[in,out] | v | Array of colors to convert. |
[in] | count | Number of colors to convert. |
[in] | colorSpaceTransformation | Specifies source and destination color space. |
void TransformColors | ( | Vector32 * | v, |
Int | count, | ||
COLORSPACETRANSFORMATION | colorSpaceTransformation | ||
) | const |
Transforms multiple colors. The function overwrites the input colors.
[in,out] | v | Array of colors to convert. |
[in] | count | Number of colors to convert. |
[in] | colorSpaceTransformation | Specifies source and destination color space. |
void GetConverter | ( | COLORSPACETRANSFORMATION | colorSpaceTransformation, |
maxon::ColorProfileConvert & | converter | ||
) | const |
Gets the converter that is used to do the transformation.
[in] | colorSpaceTransformation | Specifies source and destination color space. |
[out] | converter | Converter that does the transformation. |