C# 클래스 UnityEditor.HandleUtility

Helper functions for Scene View style 3D GUI.

파일 보기 프로젝트 열기: CarlosHBC/UnityDecompiled 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ApplyDottedWireMaterial void
ApplyWireMaterial void
BeginHandles void
CalcRayPlaceOffset float
CameraNeedsToRenderIntoRT bool
DistanceToDiamond float
DistanceToDiamondInternal float
DistanceToRectangleInternal float
EndHandles void
FindNearestVertex bool
FindSelectionBase UnityEngine.GameObject
GetParametrization float
INTERNAL_CALL_CalcRayPlaceOffset float
INTERNAL_CALL_DistancePointBezier float
INTERNAL_CALL_Internal_FindNearestVertex bool
INTERNAL_CALL_Internal_PickClosestGO UnityEngine.GameObject
INTERNAL_CALL_Internal_PickRectObjects UnityEngine.GameObject[]
INTERNAL_CALL_IntersectRayMesh bool
InitHandleMaterials void
Internal_FindNearestVertex bool
Internal_PickClosestGO UnityEngine.GameObject
Internal_PickRectObjects UnityEngine.GameObject[]
Internal_Repaint void
Internal_SetHandleWireTextureIndex void
IntersectRayMesh bool
PickGameObject UnityEngine.GameObject
PickGameObject UnityEngine.GameObject
SetViewInfo void

공개 메소드들

메소드 설명
AddControl ( int controlId, float distance ) : void

Record a distance measurement from a handle.

AddDefaultControl ( int controlId ) : void

Add the ID for a default control. This will be picked if nothing else is.

CalcLineTranslation ( Vector2 src, Vector2 dest, Vector3 srcPosition, Vector3 constraintDir ) : float

Map a mouse drag onto a movement along a line in 3D space.

ClosestPointToArc ( Vector3 center, Vector3 normal, Vector3 from, float angle, float radius ) : Vector3

Get the point on an arc (in 3D space) which is closest to the current mouse position.

ClosestPointToDisc ( Vector3 center, Vector3 normal, float radius ) : Vector3

Get the point on an disc (in 3D space) which is closest to the current mouse position.

ClosestPointToPolyLine ( ) : Vector3

Get the point on a polyline (in 3D space) which is closest to the current mouse position.

DistancePointBezier ( Vector3 point, Vector3 startPosition, Vector3 endPosition, Vector3 startTangent, Vector3 endTangent ) : float

Calculate distance between a point and a Bezier curve.

DistancePointLine ( Vector3 point, Vector3 lineStart, Vector3 lineEnd ) : float

Calculate distance between a point and a line.

DistancePointToLine ( Vector2 p, Vector2 a, Vector2 b ) : float

Distance from a point p in 2d to a line defined by two points a and b.

DistancePointToLineSegment ( Vector2 p, Vector2 a, Vector2 b ) : float

Distance from a point p in 2d to a line segment defined by two points a and b.

DistanceToArc ( Vector3 center, Vector3 normal, Vector3 from, float angle, float radius ) : float

Pixel distance from mouse pointer to a 3D section of a disc.

DistanceToCircle ( Vector3 position, float radius ) : float

Pixel distance from mouse pointer to camera facing circle.

DistanceToDisc ( Vector3 center, Vector3 normal, float radius ) : float

Pixel distance from mouse pointer to a 3D disc.

DistanceToLine ( Vector3 p1, Vector3 p2 ) : float

Pixel distance from mouse pointer to line.

DistanceToPolyLine ( ) : float

Pixel distance from mouse pointer to a polyline.

DistanceToRectangle ( Vector3 position, Quaternion rotation, float size ) : float

Pixel distance from mouse pointer to a rectangle on screen.

GUIPointToWorldRay ( Vector2 position ) : Ray

Convert 2D GUI position to a world space ray.

GetHandleSize ( Vector3 position ) : float

Get world space size of a manipulator handle at given position.

PickGameObject ( Vector2 position, GameObject ignore, int &materialIndex ) : GameObject
PickGameObject ( Vector2 position, bool selectPrefabRoot ) : GameObject

Pick game object closest to specified position.

