4 * License : The MIT License
5 * Copyright(c) 2010 MikuToga Partners
8 package jp.sfjp.mikutoga.pmd.model;
10 import jp.sourceforge.mikutoga.corelib.I18nText;
11 import jp.sourceforge.mikutoga.math.MkPos3D;
12 import jp.sourceforge.mikutoga.pmd.Deg3d;
13 import jp.sourceforge.mikutoga.pmd.Rad3d;
14 import jp.sourceforge.mikutoga.pmd.TripletRange;
19 public class JointInfo {
21 private final I18nText jointName = new I18nText();
23 private RigidInfo rigidA;
24 private RigidInfo rigidB;
26 private final MkPos3D position = new MkPos3D();
27 private final Rad3d rotation = new Rad3d();
29 private final MkPos3D elaPosition = new MkPos3D();
30 private final Deg3d elaRotation = new Deg3d();
32 private final TripletRange posRange = new TripletRange();
33 private final TripletRange rotRange = new TripletRange();
47 public I18nText getJointName(){
48 return this.jointName;
55 public RigidInfo getRigidA(){
63 public RigidInfo getRigidB(){
72 public void setRigidPair(RigidInfo rigidA, RigidInfo rigidB){
82 public MkPos3D getPosition(){
90 public Rad3d getRotation(){
98 public MkPos3D getElasticPosition(){
99 return this.elaPosition;
106 public Deg3d getElasticRotation(){
107 return this.elaRotation;
114 public TripletRange getPositionRange(){
115 return this.posRange;
122 public TripletRange getRotationRange(){
123 return this.rotRange;
128 * @return {@inheritDoc}
131 public String toString(){
132 StringBuilder result = new StringBuilder();
134 result.append("Joint ");
135 result.append(this.jointName);
137 .append(this.rigidA.getRigidName())
139 .append(this.rigidB.getRigidName())
141 result.append(this.position).append(' ');
142 result.append(this.rotation).append(' ');
144 result.append("poslim{").append(this.posRange).append("} ");
145 result.append("rotlim{").append(this.rotRange).append("} ");
147 result.append("ela:").append(this.elaPosition).append(' ');
148 result.append("ela:").append(this.elaRotation);
150 return result.toString();