本文整理汇总了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;
}
示例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;
}
示例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;
}
}
示例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;
}
示例5: GetAxis
public float GetAxis(AxisType axis)
{
if( axisValues == null )
axisValues = new float[System.Enum.GetValues(typeof(AxisType)).Length];
return axisValues[(int)axis];
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 "";
}
示例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;
}
示例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;
}
示例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);
}