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)); }
public void SetMesh(FluxMesh mesh) { if (mesh == _mesh) { return; } _mesh = mesh; if (_mesh == null) { return; } CreateBuffers(); }
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); } }
public override void UpdateShaderVariables(FluxMesh mesh) { _wvpMatrixVar.SetMatrix(Matrix.Identity * Context.Camera.ViewProjectionMatrix); _worldMatrixVar.SetMatrix(Matrix.Identity); }
public abstract void UpdateShaderVariables(FluxMesh mesh);