C# Класс 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
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
SignedAngle ( Vector3 from, Vector3 to, Vector3 up ) : float

Описание методов

AddPoint() публичный Метод

public AddPoint ( Vector3 position ) : TrackBuildRPoint,
position Vector3
Результат TrackBuildRPoint,

AddPoint() публичный Метод

public AddPoint ( TrackBuildRPoint, point ) : void
point TrackBuildRPoint,
Результат void

AddTexture() публичный Метод

public AddTexture ( ) : void
Результат void

CheckDiagram() публичный Метод

public CheckDiagram ( ) : void
Результат void

Clear() публичный Метод

public Clear ( ) : void
Результат void

FromKML() публичный Метод

public FromKML ( string coordinates ) : void
coordinates string
Результат void

FromXML() публичный Метод

public FromXML ( XmlNode node ) : void
node XmlNode
Результат void

GenerateSecondaryUVSet() публичный Метод

/// Mark the pit lane as dirty so it will be recalculated/rebuilt /// /// Set pit lane point data to rerender ///
public GenerateSecondaryUVSet ( ) : void
Результат void

GetLastPointIndex() публичный Метод

public GetLastPointIndex ( float trackPercentage ) : int
trackPercentage float
Результат int

GetLeftBoundaryPosition() публичный Метод

public GetLeftBoundaryPosition ( float t ) : Vector3
t float
Результат Vector3

GetNearestPoint() публичный Метод

public GetNearestPoint ( Vector3 fromPostition ) : float
fromPostition Vector3
Результат float

GetNearestPointIndex() публичный Метод

public GetNearestPointIndex ( float trackPercentage ) : int
trackPercentage float
Результат int

GetNextPointIndex() публичный Метод

public GetNextPointIndex ( float trackPercentage ) : int
trackPercentage float
Результат int

GetPoint() публичный Метод

public GetPoint ( int index ) : TrackBuildRPoint,
index int
Результат TrackBuildRPoint,

GetRightBoundaryPosition() публичный Метод

public GetRightBoundaryPosition ( float t ) : Vector3
t float
Результат Vector3

GetTexturesArray() публичный Метод

public GetTexturesArray ( ) : TrackBuildRTexture[]
Результат TrackBuildRTexture[]

GetTrackCross() публичный Метод

public GetTrackCross ( float t ) : Vector3
t float
Результат Vector3

GetTrackCrownAngle() публичный Метод

public GetTrackCrownAngle ( float t ) : float
t float
Результат float

GetTrackDirection() публичный Метод

public GetTrackDirection ( float t ) : Vector3
t float
Результат Vector3

GetTrackPercentage() публичный Метод

public GetTrackPercentage ( TrackBuildRPoint, point ) : float
point TrackBuildRPoint,
Результат float

GetTrackPercentage() публичный Метод

public GetTrackPercentage ( int pointIndex ) : float
pointIndex int
Результат float

GetTrackPosition() публичный Метод

public GetTrackPosition ( float t ) : Vector3
t float
Результат Vector3

GetTrackUp() публичный Метод

public GetTrackUp ( float t ) : Quaternion
t float
Результат Quaternion

GetTrackWidth() публичный Метод

public GetTrackWidth ( float t ) : float
t float
Результат float

InitTextures() публичный Метод

public InitTextures ( ) : void
Результат void

InsertPoint() публичный Метод

public InsertPoint ( int index ) : TrackBuildRPoint,
index int
Результат TrackBuildRPoint,

InsertPoint() публичный Метод

public InsertPoint ( TrackBuildRPoint, point, int index ) : void
point TrackBuildRPoint,
index int
Результат void

OnEnable() публичный Метод

public OnEnable ( ) : void
Результат void

OptimseMeshes() публичный Метод

public OptimseMeshes ( ) : void
Результат void

ReRenderTrack() публичный Метод

Set all point data to rerender
public ReRenderTrack ( ) : void
Результат void

RecalculateCurves() публичный Метод

public RecalculateCurves ( ) : void
Результат void

RemovePoint() публичный Метод

public RemovePoint ( TrackBuildRPoint point ) : void
point TrackBuildRPoint
Результат void

RemoveTexture() публичный Метод

public RemoveTexture ( TrackBuildRTexture texture ) : void
texture TrackBuildRTexture
Результат void

SetTrackDirty() публичный Метод

Mark the entire track as dirty so it will be recalculated/rebuilt
public SetTrackDirty ( ) : void
Результат void

Texture() публичный Метод

public Texture ( int index ) : TrackBuildRTexture
index int
Результат TrackBuildRTexture

ToXML() публичный Метод

public ToXML ( ) : string
Результат string

TrackRendered() публичный Метод

Set all point data as rendered
public TrackRendered ( ) : void
Результат void

this() публичный Метод

public this ( int index ) : TrackBuildRPoint
index int
Результат TrackBuildRPoint

Описание свойств

additionalBumperHeight публичное свойство

public float additionalBumperHeight
Результат float

assignedPoints публичное свойство

public int assignedPoints
Результат int

baseTransform публичное свойство

public Transform baseTransform
Результат Transform

bumperAngleThresold публичное свойство

public float bumperAngleThresold
Результат float

bumperHeight публичное свойство

public float bumperHeight
Результат float

bumperMode публичное свойство

public BumperModes bumperMode
Результат BumperModes

bumperWidth публичное свойство

public float bumperWidth
Результат float

conformAccuracy публичное свойство

public float conformAccuracy
Результат float

diagramFilepath публичное свойство

public string diagramFilepath
Результат string

diagramGO публичное свойство

public GameObject diagramGO
Результат GameObject

diagramMaterial публичное свойство

public Material diagramMaterial
Результат Material

diagramMesh публичное свойство

public Mesh diagramMesh
Результат Mesh

drawMode публичное свойство

public bool drawMode
Результат bool

editMeshResolution публичное свойство

public float editMeshResolution
Результат float

includeCollider публичное свойство

public bool includeCollider
Результат bool

includeColliderRoof публичное свойство

public bool includeColliderRoof
Результат bool

jumpHeight публичное свойство

public float jumpHeight
Результат float

lastPolycount публичное свойство

public int lastPolycount
Результат int

loopPoints публичное свойство

public int loopPoints
Результат int

loopRadius публичное свойство

public float loopRadius
Результат float

maxJumpLength публичное свойство

public float maxJumpLength
Результат float

mergeCurve публичное свойство

public AnimationCurve mergeCurve
Результат AnimationCurve

mergeTerrain публичное свойство

public Terrain mergeTerrain
Результат Terrain

scale публичное свойство

public float scale
Результат float

scalePointA публичное свойство

public Vector3 scalePointA
Результат Vector3

scalePointB публичное свойство

public Vector3 scalePointB
Результат Vector3

showDiagram публичное свойство

public bool showDiagram
Результат bool

terrainAccuracy публичное свойство

public float terrainAccuracy
Результат float

terrainMergeMargin публичное свойство

public float terrainMergeMargin
Результат float

terrainMergeWidth публичное свойство

public float terrainMergeWidth
Результат float

trackBumpers публичное свойство

public bool trackBumpers
Результат bool

trackColliderWallHeight публичное свойство

public float trackColliderWallHeight
Результат float

twistAngle публичное свойство

public float twistAngle
Результат float

twistPoints публичное свойство

public int twistPoints
Результат int

twistRadius публичное свойство

public float twistRadius
Результат float