public void AddMesh(Mesh mesh) { for (int index = 0; index < mesh.SubMeshes.Count; index++) { Mesh.SubMesh subMesh = mesh.SubMeshes[index]; AddSubMesh(subMesh); } }
public override void GetShadowCasters(BoundingFrustum frustum, List <Mesh.SubMesh> visibleSubMeshes) { for (int index = 0; index < _worldSubMeshes.Count; index++) { Mesh.SubMesh subMesh = _worldSubMeshes[index]; if (subMesh.Enabled && subMesh.CastShadows && frustum.Intersects(subMesh.GlobalBoundingSphere) && frustum.Intersects(subMesh.GlobalBoundingBox)) { visibleSubMeshes.Add(subMesh); } } }
public override void GetVisibleMeshes(BoundingFrustum frustum, List <Mesh.SubMesh>[] visibleSubMeshes) { for (int index = 0; index < _worldSubMeshes.Count; index++) { Mesh.SubMesh subMesh = _worldSubMeshes[index]; if (subMesh.Enabled && frustum.Intersects(subMesh.GlobalBoundingSphere) && frustum.Intersects(subMesh.GlobalBoundingBox)) { visibleSubMeshes[(int)subMesh.RenderQueue].Add(subMesh); } } }
public void GetShadowCasters(BoundingFrustum frustum, List <Mesh.SubMesh> visibleSubMeshes) { for (int index = 0; index < meshes.Count; index++) { Mesh m = meshes[index]; if (m.GetCastShadows() && frustum.Intersects(m.GlobalBoundingBox)) { for (int si = 0; si < m.SubMeshes.Count; si++) { Mesh.SubMesh sm = m.SubMeshes[si]; if (sm.Enabled && sm.CastShadows) { visibleSubMeshes.Add(sm); } } } } }
public void GetVisibleMeshes(BoundingFrustum frustum, List <Mesh.SubMesh>[] visibleSubMeshes) { for (int index = 0; index < meshes.Count; index++) { Mesh m = meshes[index]; if (frustum.Intersects(m.GlobalBoundingBox)) { for (int si = 0; si < m.SubMeshes.Count; si++) { Mesh.SubMesh sm = m.SubMeshes[si]; if (sm.Enabled) { visibleSubMeshes[(int)sm.RenderQueue].Add(sm); } } } } }
public void RemoveSubMesh(Mesh.SubMesh subMesh) { _worldSubMeshes.Remove(subMesh); }
public void AddSubMesh(Mesh.SubMesh subMesh) { addSubMeshFunc(subMesh); _worldSubMeshes.Add(subMesh); }