Esempio n. 1
0
        public void DeleteMesh(SimpleMeshRenderElement el)
        {
            if (el.IsDeleted)
            {
                throw new InvalidOperationException();
            }

            var data = getRenderData(el.Mesh);


            data.ElementDeleted[el.ElementNumber] = true;


            elements.Remove(el);
        }
Esempio n. 2
0
        public SimpleMeshRenderElement AddMesh(IMesh mesh)
        {
            var el = new SimpleMeshRenderElement(this, mesh);


            var data = getRenderData(mesh);


            el.ElementNumber = data.WorldMatrices.Count;
            data.WorldMatrices.Add(el.WorldMatrix);
            data.ElementDeleted.Add(false);


            elements.Add(el);

            return(el);
        }
Esempio n. 3
0
 public void UpdateWorldMatrix(SimpleMeshRenderElement el)
 {
     renderDataDict[el.Mesh].WorldMatrices[el.ElementNumber] = el.WorldMatrix;
 }