BallisticNG
 All Classes Namespaces Functions Variables Enumerations Properties
Public Member Functions | Public Attributes | Properties
BnG.TrackData.Section Class Reference

Represents a collection of tiles. More...

List of all members.

Public Member Functions

float Width (Vector3 worldPos)
 Returns the width of this section, using a world position to determine the side to return the width on.
float InterpolatedWidth (Vector3 worldPos)
 Returns the interpolated width of this section, using a world psotiion to determine the side to return the width on.
float InterpolatedHeight (Vector3 worldPos)
 Returns the interpolated width of this section, using a world psotiion to determine the side to return the width on.
float Height (Vector3 worldPos)
 Returns the height of this section, using a world position to determine the side to return the height on.
float Width (int side)
float Height (int side)
float FloorWidth (Vector3 worldPos)
float FloorWidth (int side)
void CalculateFloorWidth (Transform floorTransform, Vector3[] floorVerts)
float Width ()
 Returns the median width of the section.
float Height ()
 Returns the median height of the section.
Section GetSectionAhead (int count)
void GetSectionAhead (int count, ref Section section)
 Retrieves a section using an already existing section reference.
Section GetSectionBehind (int count)
void GetSectionBehind (int count, ref Section section)
 Retrieves a section using an already existing section reference. If a junction start is hit or there isn't a previous section reference then the search terminates.
void GetSectionBehindAllowJunctionStart (int count, ref Section section)
 Retrieves a section using an already existing section reference. If a junction start is hit or there isn't a previous section reference then the search terminates.
Vector3 TransformPoint (Vector3 vec)
 Returns an offset in local space to this section.
Vector3 InverseTransformPoint (Vector3 vec)
 Returns the transformation of a world space vector into the local space of this section.
Vector3 LeftSideInverseTransformPoint (Vector3 vec)
 Returns the transformation of a world space vector into the local space of this sections left side.
Vector3 RightSideInverseTransformPoint (Vector3 vec)
 Returns the transformation of a world space vector into the local space of this sections right side.
Vector3 TransformDirection (Vector3 direction)
 Converts the local space direction into a world space direction.
float PositionToT (Vector3 pos, float maxDistance, bool betweenSections, bool allowNegative)
 Returns a T value for how far out in comparison to the distance between this section and the next is.
Vector3 InterpolatedUp (Vector3 pos, bool useNormal)
 Interpolates an up vector using the previous, current and next sections using the provided position as a reference. This is similar to calculating a barycentric normal.
Vector3 InterpolatedForward (Vector3 pos)
 Interpolates a forward vector using the previous, current and next sections using the provided position as a reference. This is similar to calculating a barycentric normal.
Vector3 InterpolatedPosition (Vector3 pos)
Vector3 InverseTransformDirection (Vector3 direction)
 Converts the world space direction into a local space direction.
SectionTrigger AddTrigger (SectionTrigger trigger)
 Adds a new trigger this section.
void RemoveTrigger (SectionTrigger trigger)
 Removes a trigger from this section.
void ClearTriggers ()
 Clears all triggers from this section.

Public Attributes

List< SectionTriggerTriggers = new List<SectionTrigger>()
int index
int IndexOf
 The index of this section in the track data section list.
E_SECTIONTYPE type
Vector3 position
bool racingLineCalculated
Vector3 racingLineLeft
Vector3 racingLineRight
Quaternion rotation
Tile[] tiles
Vector3 normal
Vector2 LeftDimension
 The dimension of the track on the left hand side of this section.
Vector2 RightDimension
 The dimension of the track on the right hand side of this section.
float LeftFloorWidth
 Width of the floor on the left hand side of the track.
float RightFloorWidth
 WIdth of the floor on the right hand side of the track.
float DistanceToNext = -1
 The cached distance to this sections next reference.
float DistanceToJunction = -1
 The cached distance to this sections junctions (if there is one).
float DistanceToReverseJunction = -1
 The cached distance to this sections reverse junction (if there is one).
float DistanceToAiOverride = -1
 The cached distance to this sections ai override.
float FlatDistanceToNext = -1
 The flat cached distance to this sections next reference. (no Y component)
float FlatDistanceToJunction = -1
 The flat cached distance to this sections junction (if there is one, with no y component).
float FlatDistanceToReverseJunction = 1
 The flat cached distance to this sections reverse junction (if there is one, with no y component).
bool HasLeftWall
bool HasRightWall
Section next
Section NextAiOverride
Section previous
Section[] linked
Section junction
Section reverseJunction
Section JunctionExit
 Sections that are interconnected to this section.
int JunctionPointer = -1
 The index of any junction data in TrackData.Instance that this section is connected too. Defaults to -1 (nothing).
bool pitlaneEntance
bool beingQuaked
float quakeHeight
bool AllowOutOfBounds
 If true then the ship will not simulate out of bounds collisions for this section.
bool ResetFlyBackwards
 If true then the AI fly backwards state will be reset to false.
bool ForTeleporter
 If true then AI will lock their target look ahead to this section.
bool LockOntoUntilClose
 If true then the AI will lock onto this section until they are close enough to it.
float LockOnToDistance = 2.0f
 How far away the LockOnUntilCLose will work to.
bool AiIgnoreJunction
 If true then AI will ignore a junction.
bool AiAlwaysWallAvoid
 if true then the AI will always wall avoid, even if there isn't a wall present.