PickGameObject ( Vector2 position, bool selectPrefabRoot, GameObject ignore ) : GameObject
PickGameObject ( Vector2 position, int &materialIndex ) : GameObject
PickRectObjects ( Rect rect ) : UnityEngine.GameObject[]

Pick GameObjects that lie within a specified screen rectangle.

PickRectObjects ( Rect rect, bool selectPrefabRootsOnly ) : UnityEngine.GameObject[]

PointOnLineParameter ( Vector3 point, Vector3 linePoint, Vector3 lineDirection ) : float

Returns the parameter for the projection of the point on the given line.

PopCamera ( Camera camera ) : void

Retrieve all camera settings.

ProjectPointLine ( Vector3 point, Vector3 lineStart, Vector3 lineEnd ) : Vector3

Project point onto a line.

PushCamera ( Camera camera ) : void

Store all camera settings.

RaySnap ( Ray ray ) : object

Casts ray against the scene and report if an object lies in its path.

Repaint ( ) : void

Repaint the current view.

WorldPointToSizedRect ( Vector3 position, GUIContent content, GUIStyle style ) : Rect

Calculate a rectangle to display a 2D GUI element near a projected point in 3D space.

WorldToGUIPoint ( Vector3 world ) : Vector2

Convert world space point to a 2D GUI position.

비공개 메소드들

메소드 설명
ApplyDottedWireMaterial ( ) : void
ApplyWireMaterial ( ) : void
BeginHandles ( ) : void
CalcRayPlaceOffset ( Transform objects, Vector3 normal ) : float
CameraNeedsToRenderIntoRT ( Camera camera ) : bool
DistanceToDiamond ( Vector3 position, Quaternion rotation, float size ) : float
DistanceToDiamondInternal ( Vector3 position, Quaternion rotation, float size, Vector2 mousePosition ) : float
DistanceToRectangleInternal ( Vector3 position, Quaternion rotation, Vector2 size ) : float
EndHandles ( ) : void
FindNearestVertex ( Vector2 guiPoint, Transform objectsToSearch, Vector3 &vertex ) : bool
FindSelectionBase ( GameObject go ) : GameObject
GetParametrization ( Vector2 x0, Vector2 x1, Vector2 x2 ) : float
INTERNAL_CALL_CalcRayPlaceOffset ( Transform objects, Vector3 &normal ) : float
INTERNAL_CALL_DistancePointBezier ( Vector3 &point, Vector3 &startPosition, Vector3 &endPosition, Vector3 &startTangent, Vector3 &endTangent ) : float
INTERNAL_CALL_Internal_FindNearestVertex ( Camera cam, Vector2 &screenPoint, Transform objectsToSearch, Transform ignoreObjects, Vector3 &vertex ) : bool
INTERNAL_CALL_Internal_PickClosestGO ( Camera cam, int layers, Vector2 &position, GameObject ignore, GameObject filter, int &materialIndex ) : GameObject
INTERNAL_CALL_Internal_PickRectObjects ( Camera cam, Rect &rect, bool selectPrefabRoots ) : UnityEngine.GameObject[]
INTERNAL_CALL_IntersectRayMesh ( Ray &ray, Mesh mesh, Matrix4x4 &matrix, RaycastHit &hit ) : bool
InitHandleMaterials ( ) : void
Internal_FindNearestVertex ( Camera cam, Vector2 screenPoint, Transform objectsToSearch, Transform ignoreObjects, Vector3 &vertex ) : bool
Internal_PickClosestGO ( Camera cam, int layers, Vector2 position, GameObject ignore, GameObject filter, int &materialIndex ) : GameObject
Internal_PickRectObjects ( Camera cam, Rect rect, bool selectPrefabRoots ) : UnityEngine.GameObject[]
Internal_Repaint ( ) : void
Internal_SetHandleWireTextureIndex ( int textureIndex ) : void
IntersectRayMesh ( Ray ray, Mesh mesh, Matrix4x4 matrix, RaycastHit &hit ) : bool
PickGameObject ( Vector2 position, GameObject ignore, GameObject filter, int &materialIndex ) : GameObject
PickGameObject ( Vector2 position, bool selectPrefabRoot, GameObject ignore, GameObject filter ) : GameObject
SetViewInfo ( Vector2 screenPosition ) : void

