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); }
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); }
public override bool HasVegetationTypeIndex(VegetationTypeIndex vegetationTypeIndex) { for (int i = 0; i <= VegetationTypeList.Count - 1; i++) { if (VegetationTypeList[i].Index == vegetationTypeIndex) { return(true); } } return(false); }
public VegetationTypeSettings GetVegetationTypeSettings(VegetationTypeIndex vegetationTypeIndex) { for (int i = 0; i <= VegetationTypeList.Count - 1; i++) { if (VegetationTypeList[i].Index == vegetationTypeIndex) { return(VegetationTypeList[i]); } } return(null); }
public VegetationTypeSettings(VegetationTypeSettings orgVegetationTypeSettings) { Index = orgVegetationTypeSettings.Index; Density = orgVegetationTypeSettings.Density; Size = orgVegetationTypeSettings.Size; }
public virtual bool HasVegetationTypeIndex(VegetationTypeIndex vegetationTypeIndex) { return(false); }
public virtual JobHandle SampleIncludeVegetationMask(VegetationInstanceData instanceData, VegetationTypeIndex vegetationTypeIndex, JobHandle dependsOn) { return(dependsOn); }