2 * triplet-value range limitation
4 * License : The MIT License
5 * Copyright(c) 2010 MikuToga Partners
8 package jp.sourceforge.mikutoga.pmd;
13 public class TripletRange {
25 public TripletRange(){
32 * 下限値が上限値より大きければ入れ替える。
36 public void setXRange(float xFrom, float xTo){
49 * 下限値が上限値より大きければ入れ替える。
53 public void setYRange(float yFrom, float yTo){
66 * 下限値が上限値より大きければ入れ替える。
70 public void setZRange(float zFrom, float zTo){
85 public float getXFrom(){
93 public float getXTo(){
101 public float getYFrom(){
109 public float getYTo(){
117 public float getZFrom(){
125 public float getZTo(){
132 * @return 制約を満たすならtrue
134 public boolean isValidX(float xVal){
135 if(this.xFrom <= xVal && xVal <= this.xTo) return true;
142 * @return 制約を満たすならtrue
144 public boolean isValidY(float yVal){
145 if(this.yFrom <= yVal && yVal <= this.yTo) return true;
152 * @return 制約を満たすならtrue
154 public boolean isValidZ(float zVal){
155 if(this.zFrom <= zVal && zVal <= this.zTo) return true;
160 public String toString(){
161 StringBuilder result = new StringBuilder();
179 return result.toString();