C# Class TrackBuildRTrack, ProjectPhoenix

Track BuildR Track holds all the point and curve data It is responsible for holding other track based data It also generates all the curve data in Recalculate Data which is used in Generator class It has some functions to allow other scripts to access basic track information
Inheritance: MonoBehaviour
Show file Open project: Alx666/ProjectPhoenix Class Usage Examples

Public Properties

Property Type Description
additionalBumperHeight float
assignedPoints int
baseTransform Transform
bumperAngleThresold float
bumperHeight float
bumperMode BumperModes
bumperWidth float
conformAccuracy float
diagramFilepath string
diagramGO GameObject
diagramMaterial Material
diagramMesh Mesh
drawMode bool
editMeshResolution float
includeCollider bool
includeColliderRoof bool
jumpHeight float
lastPolycount int
loopPoints int
loopRadius float
maxJumpLength float
mergeCurve AnimationCurve
mergeTerrain Terrain
scale float
scalePointA Vector3
scalePointB Vector3
showDiagram bool
terrainAccuracy float
terrainMergeMargin float
terrainMergeWidth float
trackBumpers bool
trackColliderWallHeight float
twistAngle float
twistPoints int
twistRadius float

Public Methods

Method Description
AddPoint ( Vector3 position ) : TrackBuildRPoint,
AddPoint ( TrackBuildRPoint, point ) : void
AddTexture ( ) : void
CheckDiagram ( ) : void
Clear ( ) : void
FromKML ( string coordinates ) : void
FromXML ( XmlNode node ) : void
GenerateSecondaryUVSet ( ) : void

/// Mark the pit lane as dirty so it will be recalculated/rebuilt ///

/// Set pit lane point data to rerender ///

GetLastPointIndex ( float trackPercentage ) : int
GetLeftBoundaryPosition ( float t ) : Vector3
GetNearestPoint ( Vector3 fromPostition ) : float
GetNearestPointIndex ( float trackPercentage ) : int
GetNextPointIndex ( float trackPercentage ) : int
GetPoint ( int index ) : TrackBuildRPoint,
GetRightBoundaryPosition ( float t ) : Vector3
GetTexturesArray ( ) : TrackBuildRTexture[]
GetTrackCross ( float t ) : Vector3
GetTrackCrownAngle ( float t ) : float
GetTrackDirection ( float t ) : Vector3
GetTrackPercentage ( TrackBuildRPoint, point ) : float
GetTrackPercentage ( int pointIndex ) : float
GetTrackPosition ( float t ) : Vector3
GetTrackUp ( float t ) : Quaternion
GetTrackWidth ( float t ) : float
InitTextures ( ) : void
InsertPoint ( int index ) : TrackBuildRPoint,
InsertPoint ( TrackBuildRPoint, point, int index ) : void
OnEnable ( ) : void
OptimseMeshes ( ) : void
ReRenderTrack ( ) : void

Set all point data to rerender

RecalculateCurves ( ) : void
RemovePoint ( TrackBuildRPoint point ) : void
RemoveTexture ( TrackBuildRTexture texture ) : void
SetTrackDirty ( ) : void

Mark the entire track as dirty so it will be recalculated/rebuilt

Texture ( int index ) : TrackBuildRTexture
ToXML ( ) : string
TrackRendered ( ) : void

Set all point data as rendered

this ( int index ) : TrackBuildRPoint

Private Methods

Method Description
SignedAngle ( Vector3 from, Vector3 to, Vector3 up ) : float

Method Details

AddPoint() public method

public AddPoint ( Vector3 position ) : TrackBuildRPoint,
position Vector3
return TrackBuildRPoint,

AddPoint() public method

public AddPoint ( TrackBuildRPoint, point ) : void
point TrackBuildRPoint,
return void

AddTexture() public method

public AddTexture ( ) : void
return void

CheckDiagram() public method

public CheckDiagram ( ) : void
return void

Clear() public method

public Clear ( ) : void
return void

FromKML() public method

public FromKML ( string coordinates ) : void
coordinates string
return void

FromXML() public method

public FromXML ( XmlNode node ) : void
node XmlNode
return void

GenerateSecondaryUVSet() public method

/// Mark the pit lane as dirty so it will be recalculated/rebuilt /// /// Set pit lane point data to rerender ///
public GenerateSecondaryUVSet ( ) : void
return void

GetLastPointIndex() public method

public GetLastPointIndex ( float trackPercentage ) : int
trackPercentage float
return int

GetLeftBoundaryPosition() public method

public GetLeftBoundaryPosition ( float t ) : Vector3
t float
return Vector3

GetNearestPoint() public method

public GetNearestPoint ( Vector3 fromPostition ) : float
fromPostition Vector3
return float

GetNearestPointIndex() public method

public GetNearestPointIndex ( float trackPercentage ) : int
trackPercentage float
return int

GetNextPointIndex() public method

