Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
PlanetariumCamera Class Reference
Inheritance diagram for PlanetariumCamera:
IKSPCamera

Public Member Functions

void Activate ()
 
void Activate (bool enableAudioListener)
 Activates this camera with optional activation of it's audio listener More...
 
int AddTarget (MapObject tgt)
 
void Deactivate ()
 
MapObject FindNearestTarget ()
 
MapObject FindNearestTarget (Vector3 position)
 
Transform GetCameraTransform ()
 
float getPitch ()
 
Transform GetPivot ()
 
Quaternion getReferenceFrame ()
 
MapObject GetTarget (int index)
 
int GetTargetIndex (string targetName)
 
float getYaw ()
 
void OnNavigatorHandoff ()
 
bool OnNavigatorRequestControl ()
 Called before the device takes control of camera input. Return true to allow the device to have control, or false to deny it. More...
 
System.Func< bool > OnNavigatorTakeOver (Callback RequestControl)
 Called when the device is about to take control of camera input. Return a method to be used to check whether the camera should receive control again. Also if necessary to get control back immediately, you can call the provided callback parameter. More...
 
void RemoveTarget (MapObject tgt)
 
void SetCamCoordsFromPosition (Vector3 wPos)
 Set the camera's coordinates (camPitch, camHdg) from the given worldspace position

Parameters
pos
More...
 
void SetDistance (float dist)
 
int SetTarget (CelestialBody body)
 
int SetTarget (string name)
 
int SetTarget (int tgtIdx)
 
void SetTarget (MapObject tgt)
 

Public Attributes

Callback AbortExternalControl = () => { }
 
float camHdg = 0f
 
float camPitch = 0f
 
MapObject initialTarget
 
float maxDistance = 150000f
 
float maxPitch = 0.95f
 
float minDistance = 3f
 
float minPitch = -0.95f
 
float orbitSensitivity = 0.5f
 
float sharpness = 10f
 
float startDistance = 30f
 
bool TabSwitchTargets
 
MapObject target
 
List< MapObjecttargets
 
float zoomScaleFactor = 1.2f
 

Protected Member Functions

void onVesselSwitching (Vessel from, Vessel to)
 

Properties

static Camera Camera [get]
 
float Distance [get]
 
static PlanetariumCamera fetch [get]
 
Quaternion pivotRotation [get]
 
- Properties inherited from IKSPCamera
bool enabled [get]
 

Member Function Documentation

void PlanetariumCamera.Activate ( )
inline
void PlanetariumCamera.Activate ( bool  enableAudioListener)
inline

Activates this camera with optional activation of it's audio listener

Parameters
enableAudioListener
int PlanetariumCamera.AddTarget ( MapObject  tgt)
inline
void PlanetariumCamera.Deactivate ( )
inline
MapObject PlanetariumCamera.FindNearestTarget ( )
inline
MapObject PlanetariumCamera.FindNearestTarget ( Vector3  position)
inline
Transform PlanetariumCamera.GetCameraTransform ( )
inline

Implements IKSPCamera.

float PlanetariumCamera.getPitch ( )
inline

Implements IKSPCamera.

Transform PlanetariumCamera.GetPivot ( )
inline

Implements IKSPCamera.

Quaternion PlanetariumCamera.getReferenceFrame ( )
inline

Implements IKSPCamera.

MapObject PlanetariumCamera.GetTarget ( int  index)
inline
int PlanetariumCamera.GetTargetIndex ( string  targetName)
inline
float PlanetariumCamera.getYaw ( )
inline

Implements IKSPCamera.

void PlanetariumCamera.OnNavigatorHandoff ( )
inline

Implements IKSPCamera.

bool PlanetariumCamera.OnNavigatorRequestControl ( )
inline

Called before the device takes control of camera input. Return true to allow the device to have control, or false to deny it.

Returns

Implements IKSPCamera.

System.Func<bool> PlanetariumCamera.OnNavigatorTakeOver ( Callback  RequestControl)
inline

Called when the device is about to take control of camera input. Return a method to be used to check whether the camera should receive control again. Also if necessary to get control back immediately, you can call the provided callback parameter.

Returns

Implements IKSPCamera.

void PlanetariumCamera.onVesselSwitching ( Vessel  from,
Vessel  to 
)
inlineprotected

< remove old target after adding the new one so as to avoid target becoming null (and defaulting to something else) during the switch

void PlanetariumCamera.RemoveTarget ( MapObject  tgt)
inline
void PlanetariumCamera.SetCamCoordsFromPosition ( Vector3  wPos)
inline

Set the camera's coordinates (camPitch, camHdg) from the given worldspace position

Parameters
pos

Implements IKSPCamera.

void PlanetariumCamera.SetDistance ( float  dist)
inline
int PlanetariumCamera.SetTarget ( CelestialBody  body)
inline
int PlanetariumCamera.SetTarget ( string  name)
inline
int PlanetariumCamera.SetTarget ( int  tgtIdx)
inline
void PlanetariumCamera.SetTarget ( MapObject  tgt)
inline

< find the active target and focus it

Member Data Documentation

Callback PlanetariumCamera.AbortExternalControl = () => { }
float PlanetariumCamera.camHdg = 0f
float PlanetariumCamera.camPitch = 0f
MapObject PlanetariumCamera.initialTarget
float PlanetariumCamera.maxDistance = 150000f
float PlanetariumCamera.maxPitch = 0.95f
float PlanetariumCamera.minDistance = 3f
float PlanetariumCamera.minPitch = -0.95f
float PlanetariumCamera.orbitSensitivity = 0.5f
float PlanetariumCamera.sharpness = 10f
float PlanetariumCamera.startDistance = 30f
bool PlanetariumCamera.TabSwitchTargets
MapObject PlanetariumCamera.target
List<MapObject> PlanetariumCamera.targets
float PlanetariumCamera.zoomScaleFactor = 1.2f

Property Documentation

Camera PlanetariumCamera.Camera
staticget
float PlanetariumCamera.Distance
get
PlanetariumCamera PlanetariumCamera.fetch
staticget
Quaternion PlanetariumCamera.pivotRotation
get

The documentation for this class was generated from the following file: