Ejemplo n.º 1
0
        public override void Draw(IDeviceContextHolder holder, ICamera camera, SpecialRenderMode mode, Func <IRenderableObject, bool> filter = null)
        {
            if (_dirNode != null && !_dirTargetSet)
            {
                _dirTargetSet = true;

                var model = holder.TryToGet <IKn5Model>();
                if (model != null)
                {
                    _dirTarget = model.GetDummyByName(_dirNode);
                    _dirTarget?.LookAt(this);
                }
            }

            base.Draw(holder, camera, mode, filter);
        }
Ejemplo n.º 2
0
        public override void Draw(IDeviceContextHolder contextHolder, ICamera camera, SpecialRenderMode mode, Func <IRenderableObject, bool> filter = null)
        {
            if (_dirNode != null && !_dirTargetSet)
            {
                _dirTargetSet = true;

                var model = contextHolder.TryToGet <IKn5Model>();
                if (model != null)
                {
                    _dirTarget = model.GetDummyByName(_dirNode);
                    _dirTarget?.LookAt(this);
                }
            }

            base.Draw(contextHolder, camera, mode, filter);

            if (HighlightDummy && mode == SpecialRenderMode.SimpleTransparent)
            {
                _lines.ParentMatrix = Matrix;
                _lines.Draw(contextHolder, camera, SpecialRenderMode.Simple);
            }
        }