메소드 상세

AddControl() 공개 정적인 메소드

Record a distance measurement from a handle.

public static AddControl ( int controlId, float distance ) : void
controlId int
distance float
리턴 void

AddDefaultControl() 공개 정적인 메소드

Add the ID for a default control. This will be picked if nothing else is.

public static AddDefaultControl ( int controlId ) : void
controlId int
리턴 void

CalcLineTranslation() 공개 정적인 메소드

Map a mouse drag onto a movement along a line in 3D space.

public static CalcLineTranslation ( Vector2 src, Vector2 dest, Vector3 srcPosition, Vector3 constraintDir ) : float
src Vector2 The source point of the drag.
dest Vector2 The destination point of the drag.
srcPosition Vector3 The 3D position the dragged object had at src ray.
constraintDir Vector3 3D direction of constrained movement.
리턴 float

ClosestPointToArc() 공개 정적인 메소드

Get the point on an arc (in 3D space) which is closest to the current mouse position.

public static ClosestPointToArc ( Vector3 center, Vector3 normal, Vector3 from, float angle, float radius ) : Vector3
center Vector3
normal Vector3
from Vector3
angle float
radius float
리턴 Vector3

ClosestPointToDisc() 공개 정적인 메소드

Get the point on an disc (in 3D space) which is closest to the current mouse position.

public static ClosestPointToDisc ( Vector3 center, Vector3 normal, float radius ) : Vector3
center Vector3
normal Vector3
radius float
리턴 Vector3

ClosestPointToPolyLine() 공개 정적인 메소드

Get the point on a polyline (in 3D space) which is closest to the current mouse position.

public static ClosestPointToPolyLine ( ) : Vector3
리턴 Vector3

DistancePointBezier() 공개 정적인 메소드

Calculate distance between a point and a Bezier curve.

public static DistancePointBezier ( Vector3 point, Vector3 startPosition, Vector3 endPosition, Vector3 startTangent, Vector3 endTangent ) : float
point Vector3
startPosition Vector3
endPosition Vector3
startTangent Vector3
endTangent Vector3
리턴 float

DistancePointLine() 공개 정적인 메소드

Calculate distance between a point and a line.

public static DistancePointLine ( Vector3 point, Vector3 lineStart, Vector3 lineEnd ) : float
point Vector3
lineStart Vector3
lineEnd Vector3
리턴 float

DistancePointToLine() 공개 정적인 메소드

Distance from a point p in 2d to a line defined by two points a and b.

public static DistancePointToLine ( Vector2 p, Vector2 a, Vector2 b ) : float
p Vector2
a Vector2
b Vector2
리턴 float

DistancePointToLineSegment() 공개 정적인 메소드

Distance from a point p in 2d to a line segment defined by two points a and b.

public static DistancePointToLineSegment ( Vector2 p, Vector2 a, Vector2 b ) : float
p Vector2
a Vector2
b Vector2
리턴 float

DistanceToArc() 공개 정적인 메소드

Pixel distance from mouse pointer to a 3D section of a disc.

public static DistanceToArc ( Vector3 center, Vector3 normal, Vector3 from, float angle, float radius ) : float
center Vector3
normal Vector3
from Vector3
angle float
radius float
리턴 float

DistanceToCircle() 공개 정적인 메소드

Pixel distance from mouse pointer to camera facing circle.

public static DistanceToCircle ( Vector3 position, float radius ) : float
position Vector3
radius float
리턴 float

DistanceToDisc() 공개 정적인 메소드

Pixel distance from mouse pointer to a 3D disc.

public static DistanceToDisc ( Vector3 center, Vector3 normal, float radius ) : float
center Vector3
normal Vector3
radius float
리턴 float

DistanceToLine() 공개 정적인 메소드

Pixel distance from mouse pointer to line.

public static DistanceToLine ( Vector3 p1, Vector3 p2 ) : float
p1 Vector3
p2 Vector3
리턴 float

DistanceToPolyLine() 공개 정적인 메소드

Pixel distance from mouse pointer to a polyline.

public static DistanceToPolyLine ( ) : float
리턴 float

DistanceToRectangle() 공개 정적인 메소드

