Exemplo n.º 1
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)
        {
            AgentEnvironment iAgentEnvironment = null;

            DA.GetData("AgentEnvironment", ref iAgentEnvironment);
            if (iAgentEnvironment.EnvDepth == 0)
            {
                DA.SetDataList("EnvironmentDisplay", iAgentEnvironment.Display2DGenericEnvironment());
            }
            else
            {
                DA.SetDataList("EnvironmentDisplay", iAgentEnvironment.Display3DGenericEnvironment());
            }
        }
Exemplo n.º 2
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)
        {
            Plane  iBasePlane = Plane.Unset;
            double iWidth     = double.NaN;
            double iHeight    = double.NaN;
            double iDepth     = 0.0;

            DA.GetData(0, ref iBasePlane);
            DA.GetData(1, ref iHeight);
            DA.GetData(2, ref iWidth);

            AgentEnvironment Env2d = new AgentEnvironment(iBasePlane, iWidth, iHeight, iDepth);


            DA.SetData("2dEnvironment", Env2d);
        }