Difference between revisions of "API:Vessel"
From Kerbal Space Program Wiki
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. | ||
− | + | <!-- Autogenerated by DOCTOOL. Yell at N3X15 if it breaks. --> | |
− | + | {{Class | |
− | + | |inherits=<ul><li>{{Type|MonoBehaviour}}</li><li>{{Type|IShipconstruct}}</li><li>{{Type|ITargetable}}</li></ul> | |
− | + | |name=Vessel | |
− | < | + | |summary=Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship. |
− | < | + | }} |
− | < | + | {{PropertiesStart}} |
− | < | + | {{Property |
− | + | |type=string | |
− | + | |name=landedAt | |
− | + | |desc= | |
− | + | |hasget= | |
− | + | |hasset= | |
− | + | }} | |
− | + | {{Property | |
− | + | |type=Part | |
− | + | |name=this | |
− | + | |desc= | |
− | + | |hasget=1 | |
− | + | |hasset= | |
− | + | }} | |
− | + | {{Property | |
− | + | |type=enum | |
− | + | |name=Situations | |
− | + | |desc= | |
− | + | |hasget= | |
− | + | |hasset= | |
− | + | }} | |
− | + | {{Property | |
− | + | |type=bool | |
− | + | |name=isCommandable | |
− | + | |desc= | |
− | + | |hasget= | |
− | + | |hasset= | |
− | + | }} | |
− | + | {{Property | |
− | + | |type=bool | |
− | + | |name=packed | |
− | + | |desc= | |
− | + | |hasget= | |
− | + | |hasset= | |
− | + | }} | |
− | + | {{Property | |
− | + | |type=bool | |
− | + | |name=LandedOrSplashed | |
− | + | |desc= | |
− | + | |hasget=1 | |
− | + | |hasset=1 | |
− | + | }} | |
− | + | {{Property | |
− | + | |type=ActionGroupList | |
− | + | |name=ActionGroups | |
− | + | |desc= | |
− | + | |hasget= | |
− | + | |hasset= | |
− | + | }} | |
− | + | {{Property | |
− | + | |type=Transform | |
− | + | |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.
Contents
Vessel Class
Inherits | Implements |
---|---|
|
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() |