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

Classes

class  AttachedFlagParts
 

Public Member Functions

void AddFlag (Part flag)
 Adds a flag to the List of child flags on this panel. Also parents the flag to this panel. More...
 
void BuildMesh (bool triangulate, FairingPanel prevPanel)
 Build the mesh of the fairing panel, uses the panel underneath this panel to calculate the uv offset More...
 
void CleanUp ()
 
bool ContainsSection (FairingXSection sec)
 
void Despawn ()
 
 FairingPanel (FairingXSection[] xSections, Material mat, float arcFrom, float arcTo, ModuleProceduralFairing host)
 
void GeneratePanelColliders (GameObject hostGo, int layer, bool isTrigger)
 
void GenerateSectionColliders (Transform modelTransform, List< FairingXSection > xSections, int nSides)
 
float GetArea ()
 The area of this panel, in sq units More...
 
Bounds GetBounds ()
 AABB of this panel, for part size calculation and the general entertainment of AABB enthusiasts More...
 
float GetCursorProximity (Vector3 cursorPosition, float range, Camera referenceCamera)
 
Vector3 GetMidPoint ()
 
float GetSlope ()
 Slope corresponds to tan(angle between the top and bottom xsections) More...
 
bool ReadyFlagsForJettison ()
 Detach and destroy the Flag Part when the fairings Jettison. Saves the Part transform for parenting them to their corresponding panel More...
 
void RemoveFlag (uint FlagID)
 Removes an attached flag reference More...
 
void SetCollapsedViewInstantly ()
 Sets the panels local position to be the pivotOffset or "default, Collapsed" position instantly. More...
 
void SetExplodedView (float t)
 
void SetOpacity (float o)
 
void SetTgtExplodedView (float t)
 
void SetTgtOpacity (float o)
 
void Spawn (Transform trf)
 

Static Public Member Functions

static List< FairingPanelSetupPanelArray (int nSegments, Material FairingMaterial, Material FairingConeMaterial, List< FairingXSection > xSections, ModuleProceduralFairing host, float capRadius)
 Returns a set of panels arranged to cover all cross-sections given the number of breakaway segments More...
 

Public Attributes

List< AttachedFlagPartsattachedFlagParts = null
 
FairingXSection bottom
 
GameObject ColliderContainer
 
GameObject go
 
bool isCap = false
 Is this panel a cap panel, i.e., a triangular end point to the fairing. More...
 
bool isLast = false
 Is this panel among the last sections before cap? More...
 
Material mat
 
Mesh mesh
 
int panelIndex
 Registered index when the panel is created. More...
 
FairingXSection persistentXSection
 
FairingXSection top
 

Constructor & Destructor Documentation

ProceduralFairings.FairingPanel.FairingPanel ( FairingXSection[]  xSections,
Material  mat,
float  arcFrom,
float  arcTo,
ModuleProceduralFairing  host 
)
inline

Member Function Documentation

void ProceduralFairings.FairingPanel.AddFlag ( Part  flag)
inline

Adds a flag to the List of child flags on this panel. Also parents the flag to this panel.

Parameters
flag
void ProceduralFairings.FairingPanel.BuildMesh ( bool  triangulate,
FairingPanel  prevPanel 
)
inline

Build the mesh of the fairing panel, uses the panel underneath this panel to calculate the uv offset

Parameters
triangulate
prevPanel

Botom of the arc

void ProceduralFairings.FairingPanel.CleanUp ( )
inline
bool ProceduralFairings.FairingPanel.ContainsSection ( FairingXSection  sec)
inline
void ProceduralFairings.FairingPanel.Despawn ( )
inline
void ProceduralFairings.FairingPanel.GeneratePanelColliders ( GameObject  hostGo,
int  layer,
bool  isTrigger 
)
inline
void ProceduralFairings.FairingPanel.GenerateSectionColliders ( Transform  modelTransform,
List< FairingXSection xSections,
int  nSides 
)
inline
float ProceduralFairings.FairingPanel.GetArea ( )
inline

The area of this panel, in sq units

Bounds ProceduralFairings.FairingPanel.GetBounds ( )
inline

AABB of this panel, for part size calculation and the general entertainment of AABB enthusiasts

float ProceduralFairings.FairingPanel.GetCursorProximity ( Vector3  cursorPosition,
float  range,
Camera  referenceCamera 
)
inline
Vector3 ProceduralFairings.FairingPanel.GetMidPoint ( )
inline
float ProceduralFairings.FairingPanel.GetSlope ( )
inline

Slope corresponds to tan(angle between the top and bottom xsections)

bool ProceduralFairings.FairingPanel.ReadyFlagsForJettison ( )
inline

Detach and destroy the Flag Part when the fairings Jettison. Saves the Part transform for parenting them to their corresponding panel

void ProceduralFairings.FairingPanel.RemoveFlag ( uint  FlagID)
inline

Removes an attached flag reference

Parameters
FlagID
void ProceduralFairings.FairingPanel.SetCollapsedViewInstantly ( )
inline

Sets the panels local position to be the pivotOffset or "default, Collapsed" position instantly.

void ProceduralFairings.FairingPanel.SetExplodedView ( float  t)
inline
void ProceduralFairings.FairingPanel.SetOpacity ( float  o)
inline
void ProceduralFairings.FairingPanel.SetTgtExplodedView ( float  t)
inline
void ProceduralFairings.FairingPanel.SetTgtOpacity ( float  o)
inline
static List<FairingPanel> ProceduralFairings.FairingPanel.SetupPanelArray ( int  nSegments,
Material  FairingMaterial,
Material  FairingConeMaterial,
List< FairingXSection xSections,
ModuleProceduralFairing  host,
float  capRadius 
)
inlinestatic

Returns a set of panels arranged to cover all cross-sections given the number of breakaway segments

< add nose cap panels

void ProceduralFairings.FairingPanel.Spawn ( Transform  trf)
inline

< Default

Member Data Documentation

List<AttachedFlagParts> ProceduralFairings.FairingPanel.attachedFlagParts = null
FairingXSection ProceduralFairings.FairingPanel.bottom
GameObject ProceduralFairings.FairingPanel.ColliderContainer
GameObject ProceduralFairings.FairingPanel.go
bool ProceduralFairings.FairingPanel.isCap = false

Is this panel a cap panel, i.e., a triangular end point to the fairing.

bool ProceduralFairings.FairingPanel.isLast = false

Is this panel among the last sections before cap?

Material ProceduralFairings.FairingPanel.mat
Mesh ProceduralFairings.FairingPanel.mesh
int ProceduralFairings.FairingPanel.panelIndex

Registered index when the panel is created.

FairingXSection ProceduralFairings.FairingPanel.persistentXSection
FairingXSection ProceduralFairings.FairingPanel.top

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