Skip to content

Latest commit

 

History

History
240 lines (96 loc) · 6.02 KB

File metadata and controls

240 lines (96 loc) · 6.02 KB

Guide

Summary

A guide widget

Instance Properties

NameReturn TypeDescription
indexnumber
Read-only
The index of the active widget
layerLayer
Read/Write
The layer the guide is on
groupGroup
Read/Write
The group this guide is part of
transformTransform
Read/Write
The transform of the Guide Widget
positionVector3
Read/Write
The 3D position of the Guide Widget
rotationRotation
Read/Write
The 3D orientation of the Guide Widget
scalenumber
Read/Write
The scale of the Guide Widget

Class Methods

Guide:NewCube(transform)

Creates a new cube guide with a default size using the transform for position and orientation

Returns: Guide (A new cube guide)

Parameters:

NameTypeDefaultDescription
transformTransformThe transform of the Guide Widget

Example

myGuide = Guide:NewCube(Transform:New(0, 5, 2)

Guide:NewSphere(transform)

Creates a new sphere guide with a default size using the transform for position and orientation

Returns: Guide (A new sphere guide)

Parameters:

NameTypeDefaultDescription
transformTransformThe transform of the Guide Widget

Example

myGuide = Guide:NewSphere(Transform:New(0, 5, 2)

Guide:NewCapsule(transform)

Creates a new capsule guide with a default size using the transform for position and orientation

Returns: Guide (A new capsule guide)

Parameters:

NameTypeDefaultDescription
transformTransformThe transform of the Guide Widget

Example

myGuide = Guide:NewCapsule(Transform:New(0, 5, 2)

Guide:NewCone(transform)

Creates a new cone guide with a default size using the transform for position and orientation

Returns: Guide (A new cone guide)

Parameters:

NameTypeDefaultDescription
transformTransformThe transform of the Guide Widget

Example

myGuide = Guide:NewCone(Transform:New(0, 5, 2)

Guide:NewEllipsoid(transform)

Creates a new ellipsoid guide with a default size using the transform for position and orientation

Returns: Guide (A new ellipsoid guide)

Parameters:

NameTypeDefaultDescription
transformTransformThe transform of the Guide Widget

Example

myGuide = Guide:NewEllipsoid(Transform:New(0, 5, 2)

Guide:NewCustom(transform, model)

Creates a new custom guide from a 3d model. Note that custom guides have to be convex so your model will be "wrapped" as a convex hull

Returns: Guide (A new custom guide based on the convex hull of the model)

Parameters:

NameTypeDefaultDescription
transformTransformThe transform of the Guide Widget
modelModelThe Model to use for the custom guide

Example

myGuide = Guide:NewCustom(Transform:New(0, 5, 2), myModel

Instance Methods

guide:Select()

Adds the guide to the current selection

Returns: nil

Example

myGuide:Select()

guide:Deselect()

Removes the guide from the current selection

Returns: nil

Example

myGuide:Deselect()

guide:Delete()

Deletes the guide

Returns: nil

Example

myGuide:Delete()

guide:Scale(scale)

Scales the guide (scale can be non-uniform as some guide types can be stretched)

Returns: nil

Parameters:

NameTypeDefaultDescription
scaleVector3The scale vector for scaling the Guide Widget

Example

myGuide:Scale(Vector3:New(2, 0, 0)