Exemplo n.º 1
0
        private void ShowTriangleMesh()
        {
            FluxMesh mesh = _selectedMeshes[0];

            if (mesh.TriangleMesh == null)
            {
                _formatter.LoadTriangleMeshData(ref mesh);
            }
            Messenger.Default.Send <MvvmMessage>(new MvvmMessage(MessageType.PhysicsMeshUpdate, mesh.TriangleMesh));
        }
Exemplo n.º 2
0
 public void SetMesh(FluxMesh mesh)
 {
     if (mesh == _mesh)
     {
         return;
     }
     _mesh = mesh;
     if (_mesh == null)
     {
         return;
     }
     CreateBuffers();
 }
Exemplo n.º 3
0
 public override void UpdateShaderVariables(FluxMesh mesh)
 {
     _wvpMatrixVar.SetMatrix(Matrix.Identity * Context.Camera.ViewProjectionMatrix);
     _worldMatrixVar.SetMatrix(Matrix.Identity);
     _useDiffuseTextureVar.Set(mesh.DiffuseTexture != null);
     if (mesh.DiffuseTexture != null)
     {
         _diffuseTextureVar.SetResource(mesh.DiffuseTexture);
     }
     _useNormalTextureVar.Set(mesh.NormalTexture != null);
     if (mesh.NormalTexture != null)
     {
         _normalTextureVar.SetResource(mesh.NormalTexture);
     }
 }
Exemplo n.º 4
0
 public override void UpdateShaderVariables(FluxMesh mesh)
 {
     _wvpMatrixVar.SetMatrix(Matrix.Identity * Context.Camera.ViewProjectionMatrix);
     _worldMatrixVar.SetMatrix(Matrix.Identity);
 }
Exemplo n.º 5
0
 public abstract void UpdateShaderVariables(FluxMesh mesh);