/// <summary> /// Remove the passed Mesh from the List /// </summary> /// <param name="m"></param> public void Remove(NodeBox m) { list.Remove(m); }
/// <summary> /// True if the Collection contains an instance of this Vector /// </summary> /// <param name="m"></param> /// <returns></returns> public bool Contains(NodeBox m) { return(list.Contains(m)); }
protected void RemoveParent(NodeBox par) { this.parents.Remove(par); }
/// <summary> /// Add a new Mesh to the Collection /// </summary> /// <param name="m"></param> public void Add(NodeBox m) { list.Add(m); }
protected void AddParent(NodeBox par) { this.parents.Add(par); }
public void RemoveChild(NodeBox cld) { cld.RemoveParent(this); this.childs.Remove(cld); }
public void AddChild(NodeBox cld) { this.childs.Add(cld); cld.AddParent(this); }
void DoRender(NodeBox nbox, Matrix basem, int effectct) { MeshBox box = null; if (nbox is MeshBox) { box = (MeshBox)nbox; } if (box != null) { if (box.Wire) { device.RenderState.FillMode = FillMode.WireFrame; } else { device.RenderState.FillMode = FillMode.Solid; } device.Material = box.Material; } Matrix tr = Matrix.Multiply(nbox.Transform, basem); if (nbox.Transform.IsAbsolute) { tr = nbox.Transform; } device.Transform.World = tr; if (box != null) { if (effect != null && PrepareEffect != null && this.usefx) { PrepareEffect(this, new PrepareEffectEventArgs(box)); } for (int s = 0; s < effectct; s++) { if (effect != null && this.usefx) { effect.BeginPass(s); } for (int i = 0; i < box.SubSetCount; i++) { box.Mesh.DrawSubset(i); } if (effect != null && this.usefx) { effect.EndPass(); } } } foreach (NodeBox cld in nbox) { DoRender(cld, tr, effectct); } }
internal PrepareEffectEventArgs(NodeBox mb) { this.mb = mb; }