Table of Contents

Class ObjectAssemblyPlacementTool

Namespace
KSP.OAB
Assembly
Assembly-CSharp.dll
public class ObjectAssemblyPlacementTool : ObjectAssemblyTool, IObjectAssemblyTool, IDisposable
Inheritance
ObjectAssemblyPlacementTool
Implements
Derived
Inherited Members
Extension Methods

Constructors

ObjectAssemblyPlacementTool(ObjectAssemblyBuilderEvents, ObjectAssemblyUIEvents, ObjectAssemblyInputHandler, ObjectAssemblyPartTracker, OABSessionInformation, ObjectAssemblyCameraManager, ObjectAssemblyAssets)

public ObjectAssemblyPlacementTool(ObjectAssemblyBuilderEvents eventSystemToUse, ObjectAssemblyUIEvents uiEventsToUse, ObjectAssemblyInputHandler inputToUse, ObjectAssemblyPartTracker partTrackerToUse, OABSessionInformation statsToUse, ObjectAssemblyCameraManager cameraManagerToUse, ObjectAssemblyAssets oabAssets)

Parameters

eventSystemToUse ObjectAssemblyBuilderEvents
uiEventsToUse ObjectAssemblyUIEvents
inputToUse ObjectAssemblyInputHandler
partTrackerToUse ObjectAssemblyPartTracker
statsToUse OABSessionInformation
cameraManagerToUse ObjectAssemblyCameraManager
oabAssets ObjectAssemblyAssets

Fields

RaycastOffset

public const float RaycastOffset = 5

Field Value

float

_isDragging

protected bool _isDragging

Field Value

bool

_outlined

protected readonly HashSet<Outline> _outlined

Field Value

HashSet<Outline>

_outlinedParts

protected readonly HashSet<IObjectAssemblyPart> _outlinedParts

Field Value

HashSet<IObjectAssemblyPart>

_tertiaryDown

protected bool _tertiaryDown

Field Value

bool

cameraManager

protected ObjectAssemblyCameraManager cameraManager

Field Value

ObjectAssemblyCameraManager

cameraPannedVertically

public float cameraPannedVertically

Field Value

float

childNodeToAttach

protected IObjectAssemblyPartNode childNodeToAttach

Field Value

IObjectAssemblyPartNode

isAligningPartToAnotherPart

protected bool isAligningPartToAnotherPart

Field Value

bool

isRotating

protected bool isRotating

Field Value

bool

lastGrabbedPart

protected IObjectAssemblyPart lastGrabbedPart

Field Value

IObjectAssemblyPart

lastMousedOverAssembly

protected IObjectAssembly lastMousedOverAssembly

Field Value

IObjectAssembly

lastOutlinedAssembly

protected IObjectAssembly lastOutlinedAssembly

Field Value

IObjectAssembly

oabAssets

protected ObjectAssemblyAssets oabAssets

Field Value

ObjectAssemblyAssets

parentNodeToAttach

protected IObjectAssemblyPartNode parentNodeToAttach

Field Value

IObjectAssemblyPartNode

partPreviouslyUnderCursor

protected IObjectAssemblyPart partPreviouslyUnderCursor

Field Value

IObjectAssemblyPart

partToAttachTo

protected IObjectAssemblyPart partToAttachTo

Field Value

IObjectAssemblyPart

partTracker

protected ObjectAssemblyPartTracker partTracker

Field Value

ObjectAssemblyPartTracker

raycastLimit

public const float raycastLimit = 2000

Field Value

float

rotateAxis

public Vector3 rotateAxis

Field Value

Vector3

stats

protected OABSessionInformation stats

Field Value

OABSessionInformation

utilInput

protected ObjectAssemblyInputHandler utilInput

Field Value

ObjectAssemblyInputHandler

Properties

CanOutlineDisabledRenderers

protected virtual bool CanOutlineDisabledRenderers { get; }

Property Value

bool

DoOutlinesFilterNames

protected virtual bool DoOutlinesFilterNames { get; }

Property Value

bool

Game

public GameInstance Game { get; }

Property Value

GameInstance

GrabbingParts

protected bool GrabbingParts { get; }

Property Value

bool

PartGrabbed

protected IObjectAssemblyPart PartGrabbed { get; }

Property Value

IObjectAssemblyPart

PartUnderCursor

protected IObjectAssemblyPart PartUnderCursor { get; }

Property Value

IObjectAssemblyPart

Methods

DetermineSuggestedRotation(IObjectAssemblyPart, IObjectAssemblyPart, bool)

public void DetermineSuggestedRotation(IObjectAssemblyPart targetParent, IObjectAssemblyPart currentHeldChild, bool snapEnabled)

