예제 #1
0
    private void AddBeamGoal(BeamGoalData data)
    {
        BeamGoal prop = new BeamGoal(this, data);

        allObjects.Add(prop);
        objectsAddedThisMove.Add(prop);
        goalObjects.Add(prop);
    }
예제 #2
0
    // Getters
    //override protected Color GetPrimaryFillMovable () { return new Color (beamColor.r, beamColor.g, beamColor.b); }


    // ----------------------------------------------------------------
    //  Initialize
    // ----------------------------------------------------------------
    override public void Initialize(BoardView _myBoardView, BoardObject bo)
    {
        myBeamGoal = bo as BeamGoal;
        beamColor  = Colors.GetBeamColor(myBeamGoal.ChannelID);
        base.Initialize(_myBoardView, bo);

        i_body.color  = beamColor;
        i_body.sprite = myBeamGoal.IsMovable ? s_bodyMovable : s_bodyNotMovable;
    }
예제 #3
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            //Input
            Plane startPln = new Plane();

            DA.GetData(0, ref startPln);

            Plane endPln = new Plane();

            DA.GetData(1, ref endPln);

            double eModulus = 0.0;

            DA.GetData(2, ref eModulus);

            double gModulus = 0.0;

            DA.GetData(3, ref gModulus);

            double area = 0.0;

            DA.GetData(4, ref area);

            double inertiaY = 0.0;

            DA.GetData(5, ref inertiaY);

            double inertiaZ = 0.0;

            DA.GetData(6, ref inertiaZ);

            double inertiaT = 0.0;

            DA.GetData(7, ref inertiaT);

            this.Message = "WIP";


            //Calculate
            GoalObject beamElement = new BeamGoal(startPln, endPln, eModulus, gModulus, area, inertiaY, inertiaZ, inertiaT);


            //Output
            DA.SetData(0, beamElement);
        }