public GetNextPointIndex ( float trackPercentage ) : int
trackPercentage float
return int

GetPoint() public method

public GetPoint ( int index ) : TrackBuildRPoint,
index int
return TrackBuildRPoint,

GetRightBoundaryPosition() public method

public GetRightBoundaryPosition ( float t ) : Vector3
t float
return Vector3

GetTexturesArray() public method

public GetTexturesArray ( ) : TrackBuildRTexture[]
return TrackBuildRTexture[]

GetTrackCross() public method

public GetTrackCross ( float t ) : Vector3
t float
return Vector3

GetTrackCrownAngle() public method

public GetTrackCrownAngle ( float t ) : float
t float
return float

GetTrackDirection() public method

public GetTrackDirection ( float t ) : Vector3
t float
return Vector3

GetTrackPercentage() public method

public GetTrackPercentage ( TrackBuildRPoint, point ) : float
point TrackBuildRPoint,
return float

GetTrackPercentage() public method

public GetTrackPercentage ( int pointIndex ) : float
pointIndex int
return float

GetTrackPosition() public method

public GetTrackPosition ( float t ) : Vector3
t float
return Vector3

GetTrackUp() public method

public GetTrackUp ( float t ) : Quaternion
t float
return Quaternion

GetTrackWidth() public method

public GetTrackWidth ( float t ) : float
t float
return float

InitTextures() public method

public InitTextures ( ) : void
return void

InsertPoint() public method

public InsertPoint ( int index ) : TrackBuildRPoint,
index int
return TrackBuildRPoint,

InsertPoint() public method

public InsertPoint ( TrackBuildRPoint, point, int index ) : void
point TrackBuildRPoint,
index int
return void

OnEnable() public method

public OnEnable ( ) : void
return void

OptimseMeshes() public method

public OptimseMeshes ( ) : void
return void

ReRenderTrack() public method

Set all point data to rerender
public ReRenderTrack ( ) : void
return void

RecalculateCurves() public method

public RecalculateCurves ( ) : void
return void

RemovePoint() public method

public RemovePoint ( TrackBuildRPoint point ) : void
point TrackBuildRPoint
return void

RemoveTexture() public method

public RemoveTexture ( TrackBuildRTexture texture ) : void
texture TrackBuildRTexture
return void

SetTrackDirty() public method

Mark the entire track as dirty so it will be recalculated/rebuilt
public SetTrackDirty ( ) : void
return void

Texture() public method

public Texture ( int index ) : TrackBuildRTexture
index int
return TrackBuildRTexture

ToXML() public method

public ToXML ( ) : string
return string

TrackRendered() public method

Set all point data as rendered
public TrackRendered ( ) : void
return void

this() public method

public this ( int index ) : TrackBuildRPoint
index int
return TrackBuildRPoint

Property Details

additionalBumperHeight public property

public float additionalBumperHeight
return float

assignedPoints public property

public int assignedPoints
return int

baseTransform public property

public Transform baseTransform
return Transform

bumperAngleThresold public property

public float bumperAngleThresold
return float

bumperHeight public property

public float bumperHeight
return float

bumperMode public property

public BumperModes bumperMode
return BumperModes

bumperWidth public property

public float bumperWidth
return float

conformAccuracy public property

public float conformAccuracy
return float

diagramFilepath public property

public string diagramFilepath
return string

diagramGO public property

public GameObject diagramGO
return GameObject

diagramMaterial public property

public Material diagramMaterial
return Material

diagramMesh public property

public Mesh diagramMesh
return Mesh

drawMode public property

public bool drawMode
return bool

editMeshResolution public property

public float editMeshResolution
return float

includeCollider public property

public bool includeCollider
return bool

includeColliderRoof public property

public bool includeColliderRoof
return bool

jumpHeight public property

public float jumpHeight
return float

lastPolycount public property

public int lastPolycount
return int

loopPoints public property

public int loopPoints
return int

loopRadius public property

public float loopRadius
return float

maxJumpLength public property

public float maxJumpLength
return float

mergeCurve public property

public AnimationCurve mergeCurve
return AnimationCurve

mergeTerrain public property

public Terrain mergeTerrain
return Terrain

scale public property

public float scale
return float

scalePointA public property

public Vector3 scalePointA
return Vector3

scalePointB public property

public Vector3 scalePointB
return Vector3

showDiagram public property

public bool showDiagram
return bool

terrainAccuracy public property

public float terrainAccuracy
return float

terrainMergeMargin public property

public float terrainMergeMargin
return float

terrainMergeWidth public property

public float terrainMergeWidth
return float

trackBumpers public property

public bool trackBumpers
return bool

trackColliderWallHeight public property

public float trackColliderWallHeight
return float

twistAngle public property

public float twistAngle
return float

twistPoints public property

public int twistPoints
return int

twistRadius public property

public float twistRadius
return float