Difference between revisions of "API:Vessel"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (N3X15 moved page Vessel to API:Vessel)
(Release of XML code docs authorized by HarvestR.)
Line 1: Line 1:
 
A Vessel represents a ship, or a piece of debris that was once part of a ship. You can access the vessel that your Part is part of with this.vessel. Particularly useful members are vessel.orbit, which gives your orbit, and vessel.mainBody, which gives CelestialBody whose influence you are currently under.
 
A Vessel represents a ship, or a piece of debris that was once part of a ship. You can access the vessel that your Part is part of with this.vessel. Particularly useful members are vessel.orbit, which gives your orbit, and vessel.mainBody, which gives CelestialBody whose influence you are currently under.
  
== Useful members ==
+
<!-- Autogenerated by DOCTOOL. Yell at N3X15 if it breaks. -->
 
+
{{Class
Note: this is not a complete listing of the class's members. It includes only the members that someone has figured out how to use and written an explanation for. If you figure out what the other members that aren't listed here do, you should add them to the list!
+
|inherits=<ul><li>{{Type|MonoBehaviour}}</li><li>{{Type|IShipconstruct}}</li><li>{{Type|ITargetable}}</li></ul>
 
+
|name=Vessel
<table border="1">
+
|summary=Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship.
<tr>
+
}}
<td><code>void ChangeWorldVelocity(Vector3d velOffset)</code></td>
+
{{PropertiesStart}}
<td>Adds velOffset to the vessel's velocity. This seems to happen instantaneously and without imposing any stresses on the ship. You can use this to simulate some sort of force, like gravity, that accelerates the vessel as a whole.</td>
+
{{Property
</tr>
+
|type=string
<tr>
+
|name=landedAt
<td><code>Vector3 findWorldCenterOfMass()</code></td>
+
|desc=
<td>Returns the center of mass of the ship, in world coordinates</td>
+
|hasget=
</tr>
+
|hasset=
<tr>
+
}}
<td><code>void SetWorldVelocity(Vector3d vel)</code></td>
+
{{Property
<td>Sets the velocity of the vessel to the supplied velocity vector. This seems to happen instantaneously and without imposing any stresses on the ship.</td>
+
|type=Part
</tr>
+
|name=this
<tr>
+
|desc=
<td><code>bool isActiveVessel { get; }</code></td>
+
|hasget=1
<td>Whether this vessel is the one the player is currently controlling. This is often useful to know, as your code will run even on non-active ships when they are within a few km of the active vessel. You can enclose your code in if(this.vessel.isActiveVessel) {} if you only want to do stuff when your plugin part is on the active ship.</td>
+
|hasset=
</tr>
+
}}
<tr>
+
{{Property
<td><code>bool isCommandable { get; }</code></td>
+
|type=enum
<td>Whether the vessel is commandable or debris. Commandable vessels can be selected from the tracking station and show up on the map with little command pod symbols. Non-commandable vessels can't and show up with debris symbols.</td>
+
|name=Situations
</tr>
+
|desc=
<tr>
+
|hasget=
<td><code>CelestialBody mainBody { get; }</code></td>
+
|hasset=
<td>The celestial body whose sphere of influence the vessel is currently inside. You will probably use this a lot.</td>
+
}}
</tr>
+
{{Property
<tr>
+
|type=bool
<td><code>bool Landed</code></td>
+
|name=isCommandable
<td>Whether the vessel is currently landed on solid ground.</td>
+
|desc=
</tr>
+
|hasget=
<tr>
+
|hasset=
<td><code>Orbit orbit</code></td>
+
}}
<td>The Orbit object storing all the information about the vessel's orbit. You can get the vessel's current velocity with vessel.orbit.GetVel()</td>
+
{{Property
</tr>
+
|type=bool
<tr>
+
|name=packed
<td><code>List<Part> parts</code></td>
+
|desc=
<td>A list of the parts in the ship.</td>
+
|hasget=
</tr>
+
|hasset=
<tr>
+
}}
<td><code>ProtoVessel protoVessel</code></td>
+
{{Property
<td>Some sort of data structure that stores saved information about the vessel. It can be useful for getting data about parts in vessels that are on rails, when vessel.parts is empty. ProtoVessel.protoPartSnapshots is a List<ProtoPartSnapshot>, with one ProtoPartSnapshot for each part in the vessel. ProtoPartSnapshot.partStateValues is a Dictionary<string, KSPParseable>, which you can store data into by overriding Part.onFlightStateSave(). This data is then accessible even if the vessel that stored the data is on rails.</td>
+
|type=bool
</tr>
+
|name=LandedOrSplashed
<tr>
+
|desc=
<td><code>Part rootPart</code></td>
+
|hasget=1
<td>The part at the root of the vessel's part tree, i.e., the command pod.</td>
+
|hasset=1
</tr>
+
}}
<tr>
+
{{Property
<td><code>bool Splashed</code></td>
+
|type=ActionGroupList
<td>Whether the vessel is currently splashed down in the ocean.</td>
+
|name=ActionGroups
</tr>
+
|desc=
<tr>
+
|hasget=
<td><code>string vesselName</code></td>
+
|hasset=
<td>The name of the vessel that appears e.g. when you mouse over it on the orbital map.</td>
+
}}
</table>
+
{{Property
 
+
|type=Transform
[[Category:Community API Documentation]]
+
|name=ReferenceTransform
 +
|desc=The reference transform is used to define the orientation of a vessel for controls and gauges. It defines which way is 'up' or 'forward' or which way pitch rotates, for instance. Read only. Use SetReferenceTransform to set. Defaults to vessel transform if no other transform is set.
 +
|hasget=1
 +
|hasset=
 +
}}
 +
{{Property
 +
|type=double
 +
|name=launchTime
 +
|desc=
 +
|hasget=
 +
|hasset=
 +
}}
 +
{{Property
 +
|type=bool
 +
|name=HoldPhysics
 +
|desc=
 +
|hasget=
 +
|hasset=
 +
}}
 +
{{Property
 +
|type=PatchedConicSolver
 +
|name=patchedConicSolver
 +
|desc=
 +
|hasget=1
 +
|hasset=
 +
}}
 +
{{Property
 +
|type=Situations
 +
|name=situation
 +
|desc=
 +
|hasget=
 +
|hasset=
 +
}}
 +
{{PropertiesEnd}}
 +
{{FieldsStart}}
 +
{{Field
 +
|type=double
 +
|name=verticalSpeed
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3
 +
|name=rb_velocity
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Quaternion
 +
|name=srfRelRotation
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=staticPressure
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3d
 +
|name=acceleration
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=geeForce
 +
|desc=
 +
}}
 +
{{Field
 +
|type=int
 +
|name=currentStage
 +
|desc=
 +
}}
 +
{{Field
 +
|type=ProtoVessel
 +
|name=protoVessel
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3d
 +
|name=obt_velocity
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3d
 +
|name=upAxis
 +
|desc=
 +
}}
 +
{{Field
 +
|type=string
 +
|name=vesselName
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=specificAcceleration
 +
|desc=Specific acceleration is the vessel's potential acceleration per unit of throttle. Used to estimate burn times and such. NOTE: this value is calculated based on smoothed acceleration, so it isn't completely accurate. It will also change as the vessel's mass is reduced as fuel burns away. (it does get pretty accurate after burning for a few seconds)
 +
}}
 +
{{Field
 +
|type=float
 +
|name=heightFromTerrain
 +
|desc=
 +
}}
 +
{{Field
 +
|type=OrbitDriver
 +
|name=orbitDriver
 +
|desc=
 +
}}
 +
{{Field
 +
|type=FlightIntegrator
 +
|name=flightIntegrator
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3
 +
|name=terrainNormal
 +
|desc=
 +
}}
 +
{{Field
 +
|type=static
 +
|name=float
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=pqsAltitude
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=terrainAltitude
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3
 +
|name=angularVelocity
 +
|desc=
 +
}}
 +
{{Field
 +
|type=PatchedConicRenderer
 +
|name=patchedConicRenderer
 +
|desc=
 +
}}
 +
{{Field
 +
|type=CelestialBody
 +
|name=mainBody
 +
|desc=
 +
}}
 +
{{Field
 +
|type=bool
 +
|name=isPersistent
 +
|desc=
 +
}}
 +
{{Field
 +
|type=OrbitTargeter
 +
|name=orbitTargeter
 +
|desc=
 +
}}
 +
{{Field
 +
|type=float
 +
|name=heightFromSurface
 +
|desc=
 +
}}
 +
{{Field
 +
|type=bool
 +
|name=Landed
 +
|desc=
 +
}}
 +
{{Field
 +
|type=bool
 +
|name=isEVA
 +
|desc=
 +
}}
 +
{{Field
 +
|type=bool
 +
|name=HasActiveCrew
 +
|desc=True if the vessel has at least one crewmember and is active (focused).
 +
}}
 +
{{Field
 +
|type=Vector3d
 +
|name=perturbation
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=missionTime
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3
 +
|name=CoM
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=longitude
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Part
 +
|name=rootPart
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Orbit
 +
|name=orbit
 +
|desc=
 +
}}
 +
{{Field
 +
|type=bool
 +
|name=loaded
 +
|desc=
 +
}}
 +
{{Field
 +
|type=uint
 +
|name=referenceTransformId
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=latitude
 +
|desc=
 +
}}
 +
{{Field
 +
|type=bool
 +
|name=isActiveVessel
 +
|desc=
 +
}}
 +
{{Field
 +
|type=double
 +
|name=altitude
 +
|desc=
 +
}}
 +
{{Field
 +
|type=State
 +
|name=state
 +
|desc=
 +
}}
 +
{{Field
 +
|type=enum
 +
|name=State
 +
|desc=
 +
}}
 +
{{Field
 +
|type=Vector3
 +
|name=localCoM
 +
|desc=This is used for persistence purposes. Use findLocalCenterOfMass() if you just want the center of mass.
 +
}}
 +
{{Field
 +
|type=Guid
 +
|name=id
 +
|desc=Unique identifier for each vessel.
 +
}}
 +
{{FieldsEnd}}
 +
{{MethodsStart}}
 +
{{StaticMethod
 +
|returntype=string
 +
|returndesc=
 +
|name=GetMETString
 +
|args=
 +
|desc=
 +
}}
 +
{{StaticMethod
 +
|returntype=string
 +
|returndesc=
 +
|name=GetSituationString
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Vector3
 +
|returndesc=
 +
|name=findWorldCenterOfMass
 +
|args=
 +
|desc=Finds the world center of mass recursively from the given ship part.
 +
}}
 +
{{Method
 +
|returntype=bool
 +
|returndesc=
 +
|name=checkSplashed
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=GoOffRails
 +
|args=
 +
|desc=puts the ship back into a simulated orbit and reenables physics
 +
}}
 +
{{Method
 +
|returntype=OrbitDriver
 +
|returndesc=
 +
|name=GetOrbitDriver
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Vector3
 +
|returndesc=
 +
|name=GetObtVelocity
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=FallBackReferenceTransform
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=ClearStaging
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=DestroyVesselComponents
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=ResetCollisionIgnores
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Transform
 +
|returndesc=
 +
|name=GetTransform
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=ChangeWorldVelocity
 +
|args=
 +
|desc=change the worldspace velocity of this vessel
 +
}}
 +
{{Method
 +
|returntype=float
 +
|returndesc=
 +
|name=GetHeightFromTerrain
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=string
 +
|returndesc=
 +
|name=GetName
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=SpawnCrew
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=float
 +
|returndesc=
 +
|name=GetHeightFromSurface
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=ProtoVessel
 +
|returndesc=
 +
|name=BackupVessel
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=FeedInputFeed
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Vector3
 +
|returndesc=
 +
|name=GetSrfVelocity
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=ResumeStaging
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Orbit
 +
|returndesc=
 +
|name=GetOrbit
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=SetPosition
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=printGroundContacts
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=SetWorldVelocity
 +
|args=
 +
|desc=set the absolute world velocity of this vessel
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=SetRotation
 +
|args=
 +
|desc=Sets the worldspace rotation of this vessel, and all its parts
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=DespawnCrew
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Vector3
 +
|returndesc=
 +
|name=findLocalCenterOfMass
 +
|args=
 +
|desc=Finds the local center of mass recursively from the given ship part.
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=OnLoadFlightState
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=int
 +
|returndesc=
 +
|name=GetCrewCount
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=OnDestroy
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=OnSaveFlightState
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=ClearToSaveStatus
 +
|returndesc=
 +
|name=IsClearToSave
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Vector3
 +
|returndesc=
 +
|name=GetFwdVector
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=Translate
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Vector3d
 +
|returndesc=
 +
|name=GetWorldPos3D
 +
|args=
 +
|desc=Get a double precision vector for the vessel's worldspace position (for when transform.position isn't accurate enough)
 +
}}
 +
{{Method
 +
|returntype=Vector3
 +
|returndesc=
 +
|name=findLocalCenterOfPressure
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=Unload
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=StartFromBackup
 +
|args=
 +
|desc=Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method.
 +
}}
 +
{{Method
 +
|returntype=bool
 +
|returndesc=
 +
|name=checkVisibility
 +
|args=
 +
|desc=Returns true if this vessel is within the visible range of any commandable (focusable) vessel, false otherwise.
 +
}}
 +
{{Method
 +
|returntype=int
 +
|returndesc=
 +
|name=GetCrewCapacity
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=float
 +
|returndesc=
 +
|name=GetTotalMass
 +
|args=
 +
|desc=Get the sum of the mass of all (physical) parts on this vessel
 +
}}
 +
{{Method
 +
|returntype=Vessel
 +
|returndesc=
 +
|name=GetVessel
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=Die
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=Vector3
 +
|returndesc=
 +
|name=findLocalMOI
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=GoOnRails
 +
|args=
 +
|desc=disables physics and puts the ship into a propagated orbit
 +
}}
 +
{{Method
 +
|returntype=bool
 +
|returndesc=
 +
|name=checkLanded
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=MakeInactive
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=SetReferenceTransform
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=printCollisions
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=MakeActive
 +
|args=
 +
|desc=
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=Initialize
 +
|args=
 +
|desc=Initialize is used in cases where the Vessel component is added to a ship that already exists.
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=SetPosition
 +
|args={{arg|Vector3|position}}
 +
|desc=Sets the worldspace position of this vessel, and all its parts
 +
}}
 +
{{Method
 +
|returntype=void
 +
|returndesc=
 +
|name=Load
 +
|args=
 +
|desc=
 +
}}
 +
{{MethodsEnd}}

