Difference between revisions of "User:Glyph/sandbox"
From Kerbal Space Program Wiki
Line 1: | Line 1: | ||
− | |||
<!-- 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 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). --> | ||
Line 6: | Line 5: | ||
|implements=<ul><li>{{Type|IShipconstruct}}</li><li>{{Type|ITargetable}}</li><li>{{Type|IDiscoverable}}</li></ul> | |implements=<ul><li>{{Type|IShipconstruct}}</li><li>{{Type|ITargetable}}</li><li>{{Type|IDiscoverable}}</li></ul> | ||
|name=Vessel | |name=Vessel | ||
− | |summary= | + | |summary=Class attributes: [DefaultMember("Item")] |
}} | }} | ||
Line 78: | Line 77: | ||
|desc= | |desc= | ||
|hasget=1 | |hasget=1 | ||
− | |hasset= | + | |hasset= |
}} | }} | ||
{{Property | {{Property | ||
Line 97: | Line 96: | ||
|type=bool | |type=bool | ||
|name=isEVA | |name=isEVA | ||
− | |desc= | + | |desc= |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 127: | Line 126: | ||
|desc= | |desc= | ||
|hasget=1 | |hasget=1 | ||
− | |hasset= | + | |hasset= |
}} | }} | ||
{{Property | {{Property | ||
Line 153: | Line 152: | ||
|type=Transform | |type=Transform | ||
|name=ReferenceTransform | |name=ReferenceTransform | ||
− | |desc= | + | |desc= |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 184: | Line 183: | ||
|type=Vector3d | |type=Vector3d | ||
|name=acceleration | |name=acceleration | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=altitude | |name=altitude | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 199: | Line 198: | ||
|type=Vector3 | |type=Vector3 | ||
|name=angularVelocity | |name=angularVelocity | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 219: | Line 218: | ||
|type=Vector3 | |type=Vector3 | ||
|name=CoM | |name=CoM | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 239: | Line 238: | ||
|type=FlightCtrlState | |type=FlightCtrlState | ||
|name=ctrlState | |name=ctrlState | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
|type=int | |type=int | ||
|name=currentStage | |name=currentStage | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 279: | Line 278: | ||
|type=double | |type=double | ||
|name=geeForce | |name=geeForce | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 299: | Line 298: | ||
|type=float | |type=float | ||
|name=heightFromSurface | |name=heightFromSurface | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 314: | Line 313: | ||
|type=Guid | |type=Guid | ||
|name=id | |name=id | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 324: | Line 323: | ||
|type=bool | |type=bool | ||
|name=Landed | |name=Landed | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 344: | Line 343: | ||
|type=bool | |type=bool | ||
|name=loaded | |name=loaded | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3 | |type=Vector3 | ||
|name=localCoM | |name=localCoM | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 379: | Line 378: | ||
|type=Vector3d | |type=Vector3d | ||
|name=obt_velocity | |name=obt_velocity | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 459: | Line 458: | ||
|type=Vector3 | |type=Vector3 | ||
|name=rb_velocity | |name=rb_velocity | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 469: | Line 468: | ||
|type=Part | |type=Part | ||
|name=rootPart | |name=rootPart | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 489: | Line 488: | ||
|type=double | |type=double | ||
|name=specificAcceleration | |name=specificAcceleration | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 514: | Line 513: | ||
|type=Quaternion | |type=Quaternion | ||
|name=srfRelRotation | |name=srfRelRotation | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 534: | Line 533: | ||
|type=double | |type=double | ||
|name=staticPressurekPa | |name=staticPressurekPa | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 544: | Line 543: | ||
|type=double | |type=double | ||
|name=terrainAltitude | |name=terrainAltitude | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3 | |type=Vector3 | ||
|name=terrainNormal | |name=terrainNormal | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3d | |type=Vector3d | ||
|name=upAxis | |name=upAxis | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=verticalSpeed | |name=verticalSpeed | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
|type=string | |type=string | ||
|name=vesselName | |name=vesselName | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Field | {{Field | ||
Line 584: | Line 583: | ||
{{MethodsStart}} | {{MethodsStart}} | ||
+ | {{Method | ||
+ | |name=Vessel | ||
+ | |args= | ||
+ | |desc= | ||
+ | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
Line 609: | Line 613: | ||
|returndesc= | |returndesc= | ||
|name=ChangeWorldVelocity | |name=ChangeWorldVelocity | ||
− | |args=Vector3d velOffset | + | |args={{arg|Vector3d|velOffset}} |
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 631: | Line 635: | ||
|name=checkVisibility | |name=checkVisibility | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 644: | Line 648: | ||
|returndesc= | |returndesc= | ||
|name=ContainsCollider | |name=ContainsCollider | ||
− | |args=Collider c | + | |args={{arg|Collider|c}} |
|desc= | |desc= | ||
}} | }} | ||
Line 701: | Line 705: | ||
|name=findLocalCenterOfMass | |name=findLocalCenterOfMass | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 721: | Line 725: | ||
|returndesc= | |returndesc= | ||
|name=findLocalMOI | |name=findLocalMOI | ||
− | |args=Vector3 worldCoM | + | |args={{arg|Vector3|worldCoM}} |
|desc= | |desc= | ||
}} | }} | ||
Line 736: | Line 740: | ||
|name=findWorldCenterOfMass | |name=findWorldCenterOfMass | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 749: | Line 753: | ||
|returndesc= | |returndesc= | ||
|name=GetActiveResource | |name=GetActiveResource | ||
− | |args=PartResourceDefinition def | + | |args={{arg|PartResourceDefinition|def}} |
|desc= | |desc= | ||
}} | }} | ||
Line 792: | Line 796: | ||
|name=GetHeightFromTerrain | |name=GetHeightFromTerrain | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 848: | Line 852: | ||
|name=GetTotalMass | |name=GetTotalMass | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 869: | Line 873: | ||
|name=GetVesselCrew | |name=GetVesselCrew | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 876: | Line 880: | ||
|name=GetWorldPos3D | |name=GetWorldPos3D | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 883: | Line 887: | ||
|name=GoOffRails | |name=GoOffRails | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 890: | Line 894: | ||
|name=GoOnRails | |name=GoOnRails | ||
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 903: | Line 907: | ||
|returndesc= | |returndesc= | ||
|name=Initialize | |name=Initialize | ||
− | |args=bool fromShipAssembly | + | |args={{arg|bool|fromShipAssembly}} |
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 952: | Line 956: | ||
|returndesc= | |returndesc= | ||
|name=OnLoadFlightState | |name=OnLoadFlightState | ||
− | |args=Dictionary〈string, KSPParseable〉 dataPool | + | |args={{arg|Dictionary〈string, KSPParseable〉|dataPool}} |
|desc= | |desc= | ||
}} | }} | ||
Line 959: | Line 963: | ||
|returndesc= | |returndesc= | ||
|name=OnSaveFlightState | |name=OnSaveFlightState | ||
− | |args=Dictionary〈string, KSPParseable〉 dataPool | + | |args={{arg|Dictionary〈string, KSPParseable〉|dataPool}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,064: | Line 1,068: | ||
|returndesc= | |returndesc= | ||
|name=SetActiveInternalPart | |name=SetActiveInternalPart | ||
− | |args=List〈Part〉 visibleParts | + | |args={{arg|List〈Part〉|visibleParts}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,071: | Line 1,075: | ||
|returndesc= | |returndesc= | ||
|name=SetActiveInternalPart | |name=SetActiveInternalPart | ||
− | |args=Part visiblePart | + | |args={{arg|Part|visiblePart}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,078: | Line 1,082: | ||
|returndesc= | |returndesc= | ||
|name=SetPosition | |name=SetPosition | ||
− | |args=Vector3 position | + | |args={{arg|Vector3|position}} |
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 1,085: | Line 1,089: | ||
|returndesc= | |returndesc= | ||
|name=SetPosition | |name=SetPosition | ||
− | |args=Vector3 position, bool usePristineCoords | + | |args={{arg|Vector3|position}},{{arg|bool|usePristineCoords}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,092: | Line 1,096: | ||
|returndesc= | |returndesc= | ||
|name=SetReferenceTransform | |name=SetReferenceTransform | ||
− | |args=Part p | + | |args={{arg|Part|p}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,099: | Line 1,103: | ||
|returndesc= | |returndesc= | ||
|name=SetRotation | |name=SetRotation | ||
− | |args=Quaternion rotation | + | |args={{arg|Quaternion|rotation}} |
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 1,106: | Line 1,110: | ||
|returndesc= | |returndesc= | ||
|name=SetWorldVelocity | |name=SetWorldVelocity | ||
− | |args=Vector3d vel | + | |args={{arg|Vector3d|vel}} |
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 1,120: | Line 1,124: | ||
|returndesc= | |returndesc= | ||
|name=StartFromBackup | |name=StartFromBackup | ||
− | |args=ProtoVessel pv | + | |args={{arg|ProtoVessel|pv}} |
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 1,127: | Line 1,131: | ||
|returndesc= | |returndesc= | ||
|name=Translate | |name=Translate | ||
− | |args=Vector3 offset | + | |args={{arg|Vector3|offset}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,141: | Line 1,145: | ||
|returndesc= | |returndesc= | ||
|name=AutoRename | |name=AutoRename | ||
− | |args=Vessel v, string baseName | + | |args={{arg|Vessel|v}},{{arg|string|baseName}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,148: | Line 1,152: | ||
|returndesc= | |returndesc= | ||
|name=GetLandedAtString | |name=GetLandedAtString | ||
− | |args=string landedAt | + | |args={{arg|string|landedAt}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,155: | Line 1,159: | ||
|returndesc= | |returndesc= | ||
|name=GetMETString | |name=GetMETString | ||
− | |args=Vessel v | + | |args={{arg|Vessel|v}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,162: | Line 1,166: | ||
|returndesc= | |returndesc= | ||
|name=GetSituationString | |name=GetSituationString | ||
− | |args=Vessel v | + | |args={{arg|Vessel|v}} |
|desc= | |desc= | ||
}} | }} | ||
Line 1,169: | Line 1,173: | ||
|returndesc= | |returndesc= | ||
|name=IsValidVesselName | |name=IsValidVesselName | ||
− | |args=string name | + | |args={{arg|string|name}} |
|desc= | |desc= | ||
}} | }} | ||
{{MethodsEnd}} | {{MethodsEnd}} | ||
+ | |||
+ | [[Category:Community API Documentation]] |
Revision as of 17:27, 12 October 2015
Contents
Vessel Class
Inherits | Implements |
---|---|
MonoBehaviour |
|
Class attributes: [DefaultMember("Item")]
Properties
The following are public properties available in Glyph/sandbox.
Signature | Description |
---|---|
ActionGroupList ActionGroups { get; } | |
VesselAutopilot Autopilot { get; } | |
Vector3 CurrentCoM { get; } | |
DiscoveryInfo DiscoveryInfo { get; } | |
float distanceLandedPackThreshold { get; set; } | Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
float distanceLandedUnpackThreshold { get; set; } | Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
float distancePackThreshold { get; set; } | Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
float distanceUnpackThreshold { get; set; } | Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
bool HoldPhysics { get; } | |
bool isActiveVessel { get; } | |
bool isCommandable { get; } | |
bool IsControllable { get; } | |
bool isEVA { get; } | |
bool isPersistent { get; set; } | |
bool IsRecoverable { get; } | |
bool LandedOrSplashed { get; } | |
CelestialBody mainBody { get; } | |
Orbit orbit { get; } | |
List〈Part〉 Parts { get; } | |
bool PatchedConicsAttached { get; } | |
Transform ReferenceTransform { get; } | |
VesselValues VesselValues { get; } | |
static float loadDistance { get; set; } | Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
static float unloadDistance { get; set; } | Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
Fields
The following is a list of publically-accessible fields in Glyph/sandbox. This includes protected items, which can be accessed by subclasses.
Signature | Description |
---|---|
Vector3d acceleration | |
double altitude | |
Vector3 angularMomentum | |
Vector3 angularVelocity | |
double atmDensity | |
double atmosphericTemperature | |
Vector3d CentrifugalAcc | |
Vector3 CoM | |
double convectiveCoefficient | |
double convectiveMachFlux | |
Vector3d CoriolisAcc | |
FlightCtrlState ctrlState | |
int currentStage | |
bool directSunlight | |
double distanceToSun | |
double dynamicPressurekPa | |
KerbalEVA evaController | |
double externalTemperature | |
ConfigNode flightPlanNode | |
double geeForce | |
double geeForce_immediate | |
Vector3d gForce | |
bool handlePhysicsStats | |
float heightFromSurface | |
float heightFromTerrain | |
double horizontalSrfSpeed | |
Guid id | |
double indicatedAirSpeed | |
bool Landed | |
string landedAt | |
double latitude | |
double launchTime | |
bool loaded | |
Vector3 localCoM | |
double longitude | |
double mach | |
double missionTime | |
Vector3 MOI | |
double obt_speed | |
Vector3d obt_velocity | |
FlightInputCallback OnAutopilotUpdate | |
FlightInputCallback OnFlyByWire | |
Callback OnJustAboutToBeDestroyed | |
FlightInputCallback OnPostAutopilotUpdate | |
FlightInputCallback OnPreAutopilotUpdate | |
OrbitDriver orbitDriver | |
OrbitRenderer orbitRenderer | |
OrbitTargeter orbitTargeter | |
bool packed | |
List〈Part〉 parts | |
PatchedConicRenderer patchedConicRenderer | |
PatchedConicSolver patchedConicSolver | |
Vector3d perturbation | |
double pqsAltitude | |
ProtoVessel protoVessel | |
Vector3 rb_velocity | |
uint referenceTransformId | |
Part rootPart | |
Situations situation | |
enum Situations | { LANDED, SPLASHED, PRELAUNCH, FLYING, SUB_ORBITAL, ORBITING, ESCAPING, DOCKED } |
double solarFlux | |
double specificAcceleration | |
double speed | |
double speedOfSound | |
bool Splashed | |
Vector3d srf_velocity | |
Quaternion srfRelRotation | |
double srfSpeed | |
State state | |
enum State | { INACTIVE, ACTIVE, DEAD } |
double staticPressurekPa | |
ITargetable targetObject | |
double terrainAltitude | |
Vector3 terrainNormal | |
Vector3d upAxis | |
double verticalSpeed | |
string vesselName | |
VesselRanges vesselRanges | |
Transform vesselTransform | |
VesselType vesselType |
Methods
The following are methods included in Glyph/sandbox.
Signature | Description |
---|---|
{{{returntype}}} Vessel() | |
void AttachPatchedConicsSolver() | |
ProtoVessel BackupVessel() | |
void CalculatePhysicsStats() | |
void ChangeWorldVelocity(Vector3d velOffset) | |
bool checkLanded() | |
bool checkSplashed() | |
bool checkVisibility() | |
void ClearStaging() | |
bool ContainsCollider(Collider c) | |
void DespawnCrew() | |
void DestroyVesselComponents() | |
void DetachPatchedConicsSolver() | |
void Die() | |
void FallBackReferenceTransform() | |
void FeedInputFeed() | |
VesselType FindDefaultVesselType() | |
Vector3 findLocalCenterOfMass() | |
Vector3 findLocalCenterOfPressure() | |
Vector3 findLocalMOI() | |
Vector3 findLocalMOI(Vector3 worldCoM) | |
List〈T〉 FindPartModulesImplementing〈T〉() | |
Vector3 findWorldCenterOfMass() | |
List〈Part〉 GetActiveParts() | |
ActiveResource GetActiveResource(PartResourceDefinition def) | |
List〈ActiveResource〉 GetActiveResources() | |
int GetCrewCapacity() | |
int GetCrewCount() | |
Vector3 GetFwdVector() | |
float GetHeightFromSurface() | |
float GetHeightFromTerrain() | |
string GetName() | |
Vector3 GetObtVelocity() | |
Orbit GetOrbit() | |
OrbitDriver GetOrbitDriver() | |
Part GetReferenceTransformPart() | |
Vector3 GetSrfVelocity() | |
VesselTargetModes GetTargetingMode() | |
float GetTotalMass() | |
Transform GetTransform() | |
Vessel GetVessel() | |
List〈ProtoCrewMember〉 GetVesselCrew() | |
Vector3d GetWorldPos3D() | |
void GoOffRails() | |
void GoOnRails() | |
bool HasControlSources() | |
bool Initialize(bool fromShipAssembly) | |
ClearToSaveStatus IsClearToSave() | |
void Load() | Has attribute [ContextMenu("Load")] |
void MakeActive() | |
void MakeInactive() | |
void MurderCrew() | |
void OnDestroy() | |
void OnLoadFlightState(Dictionary〈string, KSPParseable〉 dataPool) | |
void OnSaveFlightState(Dictionary〈string, KSPParseable〉 dataPool) | |
double PQSAltitude() | |
void printCollisions() | Has attribute [ContextMenu("Print All Collisions")] |
void printGroundContacts() | Has attribute [ContextMenu("Print Ground Contacts")] |
void RenameVessel() | Has attribute [ContextMenu("Rename Vessel")] |
void ResetCollisionIgnores() | Has attribute [ContextMenu("Reset Collision Ignores")] |
void ResumeStaging() | |
void ResumeTarget() | |
double RevealAltitude() | |
float RevealMass() | |
string RevealName() | |
string RevealSituationString() | |
double RevealSpeed() | |
string RevealType() | |
void SetActiveInternalPart() | |
void SetActiveInternalPart(List〈Part〉 visibleParts) | |
void SetActiveInternalPart(Part visiblePart) | |
void SetPosition(Vector3 position) | |
void SetPosition(Vector3 position,bool usePristineCoords) | |
void SetReferenceTransform(Part p) | |
void SetRotation(Quaternion rotation) | |
void SetWorldVelocity(Vector3d vel) | |
void SpawnCrew() | |
void StartFromBackup(ProtoVessel pv) | |
void Translate(Vector3 offset) | |
void Unload() | Has attribute [ContextMenu("Unload")] |
static string AutoRename(Vessel v,string baseName) | |
static string GetLandedAtString(string landedAt) | |
static string GetMETString(Vessel v) | |
static string GetSituationString(Vessel v) | |
static bool IsValidVesselName(string name) |