C# Class UnityEditor.Handles

Exibir arquivo Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
ArrowCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw an arrow like those used by the move tool.

ArrowHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw an arrow like those used by the move tool.

BeginGUI ( ) : void

Begin a 2D GUI block inside the 3D handle GUI.

Button ( Vector3 position, Quaternion direction, float size, float pickSize, CapFunction capFunction ) : bool
Button ( Vector3 position, Quaternion direction, float size, float pickSize, DrawCapFunction capFunc ) : bool
CircleCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a camera-facing Circle. Pass this into handle functions.

CircleHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a circle handle. Pass this into handle functions.

ClearCamera ( Rect position, Camera camera ) : void

Clears the camera.

ConeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a Cone. Pass this into handle functions.

ConeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a cone handle. Pass this into handle functions.

CubeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a cube. Pass this into handle functions.

CubeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a cube handle. Pass this into handle functions.

CylinderCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void

Draw a Cylinder. Pass this into handle functions.

CylinderHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void

Draw a cylinder handle. Pass this into handle functions.

Disc ( Quaternion rotation, Vector3 position, Vector3 axis, float size, bool cutoffPlane, float snap ) : Quaternion

Make a 3D disc that can be dragged with the mouse.

Private Methods

Method Description
BeginGUI ( Rect position ) : void
BeginLineDrawing ( Matrix4x4 matrix, bool dottedLines ) : bool
Button ( int controlID, Vector3 position, Quaternion direction, float size, float pickSize, CapFunction capFunction ) : bool
Button ( int controlID, Vector3 position, Quaternion direction, float size, float pickSize, DrawCapFunction capFunc ) : bool
ConeFrustrumHandle ( Quaternion rotation, Vector3 position, Vector3 radiusAngleRange ) : Vector3
ConeHandle ( Quaternion rotation, Vector3 position, Vector2 angleAndRange, float angleScale, float rangeScale, bool handlesOnly ) : Vector2
DistanceToPolygone ( Vector3 vertices ) : float
DoBoneHandle ( Transform target ) : void
DoBoneHandle ( Transform target, bool>.Dictionary validBones ) : void
DoConeFrustrumHandle ( Quaternion rotation, Vector3 position, Vector3 radiusAngleRange ) : Vector3
DoConeHandle ( Quaternion rotation, Vector3 position, Vector2 angleAndRange, float angleScale, float rangeScale, bool handlesOnly ) : Vector2
DoDrawAAConvexPolygon ( Vector3 points, int actualNumberOfPoints, float alpha ) : void
DoDrawAAPolyLine ( Color colors, Vector3 points, int actualNumberOfPoints, Texture2D lineTex, float width, float alpha ) : void
DoPlanarHandle ( PlaneHandle planeID, Vector3 position, Quaternion rotation, float handleSize ) : Vector3

Method Details

ArrowCap() public static method

Draw an arrow like those used by the move tool.

public static ArrowCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
return void

ArrowHandleCap() public static method

Draw an arrow like those used by the move tool.

public static ArrowHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
return void

BeginGUI() public static method

Begin a 2D GUI block inside the 3D handle GUI.

public static BeginGUI ( ) : void
return void

Button() public static method

public static Button ( Vector3 position, Quaternion direction, float size, float pickSize, CapFunction capFunction ) : bool
position Vector3
direction UnityEngine.Quaternion
size float
pickSize float
capFunction CapFunction
return bool

Button() public static method

public static Button ( Vector3 position, Quaternion direction, float size, float pickSize, DrawCapFunction capFunc ) : bool
position Vector3
direction UnityEngine.Quaternion
size float
pickSize float
capFunc DrawCapFunction
return bool

CircleCap() public static method

Draw a camera-facing Circle. Pass this into handle functions.

public static CircleCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position for the start of the handle.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
return void

CircleHandleCap() public static method

Draw a circle handle. Pass this into handle functions.

public static CircleHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
return void

ClearCamera() public static method

Clears the camera.

public static ClearCamera ( Rect position, Camera camera ) : void
position UnityEngine.Rect Where in the Scene to clear.
camera UnityEngine.Camera The camera to clear.
return void

ConeCap() public static method

Draw a Cone. Pass this into handle functions.

public static ConeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
return void

ConeHandleCap() public static method

Draw a cone handle. Pass this into handle functions.

public static ConeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
return void

CubeCap() public static method

Draw a cube. Pass this into handle functions.

public static CubeCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
return void

CubeHandleCap() public static method

Draw a cube handle. Pass this into handle functions.

public static CubeHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
return void

CylinderCap() public static method

Draw a Cylinder. Pass this into handle functions.

public static CylinderCap ( int controlID, Vector3 position, Quaternion rotation, float size ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
return void

CylinderHandleCap() public static method

Draw a cylinder handle. Pass this into handle functions.

public static CylinderHandleCap ( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType ) : void
controlID int The control ID for the handle.
position Vector3 The world-space position of the handle's start point.
rotation UnityEngine.Quaternion The rotation of the handle.
size float The size of the handle in world-space units.
eventType EventType Event type for the handle to act upon. By design it handles EventType.Layout and EventType.Repaint events.
return void

Disc() public static method

Make a 3D disc that can be dragged with the mouse.

public static Disc ( Quaternion rotation, Vector3 position, Vector3 axis, float size, bool cutoffPlane, float snap ) : Quaternion
rotation UnityEngine.Quaternion The rotation of the disc.
position Vector3 The center of the disc.
axis Vector3 The axis to rotate around.
size float The size of the disc in world space.
cutoffPlane bool If true, only the front-facing half of the circle is draw / draggable. This is useful when you have many overlapping rotation axes (like in the default rotate tool) to avoid clutter.
snap float The grid size to snap to.
return UnityEngine.Quaternion