C# Класс SpaceSim.Spacecrafts.SpaceCraftBase

Наследование: SpaceSim.Physics.GravitationalBodyBase, IAerodynamicBody, ISpaceCraft
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
EntryFlame ReEntryFlame
IspMultiplier double
MachNumber double
MissionName string
StageOffset VectorMath.DVector2
Texture System.Drawing.Bitmap

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

AddChild() публичный Метод

public AddChild ( ISpaceCraft child ) : void
child ISpaceCraft
Результат void

ComputeBoundingBox() публичный Метод

public ComputeBoundingBox ( ) : RectangleD
Результат VectorMath.RectangleD

DeployFairing() публичный Метод

Deploys the fairing.
public DeployFairing ( ) : void
Результат void

DeployGridFins() публичный Метод

Deploys the grid fins.
public DeployGridFins ( ) : void
Результат void

DeployLandingLegs() публичный Метод

Deploys the landing legs.
public DeployLandingLegs ( ) : void
Результат void

FixedUpdate() публичный Метод

public FixedUpdate ( SpaceSim.Physics.TimeStep timeStep ) : void
timeStep SpaceSim.Physics.TimeStep
Результат void

GetAlpha() публичный Метод

public GetAlpha ( ) : double
Результат double

GetBaseCd() публичный Метод

public GetBaseCd ( double baseCd ) : double
baseCd double
Результат double

GetDownrangeDistance() публичный Метод

Gets the down range distance along the equator of the parent planet.
public GetDownrangeDistance ( DVector2 pointOfReference ) : double
pointOfReference VectorMath.DVector2
Результат double

GetRelativeAcceleration() публичный Метод

public GetRelativeAcceleration ( ) : DVector2
Результат VectorMath.DVector2

GetRelativeAltitude() публичный Метод

Gets the relative altitude of the spacecraft from it's parent's surface.
public GetRelativeAltitude ( ) : double
Результат double

GetRelativePitch() публичный Метод

public GetRelativePitch ( ) : double
Результат double

GetRelativeVelocity() публичный Метод

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
Результат VectorMath.DVector2

InitializeController() публичный Метод

public InitializeController ( EventManager eventManager ) : void
eventManager SpaceSim.Drawing.EventManager
Результат void

OffsetPitch() публичный Метод

public OffsetPitch ( double offset ) : void
offset double
Результат void

OffsetRelativePitch() публичный Метод

public OffsetRelativePitch ( double offset ) : void
offset double
Результат void

OffsetRoll() публичный Метод

public OffsetRoll ( double offset ) : void
offset double
Результат void

OffsetYaw() публичный Метод

public OffsetYaw ( double offset ) : void
offset double
Результат void

RemoveChild() публичный Метод

public RemoveChild ( ISpaceCraft child ) : void
child ISpaceCraft
Результат void

RenderAbove() защищенный Метод

protected RenderAbove ( Graphics graphics, RectangleD cameraBounds ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
Результат void

RenderBelow() защищенный Метод

protected RenderBelow ( Graphics graphics, RectangleD cameraBounds ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
Результат void

RenderGdi() публичный Метод

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
Результат void

RenderShip() защищенный Метод

protected RenderShip ( Graphics graphics, RectangleD cameraBounds, RectangleF screenBounds ) : void
graphics System.Drawing.Graphics
cameraBounds VectorMath.RectangleD
screenBounds System.Drawing.RectangleF
Результат void

ResetAccelerations() публичный Метод

public ResetAccelerations ( ) : void
Результат void

ResolveAtmopsherics() публичный Метод

public ResolveAtmopsherics ( IMassiveBody body ) : void
body IMassiveBody
Результат void

ResolveGravitation() публичный Метод

public ResolveGravitation ( IPhysicsBody other ) : void
other IPhysicsBody
Результат void

SetParent() публичный Метод

public SetParent ( ISpaceCraft craft ) : void
craft ISpaceCraft
Результат void

SetPitch() публичный Метод

public SetPitch ( double pitch ) : void
pitch double
Результат void

SetRelativePitch() публичный Метод

public SetRelativePitch ( double pitch ) : void
pitch double
Результат void

SetRoll() публичный Метод

public SetRoll ( double roll ) : void
roll double
Результат void

SetThrottle() публичный Метод

public SetThrottle ( double throttle, int engineIds = null ) : void
throttle double
engineIds int
Результат void

SetYaw() публичный Метод

public SetYaw ( double yaw ) : void
yaw double
Результат void

SpaceCraftBase() защищенный Метод

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
Результат System

Stage() публичный Метод

Stages the spacecraft according to its mounted angle by applying a normal force.
public Stage ( ) : void
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

ToggleDisplayVectors() публичный Метод

public ToggleDisplayVectors ( ) : void
Результат void

Update() публичный Метод

Updates the spacecraft and it's children.
public Update ( double dt ) : void
dt double
Результат void

UpdateAnimations() публичный Метод

public UpdateAnimations ( SpaceSim.Physics.TimeStep timeStep ) : void
timeStep SpaceSim.Physics.TimeStep
Результат void

UpdateChildren() публичный Метод

public UpdateChildren ( DVector2 position, DVector2 velocity ) : void
position VectorMath.DVector2
velocity VectorMath.DVector2
Результат void

UpdateController() публичный Метод

public UpdateController ( double dt ) : void
dt double
Результат void

Visibility() публичный Метод

public Visibility ( RectangleD cameraBounds ) : double
cameraBounds VectorMath.RectangleD
Результат double

Описание свойств

EntryFlame защищенное свойство

protected ReEntryFlame EntryFlame
Результат ReEntryFlame

IspMultiplier защищенное свойство

protected double IspMultiplier
Результат double

MachNumber защищенное свойство

protected double MachNumber
Результат double

MissionName защищенное свойство

protected string MissionName
Результат string

StageOffset защищенное свойство

protected DVector2,VectorMath StageOffset
Результат VectorMath.DVector2

Texture защищенное свойство

protected Bitmap,System.Drawing Texture
Результат System.Drawing.Bitmap