C# Class SSTUTools.SSTUAttachNodeUtils

Utility class for methods that manipulate part attach nodes.
Mostra file Open project: shadowmage45/SSTULabs Class Usage Examples

Public Methods

Method Description
createAttachNode ( Part part, String id, Vector3 pos, Vector3 orient, int size ) : AttachNode

Creates a new attach node with the given paramaters and adds it to the input part.

destroyAttachNode ( Part part, AttachNode node ) : void

Destroys the input attach node and removes it from the part.

updateAttachNodePosition ( Part part, AttachNode node, Vector3 newPos, Vector3 orientation, bool updatePartPosition ) : void

Updates an attach node position and handles offseting of any attached parts (or base part if attached part is the parent). Intended to replace the current per-part-module code that does the same, with a centrally managed utility method, for convenience and easier bug tracking and fixing.

updateSurfaceAttachedChildren ( Part part, float oldDiameter, float newDiameter ) : void

Updates surface attached children of the input part.

Method Details

createAttachNode() public static method

Creates a new attach node with the given paramaters and adds it to the input part.
public static createAttachNode ( Part part, String id, Vector3 pos, Vector3 orient, int size ) : AttachNode
part Part
id String
pos Vector3
orient Vector3
size int
return AttachNode

destroyAttachNode() public static method

Destroys the input attach node and removes it from the part.
public static destroyAttachNode ( Part part, AttachNode node ) : void
part Part
node AttachNode
return void

updateAttachNodePosition() public static method

Updates an attach node position and handles offseting of any attached parts (or base part if attached part is the parent). Intended to replace the current per-part-module code that does the same, with a centrally managed utility method, for convenience and easier bug tracking and fixing.
public static updateAttachNodePosition ( Part part, AttachNode node, Vector3 newPos, Vector3 orientation, bool updatePartPosition ) : void
part Part
node AttachNode
newPos Vector3
orientation Vector3
updatePartPosition bool
return void

updateSurfaceAttachedChildren() public static method

Updates surface attached children of the input part.
public static updateSurfaceAttachedChildren ( Part part, float oldDiameter, float newDiameter ) : void
part Part
oldDiameter float
newDiameter float
return void