OcioConverter Class Reference

#include <c4d_shader.h>

Detailed Description

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 ()
 

Constructor & Destructor Documentation

◆ OcioConverter()

OcioConverter ( )
private

◆ ~OcioConverter()

Destructor.

Member Function Documentation

◆ Init()

static maxon::Result<OcioConverter*> Init ( const BaseDocument doc,
Int32  overrideViewTransform = -1 
)
static

Creates a new converter and Initializes it with the document settings.

Parameters
[in]docDocument from which the OCIO settings are taken.
[in]overrideViewTransformIndex within the viewtransform array to override the view transform. Ignored, if the value is not a valid index.
Returns
New OCIO converter.

◆ TransformColor() [1/2]

Vector64 TransformColor ( const Vector64 v,
COLORSPACETRANSFORMATION  colorSpaceTransformation 
) const

Transforms a color.

Parameters
[in]vInput color.
[in]colorSpaceTransformationSpecifies source and destination color space.
Returns
The transformed color.

◆ TransformColor() [2/2]

Vector32 TransformColor ( const Vector32 v,
COLORSPACETRANSFORMATION  colorSpaceTransformation 
) const

Transforms a color.

Parameters
[in]vInput color.
[in]colorSpaceTransformationSpecifies source and destination color space.
Returns
The transformed color.

◆ TransformColors() [1/2]

void TransformColors ( Vector64 v,
Int  count,
COLORSPACETRANSFORMATION  colorSpaceTransformation 
) const

Transforms multiple colors. The function overwrites the input colors.

Parameters
[in,out]vArray of colors to convert.
[in]countNumber of colors to convert.
[in]colorSpaceTransformationSpecifies source and destination color space.

◆ TransformColors() [2/2]

void TransformColors ( Vector32 v,
Int  count,
COLORSPACETRANSFORMATION  colorSpaceTransformation 
) const

Transforms multiple colors. The function overwrites the input colors.

Parameters
[in,out]vArray of colors to convert.
[in]countNumber of colors to convert.
[in]colorSpaceTransformationSpecifies source and destination color space.

◆ GetConverter()

void GetConverter ( COLORSPACETRANSFORMATION  colorSpaceTransformation,
maxon::ColorProfileConvert &  converter 
) const

Gets the converter that is used to do the transformation.

Parameters
[in]colorSpaceTransformationSpecifies source and destination color space.
[out]converterConverter that does the transformation.