public void SyncWithModel(FigureModel model, List <ControlVertexProvider> children) { //sync occluder var materialSetDirector = model.MaterialSet.Directory; var newOcclusionDirectory = OccluderLoader.IsOcclusionDirectory(materialSetDirector) ? materialSetDirector : (model.Shape.Directory ?? occluderLoader.DefaultDirectory); if (newOcclusionDirectory != occlusionDirectory) { var newOccluder = occluderLoader.Load(newOcclusionDirectory); occluder?.Dispose(); occlusionDirectory = newOcclusionDirectory; occluder = newOccluder; } //sync visible isVisible = model.IsVisible; //register child occluders if (children != null) { //children are synced first so all children should have occluders by this point var childOccluders = children .Where(child => child.isVisible) .Select(child => child.occluder) .ToList(); occluder.SetChildOccluders(childOccluders); } }
public void AddBinding(IOccluder plane, Vector3 zero) { Bindings.Add(new SceneBinding(plane, zero)); }
public ZBufferItem(IOccluder o, Vector3 i, Vector3 t) { Primitive = o; Intersection = i; Translation = t; }
public SceneBinding(IOccluder mesh, Vector3 position) { Shape = mesh; Position = position; }