コード例 #1
0
 public DirectionalLightProxy3D(AdornerSet3D adornerSet)
     : base(adornerSet)
 {
     this.AdornerModel = DirectionalLightProxy3D.adornerGeometry.Clone();
     this.SetName((DependencyObject)this.AdornerModel, "DirectionalLightProxy3D");
     this.IsProxyGeometry = true;
 }
コード例 #2
0
 public PointLightProxy3D(AdornerSet3D adornerSet)
     : base(adornerSet)
 {
     this.positionPropertyGeometry = PointLightProxy3D.adornerGeometry.Clone();
     this.AdornerModel             = new Model3DGroup();
     this.AdornerModel.Children.Add((Model3D)this.positionPropertyGeometry);
     this.SetName((DependencyObject)this.AdornerModel, "PointLightProxy3D");
     this.IsProxyGeometry = true;
 }
コード例 #3
0
 public SpotLightAdorner3D(AdornerSet3D adornerSet, SpotLightAdornerBehavior3D.TypeOfConeAngle typeOfConeAngle)
     : base(adornerSet)
 {
     this.typeOfConeAngle      = typeOfConeAngle;
     this.spotPropertyGeometry = Torus.CreateTorus(1.0, 0.015, 24, 15, this.typeOfConeAngle != SpotLightAdornerBehavior3D.TypeOfConeAngle.InnerConeAngle ? Adorner3D.RedLook : Adorner3D.GreenLook);
     this.AdornerModel         = new Model3DGroup();
     this.AdornerModel.Children.Add((Model3D)this.spotPropertyGeometry);
     this.SetName((DependencyObject)this.AdornerModel, "SpotLightAdorner3D");
 }
コード例 #4
0
 public DirectionalLightAdorner3D(AdornerSet3D adornerSet)
     : base(adornerSet)
 {
     this.directionPropertyGeometry = DirectionalLightAdorner3D.adornerGeometry.Clone();
     this.AdornerModel = new Model3DGroup();
     this.AdornerModel.Children.Add((Model3D)this.directionPropertyGeometry);
     this.SetName((DependencyObject)this.AdornerModel, "DirectionalLightAdorner3D");
     this.IsProxyGeometry = true;
 }
コード例 #5
0
 public SpotLightConeAdorner3D(AdornerSet3D adornerSet, SpotLightAdornerBehavior3D.TypeOfConeAngle typeOfConeAngle)
     : base(adornerSet)
 {
     this.typeOfConeAngle = typeOfConeAngle;
     for (int index = 0; index < 4; ++index)
     {
         this.spotPropertyGeometry.Children.Add((Model3D)Cylinder.CreateCylinder(0.01, 1.0, 8, (Material) new DiffuseMaterial((Brush) new SolidColorBrush(this.typeOfConeAngle != SpotLightAdornerBehavior3D.TypeOfConeAngle.InnerConeAngle ? Color.FromRgb(byte.MaxValue, (byte)0, (byte)0) : Color.FromRgb((byte)0, byte.MaxValue, (byte)0))), (Material)null, (Material)null));
     }
     this.AdornerModel = new Model3DGroup();
     this.AdornerModel.Children.Add((Model3D)this.spotPropertyGeometry);
     this.SetName((DependencyObject)this.AdornerModel, "SpotLightConeAdorner3D");
 }
コード例 #6
0
ファイル: ScaleAdorner3D.cs プロジェクト: radtek/Shopdrawing
        public ScaleAdorner3D(AdornerSet3D adornerSet, Adorner3D.TransformVia direction)
            : base(adornerSet, direction)
        {
            switch (direction)
            {
            case Adorner3D.TransformVia.XAxis:
                this.scaleAxis    = new Vector3D(1.0, 0.0, 0.0);
                this.AdornerModel = ScaleAdorner3D.xCube;
                break;

            case Adorner3D.TransformVia.YAxis:
                this.scaleAxis    = new Vector3D(0.0, 1.0, 0.0);
                this.AdornerModel = ScaleAdorner3D.yCube;
                break;

            case Adorner3D.TransformVia.ZAxis:
                this.scaleAxis    = new Vector3D(0.0, 0.0, 1.0);
                this.AdornerModel = ScaleAdorner3D.zCube;
                break;
            }
        }
コード例 #7
0
        public RotateAdorner3D(AdornerSet3D adornerSet, Adorner3D.TransformVia direction)
            : base(adornerSet, direction)
        {
            switch (direction)
            {
            case Adorner3D.TransformVia.XAxis:
                this.rotationAxis = new Vector3D(1.0, 0.0, 0.0);
                this.AdornerModel = RotateAdorner3D.xTorus;
                break;

            case Adorner3D.TransformVia.YAxis:
                this.rotationAxis = new Vector3D(0.0, 1.0, 0.0);
                this.AdornerModel = RotateAdorner3D.yTorus;
                break;

            case Adorner3D.TransformVia.ZAxis:
                this.rotationAxis = new Vector3D(0.0, 0.0, 1.0);
                this.AdornerModel = RotateAdorner3D.zTorus;
                break;
            }
        }
コード例 #8
0
        public TranslateAdorner3D(AdornerSet3D adornerSet, Adorner3D.TransformVia direction)
            : base(adornerSet, direction)
        {
            switch (direction)
            {
            case Adorner3D.TransformVia.XAxis:
                this.translationAxis = new Vector3D(1.0, 0.0, 0.0);
                this.AdornerModel    = TranslateAdorner3D.xAxisAndArrowHead;
                break;

            case Adorner3D.TransformVia.YAxis:
                this.translationAxis = new Vector3D(0.0, 1.0, 0.0);
                this.AdornerModel    = TranslateAdorner3D.yAxisAndArrowHead;
                break;

            case Adorner3D.TransformVia.ZAxis:
                this.translationAxis = new Vector3D(0.0, 0.0, 1.0);
                this.AdornerModel    = TranslateAdorner3D.zAxisAndArrowHead;
                break;
            }
        }