C# Class SpaceSim.Spacecrafts.SpaceCraftBase

Inheritance: SpaceSim.Physics.GravitationalBodyBase, IAerodynamicBody, ISpaceCraft
Afficher le fichier Open project: zlynn1990/SpaceSim Class Usage Examples

Protected Properties

Свойство Type Description
EntryFlame ReEntryFlame
IspMultiplier double
MachNumber double
MissionName string
StageOffset VectorMath.DVector2
Texture System.Drawing.Bitmap

Méthodes publiques

Méthode Description
AddChild ( ISpaceCraft child ) : void
ComputeBoundingBox ( ) : RectangleD
DeployFairing ( ) : void

Deploys the fairing.

DeployGridFins ( ) : void

Deploys the grid fins.

DeployLandingLegs ( ) : void

Deploys the landing legs.

FixedUpdate ( SpaceSim.Physics.TimeStep timeStep ) : void
GetAlpha ( ) : double
GetBaseCd ( double baseCd ) : double
GetDownrangeDistance ( DVector2 pointOfReference ) : double

Gets the down range distance along the equator of the parent planet.

GetRelativeAcceleration ( ) : DVector2
GetRelativeAltitude ( ) : double

Gets the relative altitude of the spacecraft from it's parent's surface.

GetRelativePitch ( ) : double
GetRelativeVelocity ( ) : DVector2

Gets the relative velocity of the spacecraft. If the space craft is within the parent's atmosphere than the rotation of the planet is taken in account. Otherwise its a simple difference of velocities.

InitializeController ( EventManager eventManager ) : void
OffsetPitch ( double offset ) : void
OffsetRelativePitch ( double offset ) : void
OffsetRoll ( double offset ) : void
OffsetYaw ( double offset ) : void
RemoveChild ( ISpaceCraft child ) : void
RenderGdi ( Graphics graphics, RectangleD cameraBounds ) : void

Renders the space craft at it's correct scale and rotation according to the camera. The engines are rendered first and then the space craft body.

ResetAccelerations ( ) : void
ResolveAtmopsherics ( IMassiveBody body ) : void
ResolveGravitation ( IPhysicsBody other ) : void
SetParent ( ISpaceCraft craft ) : void
SetPitch ( double pitch ) : void
SetRelativePitch ( double pitch ) : void
SetRoll ( double roll ) : void
SetThrottle ( double throttle, int engineIds = null ) : void
SetYaw ( double yaw ) : void
Stage ( ) : void

Stages the spacecraft according to its mounted angle by applying a normal force.

ToString ( ) : string
ToggleDisplayVectors ( ) : void
Update ( double dt ) : void

Updates the spacecraft and it's children.

UpdateAnimations ( SpaceSim.Physics.TimeStep timeStep ) : void
UpdateChildren ( DVector2 position, DVector2 velocity ) : void
UpdateController ( double dt ) : void
Visibility ( RectangleD cameraBounds ) : double

Méthodes protégées

Méthode Description
RenderAbove ( Graphics graphics, RectangleD cameraBounds ) : void
RenderBelow ( Graphics graphics, RectangleD cameraBounds ) : void
RenderShip ( Graphics graphics, RectangleD cameraBounds, RectangleF screenBounds ) : void
SpaceCraftBase ( string craftDirectory, DVector2 position, DVector2 velocity, double payloadMass, double propellantMass, string texturePath, ReEntryFlame entryFlame = null ) : System

Private Methods

Méthode Description
GetChildDragCoefficient ( List children, double totalDragCoefficient ) : double
GetChildFormDragArea ( List children, double totalFormDragArea ) : double
GetChildLiftArea ( List children, double totalLiftArea ) : double
GetMaxChildLiftCoefficient ( List children, double totalLiftCoefficient ) : double
TotalFormDragArea ( ) : double

Recursively finds the total drag area of all surfaces exposed to air in the spacecraft.

TotalFormDragCoefficient ( ) : double

Recursively finds the total drag of all surfaces exposed to air in the spacecraft.

TotalLiftArea ( ) : double

Recursively finds the total lift area of all surfaces exposed to air in the spacecraft.

TotalLiftCoefficient ( ) : double

Recursively finds the total lift of all surfaces exposed to air in the spacecraft.

TotalSkinFrictionArea ( ) : double

Recursively finds the total drag area of all surfaces exposed to air in the spacecraft.

TotalSkinFrictionCoefficient ( ) : double

Recursively finds the total skin friction due to all surfaces exposed to air in the spacecraft.

UpdateEngines ( double dt ) : void

Recursively updates the engines in the spacecraft and updates propellant mass.

Method Details

AddChild() public méthode

public AddChild ( ISpaceCraft child ) : void
child ISpaceCraft
Résultat void

ComputeBoundingBox() public méthode

public ComputeBoundingBox ( ) : RectangleD
Résultat VectorMath.RectangleD

DeployFairing() public méthode

Deploys the fairing.
public DeployFairing ( ) : void
Résultat void

DeployGridFins() public méthode

Deploys the grid fins.
public DeployGridFins ( ) : void
Résultat void

DeployLandingLegs() public méthode

Deploys the landing legs.
public DeployLandingLegs ( ) : void
Résultat void

FixedUpdate() public méthode

public FixedUpdate ( SpaceSim.Physics.TimeStep timeStep ) : void
timeStep SpaceSim.Physics.TimeStep
Résultat void

GetAlpha() public méthode

