Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
VRageMath.Spatial.MyClusterTree Class Reference

Classes

interface  IMyActivationHandler
 
struct  MyClusterQueryResult
 

Public Member Functions

 MyClusterTree (BoundingBoxD?singleCluster, bool forcedClusters)
 
ulong AddObject (BoundingBoxD bbox, IMyActivationHandler activationHandler, ulong?customId, string tag, long entityId)
 
void MoveObject (ulong id, BoundingBoxD aabb, Vector3 velocity)
 
void EnsureClusterSpace (BoundingBoxD aabb)
 
void RemoveObject (ulong id)
 
Vector3D GetObjectOffset (ulong id)
 
object GetClusterForPosition (Vector3D pos)
 
void Dispose ()
 
ListReader< object > GetList ()
 
void CastRay (Vector3D from, Vector3D to, List< MyClusterQueryResult > results)
 
void Intersects (Vector3D translation, List< MyClusterQueryResult > results)
 
void GetAll (List< MyClusterQueryResult > results)
 
void ReorderClusters (BoundingBoxD aabb, ulong objectId=ulong.MaxValue)
 
void GetAllStaticObjects (List< BoundingBoxD > staticObjects)
 
void Serialize (List< BoundingBoxD > list)
 
void Deserialize (List< BoundingBoxD > list)
 

Static Public Member Functions

static BoundingBoxD AdjustAABBByVelocity (BoundingBoxD aabb, Vector3 velocity)
 

Public Attributes

Func< int, BoundingBoxD, object > OnClusterCreated
 
Action< object > OnClusterRemoved
 
Action< object > OnFinishBatch
 
Action OnClustersReordered
 
Func< long, bool > GetEntityReplicableExistsById
 
const ulong CLUSTERED_OBJECT_ID_UNITIALIZED = ulong.MaxValue
 
readonly BoundingBoxD SingleCluster
 
readonly bool ForcedClusters
 

Static Public Attributes

static Vector3 IdealClusterSize = new Vector3(20000)
 
static Vector3 MinimumDistanceFromBorder = IdealClusterSize / 10.0f
 
static Vector3 MaximumForSplit = IdealClusterSize * 2
 

Detailed Description

Definition at line 12 of file MyClusterTree.cs.

Constructor & Destructor Documentation

VRageMath.Spatial.MyClusterTree.MyClusterTree ( BoundingBoxD singleCluster,
bool  forcedClusters 
)
inline

Definition at line 128 of file MyClusterTree.cs.

Member Function Documentation

ulong VRageMath.Spatial.MyClusterTree.AddObject ( BoundingBoxD  bbox,
IMyActivationHandler  activationHandler,
ulong?  customId,
string  tag,
long  entityId 
)
inline

Definition at line 134 of file MyClusterTree.cs.

static BoundingBoxD VRageMath.Spatial.MyClusterTree.AdjustAABBByVelocity ( BoundingBoxD  aabb,
Vector3  velocity 
)
inlinestatic

Definition at line 303 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.CastRay ( Vector3D  from,
Vector3D  to,
List< MyClusterQueryResult results 
)
inline

Definition at line 557 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.Deserialize ( List< BoundingBoxD list)
inline

Definition at line 1060 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.Dispose ( )
inline

Definition at line 499 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.EnsureClusterSpace ( BoundingBoxD  aabb)
inline

Definition at line 375 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.GetAll ( List< MyClusterQueryResult results)
inline

Definition at line 595 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.GetAllStaticObjects ( List< BoundingBoxD staticObjects)
inline

Definition at line 1042 of file MyClusterTree.cs.

object VRageMath.Spatial.MyClusterTree.GetClusterForPosition ( Vector3D  pos)
inline

Definition at line 492 of file MyClusterTree.cs.

ListReader<object> VRageMath.Spatial.MyClusterTree.GetList ( )
inline

Definition at line 516 of file MyClusterTree.cs.

Vector3D VRageMath.Spatial.MyClusterTree.GetObjectOffset ( ulong  id)
inline

Definition at line 479 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.Intersects ( Vector3D  translation,
List< MyClusterQueryResult results 
)
inline

Definition at line 580 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.MoveObject ( ulong  id,
BoundingBoxD  aabb,
Vector3  velocity 
)
inline

Definition at line 315 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.RemoveObject ( ulong  id)
inline

Definition at line 414 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.ReorderClusters ( BoundingBoxD  aabb,
ulong  objectId = ulong.MaxValue 
)
inline

Definition at line 660 of file MyClusterTree.cs.

void VRageMath.Spatial.MyClusterTree.Serialize ( List< BoundingBoxD list)
inline

Definition at line 1052 of file MyClusterTree.cs.

Member Data Documentation

const ulong VRageMath.Spatial.MyClusterTree.CLUSTERED_OBJECT_ID_UNITIALIZED = ulong.MaxValue

Definition at line 74 of file MyClusterTree.cs.

readonly bool VRageMath.Spatial.MyClusterTree.ForcedClusters

Definition at line 81 of file MyClusterTree.cs.

Func<long, bool> VRageMath.Spatial.MyClusterTree.GetEntityReplicableExistsById

Definition at line 20 of file MyClusterTree.cs.

Vector3 VRageMath.Spatial.MyClusterTree.IdealClusterSize = new Vector3(20000)
static

Definition at line 76 of file MyClusterTree.cs.

Vector3 VRageMath.Spatial.MyClusterTree.MaximumForSplit = IdealClusterSize * 2
static

Definition at line 78 of file MyClusterTree.cs.

Vector3 VRageMath.Spatial.MyClusterTree.MinimumDistanceFromBorder = IdealClusterSize / 10.0f
static

Definition at line 77 of file MyClusterTree.cs.

Func<int, BoundingBoxD, object> VRageMath.Spatial.MyClusterTree.OnClusterCreated

Definition at line 16 of file MyClusterTree.cs.

Action<object> VRageMath.Spatial.MyClusterTree.OnClusterRemoved

Definition at line 17 of file MyClusterTree.cs.

Action VRageMath.Spatial.MyClusterTree.OnClustersReordered

Definition at line 19 of file MyClusterTree.cs.

Action<object> VRageMath.Spatial.MyClusterTree.OnFinishBatch

Definition at line 18 of file MyClusterTree.cs.

readonly BoundingBoxD VRageMath.Spatial.MyClusterTree.SingleCluster

Definition at line 80 of file MyClusterTree.cs.


The documentation for this class was generated from the following file: