C# Class FootprintPlacer

Inheritance: MonoBehaviour
Mostrar archivo Open project: famerij/EdgeGraph Class Usage Examples

Public Properties

Property Type Description
footprintPrefabsInside List
footprintPrefabsOnEdge List
graph Graph
handPlacementEnabled bool
handPlacementOnEdge bool

Public Methods

Method Description
ClearUnmodifiedFootprints ( bool onEdge ) : void
FillInsideWithFootprints ( ) : void
FillWithEdgesWithFootprints ( ) : void
GetFootprintPosAndRotAtTarget ( Vector3 target, Vector3 &pos, Quaternion &rot, Vector3 &closestPoint, int index, bool placeOnEdge = true, bool placeInside = true ) : void

Gets position and rotation in given target position according to closest edge

GetRandomEdgeFootPrintIdx ( ) : int
GetRandomInsideFootPrintIdx ( ) : int
InstantiatedFootprintDestroyed ( Footprint, fp ) : void
PlaceFootprint ( Vector3 worldPos, Quaternion rotation, int index, bool onEdge, bool modified = false ) : GameObject
UpdateData ( ) : void

Private Methods

Method Description
FootprintIsInsideGraph ( Footprint, footprint, Matrix4x4 footprintTRSMatrix ) : bool
FootprintOverlapsOthers ( Footprint, footprint, Matrix4x4 footprintTRSMatrix ) : bool

Method Details

ClearUnmodifiedFootprints() public method

public ClearUnmodifiedFootprints ( bool onEdge ) : void
onEdge bool
return void

FillInsideWithFootprints() public method

public FillInsideWithFootprints ( ) : void
return void

FillWithEdgesWithFootprints() public method

public FillWithEdgesWithFootprints ( ) : void
return void

GetFootprintPosAndRotAtTarget() public method

Gets position and rotation in given target position according to closest edge
public GetFootprintPosAndRotAtTarget ( Vector3 target, Vector3 &pos, Quaternion &rot, Vector3 &closestPoint, int index, bool placeOnEdge = true, bool placeInside = true ) : void
target Vector3
pos Vector3
rot Quaternion
closestPoint Vector3
index int
placeOnEdge bool Is footprint placed on the edge or on target?
placeInside bool Is footprint placed inside or outside the edge?
return void

GetRandomEdgeFootPrintIdx() public method

public GetRandomEdgeFootPrintIdx ( ) : int
return int

GetRandomInsideFootPrintIdx() public method

public GetRandomInsideFootPrintIdx ( ) : int
return int

InstantiatedFootprintDestroyed() public method

public InstantiatedFootprintDestroyed ( Footprint, fp ) : void
fp Footprint,
return void

PlaceFootprint() public method

public PlaceFootprint ( Vector3 worldPos, Quaternion rotation, int index, bool onEdge, bool modified = false ) : GameObject
worldPos Vector3
rotation Quaternion
index int
onEdge bool
modified bool
return GameObject

UpdateData() public method

public UpdateData ( ) : void
return void

Property Details

footprintPrefabsInside public_oe property

public List footprintPrefabsInside
return List

footprintPrefabsOnEdge public_oe property

public List footprintPrefabsOnEdge
return List

graph public_oe property

public Graph graph
return Graph

handPlacementEnabled public_oe property

public bool handPlacementEnabled
return bool

handPlacementOnEdge public_oe property

public bool handPlacementOnEdge
return bool