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

Public Member Functions

int CompareTo (OcclusionData b)
 Just does a compareto on maximumDot (but without the call overhead of two calls) More...
 
double GetConvectionMultVerts (OcclusionCone cone)
 Returns the overlap area (of this part vs the passed cone) times the occlusion at that depth times the overall occlusion of the cone Uses circle-circle intersection method More...
 
double GetCylinderOcclusion (OcclusionCylinder cyl)
 
double GetCylinderOcclusionVerts (OcclusionCylinder cyl)
 
double GetShockStats (OcclusionCone cone, ref double newTempMult, ref double newCoeffMult)
 Returns the overlap area (of this part vs the passed cone) times the occlusion at that depth times the overall occlusion of the cone Uses circle-circle intersection method More...
 
 OcclusionData (PartThermalData data)
 
void Update (Vector3 velocity, bool useDragArea=true)
 

Public Attributes

OcclusionCylinder bodyCyl
 
Vector3 boundsCenter
 
Vector3[] boundsVertices = new Vector3[8]
 positions in projection-space (i.e. on a plane defined by the projection vector) More...
 
Vector2 center
 
double centroidDot
 centroid as above More...
 
OcclusionCone convCone
 
double invFineness
 the Cd at the given angle (0-1); asin(invFineness) = halfangle of taper More...
 
double maximumDot
 maximum, i.e. forward-most, extent of part on projection axis More...
 
double maxWidthDepth
 Set by taking the displacement behind the forward-most-bit (on the projection axis) More...
 
Vector2 minExtents
 
double minimumDot
 the part's minimum on the projection axis More...
 
Part part
 
double projectedArea
 the cross-sectional area, from dragcubes More...
 
Vector3 projectedCenter
 
float[] projectedDots = new float[8]
 
double projectedRadius
 the radius of (that area taken as a circle) More...
 
Vector3[] projectedVertices = new Vector3[8]
 
PartThermalData ptd
 
OcclusionCylinder sunCyl
 

Protected Member Functions

void CreateCornerArray ()
 

Static Protected Member Functions

static double AreaOfIntersection (double existingConeRadius, double potentialConeRadius, double sqrDistance)
 find the area of intersection of the potential circle with the existing circle, given square of distance between their centers More...
 
static double RectRectIntersection (double centralExtentX, double centralExtentY, double minX, double maxX, double minY, double maxY)
 
static double sA (double r, double x, double y)
 

Constructor & Destructor Documentation

OcclusionData.OcclusionData ( PartThermalData  data)
inline

Member Function Documentation

static double OcclusionData.AreaOfIntersection ( double  existingConeRadius,
double  potentialConeRadius,
double  sqrDistance 
)
inlinestaticprotected

find the area of intersection of the potential circle with the existing circle, given square of distance between their centers

Parameters
existingConeRadiusthe circle that will do the occluding
potentialConeRadiusthe circle to be occluded
sqrDistancesquare of the distance between their centers
Returns
the overlap (0-1)

< distance is greater than sum of the radii - no intersection

< 0% overlap

< if the old circle is zero size, there's no intersection

< One fits within the other

< case 1: new circle fits entirely within old circle? full intersection

< case 2: old circle fits entirely within new circle?

< some % overlap

int OcclusionData.CompareTo ( OcclusionData  b)
inline

Just does a compareto on maximumDot (but without the call overhead of two calls)

Parameters
b
Returns
void OcclusionData.CreateCornerArray ( )
inlineprotected
double OcclusionData.GetConvectionMultVerts ( OcclusionCone  cone)
inline

Returns the overlap area (of this part vs the passed cone) times the occlusion at that depth times the overall occlusion of the cone Uses circle-circle intersection method

Parameters
conethe cone to test against
Returns
the convection multiplier based on overlap area

< cylinder radius doesn't change based on displacement

< test vs cylinder

double OcclusionData.GetCylinderOcclusion ( OcclusionCylinder  cyl)
inline
double OcclusionData.GetCylinderOcclusionVerts ( OcclusionCylinder  cyl)
inline

< cylinder radius doesn't change based on displacement

< test vs cylinder

double OcclusionData.GetShockStats ( OcclusionCone  cone,
ref double  newTempMult,
ref double  newCoeffMult 
)
inline

Returns the overlap area (of this part vs the passed cone) times the occlusion at that depth times the overall occlusion of the cone Uses circle-circle intersection method

Parameters
conethe cone to test against
Returns
the convection multiplier based on overlap area

< catch the stack part where top is fully cube-occluded case

static double OcclusionData.RectRectIntersection ( double  centralExtentX,
double  centralExtentY,
double  minX,
double  maxX,
double  minY,
double  maxY 
)
inlinestaticprotected

< FIXME should divisor being 0 mean we return 1 instead, since it is of no size so will be occluded?

static double OcclusionData.sA ( double  r,
double  x,
double  y 
)
inlinestaticprotected
void OcclusionData.Update ( Vector3  velocity,
bool  useDragArea = true 
)
inline

< create the bounds based on the current weighted dragcubes

< calculate projected bounds center

< calculate center and extents in the plane of the normal

< displacement along the vector

< project vertex onto velocity plane

< test vertex ditance with velocity dot

< area calcs

Member Data Documentation

OcclusionCylinder OcclusionData.bodyCyl
Vector3 OcclusionData.boundsCenter
Vector3 [] OcclusionData.boundsVertices = new Vector3[8]

positions in projection-space (i.e. on a plane defined by the projection vector)

Vector2 OcclusionData.center
double OcclusionData.centroidDot

centroid as above

OcclusionCone OcclusionData.convCone
double OcclusionData.invFineness

the Cd at the given angle (0-1); asin(invFineness) = halfangle of taper

double OcclusionData.maximumDot

maximum, i.e. forward-most, extent of part on projection axis

double OcclusionData.maxWidthDepth

Set by taking the displacement behind the forward-most-bit (on the projection axis)

Vector2 OcclusionData.minExtents
double OcclusionData.minimumDot

the part's minimum on the projection axis

Part OcclusionData.part
double OcclusionData.projectedArea

the cross-sectional area, from dragcubes

Vector3 OcclusionData.projectedCenter
float [] OcclusionData.projectedDots = new float[8]
double OcclusionData.projectedRadius

the radius of (that area taken as a circle)

Vector3 [] OcclusionData.projectedVertices = new Vector3[8]
PartThermalData OcclusionData.ptd
OcclusionCylinder OcclusionData.sunCyl

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