コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the DecomposeAgent class.
 /// </summary>
 public DeconstructAgentCollectionComponent()
   : base(RS.deconstructQNName, RS.deconstructQNNickname,
       RS.deconstructQNDescription,
       RS.pluginCategoryName, RS.utilitySubcategoryName, RS.icon_deconstructAC, RS.desconstructQNGuid)
 {
   agentCollection = new SpatialCollectionType();
 }
コード例 #2
0
 protected override bool GetInputs(IGH_DataAccess da)
 {
   if (!base.GetInputs(da)) return false;
   SpatialCollectionType neighborsCollection = new SpatialCollectionType();
   if (!da.GetData(nextInputIndex++, ref neighborsCollection)) return false;
   neighbors = neighborsCollection.Quelea;
   return true;
 }
コード例 #3
0
ファイル: NeighborsComponent.cs プロジェクト: lxfschr/Quelea
    private SpatialCollectionType GetNeighbors()
    {
      neighbors = new SpatialCollectionAsList<IQuelea>();
      wrappedPositions = new List<Point3d>();
      if (agent.VisionRadius > 0)
      {
        if (agent.Environment.Wrap)
        {
          neighbors = GetNeighborsWrapped();
        }
        else
        {
          neighbors = queleaNetwork.Quelea.GetNeighborsInSphere(agent, agent.VisionRadius * visionRadiusMultiplier);

          if (visionAngleMultiplier < 1.0)
          {
            neighbors = GetNeighborsInVisionAngle(neighbors);
          }
        }
      }
      SpatialCollectionType neighborsType = new SpatialCollectionType(neighbors);
      neighborsType.WrappedPositions = wrappedPositions;
      return neighborsType;
    }