C# 클래스 HoloToolkit.Sharing.Utilities.Utils

파일 보기 프로젝트 열기: OpenHID/InteractivePaint

공개 메소드들

메소드 설명
ConnectCylinderBetweenPoints ( Transform endPointSpace, Vector3 a, Vector3 b, Transform cylTransform ) : void

Given two points and the transform that they are in, set position, rotation, and scale of a cylinder transform to connect it between the two points

GetChildRecursive ( Transform t, string name ) : Transform

walk hierarchy looking for named transform

IsInEditor ( ) : bool

helper for detecting if running in editor

Map ( float minA, float maxA, float minB, float maxB, float value ) : float

This takes a value, whose proportions are defined by minA and maxA, and scales it to a space defined by minB and maxB. For example, 5 in the space of 0 to 10 will map to 50 in the space of 0 to 100.

MapAndClamp ( float minA, float maxA, float minB, float maxB, float value ) : float

This wrapper performs a map, but sets the results upper and lower limit based on the upper and lower bounds of the new scale.

MoveObjectInFrontOfUser ( Transform stageTransform, Transform tran, Vector3 offset, float yawOffset ) : void

Position transform along the gaze direction and orient yaw to match, with the specified offset

SetLayerRecursively ( GameObject gameObject, int layer ) : void
SetMaterialRecursive ( Transform t, Material mat ) : void

Change material for every object in hierarchy

SetMaterialRecursiveForName ( Transform t, Material mat, string nameToTest ) : void

Change material for every object in hierarchy which has a name equal to nameToTest

메소드 상세

ConnectCylinderBetweenPoints() 공개 정적인 메소드

Given two points and the transform that they are in, set position, rotation, and scale of a cylinder transform to connect it between the two points
public static ConnectCylinderBetweenPoints ( Transform endPointSpace, Vector3 a, Vector3 b, Transform cylTransform ) : void
endPointSpace UnityEngine.Transform
a UnityEngine.Vector3 One end point in the space of endPointSpace
b UnityEngine.Vector3 Other end point in the space of endPointSpace
cylTransform UnityEngine.Transform transform for the cylinder primitive to connect
리턴 void

GetChildRecursive() 공개 정적인 메소드

walk hierarchy looking for named transform
public static GetChildRecursive ( Transform t, string name ) : Transform
t UnityEngine.Transform root transform to start searching from
name string name to look for
리턴 UnityEngine.Transform

IsInEditor() 공개 정적인 메소드

helper for detecting if running in editor
public static IsInEditor ( ) : bool
리턴 bool

Map() 공개 정적인 메소드

This takes a value, whose proportions are defined by minA and maxA, and scales it to a space defined by minB and maxB. For example, 5 in the space of 0 to 10 will map to 50 in the space of 0 to 100.
public static Map ( float minA, float maxA, float minB, float maxB, float value ) : float
minA float lower bound for the original scale
maxA float upper bound for the original scale
minB float lower bound for new scale
maxB float upper bound for new scale
value float the original scale value to convert to the new /// scale.
리턴 float

MapAndClamp() 공개 정적인 메소드

This wrapper performs a map, but sets the results upper and lower limit based on the upper and lower bounds of the new scale.
public static MapAndClamp ( float minA, float maxA, float minB, float maxB, float value ) : float
minA float lower bound for the original scale
maxA float upper bound for the original scale
minB float lower bound for new scale
maxB float upper bound for new scale
value float the original scale value to convert to the new /// scale.
리턴 float

MoveObjectInFrontOfUser() 공개 정적인 메소드

Position transform along the gaze direction and orient yaw to match, with the specified offset
public static MoveObjectInFrontOfUser ( Transform stageTransform, Transform tran, Vector3 offset, float yawOffset ) : void
stageTransform UnityEngine.Transform transform of higher-level space where 0,1,0 is up
tran UnityEngine.Transform transform to be repositioned
offset UnityEngine.Vector3 translation offset, Z is forward
yawOffset float yaw offset
리턴 void

SetLayerRecursively() 공개 정적인 메소드

public static SetLayerRecursively ( GameObject gameObject, int layer ) : void
gameObject UnityEngine.GameObject
layer int
리턴 void

SetMaterialRecursive() 공개 정적인 메소드

Change material for every object in hierarchy
public static SetMaterialRecursive ( Transform t, Material mat ) : void
t UnityEngine.Transform root transform to start looking for renderers
mat UnityEngine.Material material to set everything to
리턴 void

SetMaterialRecursiveForName() 공개 정적인 메소드

Change material for every object in hierarchy which has a name equal to nameToTest
public static SetMaterialRecursiveForName ( Transform t, Material mat, string nameToTest ) : void
t UnityEngine.Transform root transform to start looking for renderers
mat UnityEngine.Material material to set everything to
nameToTest string
리턴 void