Beispiel #1
0
        public void SetVertexColor(int nObjectID, int nVertexID, Vector3f vColor)
        {
            StoredCommands sc = new StoredCommands();

            sc.AppendSceneCommand_SetVertexColor(nObjectID, nVertexID, vColor.toVec3f());
            ExecuteCommands(sc);
        }
Beispiel #2
0
        public void SetVertexColors(int nObjectID, Vector3f[] vColors, int nBatchSize)
        {
            int nBatches = vColors.Length / nBatchSize;

            for (int j = 0; j <= nBatches; ++j)
            {
                StoredCommands sc       = new StoredCommands();
                int            iStart   = j * nBatchSize;
                int            iUseSize = (j == nBatches) ? (vColors.Length - nBatches * nBatchSize) : nBatchSize;
                for (int k = 0; k < iUseSize; ++k)
                {
                    if (vColors[iStart + k] != Vector3f.Invalid)
                    {
                        sc.AppendSceneCommand_SetVertexColor(nObjectID, iStart + k, vColors[iStart + k].toVec3f());
                    }
                }
                ExecuteCommands(sc);
            }
        }