public static ArcHandle InitAngularHandle() { ArcHandle handle = new ArcHandle(); handle.SetColorWithRadiusHandle(Color.white, 0f); handle.radiusHandleSizeFunction = pos => 0f; // no radius handle return(handle); }
public static ArcHandle InitRadialHandle() { ArcHandle handle = new ArcHandle(); handle.SetColorWithRadiusHandle(Color.white, 0f); handle.angle = 360f; handle.angleHandleSizeFunction = pos => 0f; // no angle handle handle.angleHandleColor = Color.clear; return(handle); }
private void OnEnable() { m_ArcHandleLatN = new ArcHandle(); m_ArcHandleLatN.SetColorWithoutRadiusHandle(new Color32(152, 237, 67, 255), 0.1f); m_ArcHandleLatN.radiusHandleColor = Color.white; m_ArcHandleLatS = new ArcHandle(); m_ArcHandleLatS.SetColorWithoutRadiusHandle(new Color32(152, 237, 67, 255), 0.1f); m_ArcHandleLatS.radiusHandleColor = Color.white; m_ArcHandleLon = new ArcHandle(); m_ArcHandleLon.SetColorWithoutRadiusHandle(new Color32(237, 67, 30, 255), 0.1f); m_ArcHandleLon.radiusHandleColor = Color.white; }
private void OnEnable() { m_Comp = (GridSensorComponent3D)target; Undo.undoRedoPerformed += OnUndoRedo; m_ArcHandleLatN = new ArcHandle(); m_ArcHandleLatN.SetColorWithoutRadiusHandle(new Color32(152, 237, 67, 255), 0.1f); m_ArcHandleLatN.radiusHandleColor = Color.white; m_ArcHandleLatS = new ArcHandle(); m_ArcHandleLatS.SetColorWithoutRadiusHandle(new Color32(152, 237, 67, 255), 0.1f); m_ArcHandleLatS.radiusHandleColor = Color.white; m_ArcHandleLon = new ArcHandle(); m_ArcHandleLon.SetColorWithoutRadiusHandle(new Color32(237, 67, 30, 255), 0.1f); m_ArcHandleLon.radiusHandleColor = Color.white; }
protected virtual void OnEnable() { m_Comp = (SpatialGridSensorComponent)target; Undo.undoRedoPerformed += OnUndoRedo; m_UpdateFlag = true; m_ArcHandleLatN = new ArcHandle(); m_ArcHandleLatN.SetColorWithoutRadiusHandle(new Color32(152, 237, 67, 255), 0.1f); m_ArcHandleLatN.radiusHandleColor = Color.white; m_ArcHandleLatS = new ArcHandle(); m_ArcHandleLatS.SetColorWithoutRadiusHandle(new Color32(152, 237, 67, 255), 0.1f); m_ArcHandleLatS.radiusHandleColor = Color.white; m_ArcHandleLon = new ArcHandle(); m_ArcHandleLon.SetColorWithoutRadiusHandle(new Color32(237, 67, 30, 255), 0.1f); m_ArcHandleLon.radiusHandleColor = Color.white; CreateGLMaterial(); }
protected virtual void SetUpArcHandle( ref ArcHandle handle, out Matrix4x4 matrix, ProjectileArc arc) { // copy the target object's data to the handle handle.angle = arc.fullAngle; m_ArcHandle.radius = HANDLE_RADIUS * HandleUtility.GetHandleSize(arc.transform.position); // set the handle matrix so that angle extends upward from target's facing direction along ground Vector3 handleNormal = arc.axis; Vector3 handleDirection = arc.facingDirection; handleDirection = Quaternion.AngleAxis(-arc.halfAngle, arc.axis) * handleDirection; //Debug.Log(handleDirection); matrix = Matrix4x4.TRS( arc.transform.position, Quaternion.LookRotation(handleDirection, handleNormal), Vector3.one ); }
private void OnEnable() { m_Arc = new ArcHandle(); m_Arc.SetColorWithRadiusHandle(Color.red, 0.2f); }
private new void OnEnable() { fOVVisualize = (FOVVisualize)target; arcHandle = new ArcHandle(); arcHandle.SetColorWithRadiusHandle(Color.red, 0.2f); }