Beispiel #1
0
        public void LabelDraw_Billboard(Matrix world)
        {
            // Always draw unparented children :fatcat:
            foreach (var c in UnparentedChildren)
            {
                c.LabelDraw_Billboard(world);
            }

            if (!(EnableDbgLabelDraw && DBG.CategoryEnableDbgLabelDraw[Category]))
            {
                return;
            }

            if (DbgLabels.Count > 0)
            {
                foreach (var label in DbgLabels.OrderByDescending(lbl => (GFX.World.CameraTransform.Position - Vector3.Transform(Vector3.Zero, lbl.World)).LengthSquared()))
                {
                    DBG.Draw3DBillboard(label.Text, label.World * Transform.WorldMatrix * world, label.Color);
                }
            }

            foreach (var c in Children)
            {
                c.LabelDraw_Billboard(Transform.WorldMatrix * world);
            }
        }