Pixel distance from mouse pointer to a rectangle on screen.

public static DistanceToRectangle ( Vector3 position, Quaternion rotation, float size ) : float
position Vector3
rotation UnityEngine.Quaternion
size float
리턴 float

GUIPointToWorldRay() 공개 정적인 메소드

Convert 2D GUI position to a world space ray.

public static GUIPointToWorldRay ( Vector2 position ) : Ray
position Vector2
리턴 UnityEngine.Ray

GetHandleSize() 공개 정적인 메소드

Get world space size of a manipulator handle at given position.

public static GetHandleSize ( Vector3 position ) : float
position Vector3 The position of the handle in 3d space.
리턴 float

PickGameObject() 공개 정적인 메소드

public static PickGameObject ( Vector2 position, GameObject ignore, int &materialIndex ) : GameObject
position Vector2
ignore UnityEngine.GameObject
materialIndex int
리턴 UnityEngine.GameObject

PickGameObject() 공개 정적인 메소드

Pick game object closest to specified position.

public static PickGameObject ( Vector2 position, bool selectPrefabRoot ) : GameObject
position Vector2
selectPrefabRoot bool Select prefab.
리턴 UnityEngine.GameObject

PickGameObject() 공개 정적인 메소드

public static PickGameObject ( Vector2 position, bool selectPrefabRoot, GameObject ignore ) : GameObject
position Vector2
selectPrefabRoot bool
ignore UnityEngine.GameObject
리턴 UnityEngine.GameObject

PickGameObject() 공개 정적인 메소드

public static PickGameObject ( Vector2 position, int &materialIndex ) : GameObject
position Vector2
materialIndex int
리턴 UnityEngine.GameObject

PickRectObjects() 공개 정적인 메소드

Pick GameObjects that lie within a specified screen rectangle.

public static PickRectObjects ( Rect rect ) : UnityEngine.GameObject[]
rect UnityEngine.Rect An screen rectangle specified with pixel coordinates.
리턴 UnityEngine.GameObject[]

PickRectObjects() 공개 정적인 메소드

public static PickRectObjects ( Rect rect, bool selectPrefabRootsOnly ) : UnityEngine.GameObject[]
rect UnityEngine.Rect
selectPrefabRootsOnly bool
리턴 UnityEngine.GameObject[]

PointOnLineParameter() 공개 정적인 메소드

Returns the parameter for the projection of the point on the given line.

public static PointOnLineParameter ( Vector3 point, Vector3 linePoint, Vector3 lineDirection ) : float
point Vector3
linePoint Vector3
lineDirection Vector3
리턴 float

PopCamera() 공개 정적인 메소드

Retrieve all camera settings.

public static PopCamera ( Camera camera ) : void
camera UnityEngine.Camera
리턴 void

ProjectPointLine() 공개 정적인 메소드

Project point onto a line.

public static ProjectPointLine ( Vector3 point, Vector3 lineStart, Vector3 lineEnd ) : Vector3
point Vector3
lineStart Vector3
lineEnd Vector3
리턴 Vector3

PushCamera() 공개 정적인 메소드

Store all camera settings.

public static PushCamera ( Camera camera ) : void
camera UnityEngine.Camera
리턴 void

RaySnap() 공개 정적인 메소드

Casts ray against the scene and report if an object lies in its path.

public static RaySnap ( Ray ray ) : object
ray UnityEngine.Ray
리턴 object

Repaint() 공개 정적인 메소드

Repaint the current view.

public static Repaint ( ) : void
리턴 void

WorldPointToSizedRect() 공개 정적인 메소드

Calculate a rectangle to display a 2D GUI element near a projected point in 3D space.

public static WorldPointToSizedRect ( Vector3 position, GUIContent content, GUIStyle style ) : Rect
position Vector3 The world-space position to use.
content UnityEngine.GUIContent The content to make room for.
style UnityEngine.GUIStyle The style to use. The style's alignment.
리턴 UnityEngine.Rect

WorldToGUIPoint() 공개 정적인 메소드

Convert world space point to a 2D GUI position.

public static WorldToGUIPoint ( Vector3 world ) : Vector2
world Vector3 Point in world space.
리턴 Vector2