4 * License : The MIT License
\r
5 * Copyright(c) 2010 MikuToga Partners
\r
8 package jp.sourceforge.mikutoga.pmd;
\r
10 import jp.sourceforge.mikutoga.corelib.I18nText;
\r
15 public class JointInfo {
\r
17 private final I18nText jointName = new I18nText();
\r
19 private RigidInfo rigidA;
\r
20 private RigidInfo rigidB;
\r
22 private final Pos3d position = new Pos3d();
\r
23 private final Rad3d rotation = new Rad3d();
\r
25 private final Pos3d elaPosition = new Pos3d();
\r
26 private final Deg3d elaRotation = new Deg3d();
\r
28 private final TripletRange posRange = new TripletRange();
\r
29 private final TripletRange rotRange = new TripletRange();
\r
43 public I18nText getJointName(){
\r
44 return this.jointName;
\r
51 public RigidInfo getRigidA(){
\r
59 public RigidInfo getRigidB(){
\r
65 * @param rigidA 連結剛体A
\r
66 * @param rigidB 連結剛体B
\r
68 public void setRigidPair(RigidInfo rigidA, RigidInfo rigidB){
\r
69 this.rigidA = rigidA;
\r
70 this.rigidB = rigidB;
\r
78 public Pos3d getPosition(){
\r
79 return this.position;
\r
86 public Rad3d getRotation(){
\r
87 return this.rotation;
\r
92 * @return ジョイントのバネ位置
\r
94 public Pos3d getElasticPosition(){
\r
95 return this.elaPosition;
\r
100 * @return ジョイントのバネ姿勢
\r
102 public Deg3d getElasticRotation(){
\r
103 return this.elaRotation;
\r
108 * @return ジョイントの位置制約
\r
110 public TripletRange getPositionRange(){
\r
111 return this.posRange;
\r
116 * @return ジョイントの姿勢制約
\r
118 public TripletRange getRotationRange(){
\r
119 return this.rotRange;
\r
124 * @return {@inheritDoc}
\r
127 public String toString(){
\r
128 StringBuilder result = new StringBuilder();
\r
130 result.append("Joint ");
\r
131 result.append(this.jointName);
\r
133 .append(this.rigidA.getRigidName())
\r
135 .append(this.rigidB.getRigidName())
\r
137 result.append(this.position).append(' ');
\r
138 result.append(this.rotation).append(' ');
\r
140 result.append("poslim{").append(this.posRange).append("} ");
\r
141 result.append("rotlim{").append(this.rotRange).append("} ");
\r
143 result.append("ela:").append(this.elaPosition).append(' ');
\r
144 result.append("ela:").append(this.elaRotation);
\r
146 return result.toString();
\r