Open Search
    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
     
    maxon::Color64 TransformColor (const maxon::Color64 &v, COLORSPACETRANSFORMATION colorSpaceTransformation) const
     
    Vector32 TransformColor (const Vector32 &v, COLORSPACETRANSFORMATION colorSpaceTransformation) const
     
    maxon::Color32 TransformColor (const maxon::Color32 &v, COLORSPACETRANSFORMATION colorSpaceTransformation) const
     
    void TransformColors (Vector64 *v, Int count, COLORSPACETRANSFORMATION colorSpaceTransformation) const
     
    void TransformColors (maxon::Color64 *v, Int count, COLORSPACETRANSFORMATION colorSpaceTransformation) const
     
    void TransformColors (Vector32 *v, Int count, COLORSPACETRANSFORMATION colorSpaceTransformation) const
     
    void TransformColors (maxon::Color32 *v, Int count, COLORSPACETRANSFORMATION colorSpaceTransformation) const
     
    void GetConverter (COLORSPACETRANSFORMATION colorSpaceTransformation, maxon::ColorProfileConvert &converter) const
     
    Bool IsOcioConverter () 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/4]

    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/4]

    maxon::Color64 TransformColor ( const maxon::Color64 v,
    COLORSPACETRANSFORMATION  colorSpaceTransformation 
    ) const

    Transforms a color.

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

    ◆ TransformColor() [3/4]

    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.

    ◆ TransformColor() [4/4]

    maxon::Color32 TransformColor ( const maxon::Color32 v,
    COLORSPACETRANSFORMATION  colorSpaceTransformation 
    ) const

    Transforms a color.

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

    ◆ TransformColors() [1/4]

    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/4]

    void TransformColors ( maxon::Color64 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() [3/4]

    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.

    ◆ TransformColors() [4/4]

    void TransformColors ( maxon::Color32 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.

    ◆ IsOcioConverter()

    Bool IsOcioConverter ( ) const

    Checks if the converter is an OCIO converter.

    Returns
    true if the converter is an OCIO converter, false if the converter is a legacy converter.