public bool getFoliageSurfaceInfo(Vector3 position, out Vector3 surfacePosition, out Vector3 surfaceNormal) { surfacePosition = position; surfacePosition.y = this.terrain.SampleHeight(position) - Landscape.TILE_HEIGHT / 2f; surfaceNormal = this.data.GetInterpolatedNormal((position.x - (float)this.coord.x * Landscape.TILE_SIZE) / Landscape.TILE_SIZE, (position.z - (float)this.coord.y * Landscape.TILE_SIZE) / Landscape.TILE_SIZE); return(!LandscapeHoleUtility.isPointInsideHoleVolume(surfacePosition)); }
// Token: 0x06000E5F RID: 3679 RVA: 0x000638DF File Offset: 0x00061CDF public static void raycastIgnoreLandscapeIfNecessary(Ray ray, float maxDistance, ref int layerMask) { if (LandscapeHoleUtility.shouldRaycastIgnoreLandscape(ray, maxDistance)) { layerMask &= ~RayMasks.GROUND; } }
// Token: 0x06000E5E RID: 3678 RVA: 0x00063860 File Offset: 0x00061C60 public static bool shouldRaycastIgnoreLandscape(Ray ray, float maxDistance) { RaycastHit raycastHit; LandscapeHoleVolume volume; RaycastHit raycastHit2; RaycastHit raycastHit3; return((LandscapeHoleUtility.doesRayIntersectHoleVolume(ray, out raycastHit, out volume, maxDistance) && Physics.Raycast(ray, out raycastHit2, maxDistance, RayMasks.GROUND) && LandscapeHoleUtility.isPointInsideHoleVolume(volume, raycastHit2.point)) || (LandscapeHoleUtility.isPointInsideHoleVolume(ray.origin, out volume) && Physics.Raycast(ray, out raycastHit3, maxDistance, RayMasks.GROUND) && LandscapeHoleUtility.isPointInsideHoleVolume(volume, raycastHit3.point))); }
// Token: 0x06000E5A RID: 3674 RVA: 0x00063754 File Offset: 0x00061B54 public static bool isPointInsideHoleVolume(Vector3 point, out LandscapeHoleVolume volume) { for (int i = 0; i < LandscapeHoleSystem.volumes.Count; i++) { volume = LandscapeHoleSystem.volumes[i]; if (LandscapeHoleUtility.isPointInsideHoleVolume(volume, point)) { return(true); } } volume = null; return(false); }
// Token: 0x06000E5C RID: 3676 RVA: 0x000637FC File Offset: 0x00061BFC public static bool doesRayIntersectHoleVolume(Ray ray, out RaycastHit hit, out LandscapeHoleVolume volume, float maxDistance) { for (int i = 0; i < LandscapeHoleSystem.volumes.Count; i++) { volume = LandscapeHoleSystem.volumes[i]; if (LandscapeHoleUtility.doesRayIntersectHoleVolume(volume, ray, out hit, maxDistance)) { return(true); } } hit = default(RaycastHit); volume = null; return(false); }
// Token: 0x06000E59 RID: 3673 RVA: 0x0006373C File Offset: 0x00061B3C public static bool isPointInsideHoleVolume(Vector3 point) { LandscapeHoleVolume landscapeHoleVolume; return(LandscapeHoleUtility.isPointInsideHoleVolume(point, out landscapeHoleVolume)); }