コード例 #1
0
            public void Convert(BufferBase input, BufferBase output, int offset)
            {
#if !AXIOM_SAFE_ONLY
                unsafe
#endif
                {
                    var inputPtr  = input.ToCol3BPointer();
                    var outputPtr = output.ToCol3BPointer();
                    outputPtr[offset] = inputPtr[offset];
                }
            }
コード例 #2
0
            public void Convert(BufferBase input, BufferBase output, int offset)
            {
#if !AXIOM_SAFE_ONLY
                unsafe
#endif
                {
                    var inputPtr  = input.ToUIntPointer();
                    var outputPtr = output.ToCol3BPointer();
                    var inp       = inputPtr[offset];

                    outputPtr[offset] = new Col3b
                    {
                        x = (byte)((inp >> 0) & 0xFF),
                        y = (byte)((inp >> 8) & 0xFF),
                        z = (byte)((inp >> 16) & 0xFF),
                    };
                }
            }
コード例 #3
0
            public void Convert(BufferBase input, BufferBase output, int offset)
            {
#if !AXIOM_SAFE_ONLY
                unsafe
#endif
                {
                    var inputPtr  = input.ToCol3BPointer();
                    var outputPtr = output.ToUIntPointer();
                    var inp       = inputPtr[offset];

                    int xshift = 8, yshift = 16, zshift = 24, ashift = 0;

#if AXIOM_BIG_ENDIAN
                    outputPtr[offset] = ((uint)(0xFF << ashift)) | (((uint)inp.x) << xshift) |
                                        (((uint)inp.y) << yshift) | (((uint)inp.z) << zshift);
#else
                    outputPtr[offset] = ((uint)(0xFF << ashift)) | (((uint)inp.x) << zshift) | (((uint)inp.y) << yshift) |
                                        (((uint)inp.z) << xshift);
#endif
                }
            }