Exemplo n.º 1
0
 public LightSettingData(Graphics.Light src)
 {
     this.Enabled           = src.Enabled;
     this.IsWorldCoordinate = src.IsWorldCoordinate;
     this.AmbientColor      = src.AmbientColor;
     this.DiffuseColor      = src.DiffuseColor;
     this.SpecularColor     = src.SpecularColor;
     this.Position          = src.Position;
 }
Exemplo n.º 2
0
        public ViewPanel()
        {
            InitializeComponent();

            /*
             * btnFit の DropDownMenu に CodAxis を関連付け
             */
            menuFitXY.Tag = Geom.CodAxis.Z;
            menuFitYZ.Tag = Geom.CodAxis.X;
            menuFitZX.Tag = Geom.CodAxis.Y;

            /*
             * btnClipOnOff の DropDownMenu に ClipDirections を関連付け
             */
            menuClipView.Tag   = ClipDirections.View;
            menuClipPlusX.Tag  = ClipDirections.PlusX;
            menuClipPlusY.Tag  = ClipDirections.PlusY;
            menuClipPlusZ.Tag  = ClipDirections.PlusZ;
            menuClipMinusX.Tag = ClipDirections.MinusX;
            menuClipMinusY.Tag = ClipDirections.MinusY;
            menuClipMinusZ.Tag = ClipDirections.MinusZ;

            /*
             * ボタンに PolygonStyles を関連付け
             */
            btnStyleFace.Tag     = Graphics.PolygonStyles.Face;
            btnStyleEdge.Tag     = Graphics.PolygonStyles.Edge;
            btnStyleFaceEdge.Tag = Graphics.PolygonStyles.Face | Graphics.PolygonStyles.Edge;

            /*
             * 光源の設定
             */
            Graphics.Light light = Graphics.Light.Lights[0];
            light.Enabled       = true;
            light.Position      = new Geom.HmCod3d(-1, 1, 1, 0);
            light.AmbientColor  = Color.FromArgb(0x80, 0x80, 0x80);
            light.DiffuseColor  = Color.FromArgb(0x80, 0x80, 0x80);
            light.SpecularColor = Color.FromArgb(0x80, 0x80, 0x80);
        }
Exemplo n.º 3
0
 /// <summary>
 /// �R���X�g���N�^�B
 /// ���b�v�Ώۂ̌�����w�肵�č\�z���܂��B
 /// </summary>
 /// <param name="light">���b�v�Ώۂ̌���</param>
 public LightSetting( Graphics.Light light )
 {
     _light = light;
 }
Exemplo n.º 4
0
 /// <summary>
 /// コンストラクタ。
 /// ラップ対象の光源を指定して構築します。
 /// </summary>
 /// <param name="light">ラップ対象の光源</param>
 public LightSetting(Graphics.Light light)
 {
     _light = light;
 }
Exemplo n.º 5
0
        public override void OnActivate()
        {
            base.OnActivate();

            Light = Stage.CreatePointLight(Owner.Position, Range, Color, CastShadows, ShadowBias, Intensity);
        }