187 lines
5.6 KiB
C#
187 lines
5.6 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using System.Security;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x02000033 RID: 51
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public sealed class CullingGroup : IDisposable
|
|
{
|
|
// Token: 0x060003D8 RID: 984 RVA: 0x00006E04 File Offset: 0x00005004
|
|
public CullingGroup()
|
|
{
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x060003D9 RID: 985 RVA: 0x00006E1C File Offset: 0x0000501C
|
|
~CullingGroup()
|
|
{
|
|
if (this.m_Ptr != IntPtr.Zero)
|
|
{
|
|
this.FinalizerFailure();
|
|
}
|
|
}
|
|
|
|
// Token: 0x060003DA RID: 986
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void Dispose();
|
|
|
|
// Token: 0x170000D6 RID: 214
|
|
// (get) Token: 0x060003DB RID: 987 RVA: 0x00006E64 File Offset: 0x00005064
|
|
// (set) Token: 0x060003DC RID: 988 RVA: 0x00006E80 File Offset: 0x00005080
|
|
public CullingGroup.StateChanged onStateChanged
|
|
{
|
|
get
|
|
{
|
|
return this.m_OnStateChanged;
|
|
}
|
|
set
|
|
{
|
|
this.m_OnStateChanged = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170000D7 RID: 215
|
|
// (get) Token: 0x060003DD RID: 989
|
|
// (set) Token: 0x060003DE RID: 990
|
|
public extern bool enabled
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170000D8 RID: 216
|
|
// (get) Token: 0x060003DF RID: 991
|
|
// (set) Token: 0x060003E0 RID: 992
|
|
public extern Camera targetCamera
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x060003E1 RID: 993
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetBoundingSpheres(BoundingSphere[] array);
|
|
|
|
// Token: 0x060003E2 RID: 994
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetBoundingSphereCount(int count);
|
|
|
|
// Token: 0x060003E3 RID: 995
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void EraseSwapBack(int index);
|
|
|
|
// Token: 0x060003E4 RID: 996 RVA: 0x00006E8C File Offset: 0x0000508C
|
|
public static void EraseSwapBack<T>(int index, T[] myArray, ref int size)
|
|
{
|
|
size--;
|
|
myArray[index] = myArray[size];
|
|
}
|
|
|
|
// Token: 0x060003E5 RID: 997 RVA: 0x00006EA4 File Offset: 0x000050A4
|
|
public int QueryIndices(bool visible, int[] result, int firstIndex)
|
|
{
|
|
return this.QueryIndices(visible, -1, CullingQueryOptions.IgnoreDistance, result, firstIndex);
|
|
}
|
|
|
|
// Token: 0x060003E6 RID: 998 RVA: 0x00006EC4 File Offset: 0x000050C4
|
|
public int QueryIndices(int distanceIndex, int[] result, int firstIndex)
|
|
{
|
|
return this.QueryIndices(false, distanceIndex, CullingQueryOptions.IgnoreVisibility, result, firstIndex);
|
|
}
|
|
|
|
// Token: 0x060003E7 RID: 999 RVA: 0x00006EE4 File Offset: 0x000050E4
|
|
public int QueryIndices(bool visible, int distanceIndex, int[] result, int firstIndex)
|
|
{
|
|
return this.QueryIndices(visible, distanceIndex, CullingQueryOptions.Normal, result, firstIndex);
|
|
}
|
|
|
|
// Token: 0x060003E8 RID: 1000
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern int QueryIndices(bool visible, int distanceIndex, CullingQueryOptions options, int[] result, int firstIndex);
|
|
|
|
// Token: 0x060003E9 RID: 1001
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern bool IsVisible(int index);
|
|
|
|
// Token: 0x060003EA RID: 1002
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern int GetDistance(int index);
|
|
|
|
// Token: 0x060003EB RID: 1003
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetBoundingDistances(float[] distances);
|
|
|
|
// Token: 0x060003EC RID: 1004 RVA: 0x00006F08 File Offset: 0x00005108
|
|
public void SetDistanceReferencePoint(Vector3 point)
|
|
{
|
|
CullingGroup.INTERNAL_CALL_SetDistanceReferencePoint(this, ref point);
|
|
}
|
|
|
|
// Token: 0x060003ED RID: 1005
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_SetDistanceReferencePoint(CullingGroup self, ref Vector3 point);
|
|
|
|
// Token: 0x060003EE RID: 1006
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetDistanceReferencePoint(Transform transform);
|
|
|
|
// Token: 0x060003EF RID: 1007 RVA: 0x00006F14 File Offset: 0x00005114
|
|
[SecuritySafeCritical]
|
|
[RequiredByNativeCode]
|
|
private unsafe static void SendEvents(CullingGroup cullingGroup, IntPtr eventsPtr, int count)
|
|
{
|
|
CullingGroupEvent* ptr = (CullingGroupEvent*)eventsPtr.ToPointer();
|
|
if (cullingGroup.m_OnStateChanged != null)
|
|
{
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
cullingGroup.m_OnStateChanged(ptr[i]);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060003F0 RID: 1008
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void Init();
|
|
|
|
// Token: 0x060003F1 RID: 1009
|
|
[ThreadAndSerializationSafe]
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void FinalizerFailure();
|
|
|
|
// Token: 0x0400004E RID: 78
|
|
internal IntPtr m_Ptr;
|
|
|
|
// Token: 0x0400004F RID: 79
|
|
private CullingGroup.StateChanged m_OnStateChanged = null;
|
|
|
|
// Token: 0x02000034 RID: 52
|
|
// (Invoke) Token: 0x060003F3 RID: 1011
|
|
public delegate void StateChanged(CullingGroupEvent sphere);
|
|
}
|
|
}
|