public GetAlpha ( ) : double
Résultat double

GetBaseCd() public méthode

public GetBaseCd ( double baseCd ) : double
baseCd double
Résultat double

GetDownrangeDistance() public méthode

Gets the down range distance along the equator of the parent planet.
public GetDownrangeDistance ( DVector2 pointOfReference ) : double
pointOfReference VectorMath.DVector2
Résultat double

GetRelativeAcceleration() public méthode

public GetRelativeAcceleration ( ) : DVector2
Résultat VectorMath.DVector2

GetRelativeAltitude() public méthode

Gets the relative altitude of the spacecraft from it's parent's surface.
public GetRelativeAltitude ( ) : double
Résultat double

GetRelativePitch() public méthode

public GetRelativePitch ( ) : double
Résultat double

GetRelativeVelocity() public méthode

Gets the relative velocity of the spacecraft. If the space craft is within the parent's atmosphere than the rotation of the planet is taken in account. Otherwise its a simple difference of velocities.
public GetRelativeVelocity ( ) : DVector2
Résultat VectorMath.DVector2

InitializeController() public méthode

public InitializeController ( EventManager eventManager ) : void
eventManager SpaceSim.Drawing.EventManager
Résultat void

OffsetPitch() public méthode

public OffsetPitch ( double offset ) : void
offset double
Résultat void

OffsetRelativePitch() public méthode

public OffsetRelativePitch ( double offset ) : void
offset double
Résultat void

OffsetRoll() public méthode

public OffsetRoll ( double offset ) : void
offset double
Résultat void

OffsetYaw() public méthode

public OffsetYaw ( double offset ) : void
offset double
Résultat void

RemoveChild() public méthode

public RemoveChild ( ISpaceCraft child ) : void
child ISpaceCraft
Résultat void

RenderAbove() protected méthode

protected RenderAbove ( Graphics graphics, RectangleD cameraBounds ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
Résultat void

RenderBelow() protected méthode

protected RenderBelow ( Graphics graphics, RectangleD cameraBounds ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
Résultat void

RenderGdi() public méthode

Renders the space craft at it's correct scale and rotation according to the camera. The engines are rendered first and then the space craft body.
public RenderGdi ( Graphics graphics, RectangleD cameraBounds ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
Résultat void

RenderShip() protected méthode

protected RenderShip ( Graphics graphics, RectangleD cameraBounds, RectangleF screenBounds ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
screenBounds System.Drawing.RectangleF
Résultat void

ResetAccelerations() public méthode

public ResetAccelerations ( ) : void
Résultat void

ResolveAtmopsherics() public méthode

public ResolveAtmopsherics ( IMassiveBody body ) : void
body IMassiveBody
Résultat void

ResolveGravitation() public méthode

public ResolveGravitation ( IPhysicsBody other ) : void
other IPhysicsBody
Résultat void

SetParent() public méthode

public SetParent ( ISpaceCraft craft ) : void
craft ISpaceCraft
Résultat void

SetPitch() public méthode

public SetPitch ( double pitch ) : void
pitch double
Résultat void

SetRelativePitch() public méthode

public SetRelativePitch ( double pitch ) : void
pitch double
Résultat void

SetRoll() public méthode

public SetRoll ( double roll ) : void
roll double
Résultat void

SetThrottle() public méthode

public SetThrottle ( double throttle, int engineIds = null ) : void
throttle double
engineIds int
Résultat void

SetYaw() public méthode

public SetYaw ( double yaw ) : void
yaw double
Résultat void

SpaceCraftBase() protected méthode

protected SpaceCraftBase ( string craftDirectory, DVector2 position, DVector2 velocity, double payloadMass, double propellantMass, string texturePath, ReEntryFlame entryFlame = null ) : System
craftDirectory string
position VectorMath.DVector2
velocity VectorMath.DVector2
payloadMass double
propellantMass double
texturePath string
entryFlame ReEntryFlame
Résultat System

Stage() public méthode

Stages the spacecraft according to its mounted angle by applying a normal force.
public Stage ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

ToggleDisplayVectors() public méthode

public ToggleDisplayVectors ( ) : void
Résultat void

Update() public méthode

Updates the spacecraft and it's children.
public Update ( double dt ) : void
dt double
Résultat void

UpdateAnimations() public méthode

public UpdateAnimations ( SpaceSim.Physics.TimeStep timeStep ) : void
timeStep SpaceSim.Physics.TimeStep
Résultat void

UpdateChildren() public méthode

public UpdateChildren ( DVector2 position, DVector2 velocity ) : void
position VectorMath.DVector2
velocity VectorMath.DVector2
Résultat void

UpdateController() public méthode

public UpdateController ( double dt ) : void
dt double
Résultat void

Visibility() public méthode

public Visibility ( RectangleD cameraBounds ) : double
cameraBounds VectorMath.RectangleD
Résultat double

Property Details

EntryFlame protected_oe property

protected ReEntryFlame EntryFlame
Résultat ReEntryFlame

IspMultiplier protected_oe property

protected double IspMultiplier
Résultat double

MachNumber protected_oe property

protected double MachNumber
Résultat double

MissionName protected_oe property

protected string MissionName
Résultat string

StageOffset protected_oe property

protected DVector2,VectorMath StageOffset
Résultat VectorMath.DVector2

Texture protected_oe property

protected Bitmap,System.Drawing Texture
Résultat System.Drawing.Bitmap