Exemple #1
0
        public override JobHandle SampleIncludeVegetationMask(VegetationInstanceData instanceData,
                                                              VegetationTypeIndex vegetationTypeIndex,
                                                              JobHandle dependsOn)
        {
            VegetationTypeSettings vegetationTypeSettings = GetVegetationTypeSettings(vegetationTypeIndex);

            if (vegetationTypeSettings != null)
            {
                IncludeVegetationMaskLineJob includeVegetationMaskLineJob =
                    new IncludeVegetationMaskLineJob
                {
                    Excluded = instanceData.Excluded.ToDeferredJobArray(),
                    Position = instanceData.Position.ToDeferredJobArray(),
                    VegetationMaskDensity = instanceData.VegetationMaskDensity.ToDeferredJobArray(),
                    VegetationMaskScale   = instanceData.VegetationMaskScale.ToDeferredJobArray(),
                    Denisty       = vegetationTypeSettings.Density,
                    Scale         = vegetationTypeSettings.Size,
                    LineSegment2D = _line2D,
                    Width         = _width
                };
                dependsOn = includeVegetationMaskLineJob.Schedule(instanceData.Excluded, 32, dependsOn);
            }

            return(dependsOn);
        }
Exemple #2
0
        public override JobHandle SampleIncludeVegetationMask(VegetationInstanceData instanceData,
                                                              VegetationTypeIndex vegetationTypeIndex,
                                                              JobHandle dependsOn)
        {
            VegetationTypeSettings vegetationTypeSettings = GetVegetationTypeSettings(vegetationTypeIndex);

            if (vegetationTypeSettings != null)
            {
                IncludeVegetatiomMaskBeaconJob includeVegetatiomMaskBeaconJob =
                    new IncludeVegetatiomMaskBeaconJob
                {
                    Excluded = instanceData.Excluded.ToDeferredJobArray(),
                    Position = instanceData.Position.ToDeferredJobArray(),
                    VegetationMaskDensity = instanceData.VegetationMaskDensity.ToDeferredJobArray(),
                    VegetationMaskScale   = instanceData.VegetationMaskScale.ToDeferredJobArray(),
                    Denisty           = vegetationTypeSettings.Density,
                    Scale             = vegetationTypeSettings.Size,
                    FalloutCurveArray = FalloutCurveArray,
                    MaskPosition      = Position,
                    Radius            = Radius
                };
                dependsOn = includeVegetatiomMaskBeaconJob.Schedule(instanceData.Excluded, 32, dependsOn);
            }

            return(dependsOn);
        }
Exemple #3
0
        public override bool HasVegetationTypeIndex(VegetationTypeIndex vegetationTypeIndex)
        {
            for (int i = 0; i <= VegetationTypeList.Count - 1; i++)
            {
                if (VegetationTypeList[i].Index == vegetationTypeIndex)
                {
                    return(true);
                }
            }

            return(false);
        }
Exemple #4
0
        public VegetationTypeSettings GetVegetationTypeSettings(VegetationTypeIndex vegetationTypeIndex)
        {
            for (int i = 0; i <= VegetationTypeList.Count - 1; i++)
            {
                if (VegetationTypeList[i].Index == vegetationTypeIndex)
                {
                    return(VegetationTypeList[i]);
                }
            }

            return(null);
        }
Exemple #5
0
 public VegetationTypeSettings(VegetationTypeSettings orgVegetationTypeSettings)
 {
     Index   = orgVegetationTypeSettings.Index;
     Density = orgVegetationTypeSettings.Density;
     Size    = orgVegetationTypeSettings.Size;
 }
Exemple #6
0
 public virtual bool HasVegetationTypeIndex(VegetationTypeIndex vegetationTypeIndex)
 {
     return(false);
 }
Exemple #7
0
 public virtual JobHandle SampleIncludeVegetationMask(VegetationInstanceData instanceData,
                                                      VegetationTypeIndex vegetationTypeIndex,
                                                      JobHandle dependsOn)
 {
     return(dependsOn);
 }