本文整理了Java中javafx.scene.Node.setRotate()
方法的一些代码示例,展示了Node.setRotate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.setRotate()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:setRotate
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
Node child = children.get(i);
child.autosize();
child.setRotate(rotate % 180 == 0 ? rotate : -rotate);
代码示例来源:origin: stackoverflow.com
private void matrixRotateNode(Node n, double alf, double bet, double gam){
double A11=Math.cos(alf)*Math.cos(gam);
double A12=Math.cos(bet)*Math.sin(alf)+Math.cos(alf)*Math.sin(bet)*Math.sin(gam);
double A13=Math.sin(alf)*Math.sin(bet)-Math.cos(alf)*Math.cos(bet)*Math.sin(gam);
double A21=-Math.cos(gam)*Math.sin(alf);
double A22=Math.cos(alf)*Math.cos(bet)-Math.sin(alf)*Math.sin(bet)*Math.sin(gam);
double A23=Math.cos(alf)*Math.sin(bet)+Math.cos(bet)*Math.sin(alf)*Math.sin(gam);
double A31=Math.sin(gam);
double A32=-Math.cos(gam)*Math.sin(bet);
double A33=Math.cos(bet)*Math.cos(gam);
double d = Math.acos((A11+A22+A33-1d)/2d);
if(d!=0d){
double den=2d*Math.sin(d);
Point3D p= new Point3D((A32-A23)/den,(A13-A31)/den,(A21-A12)/den);
n.setRotationAxis(p);
n.setRotate(Math.toDegrees(d));
}
}
代码示例来源:origin: org.jfxtras/jfxtras-common
/**
*
* @param progress
* @param animationLayoutInfo
*/
@Implements(interfaces=CircularPane.AnimationInterpolation.class)
static public void animateFromTheOriginWithFadeRotate(double progress, AnimationLayoutInfo animationLayoutInfo) {
// do the calculation
CircularPane.animateFromTheOrigin(progress, animationLayoutInfo);
// add a fade
animationLayoutInfo.node.setOpacity(progress);
animationLayoutInfo.node.setRotate(2 * 360 * progress);
}
代码示例来源:origin: com.jfoenix/jfoenix
Node child = children.get(i);
child.autosize();
child.setRotate(rotate % 180 == 0 ? rotate : -rotate);
内容来源于网络,如有侵权,请联系作者删除!