Revision as of 03:38, 10 November 2012

A Vessel represents a ship, or a piece of debris that was once part of a ship. You can access the vessel that your Part is part of with this.vessel. Particularly useful members are vessel.orbit, which gives your orbit, and vessel.mainBody, which gives CelestialBody whose influence you are currently under.

Vessel Class

Inherits Implements
  • MonoBehaviour
  • IShipconstruct
  • ITargetable

Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship.

Properties

The following are public properties available in Vessel.

Signature Description
string landedAt { }
Part this { get; }
enum Situations { }
bool isCommandable { }
bool packed { }
bool LandedOrSplashed { get; set; }
ActionGroupList ActionGroups { }
Transform ReferenceTransform { get; } The reference transform is used to define the orientation of a vessel for controls and gauges. It defines which way is 'up' or 'forward' or which way pitch rotates, for instance. Read only. Use SetReferenceTransform to set. Defaults to vessel transform if no other transform is set.
double launchTime { }
bool HoldPhysics { }
PatchedConicSolver patchedConicSolver { get; }
Situations situation { }

Fields

The following is a list of publically-accessible fields in Vessel. This includes protected items, which can be accessed by subclasses.

Signature Description
double verticalSpeed
Vector3 rb_velocity
Quaternion srfRelRotation
double staticPressure
Vector3d acceleration
double geeForce
int currentStage
ProtoVessel protoVessel
Vector3d obt_velocity
Vector3d upAxis
string vesselName
double specificAcceleration Specific acceleration is the vessel's potential acceleration per unit of throttle. Used to estimate burn times and such. NOTE: this value is calculated based on smoothed acceleration, so it isn't completely accurate. It will also change as the vessel's mass is reduced as fuel burns away. (it does get pretty accurate after burning for a few seconds)
float heightFromTerrain
OrbitDriver orbitDriver
FlightIntegrator flightIntegrator
Vector3 terrainNormal
static float
double pqsAltitude
double terrainAltitude
Vector3 angularVelocity
PatchedConicRenderer patchedConicRenderer
CelestialBody mainBody
bool isPersistent
OrbitTargeter orbitTargeter
float heightFromSurface
bool Landed
bool isEVA
bool HasActiveCrew True if the vessel has at least one crewmember and is active (focused).
Vector3d perturbation
double missionTime
Vector3 CoM
double longitude
Part rootPart
Orbit orbit
bool loaded
uint referenceTransformId
double latitude
bool isActiveVessel
double altitude
State state
enum State
Vector3 localCoM This is used for persistence purposes. Use findLocalCenterOfMass() if you just want the center of mass.
Guid id Unique identifier for each vessel.

