4 * License : The MIT License
5 * Copyright(c) 2011 MikuToga Partners
8 package jp.sfjp.mikutoga.math;
18 public strictfp class EulerYXZ {
38 * @param xRot X軸回転量。(ラジアン)
39 * @param yRot Y軸回転量。(ラジアン)
40 * @param zRot Z軸回転量。(ラジアン)
42 public EulerYXZ(double xRot, double yRot, double zRot){
53 * @return X軸回転量を返す。(ラジアン)
55 public double getXRot(){
62 * @return Y軸回転量を返す。(ラジアン)
64 public double getYRot(){
71 * @return Z軸回転量を返す。(ラジアン)
73 public double getZRot(){
80 * @param xRotArg X軸回転量。(ラジアン)
82 public void setXRot(double xRotArg){
90 * @param yRotArg Y軸回転量。(ラジアン)
92 public void setYRot(double yRotArg){
100 * @param zRotArg Z軸回転量。(ラジアン)
102 public void setZRot(double zRotArg){
110 * @param xRotArg X軸回転量。(ラジアン)
111 * @param yRotArg Y軸回転量。(ラジアン)
112 * @param zRotArg Z軸回転量。(ラジアン)
114 public void setRot(double xRotArg, double yRotArg, double zRotArg){
129 private static String toString(double x, double y, double z){
130 StringBuilder result = new StringBuilder();
132 result.append("x=") .append(x);
133 result.append(" y=").append(y);
134 result.append(" z=").append(z);
136 return result.toString();
141 * @return {@inheritDoc}
144 public String toString(){
146 result = toString(this.xRot, this.yRot, this.zRot);
154 public String toDegString(){
155 double xDeg = StrictMath.toDegrees(this.xRot);
156 double yDeg = StrictMath.toDegrees(this.yRot);
157 double zDeg = StrictMath.toDegrees(this.zRot);
160 result = toString(xDeg, yDeg, zDeg);