-/*\r
- * joint information\r
- *\r
- * License : The MIT License\r
- * Copyright(c) 2010 MikuToga Partners\r
- */\r
-\r
-package jp.sourceforge.mikutoga.pmd;\r
-\r
-import jp.sourceforge.mikutoga.corelib.I18nText;\r
-\r
-/**\r
- * 剛体間ジョイント情報。\r
- */\r
-public class JointInfo {\r
-\r
- private final I18nText jointName = new I18nText();\r
-\r
- private RigidInfo rigidA;\r
- private RigidInfo rigidB;\r
-\r
- private final Pos3d position = new Pos3d();\r
- private final Rad3d rotation = new Rad3d();\r
-\r
- private final Pos3d elaPosition = new Pos3d();\r
- private final Deg3d elaRotation = new Deg3d();\r
-\r
- private final TripletRange posRange = new TripletRange();\r
- private final TripletRange rotRange = new TripletRange();\r
-\r
- /**\r
- * コンストラクタ。\r
- */\r
- public JointInfo(){\r
- super();\r
- return;\r
- }\r
-\r
- /**\r
- * ジョイント名を返す。\r
- * @return ジョイント名\r
- */\r
- public I18nText getJointName(){\r
- return this.jointName;\r
- }\r
-\r
- /**\r
- * 連結剛体Aを返す。\r
- * @return 連結剛体A\r
- */\r
- public RigidInfo getRigidA(){\r
- return this.rigidA;\r
- }\r
-\r
- /**\r
- * 連結剛体Bを返す。\r
- * @return 連結剛体B\r
- */\r
- public RigidInfo getRigidB(){\r
- return this.rigidB;\r
- }\r
-\r
- /**\r
- * 連結する剛体を設定する。\r
- * @param rigidA 連結剛体A\r
- * @param rigidB 連結剛体B\r
- */\r
- public void setRigidPair(RigidInfo rigidA, RigidInfo rigidB){\r
- this.rigidA = rigidA;\r
- this.rigidB = rigidB;\r
- return;\r
- }\r
-\r
- /**\r
- * ジョイントの位置を返す。\r
- * @return ジョイントの位置\r
- */\r
- public Pos3d getPosition(){\r
- return this.position;\r
- }\r
-\r
- /**\r
- * ジョイントの姿勢を返す。\r
- * @return ジョイントの姿勢\r
- */\r
- public Rad3d getRotation(){\r
- return this.rotation;\r
- }\r
-\r
- /**\r
- * ジョイントのバネ位置を返す。\r
- * @return ジョイントのバネ位置\r
- */\r
- public Pos3d getElasticPosition(){\r
- return this.elaPosition;\r
- }\r
-\r
- /**\r
- * ジョイントのバネ姿勢を返す。\r
- * @return ジョイントのバネ姿勢\r
- */\r
- public Deg3d getElasticRotation(){\r
- return this.elaRotation;\r
- }\r
-\r
- /**\r
- * ジョイントの位置制約を返す。\r
- * @return ジョイントの位置制約\r
- */\r
- public TripletRange getPositionRange(){\r
- return this.posRange;\r
- }\r
-\r
- /**\r
- * ジョイントの姿勢制約を返す。\r
- * @return ジョイントの姿勢制約\r
- */\r
- public TripletRange getRotationRange(){\r
- return this.rotRange;\r
- }\r
-\r
- /**\r
- * {@inheritDoc}\r
- * @return {@inheritDoc}\r
- */\r
- @Override\r
- public String toString(){\r
- StringBuilder result = new StringBuilder();\r
-\r
- result.append("Joint ");\r
- result.append(this.jointName);\r
- result.append("[")\r
- .append(this.rigidA.getRigidName())\r
- .append("<=>")\r
- .append(this.rigidB.getRigidName())\r
- .append("] ");\r
- result.append(this.position).append(' ');\r
- result.append(this.rotation).append(' ');\r
-\r
- result.append("poslim{").append(this.posRange).append("} ");\r
- result.append("rotlim{").append(this.rotRange).append("} ");\r
-\r
- result.append("ela:").append(this.elaPosition).append(' ');\r
- result.append("ela:").append(this.elaRotation);\r
-\r
- return result.toString();\r
- }\r
-\r
-}\r
+/*
+ * joint information
+ *
+ * License : The MIT License
+ * Copyright(c) 2010 MikuToga Partners
+ */
+
+package jp.sourceforge.mikutoga.pmd;
+
+import jp.sourceforge.mikutoga.corelib.I18nText;
+
+/**
+ * 剛体間ジョイント情報。
+ */
+public class JointInfo {
+
+ private final I18nText jointName = new I18nText();
+
+ private RigidInfo rigidA;
+ private RigidInfo rigidB;
+
+ private final Pos3d position = new Pos3d();
+ private final Rad3d rotation = new Rad3d();
+
+ private final Pos3d elaPosition = new Pos3d();
+ private final Deg3d elaRotation = new Deg3d();
+
+ private final TripletRange posRange = new TripletRange();
+ private final TripletRange rotRange = new TripletRange();
+
+ /**
+ * コンストラクタ。
+ */
+ public JointInfo(){
+ super();
+ return;
+ }
+
+ /**
+ * ジョイント名を返す。
+ * @return ジョイント名
+ */
+ public I18nText getJointName(){
+ return this.jointName;
+ }
+
+ /**
+ * 連結剛体Aを返す。
+ * @return 連結剛体A
+ */
+ public RigidInfo getRigidA(){
+ return this.rigidA;
+ }
+
+ /**
+ * 連結剛体Bを返す。
+ * @return 連結剛体B
+ */
+ public RigidInfo getRigidB(){
+ return this.rigidB;
+ }
+
+ /**
+ * 連結する剛体を設定する。
+ * @param rigidA 連結剛体A
+ * @param rigidB 連結剛体B
+ */
+ public void setRigidPair(RigidInfo rigidA, RigidInfo rigidB){
+ this.rigidA = rigidA;
+ this.rigidB = rigidB;
+ return;
+ }
+
+ /**
+ * ジョイントの位置を返す。
+ * @return ジョイントの位置
+ */
+ public Pos3d getPosition(){
+ return this.position;
+ }
+
+ /**
+ * ジョイントの姿勢を返す。
+ * @return ジョイントの姿勢
+ */
+ public Rad3d getRotation(){
+ return this.rotation;
+ }
+
+ /**
+ * ジョイントのバネ位置を返す。
+ * @return ジョイントのバネ位置
+ */
+ public Pos3d getElasticPosition(){
+ return this.elaPosition;
+ }
+
+ /**
+ * ジョイントのバネ姿勢を返す。
+ * @return ジョイントのバネ姿勢
+ */
+ public Deg3d getElasticRotation(){
+ return this.elaRotation;
+ }
+
+ /**
+ * ジョイントの位置制約を返す。
+ * @return ジョイントの位置制約
+ */
+ public TripletRange getPositionRange(){
+ return this.posRange;
+ }
+
+ /**
+ * ジョイントの姿勢制約を返す。
+ * @return ジョイントの姿勢制約
+ */
+ public TripletRange getRotationRange(){
+ return this.rotRange;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @return {@inheritDoc}
+ */
+ @Override
+ public String toString(){
+ StringBuilder result = new StringBuilder();
+
+ result.append("Joint ");
+ result.append(this.jointName);
+ result.append("[")
+ .append(this.rigidA.getRigidName())
+ .append("<=>")
+ .append(this.rigidB.getRigidName())
+ .append("] ");
+ result.append(this.position).append(' ');
+ result.append(this.rotation).append(' ');
+
+ result.append("poslim{").append(this.posRange).append("} ");
+ result.append("rotlim{").append(this.rotRange).append("} ");
+
+ result.append("ela:").append(this.elaPosition).append(' ');
+ result.append("ela:").append(this.elaRotation);
+
+ return result.toString();
+ }
+
+}