bool NoHoverPositionCorrection
 If true then the hover position correction used for the hover origin will not be used.
float rotationMultiplier = 1
bool NoTiltLock
 If true then ships in 2159 won't lock their tilt when over this section.
bool NoMaglockSounds
 If true then this section will not make any maglock sounds.

Properties

Vector3 Forward [get]
 The forward vector for this section.
Vector3 Right [get]
 The right vector for this section.
Vector3 Up [get]
 The up vector for this section.

Detailed Description

Represents a collection of tiles.


Member Function Documentation

Adds a new trigger this section.

Clears all triggers from this section.

void BnG.TrackData.Section.GetSectionAhead ( int  count,
ref Section  section 
) [inline]

Retrieves a section using an already existing section reference.

Parameters:
countThe number of sections to iterate through.
sectionThe section reference.
void BnG.TrackData.Section.GetSectionBehind ( int  count,
ref Section  section 
) [inline]

Retrieves a section using an already existing section reference. If a junction start is hit or there isn't a previous section reference then the search terminates.

Parameters:
countThe number of sections to iterate through.
sectionThe section reference.
void BnG.TrackData.Section.GetSectionBehindAllowJunctionStart ( int  count,
ref Section  section 
) [inline]

Retrieves a section using an already existing section reference. If a junction start is hit or there isn't a previous section reference then the search terminates.

Parameters:
countThe number of sections to iterate through.
sectionThe section reference.
float BnG.TrackData.Section.Height ( Vector3  worldPos) [inline]

Returns the height of this section, using a world position to determine the side to return the height on.

Parameters:
worldPos
Returns:
float BnG.TrackData.Section.Height ( ) [inline]

Returns the median height of the section.

Returns:
Vector3 BnG.TrackData.Section.InterpolatedForward ( Vector3  pos) [inline]

Interpolates a forward vector using the previous, current and next sections using the provided position as a reference. This is similar to calculating a barycentric normal.

float BnG.TrackData.Section.InterpolatedHeight ( Vector3  worldPos) [inline]

Returns the interpolated width of this section, using a world psotiion to determine the side to return the width on.

Vector3 BnG.TrackData.Section.InterpolatedUp ( Vector3  pos,
bool  useNormal 
) [inline]

Interpolates an up vector using the previous, current and next sections using the provided position as a reference. This is similar to calculating a barycentric normal.

float BnG.TrackData.Section.InterpolatedWidth ( Vector3  worldPos) [inline]

Returns the interpolated width of this section, using a world psotiion to determine the side to return the width on.

Vector3 BnG.TrackData.Section.InverseTransformDirection ( Vector3  direction) [inline]

Converts the world space direction into a local space direction.

Vector3 BnG.TrackData.Section.InverseTransformPoint ( Vector3  vec) [inline]

Returns the transformation of a world space vector into the local space of this section.

Vector3 BnG.TrackData.Section.LeftSideInverseTransformPoint ( Vector3  vec) [inline]

Returns the transformation of a world space vector into the local space of this sections left side.

float BnG.TrackData.Section.PositionToT ( Vector3  pos,
float  maxDistance,
bool  betweenSections,
bool  allowNegative 
) [inline]

Returns a T value for how far out in comparison to the distance between this section and the next is.

Removes a trigger from this section.

Vector3 BnG.TrackData.Section.RightSideInverseTransformPoint ( Vector3  vec) [inline]

Returns the transformation of a world space vector into the local space of this sections right side.

Vector3 BnG.TrackData.Section.TransformDirection ( Vector3  direction) [inline]

Converts the local space direction into a world space direction.

Vector3 BnG.TrackData.Section.TransformPoint ( Vector3  vec) [inline]

Returns an offset in local space to this section.

float BnG.TrackData.Section.Width ( Vector3  worldPos) [inline]

Returns the width of this section, using a world position to determine the side to return the width on.

Parameters:
worldPos
Returns:
float BnG.TrackData.Section.Width ( ) [inline]

Returns the median width of the section.

Returns:

Member Data Documentation

if true then the AI will always wall avoid, even if there isn't a wall present.

If true then AI will ignore a junction.

If true then the ship will not simulate out of bounds collisions for this section.

The cached distance to this sections ai override.

The cached distance to this sections junctions (if there is one).

The cached distance to this sections next reference.

The cached distance to this sections reverse junction (if there is one).

The flat cached distance to this sections junction (if there is one, with no y component).

The flat cached distance to this sections next reference. (no Y component)

The flat cached distance to this sections reverse junction (if there is one, with no y component).

If true then AI will lock their target look ahead to this section.

The index of this section in the track data section list.

Sections that are interconnected to this section.

The index of any junction data in TrackData.Instance that this section is connected too. Defaults to -1 (nothing).

The dimension of the track on the left hand side of this section.

Width of the floor on the left hand side of the track.

How far away the LockOnUntilCLose will work to.

If true then the AI will lock onto this section until they are close enough to it.

If true then the hover position correction used for the hover origin will not be used.

If true then this section will not make any maglock sounds.

If true then ships in 2159 won't lock their tilt when over this section.

If true then the AI fly backwards state will be reset to false.

The dimension of the track on the right hand side of this section.

WIdth of the floor on the right hand side of the track.


Property Documentation

The forward vector for this section.

The right vector for this section.

Vector3 BnG.TrackData.Section.Up [get]

The up vector for this section.


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