// Token: 0x06000CBD RID: 3261 RVA: 0x0005DE68 File Offset: 0x0005C268 public static void addInstance(AssetReference <FoliageInstancedMeshInfoAsset> assetReference, Vector3 position, Quaternion rotation, Vector3 scale, bool clearWhenBaked) { FoliageTile orAddTile = FoliageSystem.getOrAddTile(position); Matrix4x4 newMatrix = Matrix4x4.TRS(position, rotation, scale); orAddTile.addInstance(new FoliageInstanceGroup(assetReference, newMatrix, clearWhenBaked)); }
// Token: 0x06000CAF RID: 3247 RVA: 0x0005D8AC File Offset: 0x0005BCAC public static void addCut(IShapeVolume cut) { Bounds worldBounds = cut.worldBounds; FoliageBounds foliageBounds = new FoliageBounds(worldBounds); for (int i = foliageBounds.min.x; i <= foliageBounds.max.x; i++) { for (int j = foliageBounds.min.y; j <= foliageBounds.max.y; j++) { FoliageCoord tileCoord = new FoliageCoord(i, j); FoliageTile orAddTile = FoliageSystem.getOrAddTile(tileCoord); orAddTile.addCut(cut); } } }
// Token: 0x06000CB0 RID: 3248 RVA: 0x0005D934 File Offset: 0x0005BD34 private static Dictionary <FoliageTile, List <IFoliageSurface> > getTileSurfacePairs() { Dictionary <FoliageTile, List <IFoliageSurface> > dictionary = new Dictionary <FoliageTile, List <IFoliageSurface> >(); foreach (KeyValuePair <FoliageCoord, FoliageTile> keyValuePair in FoliageSystem.tiles) { FoliageTile value = keyValuePair.Value; if (FoliageVolumeUtility.isTileBakeable(value)) { dictionary.Add(value, new List <IFoliageSurface>()); } } foreach (IFoliageSurface foliageSurface in FoliageSystem.surfaces) { FoliageBounds foliageSurfaceBounds = foliageSurface.getFoliageSurfaceBounds(); for (int i = foliageSurfaceBounds.min.x; i <= foliageSurfaceBounds.max.x; i++) { for (int j = foliageSurfaceBounds.min.y; j <= foliageSurfaceBounds.max.y; j++) { FoliageCoord tileCoord = new FoliageCoord(i, j); FoliageTile orAddTile = FoliageSystem.getOrAddTile(tileCoord); if (FoliageVolumeUtility.isTileBakeable(orAddTile)) { List <IFoliageSurface> list; if (!dictionary.TryGetValue(orAddTile, out list)) { list = new List <IFoliageSurface>(); dictionary.Add(orAddTile, list); } list.Add(foliageSurface); } } } } return(dictionary); }
// Token: 0x06000CC2 RID: 3266 RVA: 0x0005E268 File Offset: 0x0005C668 public static FoliageTile getOrAddTile(Vector3 worldPosition) { FoliageCoord tileCoord = new FoliageCoord(worldPosition); return(FoliageSystem.getOrAddTile(tileCoord)); }