public void Draw(GuiWidget sender, IObject3D item, bool isSelected, DrawEventArgs e, Matrix4X4 itemMaxtrix, WorldView world) { if (item == scene.DebugItem) { //if (item.Mesh != null) //{ // var debugItem = scene.DebugItem; // GLHelper.Render( // debugItem.Mesh, // debugBorderColor, // debugItem.WorldMatrix(), // RenderTypes.Wireframe, // debugItem.WorldMatrix() * world.ModelviewMatrix); //} var frustum = world.GetClippingFrustum(); var aabb = item.GetAxisAlignedBoundingBox(Matrix4X4.Identity); world.RenderAabb(aabb, Matrix4X4.Identity, debugBorderColor, 1); if (item.Mesh != null) { GLHelper.Render( item.Mesh, debugBorderColor, item.WorldMatrix(), RenderTypes.Wireframe, item.WorldMatrix() * world.ModelviewMatrix); } } }
public static void DrawOctreeNode(this WorldView world, OctreeNode node, Color color) { var aabb = new AxisAlignedBoundingBox(node.Min, node.Min + node.Size); world.RenderAabb(aabb, Matrix4X4.Identity, color); }