Class TransformModel
- Namespace
- KSP.Sim.impl
- Assembly
- Assembly-CSharp.dll
public class TransformModel : ITransformModelInternal, ITransformModel, IStringIdentity, IPositionDriver, IRotationDriver
- Inheritance
-
TransformModel
- Implements
-
- Derived
-
- Inherited Members
-
- Extension Methods
-
Constructors
public TransformModel(SimulationObjectModel objectModel)
Parameters
objectModel SimulationObjectModel
public TransformModel(string guid, SimTransformTag tag = SimTransformTag.None)
Parameters
guid string
tag SimTransformTag
Properties
public IAngularMotionDriver AngularMotionDriver { get; set; }
Property Value
- IAngularMotionDriver
public bool CanAcceptRotationUpdate { get; }
Property Value
- bool
public string Guid { get; }
Property Value
- string
public ILinearMotionDriver LinearMotionDriver { get; set; }
Property Value
- ILinearMotionDriver
public Position Position { get; set; }
Property Value
- Position
public IPositionDriver PositionDriver { get; set; }
Property Value
- IPositionDriver
RigidbodyDriver
public IRigidbodyDriver RigidbodyDriver { set; }
Property Value
- IRigidbodyDriver
public Rotation Rotation { get; set; }
Property Value
- Rotation
public IRotationDriver RotationDriver { get; set; }
Property Value
- IRotationDriver
public SimTransformTag SimTag { get; protected set; }
Property Value
- SimTransformTag
_bodyFrameInternal
public ITransformFrameInternal _bodyFrameInternal { get; }
Property Value
- ITransformFrameInternal
public ITransformFrameInternal _celestialFrameInternal { get; }
Property Value
- ITransformFrameInternal
public ITransformFrameInternal _parentInternal { get; }
Property Value
- ITransformFrameInternal
public Vector back { get; }
Property Value
- Vector
bodyFrame
public ITransformFrame bodyFrame { get; }
Property Value
- ITransformFrame
public ITransformFrame celestialFrame { get; }
Property Value
- ITransformFrame
public QuaternionD celestialTilt { get; set; }
Property Value
- QuaternionD
public List<ITransformModel> children { get; }
Property Value
- List<ITransformModel>
public ICoordinateSystem coordinateSystem { get; }
Property Value
- ICoordinateSystem
public Vector down { get; }
Property Value
- Vector
public Vector forward { get; }
Property Value
- Vector
public bool isInternalTransform { get; }
Property Value
- bool
public QuaternionD launchTilt { get; set; }
Property Value
- QuaternionD
public Vector left { get; }
Property Value
- Vector
public Vector3d localPosition { get; set; }
Property Value
- Vector3d
public QuaternionD localRotation { get; set; }
Property Value
- QuaternionD
public IMotionModel motionModel { get; }
Property Value
- IMotionModel
public SimulationObjectModel objectModel { get; }
Property Value
- SimulationObjectModel
public ITransformFrame parent { get; set; }
Property Value
- ITransformFrame
public List<ITransformFrameInternal> parentageCache { get; }
Property Value
- List<ITransformFrameInternal>
public bool parentageCacheDirty { get; set; }
Property Value
- bool
public Vector right { get; }
Property Value
- Vector
public Vector up { get; }
Property Value
- Vector
Methods
public void AddChild(ITransformModel youngChild)
Parameters
youngChild ITransformModel
public ITransformModel FindChildByName(string name, bool recursive)
Parameters
name string
recursive bool
Returns
- ITransformModel
public Vector3d GetLocalPosition()
Returns
- Vector3d
public QuaternionD GetLocalRotation()
Returns
- QuaternionD
public ITransformFrame GetSimObjectParentTransformFrame()
Returns
- ITransformFrame
GetSimSOIBodyParentTransformFrame()
public ITransformFrame GetSimSOIBodyParentTransformFrame()
Returns
- ITransformFrame
public ITransformFrame GetTransformFrame(TransformFrameType frameType)
Parameters
frameType TransformFrameType
Returns
- ITransformFrame
public bool Is(IStringIdentity other)
Parameters
other IStringIdentity
Returns
- bool
public void PerformFrameSnap(IMotionFrame newMotionFrame, List<Action> actionList)
Parameters
newMotionFrame IMotionFrame
actionList List<Action>
public void RemoveChild(ITransformModel oldChild)
Parameters
oldChild ITransformModel
public void SetLocalPosition(Vector3d newLocalPosition)
Parameters
newLocalPosition Vector3d
public void SetLocalRotation(QuaternionD newLocalRotation)
Parameters
newLocalRotation QuaternionD
public void SetParent(ITransformFrame newParent)
Parameters
newParent ITransformFrame
public void TriggerPositionRotationUpdatedEvents()
public void UpdatePosition(Position newPosition)
Parameters
newPosition Position
public void UpdateRotation(Rotation newRotation)
Parameters
newRotation Rotation
public void UpdateSimTransformTagFromSimObject()
Events
public event Action<Position> PositionUpdated
Event Type
- Action<Position>
public event Action<Rotation> RotationUpdated
Event Type
- Action<Rotation>