本文整理汇总了C#中FluidKit.Controls.Motion类的典型用法代码示例。如果您正苦于以下问题:C# Motion类的具体用法?C# Motion怎么用?C# Motion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Motion类属于FluidKit.Controls命名空间,在下文中一共展示了Motion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBeforeMotion
protected override Motion GetBeforeMotion(int deltaIndex)
{
double aspect = Owner.ElementWidth / Owner.ElementHeight;
double ItemWidth = aspect;
double ItemHeight = 1;
int row = -1;
int column = -1;
int slot = Math.Abs(deltaIndex);
if (slot <= 2)
{
row = 0;
column = 2 - slot;
}
else
{
row = -1 - ((slot - 3) / Columns);
column = (slot - 3) % Columns;
}
Motion m = new Motion();
m.Angle = 0;
m.Axis = new Vector3D(1, 0, 0);
m.X = (column - 2) * (ItemWidth + Owner.ItemGap);
m.Y = -1 * row * (ItemHeight + Owner.ItemGap);
return m;
}
示例2: GetSelectionMotion
protected override Motion GetSelectionMotion(int index)
{
var m = new Motion {
Angle = 0,
Axis = new Vector3D(0, 1, 0),
X = 0, Z = Owner.PopoutDistance
};
return m;
}
示例3: GetAfterMotion
protected override Motion GetAfterMotion(int deltaIndex)
{
Motion m = new Motion();
m.X = Owner.ItemGap * deltaIndex;
m.Z = -1 * Owner.ItemGap * deltaIndex;
return m;
}
示例4: GetSelectionMotion
protected override Motion GetSelectionMotion()
{
Motion m = new Motion();
m.Axis = new Vector3D(0, 1, 0);
m.Z = Owner.PopoutDistance;
return m;
}
示例5: GetPreviousMotion
protected override Motion GetPreviousMotion(int index)
{
Motion m = new Motion();
m.X = -1*Owner.FrontItemGap;
m.Z = -1*Owner.ItemGap*(Owner.SelectedIndex - index);
return m;
}
示例6: GetAfterMotion
protected override Motion GetAfterMotion(int deltaIndex)
{
Motion m = new Motion();
m.X = -1 * Owner.FrontItemGap;
m.Z = -1 * Owner.ItemGap * deltaIndex + Owner.PopoutDistance * 2 / 3;
return m;
}
示例7: GetBeforeMotion
protected override Motion GetBeforeMotion(int deltaIndex)
{
Motion m = new Motion();
m.X = -1 * Owner.FrontItemGap;
m.Z = Owner.ItemGap * deltaIndex;
return m;
}
示例8: GetSelectionMotion
protected override Motion GetSelectionMotion()
{
Motion m = new Motion();
m.X = -1 * (Owner.ItemGap + Owner.PopoutDistance);
m.Y = Owner.ItemGap;
return m;
}
示例9: GetNextMotion
protected override Motion GetNextMotion(int index)
{
Motion m = new Motion();
m.X = -1*Owner.FrontItemGap;
m.Z = Owner.ItemGap*(index - Owner.SelectedIndex);
return m;
}
示例10: GetSelectionMotion
protected override Motion GetSelectionMotion(int index)
{
Motion m = new Motion();
m.Angle = 0;
m.Y = 0;
m.Z = Owner.PopoutDistance;
return m;
}
示例11: GetPreviousMotion
protected override Motion GetPreviousMotion(int index)
{
Motion m = new Motion();
m.Angle = Owner.TiltAngle;
m.Axis = new Vector3D(1, 0, 0);
m.Y = -1*Owner.ItemGap*(Owner.SelectedIndex - index) - Owner.FrontItemGap;
return m;
}
示例12: GetAfterMotion
protected override Motion GetAfterMotion(int deltaIndex)
{
Motion m = new Motion();
m.Angle = -1 * Owner.TiltAngle;
m.Axis = new Vector3D(0, 1, 0);
m.X = Owner.ItemGap * deltaIndex + Owner.FrontItemGap;
return m;
}
示例13: GetBeforeMotion
protected override Motion GetBeforeMotion(int deltaIndex)
{
Motion m = new Motion();
m.Angle = Owner.TiltAngle;
m.Axis = new Vector3D(1, 0, 0);
m.Y = Owner.ItemGap * deltaIndex - Owner.FrontItemGap;
return m;
}
示例14: GetNextMotion
protected override Motion GetNextMotion(int index)
{
Motion m = new Motion();
m.Angle = -1*Owner.TiltAngle;
m.Axis = new Vector3D(0, 1, 0);
m.X = Owner.ItemGap*(index - Owner.SelectedIndex) + Owner.FrontItemGap;
return m;
}
示例15: GetPreviousMotion
protected override Motion GetPreviousMotion(int index)
{
Motion m = new Motion();
m.Axis = new Vector3D(0, 1, 0);
m.X = -1*(Owner.FrontItemGap + Owner.ItemGap*(Owner.SelectedIndex - index));
m.Z = -1*Owner.ItemGap*(Owner.SelectedIndex - index);
return m;
}