Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
ProceduralFairings.FairingXSection Class Reference
Inheritance diagram for ProceduralFairings.FairingXSection:
IConfigNode

Public Member Functions

bool AddAttachedFlag (int panelIndex, uint flagPartID)
 Adds a flag to an existing panel index or creates a new one. More...
 
void AddNewFairingPanel (int panelIndex)
 Adds a new fairing panel reference by the panel index. More...
 
int CompareTo (FairingXSection b)
 
 FairingXSection ()
 
 FairingXSection (bool isCap)
 
 FairingXSection (FairingXSection from, FairingXSection to)
 
 FairingXSection (FairingXSection cloneOf)
 
int GetPanelIndexFromFlag (uint FlagID, uint placementID)
 Returns a panel index of 0 or greater when the part craft id OR a flag part placementID is passed and corresponds to an stored FLAG id More...
 
void Load (ConfigNode node)
 
void RemoveAttachedFlag (uint FlagID)
 
void Save (ConfigNode node)
 
void UpdateLerp (float t, float y)
 

Static Public Member Functions

static float CircleCast (FairingXSection xs, Vector3 wAxis, Vector3 wPivot, Vector3 wRadial, int nRays, float rLength, int layerMask, out float lVariance, out RaycastHit hit)
 Peform a series of raycasts towards the xsection center. More...
 
static bool ConeCast (FairingXSection xsFrom, FairingXSection xsTo, Vector3 wAxis, Vector3 wPivot, Vector3 wRadial, float radiusOffset, int nRays, int layerMask, out float hitLengthScalar, float aOffset=0f)
 Peform a series of raycasts from one xsection towards another, along the cone surface between them. Returns true if anything hit along the way. More...
 
static float GetSlopeAngle (FairingXSection from, FairingXSection to)
 Returns the angle (in radians) formed by the slope between the two given sections (PI = no slope, lesser than PI = narrowing, greater = widening) More...
 

Public Attributes

Color color
 
List< FairingPanelFlagsfairingPanelFlags = null
 
float h
 
bool isCap
 cap section. radius = 0 More...
 
bool isLast
 last xsection before cap More...
 
bool isValid
 used for placement More...
 
float r
 

Properties

bool IsLerp [get]
 

Constructor & Destructor Documentation

ProceduralFairings.FairingXSection.FairingXSection ( )
inline
ProceduralFairings.FairingXSection.FairingXSection ( bool  isCap)
inline
ProceduralFairings.FairingXSection.FairingXSection ( FairingXSection  from,
FairingXSection  to 
)
inline
ProceduralFairings.FairingXSection.FairingXSection ( FairingXSection  cloneOf)
inline

Member Function Documentation

bool ProceduralFairings.FairingXSection.AddAttachedFlag ( int  panelIndex,
uint  flagPartID 
)
inline

Adds a flag to an existing panel index or creates a new one.

Parameters
panelIndexFairing panel index
flagPartIDflag Part persistent id
void ProceduralFairings.FairingXSection.AddNewFairingPanel ( int  panelIndex)
inline

Adds a new fairing panel reference by the panel index.

Parameters
panelIndex
static float ProceduralFairings.FairingXSection.CircleCast ( FairingXSection  xs,
Vector3  wAxis,
Vector3  wPivot,
Vector3  wRadial,
int  nRays,
float  rLength,
int  layerMask,
out float  lVariance,
out RaycastHit  hit 
)
inlinestatic

Peform a series of raycasts towards the xsection center.

Parameters
xsThe X-section in question
wAxisworldspace axis
wPivotworldspace base pivot point
wRadialworldspace fwd reference
nRaysray count, precision
rLengthray length (always finds center, set to reasonable max)
layerMaskthe raycast layermask
lVariancethe delta between the highest and lowest surfaces found.
Returns
The highest surface height (from center)
int ProceduralFairings.FairingXSection.CompareTo ( FairingXSection  b)
inline
static bool ProceduralFairings.FairingXSection.ConeCast ( FairingXSection  xsFrom,
FairingXSection  xsTo,
Vector3  wAxis,
Vector3  wPivot,
Vector3  wRadial,
float  radiusOffset,
int  nRays,
int  layerMask,
out float  hitLengthScalar,
float  aOffset = 0f 
)
inlinestatic

Peform a series of raycasts from one xsection towards another, along the cone surface between them. Returns true if anything hit along the way.

Parameters
xsFromThe X-section in question
wAxisworldspace axis
wPivotworldspace base pivot point
wRadialworldspace fwd reference
nRaysray count, precision
rLengthray length (always finds center, set to reasonable max)
layerMaskthe raycast layermask
Returns
True if any surface is found intersecting the cone surface
int ProceduralFairings.FairingXSection.GetPanelIndexFromFlag ( uint  FlagID,
uint  placementID 
)
inline

Returns a panel index of 0 or greater when the part craft id OR a flag part placementID is passed and corresponds to an stored FLAG id

Returns
Returning -1 means the requested flag is not found.
static float ProceduralFairings.FairingXSection.GetSlopeAngle ( FairingXSection  from,
FairingXSection  to 
)
inlinestatic

Returns the angle (in radians) formed by the slope between the two given sections (PI = no slope, lesser than PI = narrowing, greater = widening)

void ProceduralFairings.FairingXSection.Load ( ConfigNode  node)
inline

Implements IConfigNode.

void ProceduralFairings.FairingXSection.RemoveAttachedFlag ( uint  FlagID)
inline
void ProceduralFairings.FairingXSection.Save ( ConfigNode  node)
inline

Implements IConfigNode.

void ProceduralFairings.FairingXSection.UpdateLerp ( float  t,
float  y 
)
inline

Member Data Documentation

Color ProceduralFairings.FairingXSection.color
List<FairingPanelFlags> ProceduralFairings.FairingXSection.fairingPanelFlags = null
float ProceduralFairings.FairingXSection.h
bool ProceduralFairings.FairingXSection.isCap

cap section. radius = 0

bool ProceduralFairings.FairingXSection.isLast

last xsection before cap

bool ProceduralFairings.FairingXSection.isValid

used for placement

float ProceduralFairings.FairingXSection.r

Property Documentation

bool ProceduralFairings.FairingXSection.IsLerp
get

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