public override void CollectGeometry( RenderingContext rc, out GeometryHandle handle, out BoundingBox bbox, out bool coloring, out bool texturing) { bbox = BoundingBox.Zero; // INTERLEAVE _pack = PackedGeometry.Pack(this); coloring = _pack.Coloring; texturing = _pack.Texturing; bbox = _pack.bbox; // BUFFER GEOMETRY handle = _pack.CreateHandle(); }
private IndexedFaceSet ifs2; // without bottom face public override void CollectGeometry( RenderingContext rc, out GeometryHandle handle, out BoundingBox bbox, out bool Coloring, out bool Texturing) { PackedGeometry master; PackedGeometry packed1; PackedGeometry packed2; List <PackedGeometry> packs; handle = GeometryHandle.Zero; bbox = BoundingBox.Zero; Texturing = false; Coloring = false; packs = new List <PackedGeometry>(); if (this.bottom) { // Cone with bottom face packed1 = PackedGeometry.Pack(ifs1); packs.Add(packed1); } else { // Cone without bottom face packed2 = PackedGeometry.Pack(ifs2); packs.Add(packed2); } master = PackedGeometry.InterleavePacks(packs); bbox = BoundingBox.CalculateBoundingBox(master); // BUFFER GEOMETRY handle = Buffering.BufferShaderGeometry(master); }
public override void CollectGeometry( RenderingContext rc, out GeometryHandle handle, out BoundingBox bbox, out bool Coloring, out bool Texturing) { handle = GeometryHandle.Zero; bbox = BoundingBox.Zero; Texturing = true; Coloring = true; parentShape = GetParent <Shape>(); buildCylinderGeometry(); _pack = PackedGeometry.Pack(ifs1); // BUFFER GEOMETRY handle = Buffering.BufferShaderGeometry(_pack); }