GetColorOfComponent (inline)

...

Syntax

public const string enginedll = @"engine.dll";

public static UInt32 GetColorOfComponent(Int64 owlInstanceColorComponent)
        {
            System.Diagnostics.Debug.Assert(IsInstanceOfClass(owlInstanceColorComponent, "ColorComponent"));
            Int64 model = GetModel(owlInstanceColorComponent);

            string[] rgbwNames = { "R", "G", "B", "W" };
            double[] rgbwValues = { 0.0, 0.0, 0.0, 0.0 };

            for (int i = 0; i < 4; i++)
            {
                Int64 card = 0;
                IntPtr valuesPtr = IntPtr.Zero;
                GetDatatypeProperty(owlInstanceColorComponent, GetPropertyByName(model, rgbwNames[i]), out valuesPtr, out card);
                if (card == 1)
                {
                    double[] values = new double[card];
                    System.Runtime.InteropServices.Marshal.Copy(valuesPtr, values, 0, (int)card);
                    rgbwValues[i] = values[0];
                }
            }

            return RDF.COLOR.RGBW(rgbwValues);
        }    

Property owlInstanceColorComponent

Size: 64 bit / 8 byte (value)
The handle of the Color Component instance.