Methods

The following are methods included in Vessel.

Signature Description
static string GetMETString()
static string GetSituationString()
Vector3 findWorldCenterOfMass() Finds the world center of mass recursively from the given ship part.
bool checkSplashed()
void GoOffRails() puts the ship back into a simulated orbit and reenables physics
OrbitDriver GetOrbitDriver()
Vector3 GetObtVelocity()
void FallBackReferenceTransform()
void ClearStaging()
void DestroyVesselComponents()
void ResetCollisionIgnores()
Transform GetTransform()
void ChangeWorldVelocity() change the worldspace velocity of this vessel
float GetHeightFromTerrain()
string GetName()
void SpawnCrew()
float GetHeightFromSurface()
ProtoVessel BackupVessel()
void FeedInputFeed()
Vector3 GetSrfVelocity()
void ResumeStaging()
Orbit GetOrbit()
void SetPosition()
void printGroundContacts()
void SetWorldVelocity() set the absolute world velocity of this vessel
void SetRotation() Sets the worldspace rotation of this vessel, and all its parts
void DespawnCrew()
Vector3 findLocalCenterOfMass() Finds the local center of mass recursively from the given ship part.
void OnLoadFlightState()
int GetCrewCount()
void OnDestroy()
void OnSaveFlightState()
ClearToSaveStatus IsClearToSave()
Vector3 GetFwdVector()
void Translate()
Vector3d GetWorldPos3D() Get a double precision vector for the vessel's worldspace position (for when transform.position isn't accurate enough)
Vector3 findLocalCenterOfPressure()
void Unload()
void StartFromBackup() Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method.
bool checkVisibility() Returns true if this vessel is within the visible range of any commandable (focusable) vessel, false otherwise.
int GetCrewCapacity()
float GetTotalMass() Get the sum of the mass of all (physical) parts on this vessel
Vessel GetVessel()
void Die()
Vector3 findLocalMOI()
void GoOnRails() disables physics and puts the ship into a propagated orbit
bool checkLanded()
void MakeInactive()
void SetReferenceTransform()
void printCollisions()
void MakeActive()
void Initialize() Initialize is used in cases where the Vessel component is added to a ship that already exists.
void SetPosition(Vector3 position) Sets the worldspace position of this vessel, and all its parts
void Load()