javafx.scene.Node.setRotate()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中javafx.scene.Node.setRotate()方法的一些代码示例,展示了Node.setRotate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.setRotate()方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:setRotate

Node.setRotate介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

  1. Node child = children.get(i);
  2. child.autosize();
  3. child.setRotate(rotate % 180 == 0 ? rotate : -rotate);

代码示例来源:origin: stackoverflow.com

  1. private void matrixRotateNode(Node n, double alf, double bet, double gam){
  2. double A11=Math.cos(alf)*Math.cos(gam);
  3. double A12=Math.cos(bet)*Math.sin(alf)+Math.cos(alf)*Math.sin(bet)*Math.sin(gam);
  4. double A13=Math.sin(alf)*Math.sin(bet)-Math.cos(alf)*Math.cos(bet)*Math.sin(gam);
  5. double A21=-Math.cos(gam)*Math.sin(alf);
  6. double A22=Math.cos(alf)*Math.cos(bet)-Math.sin(alf)*Math.sin(bet)*Math.sin(gam);
  7. double A23=Math.cos(alf)*Math.sin(bet)+Math.cos(bet)*Math.sin(alf)*Math.sin(gam);
  8. double A31=Math.sin(gam);
  9. double A32=-Math.cos(gam)*Math.sin(bet);
  10. double A33=Math.cos(bet)*Math.cos(gam);
  11. double d = Math.acos((A11+A22+A33-1d)/2d);
  12. if(d!=0d){
  13. double den=2d*Math.sin(d);
  14. Point3D p= new Point3D((A32-A23)/den,(A13-A31)/den,(A21-A12)/den);
  15. n.setRotationAxis(p);
  16. n.setRotate(Math.toDegrees(d));
  17. }
  18. }

代码示例来源:origin: org.jfxtras/jfxtras-common

  1. /**
  2. *
  3. * @param progress
  4. * @param animationLayoutInfo
  5. */
  6. @Implements(interfaces=CircularPane.AnimationInterpolation.class)
  7. static public void animateFromTheOriginWithFadeRotate(double progress, AnimationLayoutInfo animationLayoutInfo) {
  8. // do the calculation
  9. CircularPane.animateFromTheOrigin(progress, animationLayoutInfo);
  10. // add a fade
  11. animationLayoutInfo.node.setOpacity(progress);
  12. animationLayoutInfo.node.setRotate(2 * 360 * progress);
  13. }

代码示例来源:origin: com.jfoenix/jfoenix

  1. Node child = children.get(i);
  2. child.autosize();
  3. child.setRotate(rotate % 180 == 0 ? rotate : -rotate);

相关文章

Node类方法