예제 #1
0
        /// <summary>
        /// Generates and populates an vertex temp buffer given 2D vectors as source data (given as 3D)
        /// </summary>
        private void FillBufferV2D(ref FullVertex[] vertexBuffer, VertexVector vertexBufferId, List <Vector3D> dataBuffer)
        {
            Vector4 temp = new Vector4(0, 0, 0, 0);
            var     i    = 0;

            foreach (var v in dataBuffer)
            {
                temp.X = v.X;
                temp.Y = v.Y;
                vertexBuffer[i].SetVector4(vertexBufferId, temp);
                i++;
            }
        }
예제 #2
0
        public void SetVector4(VertexVector bufferId, Vector4 data)
        {
            switch (bufferId)
            {
            case VertexVector.Position: _position = data; break;

            case VertexVector.Normal: _normal = data; break;

            case VertexVector.TextureCoordinate: _textureCoordinate = data; break;

            case VertexVector.Tangent: _tangent = data; break;

            case VertexVector.Bitangent: _bitangent = data; break;

            default: Debug.Assert(false); break;
            }
        }
예제 #3
0
 public VertexVector GetVertices()
 {
     VertexVector ret = new VertexVector(SharpMochaPINVOKE.Mesh_GetVertices(swigCPtr), false);
     return ret;
 }