Difference between revisions of "API:Vessel"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (grammar)
m (Blanked the page)
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.
 
  
<!-- Class tables autogenerated by Glyph's kerbal_wiki_pdoc program for KSP 1.04. Using syntax set up for the wiki by N3X15, format from DOCTOOLS (I'm not clear if DOCTOOLS is the script used to generate N3X15's old version of these tables, or some mediawiki thing). -->
 
{{Class
 
  |inherits={{Type|MonoBehaviour}}
 
  |implements=<ul><li>{{Type|IShipconstruct}}</li><li>{{Type|ITargetable}}</li><li>{{Type|IDiscoverable}}</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.
 
}}
 
{{Properties|properties=
 
{{Property
 
  |type=ActionGroupList
 
  |name=ActionGroups
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=VesselAutopilot
 
  |name=Autopilot
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=Vector3
 
  |name=CurrentCoM
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=DiscoveryInfo
 
  |name=DiscoveryInfo
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=float
 
  |name=distanceLandedPackThreshold
 
  |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
  |hasget=1
 
  |hasset=1
 
}}
 
{{Property
 
  |type=float
 
  |name=distanceLandedUnpackThreshold
 
  |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
  |hasget=1
 
  |hasset=1
 
}}
 
{{Property
 
  |type=float
 
  |name=distancePackThreshold
 
  |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
  |hasget=1
 
  |hasset=1
 
}}
 
{{Property
 
  |type=float
 
  |name=distanceUnpackThreshold
 
  |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
  |hasget=1
 
  |hasset=1
 
}}
 
{{Property
 
  |type=bool
 
  |name=HoldPhysics
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=bool
 
  |name=isActiveVessel
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=bool
 
  |name=isCommandable
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=bool
 
  |name=IsControllable
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=bool
 
  |name=isEVA
 
  |desc=True if the vessel is an EVA kerbal.
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=bool
 
  |name=isPersistent
 
  |desc=?
 
  |hasget=1
 
  |hasset=1
 
}}
 
{{Property
 
  |type=bool
 
  |name=IsRecoverable
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=bool
 
  |name=LandedOrSplashed
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=CelestialBody
 
  |name=mainBody
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=Orbit
 
  |name=orbit
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=List&#x3008;Part&#x3009;
 
  |name=Parts
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=bool
 
  |name=PatchedConicsAttached
 
  |desc=?
 
  |hasget=1
 
  |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=VesselValues
 
  |name=VesselValues
 
  |desc=?
 
  |hasget=1
 
  |hasset=
 
}}
 
{{Property
 
  |type=static float
 
  |name=loadDistance
 
  |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
  |hasget=1
 
  |hasset=1
 
}}
 
{{Property
 
  |type=static float
 
  |name=unloadDistance
 
  |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
  |hasget=1
 
  |hasset=1
 
}}
 
}}
 
 
{{Fields|
 
{{Field
 
  |type=Vector3d
 
  |name=acceleration
 
  |desc=The current acceleration vector of the vessel.
 
}}
 
{{Field
 
  |type=double
 
  |name=altitude
 
  |desc=Height above the surface of the reference body, including liquid bodies.
 
}}
 
{{Field
 
  |type=Vector3
 
  |name=angularMomentum
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3
 
  |name=angularVelocity
 
  |desc=The angular velocity vector of the vessel.
 
}}
 
{{Field
 
  |type=double
 
  |name=atmDensity
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=atmosphericTemperature
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3d
 
  |name=CentrifugalAcc
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3
 
  |name=CoM
 
  |desc=The vector corresponding to the vessel's center of mass, relative to the vessel origin.
 
}}
 
{{Field
 
  |type=double
 
  |name=convectiveCoefficient
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=convectiveMachFlux
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3d
 
  |name=CoriolisAcc
 
  |desc=?
 
}}
 
{{Field
 
  |type=FlightCtrlState
 
  |name=ctrlState
 
  |desc=The vessel's flight control state object, used for accessing and modifying user and fly-by-wire input.
 
}}
 
{{Field
 
  |type=int
 
  |name=currentStage
 
  |desc=Current stage of the vessel.
 
}}
 
{{Field
 
  |type=bool
 
  |name=directSunlight
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=distanceToSun
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=dynamicPressurekPa
 
  |desc=?
 
}}
 
{{Field
 
  |type=KerbalEVA
 
  |name=evaController
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=externalTemperature
 
  |desc=?
 
}}
 
{{Field
 
  |type=ConfigNode
 
  |name=flightPlanNode
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=geeForce
 
  |desc=The current magnitude of gravity, in meters per second squared. (Is this right? geeForce is not gravity)
 
}}
 
{{Field
 
  |type=double
 
  |name=geeForce_immediate
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3d
 
  |name=gForce
 
  |desc=?
 
}}
 
{{Field
 
  |type=bool
 
  |name=handlePhysicsStats
 
  |desc=?
 
}}
 
{{Field
 
  |type=float
 
  |name=heightFromSurface
 
  |desc=The height above the surface of the reference body, including liquid bodies.
 
}}
 
{{Field
 
  |type=float
 
  |name=heightFromTerrain
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=horizontalSrfSpeed
 
  |desc=?
 
}}
 
{{Field
 
  |type=Guid
 
  |name=id
 
  |desc=Unique identifier for each vessel.
 
}}
 
{{Field
 
  |type=double
 
  |name=indicatedAirSpeed
 
  |desc=?
 
}}
 
{{Field
 
  |type=bool
 
  |name=Landed
 
  |desc=True if the vessel has landed.
 
}}
 
{{Field
 
  |type=string
 
  |name=landedAt
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=latitude
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=launchTime
 
  |desc=?
 
}}
 
{{Field
 
  |type=bool
 
  |name=loaded
 
  |desc=True if the vessel has loaded.
 
}}
 
{{Field
 
  |type=Vector3
 
  |name=localCoM
 
  |desc=This is used for persistence purposes. Use findLocalCenterOfMass() if you just want the center of mass.
 
}}
 
{{Field
 
  |type=double
 
  |name=longitude
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=mach
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=missionTime
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3
 
  |name=MOI
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=obt_speed
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3d
 
  |name=obt_velocity
 
  |desc=The orbital velocity vector of the vessel, relative to the reference body.
 
}}
 
{{Field
 
  |type=FlightInputCallback
 
  |name=OnAutopilotUpdate
 
  |desc=?
 
}}
 
{{Field
 
  |type=FlightInputCallback
 
  |name=OnFlyByWire
 
  |desc=?
 
}}
 
{{Field
 
  |type=Callback
 
  |name=OnJustAboutToBeDestroyed
 
  |desc=?
 
}}
 
{{Field
 
  |type=FlightInputCallback
 
  |name=OnPostAutopilotUpdate
 
  |desc=?
 
}}
 
{{Field
 
  |type=FlightInputCallback
 
  |name=OnPreAutopilotUpdate
 
  |desc=?
 
}}
 
{{Field
 
  |type=OrbitDriver
 
  |name=orbitDriver
 
  |desc=?
 
}}
 
{{Field
 
  |type=OrbitRenderer
 
  |name=orbitRenderer
 
  |desc=?
 
}}
 
{{Field
 
  |type=OrbitTargeter
 
  |name=orbitTargeter
 
  |desc=?
 
}}
 
{{Field
 
  |type=bool
 
  |name=packed
 
  |desc=?
 
}}
 
{{Field
 
  |type=List&#x3008;Part&#x3009;
 
  |name=parts
 
  |desc=?
 
}}
 
{{Field
 
  |type=PatchedConicRenderer
 
  |name=patchedConicRenderer
 
  |desc=?
 
}}
 
{{Field
 
  |type=PatchedConicSolver
 
  |name=patchedConicSolver
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3d
 
  |name=perturbation
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=pqsAltitude
 
  |desc=?
 
}}
 
{{Field
 
  |type=ProtoVessel
 
  |name=protoVessel
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3
 
  |name=rb_velocity
 
  |desc=The current velocity of the Unity physics rigidbody.
 
}}
 
{{Field
 
  |type=uint
 
  |name=referenceTransformId
 
  |desc=?
 
}}
 
{{Field
 
  |type=Part
 
  |name=rootPart
 
  |desc=The root part of the vessel.
 
}}
 
{{Field
 
  |type=Situations
 
  |name=situation
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=solarFlux
 
  |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=double
 
  |name=speed
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=speedOfSound
 
  |desc=?
 
}}
 
{{Field
 
  |type=bool
 
  |name=Splashed
 
  |desc=?
 
}}
 
{{Field
 
  |type=Vector3d
 
  |name=srf_velocity
 
  |desc=The velocity vector of the vessel while in the atmosphere. (Prograde)
 
}}
 
{{Field
 
  |type=Quaternion
 
  |name=srfRelRotation
 
  |desc=The Quaternion corresponding to the vessel's rotation, relative to the surface of reference body.
 
}}
 
{{Field
 
  |type=double
 
  |name=srfSpeed
 
  |desc=?
 
}}
 
{{Field
 
  |type=State
 
  |name=state
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=staticPressurekPa
 
  |desc=The current atmospheric pressure of this vessel.
 
}}
 
{{Field
 
  |type=ITargetable
 
  |name=targetObject
 
  |desc=?
 
}}
 
{{Field
 
  |type=double
 
  |name=terrainAltitude
 
  |desc=The height of the terrain, relative to the center of the reference body.
 
}}
 
{{Field
 
  |type=Vector3
 
  |name=terrainNormal
 
  |desc=The vector perpendicular to the terrain.
 
}}
 
{{Field
 
  |type=Vector3d
 
  |name=upAxis
 
  |desc=Vector corresponding to the vessel's up facing direction.
 
}}
 
{{Field
 
  |type=double
 
  |name=verticalSpeed
 
  |desc=The vertical speed of the vessel, relative to the surface of the reference body.
 
}}
 
{{Field
 
  |type=string
 
  |name=vesselName
 
  |desc=Name identifier of the vessel.
 
}}
 
{{Field
 
  |type=VesselRanges
 
  |name=vesselRanges
 
  |desc=?
 
}}
 
{{Field
 
  |type=Transform
 
  |name=vesselTransform
 
  |desc=?
 
}}
 
{{Field
 
  |type=VesselType
 
  |name=vesselType
 
  |desc=?
 
}}
 
}}
 
 
{{Methods|
 
{{Method
 
  |returntype=constructor
 
  |returndesc=
 
  |name=Vessel
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=AttachPatchedConicsSolver
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=ProtoVessel
 
  |returndesc=
 
  |name=BackupVessel
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=CalculatePhysicsStats
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=ChangeWorldVelocity
 
  |args={{arg|Vector3d|velOffset}}
 
  |desc=change the worldspace velocity of this vessel
 
}}
 
{{Method
 
  |returntype=bool
 
  |returndesc=
 
  |name=checkLanded
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=bool
 
  |returndesc=
 
  |name=checkSplashed
 
  |args=
 
  |desc=?
 
}}
 
{{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=void
 
  |returndesc=
 
  |name=ClearStaging
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=bool
 
  |returndesc=
 
  |name=ContainsCollider
 
  |args={{arg|Collider|c}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=DespawnCrew
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=DestroyVesselComponents
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=DetachPatchedConicsSolver
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=Die
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=FallBackReferenceTransform
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=FeedInputFeed
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=VesselType
 
  |returndesc=
 
  |name=FindDefaultVesselType
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=findLocalCenterOfMass
 
  |args=
 
  |desc=Finds the local center of mass recursively from the given ship part.
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=findLocalCenterOfPressure
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=findLocalMOI
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=findLocalMOI
 
  |args={{arg|Vector3|worldCoM}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=List&#x3008;T&#x3009;
 
  |returndesc=
 
  |name=FindPartModulesImplementing&#x3008;T&#x3009;
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=findWorldCenterOfMass
 
  |args=
 
  |desc=Finds the world center of mass recursively from the given ship part.
 
}}
 
{{Method
 
  |returntype=List&#x3008;Part&#x3009;
 
  |returndesc=
 
  |name=GetActiveParts
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=ActiveResource
 
  |returndesc=
 
  |name=GetActiveResource
 
  |args={{arg|PartResourceDefinition|def}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=List&#x3008;ActiveResource&#x3009;
 
  |returndesc=
 
  |name=GetActiveResources
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=int
 
  |returndesc=
 
  |name=GetCrewCapacity
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=int
 
  |returndesc=
 
  |name=GetCrewCount
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=GetFwdVector
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=float
 
  |returndesc=
 
  |name=GetHeightFromSurface
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=float
 
  |returndesc=
 
  |name=GetHeightFromTerrain
 
  |args=
 
  |desc=The vessel's altitude above the reference body's terrain, not including liquid bodies.
 
}}
 
{{Method
 
  |returntype=string
 
  |returndesc=
 
  |name=GetName
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=GetObtVelocity
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Orbit
 
  |returndesc=
 
  |name=GetOrbit
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=OrbitDriver
 
  |returndesc=
 
  |name=GetOrbitDriver
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Part
 
  |returndesc=
 
  |name=GetReferenceTransformPart
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vector3
 
  |returndesc=
 
  |name=GetSrfVelocity
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=VesselTargetModes
 
  |returndesc=
 
  |name=GetTargetingMode
 
  |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=Transform
 
  |returndesc=
 
  |name=GetTransform
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=Vessel
 
  |returndesc=
 
  |name=GetVessel
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=List&#x3008;ProtoCrewMember&#x3009;
 
  |returndesc=
 
  |name=GetVesselCrew
 
  |args=
 
  |desc=Returns a list of ProtoCrewMembers corresponding to each kerbal on board. ProtoCrewMember contains many fields relating to the kerbals stats such as name, courage, etc.
 
}}
 
{{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=void
 
  |returndesc=
 
  |name=GoOffRails
 
  |args=
 
  |desc=puts the ship back into a simulated orbit and reenables physics
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=GoOnRails
 
  |args=
 
  |desc=disables physics and puts the ship into a propagated orbit
 
}}
 
{{Method
 
  |returntype=bool
 
  |returndesc=
 
  |name=HasControlSources
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=bool
 
  |returndesc=
 
  |name=Initialize
 
  |args={{arg|bool|fromShipAssembly}}
 
  |desc=Initialize is used in cases where the Vessel component is added to a ship that already exists.
 
}}
 
{{Method
 
  |returntype=ClearToSaveStatus
 
  |returndesc=
 
  |name=IsClearToSave
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=Load
 
  |args=
 
  |desc=? Has attribute [ContextMenu("Load")]
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=MakeActive
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=MakeInactive
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=MurderCrew
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=OnDestroy
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=OnLoadFlightState
 
  |args={{arg|Dictionary&#x3008;string, KSPParseable&#x3009;|dataPool}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=OnSaveFlightState
 
  |args={{arg|Dictionary&#x3008;string, KSPParseable&#x3009;|dataPool}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=double
 
  |returndesc=
 
  |name=PQSAltitude
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=printCollisions
 
  |args=
 
  |desc=? Has attribute [ContextMenu("Print All Collisions")]
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=printGroundContacts
 
  |args=
 
  |desc=? Has attribute [ContextMenu("Print Ground Contacts")]
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=RenameVessel
 
  |args=
 
  |desc=? Has attribute [ContextMenu("Rename Vessel")]
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=ResetCollisionIgnores
 
  |args=
 
  |desc=? Has attribute [ContextMenu("Reset Collision Ignores")]
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=ResumeStaging
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=ResumeTarget
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=double
 
  |returndesc=
 
  |name=RevealAltitude
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=float
 
  |returndesc=
 
  |name=RevealMass
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=string
 
  |returndesc=
 
  |name=RevealName
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=string
 
  |returndesc=
 
  |name=RevealSituationString
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=double
 
  |returndesc=
 
  |name=RevealSpeed
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=string
 
  |returndesc=
 
  |name=RevealType
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=SetActiveInternalPart
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=SetActiveInternalPart
 
  |args={{arg|List&#x3008;Part&#x3009;|visibleParts}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=SetActiveInternalPart
 
  |args={{arg|Part|visiblePart}}
 
  |desc=?
 
}}
 
{{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=SetPosition
 
  |args={{arg|Vector3|position}},{{arg|bool|usePristineCoords}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=SetReferenceTransform
 
  |args={{arg|Part|p}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=SetRotation
 
  |args={{arg|Quaternion|rotation}}
 
  |desc=Sets the worldspace rotation of this vessel, and all its parts
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=SetWorldVelocity
 
  |args={{arg|Vector3d|vel}}
 
  |desc=set the absolute world velocity of this vessel
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=SpawnCrew
 
  |args=
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=StartFromBackup
 
  |args={{arg|ProtoVessel|pv}}
 
  |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=void
 
  |returndesc=
 
  |name=Translate
 
  |args={{arg|Vector3|offset}}
 
  |desc=?
 
}}
 
{{Method
 
  |returntype=void
 
  |returndesc=
 
  |name=Unload
 
  |args=
 
  |desc=? Has attribute [ContextMenu("Unload")]
 
}}
 
{{StaticMethod
 
  |returntype=string
 
  |returndesc=
 
  |name=AutoRename
 
  |args={{arg|Vessel|v}},{{arg|string|baseName}}
 
  |desc=?
 
}}
 
{{StaticMethod
 
  |returntype=string
 
  |returndesc=
 
  |name=GetLandedAtString
 
  |args={{arg|string|landedAt}}
 
  |desc=?
 
}}
 
{{StaticMethod
 
  |returntype=string
 
  |returndesc=
 
  |name=GetMETString
 
  |args={{arg|Vessel|v}}
 
  |desc=?
 
}}
 
{{StaticMethod
 
  |returntype=string
 
  |returndesc=
 
  |name=GetSituationString
 
  |args={{arg|Vessel|v}}
 
  |desc=?
 
}}
 
{{StaticMethod
 
  |returntype=bool
 
  |returndesc=
 
  |name=IsValidVesselName
 
  |args={{arg|string|name}}
 
  |desc=?
 
}}
 
}}
 
{{Enums|enums=
 
{{Enum
 
  |name=Situations
 
  |values=LANDED<br/>SPLASHED<br/>PRELAUNCH<br/>FLYING<br/>SUB_ORBITAL<br/>ORBITING<br/>ESCAPING<br/>DOCKED
 
}}
 
{{Enum
 
  |name=State
 
  |values=INACTIVE<br/>ACTIVE<br/>DEAD
 
}}
 
}}
 
== Other API ==
 
 
Vessel also contains the following, not included above.
 
 
<syntaxhighlight>
 
...
 
public Part this[int index] { get; }
 
public Part this[uint flightID] { get; }
 
 
public class ActiveResource
 
{
 
  public double amount;
 
  public PartResourceDefinition info;
 
  public double maxAmount;
 
  public List<Part> parts;
 
 
  public ActiveResource(PartResourceDefinition def);
 
}
 
...
 
</syntaxhighlight>
 
 
[[Category:Community API Documentation]]
 

Revision as of 17:44, 17 March 2017