![]() |
Kerbal Space Program
1.12.4
|
Classes | |
| struct | CubeData |
| A struct to hold the data calculated for cubes More... | |
Public Member Functions | |
| void | AddSurfaceDragDirection (Vector3 direction, float machNumber, ref CubeData retData) |
| Calculates all the dragcube data for a given direction and mach More... | |
| void | ClearCubes () |
| Clears all drag cubes and resets procedural flag to false More... | |
| void | DrawDragGizmos () |
| Draw the gizmos for debugging purposes More... | |
| void | ForceUpdate (bool weights, bool occlusion, bool resetProcTiming=false) |
| Forces the drag cubes on this part to recalculate it's weights and also all attached parts to recalculate their occlusion More... | |
| DragCube | GetCube (string name) |
| Searches for a drag cube with the given name. More... | |
| float | GetCubeAreaDir (Vector3 dir, float[] areas) |
| Gets the cross-sectional area facing a certain direction, using the specified area array More... | |
| float | GetCubeAreaDir (Vector3 dir) |
| Gets the cross-sectional area facing a certain direction. More... | |
| float | GetCubeCoeffDir (Vector3 dir) |
| Gets the fineness of an object in the given direction, using the drag coefficients. More... | |
| float | GetCubeDepthDir (Vector3 dir) |
| Gets the weighted depth of maximum width of the object in the given direction. (E.g. a Mk1 Pod would have a depth offset of about 0.3m in YN) More... | |
| bool | LoadCube (DragCubeList cubes, string whichOne) |
| Loads an existing drag cube from a drag cube list, specifying the desired name More... | |
| bool | LoadCubes (ConfigNode node) |
| Loads the custom drag cubes defined in the part's cfg More... | |
| bool | LoadCubes (DragCubeList cubes) |
| Loads an existing drag cube list into this part More... | |
| void | RequestOcclusionUpdate () |
| Forces the drag cubes on this part to recalculate occlusion More... | |
| void | ResetCubeWeights (float newWeight) |
| Resets all cube weights to a given value (useful for clearing all cubes) More... | |
| void | ResetCubeWeights () |
| Resets all cube weights to 1 More... | |
| ConfigNode | SaveCubes () |
| void | SetCubeWeight (string name, float weight) |
| Sets a given cube weight More... | |
| void | SetDrag (Vector3 vector, float machNumber) |
| Sets the part's drag vector and recalculates the area and drag for the drag cube list More... | |
| void | SetDragVectorRotation (Quaternion rotation) |
| void | SetDragVectorRotation (bool rotateDragVector) |
| void | SetDragWeights () |
| Sets the part's weighted drag areas and coefficients More... | |
| void | SetOcclusionMultiplier (float multiplier) |
| void | SetPart (Part part) |
| used to assign the part up on start More... | |
| void | SetPartOcclusion () |
| Sets the state of the occlusion from the attached nodes More... | |
Static Public Member Functions | |
| static Vector3 | GetFaceDirection (DragCube.DragFace direction) |
Public Attributes | |
| PhysicsGlobals.LiftingSurfaceCurve | BodyLiftCurve |
| FloatCurve | DragCurveCd |
| FloatCurve | DragCurveCdPower |
| FloatCurve | DragCurveMultiplier |
| PhysicsGlobals.SurfaceCurvesList | SurfaceCurves |
Properties | |
| float | Area [get] |
| The resulting area More... | |
| float | AreaDrag [get] |
| The resulting area multiplied by the drag coefficient More... | |
| float[] | AreaOccluded [get] |
| float | CrossSectionalArea [get] |
| The resulting area without taking mach curves into account More... | |
| List< DragCube > | Cubes [get] |
| List of DragCubes contained by this object More... | |
| float | Depth [get] |
| The depth value More... | |
| float | DragCoeff [get] |
| The drag coefficient, unmodified by Mach effects More... | |
| Vector3 | DragVector [get] |
| The part that this drag list is assigned to More... | |
| Quaternion | DragVectorRotation [get] |
| float | ExposedArea [get] |
| The resulting area taking mach compressability into acount More... | |
| Vector3 | LiftForce [get] |
| The lift force from blunt body effects More... | |
| bool | None [get, set] |
| If this part has this flag set, it will never generate any drag More... | |
| float | OcclusionMultiplier [get] |
| Part | Part [get] |
| The part that this drag list is assigned to More... | |
| float | PostOcclusionArea [get] |
| The resulting area More... | |
| bool | Procedural [get, set] |
| If this part has procedural drag cube setup this flag will be true More... | |
| bool | RotateDragVector [get] |
| float | TaperDot [get] |
| The average dot of the surface with the drag vector, representing the cosine of the conic half-angle More... | |
| float[] | WeightedArea [get] |
| Vector3 | WeightedCenter [get] |
| float[] | WeightedDepth [get] |
| float[] | WeightedDrag [get] |
| Vector3 | WeightedSize [get] |
|
inline |
Calculates all the dragcube data for a given direction and mach
| direction | the outgoing direction |
| machNumber | the part's mach |
< get area multiplier, catching some bad cases
|
inline |
Clears all drag cubes and resets procedural flag to false
|
inline |
Draw the gizmos for debugging purposes
|
inline |
Forces the drag cubes on this part to recalculate it's weights and also all attached parts to recalculate their occlusion
|
inline |
Searches for a drag cube with the given name.
| name | Name of the drag cube that we want to get. |
|
inline |
Gets the cross-sectional area facing a certain direction, using the specified area array
| dir | the outgoing direction |
| areas | the area array to use |
|
inline |
Gets the cross-sectional area facing a certain direction.
| dir | the outgoing direction |
|
inline |
Gets the fineness of an object in the given direction, using the drag coefficients.
| dir | the outgoing direction |
|
inline |
Gets the weighted depth of maximum width of the object in the given direction. (E.g. a Mk1 Pod would have a depth offset of about 0.3m in YN)
| dir | the outgoing direction |
|
inlinestatic |
|
inline |
Loads an existing drag cube from a drag cube list, specifying the desired name
|
inline |
Loads the custom drag cubes defined in the part's cfg
|
inline |
Loads an existing drag cube list into this part
|
inline |
Forces the drag cubes on this part to recalculate occlusion
|
inline |
Resets all cube weights to a given value (useful for clearing all cubes)
|
inline |
Resets all cube weights to 1
|
inline |
|
inline |
Sets a given cube weight
| name | |
| weight |
|
inline |
Sets the part's drag vector and recalculates the area and drag for the drag cube list
| vector |
|
inline |
|
inline |
|
inline |
Sets the part's weighted drag areas and coefficients
|
inline |
|
inline |
used to assign the part up on start
| part |
|
inline |
Sets the state of the occlusion from the attached nodes
| part |
< set occluded area array to weighted area - we will subtract from this occluded area array as required
< set weighted drag back to original - we will modify it based on occlusion
< some helpful things
| PhysicsGlobals.LiftingSurfaceCurve DragCubeList.BodyLiftCurve |
| FloatCurve DragCubeList.DragCurveCd |
| FloatCurve DragCubeList.DragCurveCdPower |
| FloatCurve DragCubeList.DragCurveMultiplier |
| PhysicsGlobals.SurfaceCurvesList DragCubeList.SurfaceCurves |
|
get |
The resulting area
|
get |
The resulting area multiplied by the drag coefficient
|
get |
|
get |
The resulting area without taking mach curves into account
|
get |
List of DragCubes contained by this object
|
get |
The depth value
|
get |
The drag coefficient, unmodified by Mach effects
|
get |
The part that this drag list is assigned to
|
get |
|
get |
The resulting area taking mach compressability into acount
|
get |
The lift force from blunt body effects
|
getset |
If this part has this flag set, it will never generate any drag
|
get |
|
get |
The part that this drag list is assigned to
|
get |
The resulting area
|
getset |
If this part has procedural drag cube setup this flag will be true
|
get |
|
get |
The average dot of the surface with the drag vector, representing the cosine of the conic half-angle
|
get |
|
get |
|
get |
|
get |
|
get |
1.8.7