当前位置: 首页>>代码示例>>C#>>正文


C# AxisType类代码示例

本文整理汇总了C#中AxisType的典型用法代码示例。如果您正苦于以下问题:C# AxisType类的具体用法?C# AxisType怎么用?C# AxisType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AxisType类属于命名空间,在下文中一共展示了AxisType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LineChart

 public LineChart(ChartSize size, ChartData data, AxisType axisTypes, AxisLabels labels, AxisRange ranges)
     : base(LineTypeDefinition, size, data)
 {
     _labels = labels;
     _axisType = axisTypes;
     _ranges = ranges;
 }
开发者ID:pachman,项目名称:ngchart,代码行数:7,代码来源:LineChart.cs

示例2: Axis2Direction

    public static Vector3 Axis2Direction(Transform transform, AxisType axisType)
    {
        if (AxisType.UP == axisType)
        {
            return transform.up;
        }
        else if (AxisType.DOWN == axisType)
        {
            return -transform.up;
        }
        else if (AxisType.LEFT == axisType)
        {
            return -transform.right;
        }
        else if (AxisType.RIGHT == axisType)
        {
            return transform.right;
        }
        else if (AxisType.FORWARD == axisType)
        {
            return transform.forward;
        }

        return -transform.forward;
    }
开发者ID:SBStudio,项目名称:MagicCube,代码行数:25,代码来源:AxisUtil.cs

示例3: FindGizmoTranslationPlane

        public Plane FindGizmoTranslationPlane(Ray pickRay, AxisType translationAxis)
        {
            Vector3 vPos = Selected.DerivedPosition;
            Vector3 vCamBack = ActiveViewport.CameraEditor.Camera.DerivedDirection;
            vCamBack = -vCamBack;

            if (translationAxis == AxisType.None)
                return new Plane(vCamBack, vPos);

            Quaternion qOrient = Selected.DerivedOrientation;
            Plane planeX = new Plane(qOrient.XAxis, vPos);
            Plane planeY = new Plane(qOrient.YAxis, vPos);
            Plane planeZ = new Plane(qOrient.ZAxis, vPos);

            float vX = planeX.ProjectVector(pickRay.Direction).Length;
            float vY = planeY.ProjectVector(pickRay.Direction).Length;
            float vZ = planeZ.ProjectVector(pickRay.Direction).Length;

            if ((int)(translationAxis & AxisType.X) != 0)
                vX = 10000.0f;
            if ((int)(translationAxis & AxisType.Y) != 0)
                vY = 10000.0f;
            if ((int)(translationAxis & AxisType.Z) != 0)
                vZ = 10000.0f;

            if (vX < vY && vX < vZ)
                return planeX;
            else
            {
                if (vY < vX && vY < vZ)
                    return planeY;
                else
                    return planeZ;
            }
        }
开发者ID:andyhebear,项目名称:likeleon,代码行数:35,代码来源:MogitorsRoot.Gizmo.cs

示例4: SetAxis

    public void SetAxis(AxisType axis, float val)
    {
        if( axisValues == null )
            axisValues = new float[System.Enum.GetValues(typeof(AxisType)).Length];

        axisValues[(int)axis] = val;
    }
开发者ID:bzgeb,项目名称:unity-input,代码行数:7,代码来源:InputState.cs

示例5: GetAxis

    public float GetAxis(AxisType axis)
    {
        if( axisValues == null )
            axisValues = new float[System.Enum.GetValues(typeof(AxisType)).Length];

        return axisValues[(int)axis];
    }
开发者ID:bzgeb,项目名称:unity-input,代码行数:7,代码来源:InputState.cs

示例6: GetAxis

    protected float GetAxis(string axisName, AxisType type = AxisType.Normal)
    {
        float value = 0f;

        value = type == AxisType.Normal ? Input.GetAxis(axisName) : Input.GetAxisRaw(axisName);

        return value;
    }
开发者ID:GR-2015,项目名称:Heasmodex,代码行数:8,代码来源:BaseInputSource.cs

示例7: DirectXControllerAxis

        public DirectXControllerAxis(DirectXControllerInterface controllerInterface, AxisType type, int axisNumber, JoystickState initialState)
        {
            _axisType = type;
            _axisNumber = axisNumber;

            _value = new HeliosValue(controllerInterface, new BindingValue(GetValue(initialState)), "", Name, "Current value for " + Name + ".", "(0 - 65536)", BindingValueUnits.Numeric);
            _triggers.Add(_value);
        }
开发者ID:Heliflyer,项目名称:helios,代码行数:8,代码来源:DirectXControllerAxis.cs

示例8: Axis

 // constructor
 internal Axis(AxisType axistype, AstNode input) {
     _axistype = axistype;
     _input = input;
     _prefix = String.Empty;
     _name = String.Empty;
     _nodetype =  XPathNodeType.All;
     this.abbrAxis = true;
 }