Parameters

targetParent IObjectAssemblyPart
currentHeldChild IObjectAssemblyPart
snapEnabled bool

Dispose()

public override void Dispose()

FindParentWithTag(GameObject, string)

public GameObject FindParentWithTag(GameObject childObject, string tag)

Parameters

childObject GameObject
tag string

Returns

GameObject

GamepadRightStickPerformed()

public override void GamepadRightStickPerformed()

GetGrabbedNodes(List<IObjectAssemblyPartNode>)

protected void GetGrabbedNodes(List<IObjectAssemblyPartNode> grabbedNodes)

Parameters

grabbedNodes List<IObjectAssemblyPartNode>

Initialize()

public override void Initialize()

InitializeInputEvents()

public void InitializeInputEvents()

IsStackAttachment(IObjectAssemblyPartNode, IObjectAssemblyPartNode)

protected bool IsStackAttachment(IObjectAssemblyPartNode parentNode, IObjectAssemblyPartNode childNode)

Parameters

parentNode IObjectAssemblyPartNode
childNode IObjectAssemblyPartNode

Returns

bool

OnAssemblyCreatedFromUI(IObjectAssembly)

public void OnAssemblyCreatedFromUI(IObjectAssembly assembly)

Parameters

assembly IObjectAssembly

OnCameraRotate()

public override void OnCameraRotate()

OnCameraRotateReleased()

public override void OnCameraRotateReleased()

OnGrabbingPart(IObjectAssemblyPart)

protected virtual void OnGrabbingPart(IObjectAssemblyPart part)

Parameters

part IObjectAssemblyPart

OnLateUpdate()

protected virtual void OnLateUpdate()

OnPartDropped(IObjectAssemblyPart)

public void OnPartDropped(IObjectAssemblyPart part)

Parameters

part IObjectAssemblyPart

OnPlacingPart(bool)

protected virtual void OnPlacingPart(bool isAttachedToSomethingElse)

Parameters

isAttachedToSomethingElse bool

OnPostLateUpdate()

protected virtual void OnPostLateUpdate()

OnPostUpdate()

protected virtual void OnPostUpdate()

OnPreLateUpdate()

protected virtual void OnPreLateUpdate()

OnPreUpdate()

protected virtual void OnPreUpdate()

OnResetRotation()

protected virtual void OnResetRotation()

OnUpdate()

protected virtual void OnUpdate()

PerformSurfaceOffsetAdjustment(IObjectAssemblyPart, IObjectAssemblyPart, Vector3, Vector3, bool)

public void PerformSurfaceOffsetAdjustment(IObjectAssemblyPart target, IObjectAssemblyPart current, Vector3 hitSpot, Vector3 hitNormal, bool snapEnabled)

Parameters

target IObjectAssemblyPart
current IObjectAssemblyPart
hitSpot Vector3
hitNormal Vector3
snapEnabled bool

PostSnapSelectionToNearbyNode(bool)

protected virtual void PostSnapSelectionToNearbyNode(bool didShow)

Parameters

didShow bool

PostSnapSelectionToSurface(bool)

protected virtual void PostSnapSelectionToSurface(bool didShow)

Parameters

didShow bool

PostSnapToSurfaceOrNode()

protected virtual void PostSnapToSurfaceOrNode()

PrimaryActionClick()

public override void PrimaryActionClick()

PrimaryActionDoubleClick()

public override void PrimaryActionDoubleClick()

RevertPartSelectionShaders()

public void RevertPartSelectionShaders()

SecondaryActionUp()

public override void SecondaryActionUp()

SectiondaryActionDown()

public override void SectiondaryActionDown()

SetOutlinedPart(IObjectAssemblyPart, bool)

public override void SetOutlinedPart(IObjectAssemblyPart part, bool includeChildren)

Parameters

part IObjectAssemblyPart
includeChildren bool

SetPartSelectionShader(IObjectAssemblyPart)

public void SetPartSelectionShader(IObjectAssemblyPart part)

Parameters

part IObjectAssemblyPart

SetupCursorForTool()

public override void SetupCursorForTool()

SnapNodes(IObjectAssemblyPartNode, IObjectAssemblyPartNode)

public static void SnapNodes(IObjectAssemblyPartNode snapTarget, IObjectAssemblyPartNode gettingSnapped)

Parameters

snapTarget IObjectAssemblyPartNode
gettingSnapped IObjectAssemblyPartNode

Terminate()

public override void Terminate()

TertiaryActionDown()

public override void TertiaryActionDown()

TertiaryActionUp()

public override void TertiaryActionUp()

UpdateCameraLerp()

protected void UpdateCameraLerp()