AlphaAt() публичный Метод

Returns the alpha value of a vertex.
public AlphaAt ( int index ) : float
index int
Результат float
Пример #1
0
        public void TestSetAllAlphas()
        {
            VertexData vertexData = new VertexData(4);
            vertexData.SetAlpha(0.5f);

            for (int i = 0; i < vertexData.NumVertices; ++i)
            {
                AssertAreEqualWithSmallError(0.5f, vertexData.AlphaAt(i), "wrong alpha", 0.005f);
            }
        }
Пример #2
0
        public void TestSetAllColorsAndAlphas()
        {
            uint color = 0xabcdef;
            float alpha = 0.5f;
            VertexData vertexData = new VertexData(4);
            vertexData.SetColor(color);
            vertexData.SetAlpha(alpha);

            for (int i=0; i<vertexData.NumVertices; ++i)
            {
                Assert.AreEqual(color, vertexData.ColorAt(i), "wrong color");
                AssertAreEqualWithSmallError(alpha, vertexData.AlphaAt(i), "wrong alpha", 0.005f);
            }
        }