C# Class QuadTree, Unity-AI-framework

Inheritance: MonoBehaviour
Show file Open project: MyOwnClone/Unity-AI-framework Class Usage Examples

Public Properties

Property Type Description
CenterX float
CenterY float
TargetSize float
Width float
differentObjects List
generationDone bool
qtisToRegenerate List
rebuildingQuadTree bool
waypointsNeedRegeneration bool

Public Methods

Method Description
DetermineGameObjectsInside ( GameObject item ) : List
GetObjectsInside ( Vector3 vec ) : List
GetQuadTreeItemFor ( Vector3 vec, Vector3 size, int maxDepth ) : List
GetQuadTreeItemFor ( Vector3 vec, int maxDepth ) : QuadTreeItem
Init ( GameObject startItem, int depth ) : void
IsGameObjectIn ( GameObject box1, GameObject box2 ) : bool
IsGameObjectIn ( GameObject bigger, Vector3 smallerPos ) : bool

Private Methods

Method Description
DetectChangeInObstacles ( ) : bool
DisposeOldQuadTree ( GameObject paramRoot, bool keepRoot ) : void
PrepareChild ( GameObject parent, Vector3 position, Vector3 size, int itemCounter, int depth ) : GameObject
Start ( ) : void
Update ( ) : void
UpdateQuadTree ( ) : void

Method Details

DetermineGameObjectsInside() public method

public DetermineGameObjectsInside ( GameObject item ) : List
item GameObject
return List

GetObjectsInside() public method

public GetObjectsInside ( Vector3 vec ) : List
vec Vector3
return List

GetQuadTreeItemFor() public method

public GetQuadTreeItemFor ( Vector3 vec, Vector3 size, int maxDepth ) : List
vec Vector3
size Vector3
maxDepth int
return List

GetQuadTreeItemFor() public method

public GetQuadTreeItemFor ( Vector3 vec, int maxDepth ) : QuadTreeItem
vec Vector3
maxDepth int
return QuadTreeItem

Init() public method

public Init ( GameObject startItem, int depth ) : void
startItem GameObject
depth int
return void

IsGameObjectIn() public method

public IsGameObjectIn ( GameObject box1, GameObject box2 ) : bool
box1 GameObject
box2 GameObject
return bool

IsGameObjectIn() public method

public IsGameObjectIn ( GameObject bigger, Vector3 smallerPos ) : bool
bigger GameObject
smallerPos Vector3
return bool

Property Details

CenterX public property

public float CenterX
return float

CenterY public property

public float CenterY
return float

TargetSize public property

public float TargetSize
return float

Width public property

public float Width
return float

differentObjects public property

public List differentObjects
return List

generationDone public static property

public static bool generationDone
return bool

qtisToRegenerate public property

public List qtisToRegenerate
return List

rebuildingQuadTree public static property

public static bool rebuildingQuadTree
return bool

waypointsNeedRegeneration public static property

public static bool waypointsNeedRegeneration
return bool