From: <edi...@us...> - 2003-08-05 23:52:21
|
Update of /cvsroot/jrman/drafts/src/org/jrman/parser/keywords In directory sc8-pr-cvs1:/tmp/cvs-serv26512/src/org/jrman/parser/keywords Modified Files: KeywordHyperboloid.java Log Message: trying to fix bounding volumne in Hyperboloid. Index: KeywordHyperboloid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordHyperboloid.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** KeywordHyperboloid.java 25 Jul 2003 13:56:50 -0000 1.5 --- KeywordHyperboloid.java 5 Aug 2003 23:52:18 -0000 1.6 *************** *** 26,65 **** public class KeywordHyperboloid extends MoveableObjectKeywordParser { ! public void parse(Tokenizer st) throws Exception { ! boolean array = false; ! int token = st.nextToken(); ! // Check por array ! if (token == TK_LBRACE) ! array = true; ! else ! st.pushBack(); ! // Expect x1 ! match(st, TK_NUMBER); ! float x1 = (float) st.nval; ! // Expect y1 ! match(st, TK_NUMBER); ! float y1 = (float) st.nval; ! // Expect z1 ! match(st, TK_NUMBER); ! float z1 = (float) st.nval; ! // Expect x2 ! match(st, TK_NUMBER); ! float x2 = (float) st.nval; ! // Expect y2 ! match(st, TK_NUMBER); ! float y2 = (float) st.nval; ! // Expect z2 ! match(st, TK_NUMBER); ! float z2 = (float) st.nval; ! // Expect theta max ! match(st, TK_NUMBER); ! float thetaMax = (float) st.nval; ! if (array) ! match(st, TK_RBRACE); ! // Expect parameter list ! Map parameters = parseParameterList(st); ! parser.addHyperboloid(x1,y1,z1,x2,y2,z2,thetaMax,parameters); ! } } --- 26,65 ---- public class KeywordHyperboloid extends MoveableObjectKeywordParser { ! public void parse(Tokenizer st) throws Exception { ! boolean array = false; ! int token = st.nextToken(); ! // Check por array ! if (token == TK_LBRACE) ! array = true; ! else ! st.pushBack(); ! // Expect x1 ! match(st, TK_NUMBER); ! float x1 = (float) st.nval; ! // Expect y1 ! match(st, TK_NUMBER); ! float y1 = (float) st.nval; ! // Expect z1 ! match(st, TK_NUMBER); ! float z1 = (float) st.nval; ! // Expect x2 ! match(st, TK_NUMBER); ! float x2 = (float) st.nval; ! // Expect y2 ! match(st, TK_NUMBER); ! float y2 = (float) st.nval; ! // Expect z2 ! match(st, TK_NUMBER); ! float z2 = (float) st.nval; ! // Expect theta max ! match(st, TK_NUMBER); ! float thetaMax = (float) st.nval; ! if (array) ! match(st, TK_RBRACE); ! // Expect parameter list ! Map parameters = parseParameterList(st); ! parser.addHyperboloid(x1, y1, z1, x2, y2, z2, thetaMax, parameters); ! } } |