开发者ID:cornelius90,项目名称:InnovatorAdmin,代码行数:9,代码来源:axis.cs

示例9: Axis

 // constructor
 public Axis(AxisType axisType, AstNode input, string prefix, string name, XPathNodeType nodetype) {
     Debug.Assert(prefix != null);
     Debug.Assert(name   != null);
     this.axisType = axisType;
     this.input    = input;
     this.prefix   = prefix;
     this.name     = name;
     this.nodeType = nodetype;
 }
开发者ID:uQr,项目名称:referencesource,代码行数:10,代码来源:Axis.cs

示例10: Axis

 public Axis(AxisType axisType, AstNode input, string prefix, string name, XPathNodeType nodetype)
 {
     this.urn = string.Empty;
     this.axisType = axisType;
     this.input = input;
     this.prefix = prefix;
     this.name = name;
     this.nodeType = nodetype;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:Axis.cs

示例11: Axis

 // constructor
 public Axis(AxisType axisType, AstNode input, string prefix, string name, XPathNodeType nodetype)
 {
     Debug.Assert(prefix != null);
     Debug.Assert(name != null);
     _axisType = axisType;
     _input = input;
     _prefix = prefix;
     _name = name;
     _nodeType = nodetype;
 }
开发者ID:noahfalk,项目名称:corefx,代码行数:11,代码来源:Axis.cs

示例12: GetAxis

    public bool windowsOnly = false; //use this for OS-specific config

    #endregion Fields

    #region Methods

    public string GetAxis(AxisType axisType)
    {
        foreach(AxisMapping mapping in axisMappings)
        {
            if( mapping.target == axisType )
                return mapping.axis;
        }

        return "";
    }
开发者ID:bzgeb,项目名称:unity-input,代码行数:16,代码来源:InputDeviceConfig.cs

示例13: InputAxisMap

        /// <summary>
        /// Creates a new InputAxisMap
        /// </summary>
        /// <param name="MouseButton">
        /// The key that will trigger this action
        /// </param>
        public InputAxisMap(AxisType triggerType, object trigger, AxisType? secondTriggerType = null, object secondTrigger = null)
        {
            TriggerType = triggerType;
            Trigger = trigger; ;

            if (secondTrigger != null)
            {
                SecondTriggerType = secondTriggerType.Value;
                SecondTrigger = secondTrigger;
            } else
                SecondTriggerType = AxisType.None;
        }
开发者ID:kourbou,项目名称:Pixel,代码行数:18,代码来源:InputAxisMap.cs

示例14: Axis

 public Axis(GraphPane pane)
 {
     mPane = pane;
     mMaximum = 0;
     mMinimum = 0;
     mScale = 1.0f;
     mTitle = new AxisTitle();
     mLabels = new AxisLabels();
     mMajorMark = new AxisMark(15.0f);
     mMinorMark = new AxisMark(6.0f);
     mAxisType = AxisType.Linear;
     mPen = SystemPens.ControlText;
 }
开发者ID:eprimo,项目名称:Linc-Reporting-Service,代码行数:13,代码来源:Axis.cs

示例15: GetRollAxis

    public static void GetRollAxis(Transform transform,
	                               Vector3 right,
	                               Vector3 forward,
	                               out AxisType rightAxis,
	                               out AxisType upAxis,
	                               out AxisType forwardAxis)
    {
        Vector3 r = default(Vector3), u = default(Vector3), f = default(Vector3);
        List<Vector3> axisList = new List<Vector3>()
        {
            transform.right,
            transform.up,
            transform.forward
        };

        for (int i = axisList.Count; --i >= 0;)
        {
            if (default(Vector3) == r)
            {
                r = axisList[i];

                continue;
            }

            float project1 = Vector3.Project(right, r).magnitude;
            float project2 = Vector3.Project(right, axisList[i]).magnitude;
            r = project1 > project2 ? r : axisList[i];
        }
        axisList.Remove(r);

        for (int i = axisList.Count; --i >= 0;)
        {
            if (default(Vector3) == f)
            {
                f = axisList[i];

                continue;
            }

            float project1 = Vector3.Project(forward, f).magnitude;
            float project2 = Vector3.Project(forward, axisList[i]).magnitude;
            f = project1 > project2 ? f : axisList[i];
        }
        axisList.Remove(f);

        u = axisList[0];

        rightAxis = Direction2Axis(transform, r);
        upAxis = Direction2Axis(transform, u);
        forwardAxis = Direction2Axis(transform, f);
    }
开发者ID:SBStudio,项目名称:MagicCube,代码行数:51,代码来源:AxisUtil.cs


注:本文中的AxisType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。