Source Code Cross Referenced for Site.java in  » 6.0-JDK-Modules » java-3d » com » db » hanim » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » com.db.hanim 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright (c) 2000-2001 Silvere Martin-Michiellot All Rights Reserved.
0003:         *
0004:         * Silvere Martin-Michiellot grants you ("Licensee") a non-exclusive,
0005:         * royalty free, license to use, but not to modify or redistribute this
0006:         * software in source and binary code form,
0007:         * provided that i) this copyright notice and license appear on all copies of
0008:         * the software; and ii) Licensee does not utilize the software in a manner
0009:         * which is disparaging to Silvere Martin-Michiellot.
0010:         *
0011:         * This software is provided "AS IS," without a warranty of any kind. ALL
0012:         * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
0013:         * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
0014:         * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. Silvere Martin-Michiellot
0015:         * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
0016:         * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
0017:         * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
0018:         * Silvere Martin-Michiellot OR ITS LICENSORS BE LIABLE
0019:         * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
0020:         * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
0021:         * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
0022:         * OR INABILITY TO USE SOFTWARE, EVEN IF Silvere Martin-Michiellot HAS BEEN
0023:         * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
0024:         *
0025:         * This software is not designed or intended for use in on-line control of
0026:         * aircraft, air traffic, aircraft navigation or aircraft communications; or in
0027:         * the design, construction, operation or maintenance of any nuclear
0028:         * facility. Licensee represents and warrants that it will not use or
0029:         * redistribute the Software for such purposes.
0030:         *
0031:         * @Author: Silvere Martin-Michiellot for Digital Biosphere
0032:         * @Version: 1.1 (to stay in touch with h-anim)
0033:         *
0034:         */
0035:
0036:        package com.db.hanim;
0037:
0038:        import java.util.*;
0039:        import javax.media.j3d.*;
0040:        import javax.vecmath.*;
0041:
0042:        /**
0043:         * This class is to implement the H-Anim proposed Site. It's implementation for Java3D has been mimicked on the VRML97 field description.
0044:         *
0045:         * @author Silvere Martin-Michiellot
0046:         * @version 1.1
0047:         */
0048:
0049:        public class Site extends Object {
0050:
0051:            public static final int l_middistal_tip = 0;
0052:            //probable duplication in h-anim with l_forefoot_tip
0053:            public static final int l_forefoot_tip = 1;
0054:            public static final int l_metatarsal_pha5 = 2;
0055:            public static final int l_digit2 = 3;
0056:            public static final int l_metatarsal_pha1 = 4;
0057:            public static final int l_lateral_malleolus = 5;
0058:            public static final int l_medial_malleolus = 6;
0059:            public static final int l_sphyrion = 7;
0060:            public static final int l_calcaneous_post = 8;
0061:            public static final int l_knee_crease = 9;
0062:            public static final int l_femoral_lateral_epicn = 10;
0063:            public static final int l_femoral_medial_epicn = 11;
0064:            public static final int r_middistal_tip = 12;
0065:            //probable duplication in h-anim with r_forefoot_tip
0066:            public static final int r_forefoot_tip = 13;
0067:            public static final int r_metatarsal_pha5 = 14;
0068:            public static final int r_digit2 = 15;
0069:            public static final int r_metatarsal_pha1 = 16;
0070:            public static final int r_lateral_malleolus = 17;
0071:            public static final int r_medial_malleolus = 18;
0072:            public static final int r_sphyrion = 19;
0073:            public static final int r_calcaneous_post = 20;
0074:            public static final int r_knee_crease = 21;
0075:            public static final int r_femoral_lateral_epicn = 22;
0076:            public static final int r_femoral_medial_epicn = 23;
0077:            public static final int r_iliocristale = 24;
0078:            public static final int r_trochanterion = 25;
0079:            public static final int l_iliocristale = 26;
0080:            public static final int l_trochanterion = 27;
0081:            public static final int r_asis = 28;
0082:            public static final int l_asis = 29;
0083:            public static final int r_psis = 30;
0084:            public static final int l_psis = 31;
0085:            public static final int crotch = 32;
0086:            public static final int skull_tip = 33;
0087:            public static final int sellion = 34;
0088:            public static final int r_infraorbitale = 35;
0089:            public static final int l_infraorbitale = 36;
0090:            public static final int supramenton = 37;
0091:            public static final int r_tragion = 38;
0092:            public static final int r_gonion = 39;
0093:            public static final int l_tragion = 40;
0094:            public static final int l_gonion = 41;
0095:            public static final int nuchale = 42;
0096:            public static final int l_hand_tip = 43;
0097:            //probable duplication in h-anim with l_middle_distal_tip
0098:            public static final int r_neck_base = 44;
0099:            public static final int l_neck_base = 45;
0100:            public static final int l_thumb_distal_tip = 46;
0101:            public static final int l_index_distal_tip = 47;
0102:            public static final int l_dactylion = 48;
0103:            public static final int l_middle_distal_tip = 49;
0104:            public static final int l_ring_distal_tip = 50;
0105:            public static final int l_pinky_distal_tip = 51;
0106:            public static final int l_metacarpal_pha2 = 52;
0107:            public static final int l_ulnar_styloid = 53;
0108:            public static final int l_metacarpal_pha5 = 54;
0109:            public static final int l_radial_styloid = 55;
0110:            public static final int l_olecranon = 56;
0111:            public static final int l_humeral_medial_epicn = 57;
0112:            public static final int l_radiale = 58;
0113:            public static final int l_humeral_lateral_epicn = 59;
0114:            public static final int r_hand_tip = 60;
0115:            //probable duplication in h-anim with r_middle_distal_tip
0116:            public static final int l_clavicale = 61;
0117:            public static final int l_acromion = 62;
0118:            public static final int l_axilla_ant = 63;
0119:            public static final int l_axilla_post = 64;
0120:            public static final int r_thumb_distal_tip = 65;
0121:            public static final int r_index_distal_tip = 66;
0122:            public static final int r_dactylion = 67;
0123:            public static final int r_middle_distal_tip = 68;
0124:            public static final int r_ring_distal_tip = 69;
0125:            public static final int r_pinky_distal_tip = 70;
0126:            public static final int r_metacarpal_pha2 = 71;
0127:            public static final int r_ulnar_styloid = 72;
0128:            public static final int r_metacarpal_pha5 = 73;
0129:            public static final int r_radial_styloid = 74;
0130:            public static final int r_olecranon = 75;
0131:            public static final int r_humeral_medial_epicn = 76;
0132:            public static final int r_radiale = 77;
0133:            public static final int r_humeral_lateral_epicn = 78;
0134:            public static final int r_clavicale = 79;
0135:            public static final int r_acromion = 80;
0136:            public static final int r_axilla_ant = 81;
0137:            public static final int r_axilla_post = 82;
0138:            public static final int suprasternale = 83;
0139:            public static final int cervicale = 84;
0140:            public static final int r_thelion = 85;
0141:            public static final int l_thelion = 86;
0142:            public static final int substernale = 87;
0143:            public static final int r_rib10 = 88;
0144:            public static final int l_rib10 = 89;
0145:            public static final int rib10_midspine = 90;
0146:            public static final int waist_preferred_post = 91;
0147:            public static final int navel = 92;
0148:            public static final int NonStandard = 93;
0149:
0150:            protected String siteName;
0151:            protected Node node;
0152:            protected Transform3D transform3D;
0153:            /**
0154:             * @deprecated since 1.0, use getTransform() or setTransform()
0155:             */
0156:            protected Point3d center;
0157:            /**
0158:             * @deprecated since 1.0, use Node.getBounds()
0159:             */
0160:            protected BoundingBox boundingBox;
0161:
0162:            /**
0163:             * Constructs a new Site
0164:             * @param siteName the name of the Site that describes in a human readable manner the Site
0165:             */
0166:            public Site(String siteName) {
0167:
0168:                super ();
0169:                this .setName(siteName);
0170:                //node is abstract and cannot be instanciated
0171:                //(only subclasses can)
0172:                //node = new Node();
0173:                transform3D = new Transform3D();
0174:                center = new Point3d();
0175:
0176:            }
0177:
0178:            /**
0179:             * Gets the Site name that describes in a human readable manner the Site
0180:             * @return the String name of this Site
0181:             */
0182:            public String getName() {
0183:
0184:                return this .siteName;
0185:
0186:            }
0187:
0188:            /**
0189:             * Sets the Site name that describes in a human readable manner the Site
0190:             * @param siteName the name of this Site
0191:             */
0192:            public void setName(String siteName) {
0193:
0194:                this .siteName = siteName;
0195:
0196:            }
0197:
0198:            /**
0199:             * Gets the Transform3D used for this Site.
0200:             * @param transform3D the Transform3D of this Site
0201:             */
0202:            //java3D like call (not a function)...
0203:            public void getTransform(Transform3D transform3D) {
0204:
0205:                transform3D.set(this .transform3D);
0206:
0207:            }
0208:
0209:            /**
0210:             * Sets the Transform3D used for this Site.
0211:             * @param transform3D the Transform3D of this Site
0212:             */
0213:            public void setTransform(Transform3D siteTransform) {
0214:
0215:                this .transform3D = siteTransform;
0216:
0217:            }
0218:
0219:            //following transformations kept for better compatibility with H-Anim spec.
0220:
0221:            /**
0222:             * Gets the Point3d that defines the overall center offset postion of the Site
0223:             * @param point3D the Point3D to put the center into for this Site
0224:             * @see com.db.hanim.Site#setCenter(Point3d)
0225:             * @deprecated since 1.0, use getTransform() or setTransform()
0226:             */
0227:            public void getCenter(Point3d point3d) {
0228:                //see setCenter for information about center
0229:
0230:                point3d.set(this .center);
0231:
0232:            }
0233:
0234:            /**
0235:             * Sets the offset center for the Site.
0236:             * According to VRML97 spec,
0237:             * Given a 3-dimensional point P and Transform node,
0238:             * P is transformed into point P' in its parent's coordinate system
0239:             * by a series of intermediate transformations.
0240:             * In matrix transformation notation, where C (center), SR (scaleOrientation),
0241:             * T (translation), R (rotation), and S (scale) are the equivalent transformation matrices,
0242:             * then P' = T × C × R × SR × S × -SR × -C × P
0243:             * unfortunately, Java3D doesn't defines all these fields and works "only" with 4x4 matrix
0244:             * a 4x4 matrix allows to perform translations, rotations, and scaling and shear effects.
0245:             * but no offset centering that we have to simulate
0246:             * @param point3d the Point3d to put the offset center into for this Site
0247:             * @see com.db.hanim.Site#setTransform(Transform3D)
0248:             * @deprecated since 1.0, use getTransform() or setTransform()
0249:             */
0250:            public void setCenter(Point3d point3d) {
0251:                //according to VRML97 spec,
0252:                //Given a 3-dimensional point P and Transform node,
0253:                //P is transformed into point P' in its parent's coordinate system
0254:                //by a series of intermediate transformations.
0255:                //In matrix transformation notation, where C (center), SR (scaleOrientation),
0256:                //T (translation), R (rotation), and S (scale) are the equivalent transformation matrices,
0257:                //then P' = T × C × R × SR × S × -SR × -C × P
0258:
0259:                //unfortunately, Java3D doesn't defines all these fields and works "only" with 4x4 matrix
0260:                //a 4x4 matrix allows to perform translations, rotations, and scaling and shear effects.
0261:                //but no offset centering that we have to simulate
0262:
0263:                this .center = point3d;
0264:
0265:            }
0266:
0267:            //end of transformations kept for h-anim
0268:
0269:            /**
0270:             * Gets the Node that is used for this Site
0271:             * @return the Java3D Node in which to put the geometry for this Site
0272:             */
0273:            public Node getNode() {
0274:                //java3D class Node is the closest class to the all-purpose children defined by h-anim
0275:
0276:                return this .node;
0277:
0278:            }
0279:
0280:            /**
0281:             * Sets the Node that is used for this Site.
0282:             * capability bits for Node should be set up by user before this method.
0283:             * @param the Java3D Node in which to put the geometry for this Site
0284:             */
0285:            public void setNode(Node node) {
0286:                //java3D class Node is the closest class to the all-purpose children defined by h-anim
0287:                //capability bits for Node should be set up by user before userSite.setNode(userNode);
0288:
0289:                this .node = node;
0290:
0291:            }
0292:
0293:            /**
0294:             * Sets the translation used for this Site to the default value proposed by H-Anim.
0295:             */
0296:            public void useDefaultTranslation() {
0297:
0298:                Vector3d vector3d;
0299:
0300:                vector3d = new Vector3d();
0301:                this .getDefaultTranslation(vector3d);
0302:                this .transform3D.setTranslation(vector3d);
0303:
0304:            }
0305:
0306:            /**
0307:             * Gets the Vector3d that defines the overall Translation default value proposed by H-Anim for this Site.
0308:             * @param vector3d the Vector3d to put the translation into for this Site
0309:             * @see com.db.hanim.Site#useDefaultTranslation()
0310:             */
0311:            public void getDefaultTranslation(Vector3d vector3d) {
0312:
0313:                switch (Site.getSiteIdentifierNumber(this .getName())) {
0314:                case Site.l_middistal_tip:
0315:                    vector3d.set(0.1354, 0.0016, 0.1476);
0316:                    break;
0317:                case Site.l_forefoot_tip:
0318:                    vector3d.set(0.1354, 0.0016, 0.1476);
0319:                    break;
0320:                case Site.l_metatarsal_pha5:
0321:                    vector3d.set(0.1825, 0.0070, 0.0928);
0322:                    break;
0323:                case Site.l_digit2:
0324:                    vector3d.set(0.1195, 0.0079, 0.1433);
0325:                    break;
0326:                case Site.l_metatarsal_pha1:
0327:                    vector3d.set(0.0816, 0.0232, 0.0106);
0328:                    break;
0329:                case Site.l_lateral_malleolus:
0330:                    vector3d.set(0.1308, 0.0597, -0.1032);
0331:                    break;
0332:                case Site.l_medial_malleolus:
0333:                    vector3d.set(0.0890, 0.0716, -0.0881);
0334:                    break;
0335:                case Site.l_sphyrion:
0336:                    vector3d.set(0.0890, 0.0575, -0.0943);
0337:                    break;
0338:                case Site.l_calcaneous_post:
0339:                    vector3d.set(0.0974, 0.0259, -0.1171);
0340:                    break;
0341:                case Site.l_knee_crease:
0342:                    vector3d.set(0.0993, 0.4881, -0.0309);
0343:                    break;
0344:                case Site.l_femoral_lateral_epicn:
0345:                    vector3d.set(0.1598, 0.4967, 0.0297);
0346:                    break;
0347:                case Site.l_femoral_medial_epicn:
0348:                    vector3d.set(0.0398, 0.4946, 0.0303);
0349:                    break;
0350:                case Site.r_middistal_tip:
0351:                    vector3d.set(-0.1043, -0.0227, 0.1450);
0352:                    break;
0353:                case Site.r_forefoot_tip:
0354:                    vector3d.set(-0.1043, -0.0227, 0.1450);
0355:                    break;
0356:                case Site.r_metatarsal_pha5:
0357:                    vector3d.set(-0.1523, 0.0166, 0.0895);
0358:                    break;
0359:                case Site.r_digit2:
0360:                    vector3d.set(-0.0883, 0.0134, 0.1383);
0361:                    break;
0362:                case Site.r_metatarsal_pha1:
0363:                    vector3d.set(-0.0521, 0.0260, 0.0127);
0364:                    break;
0365:                case Site.r_lateral_malleolus:
0366:                    vector3d.set(-0.1006, 0.0658, -0.1075);
0367:                    break;
0368:                case Site.r_medial_malleolus:
0369:                    vector3d.set(-0.0591, 0.0760, -0.0928);
0370:                    break;
0371:                case Site.r_sphyrion:
0372:                    vector3d.set(-0.0603, 0.0610, -0.1002);
0373:                    break;
0374:                case Site.r_calcaneous_post:
0375:                    vector3d.set(-0.0692, 0.0297, -0.1221);
0376:                    break;
0377:                case Site.r_knee_crease:
0378:                    vector3d.set(-0.0825, 0.4932, -0.0326);
0379:                    break;
0380:                case Site.r_femoral_lateral_epicn:
0381:                    vector3d.set(-0.1421, 0.4992, 0.0310);
0382:                    break;
0383:                case Site.r_femoral_medial_epicn:
0384:                    vector3d.set(-0.0221, 0.5014, 0.0289);
0385:                    break;
0386:                case Site.r_iliocristale:
0387:                    vector3d.set(-0.1525, 1.0628, 0.0035);
0388:                    break;
0389:                case Site.r_trochanterion:
0390:                    vector3d.set(-0.1689, 0.8419, 0.0352);
0391:                    break;
0392:                case Site.l_iliocristale:
0393:                    vector3d.set(0.1612, 1.0537, 0.0008);
0394:                    break;
0395:                case Site.l_trochanterion:
0396:                    vector3d.set(0.1677, 0.8336, 0.0303);
0397:                    break;
0398:                case Site.r_asis:
0399:                    vector3d.set(-0.0887, 1.0021, 0.1112);
0400:                    break;
0401:                case Site.l_asis:
0402:                    vector3d.set(0.0925, 0.9983, 0.1052);
0403:                    break;
0404:                case Site.r_psis:
0405:                    vector3d.set(-0.0716, 1.0190, -0.1138);
0406:                    break;
0407:                case Site.l_psis:
0408:                    vector3d.set(0.0774, 1.0190, -0.1151);
0409:                    break;
0410:                case Site.crotch:
0411:                    vector3d.set(0.0034, 0.8266, 0.0257);
0412:                    break;
0413:                case Site.skull_tip:
0414:                    vector3d.set(0.0050, 1.7504, 0.0055);
0415:                    break;
0416:                case Site.sellion:
0417:                    vector3d.set(0.0058, 1.6316, 0.0852);
0418:                    break;
0419:                case Site.r_infraorbitale:
0420:                    vector3d.set(-0.0237, 1.6171, 0.0752);
0421:                    break;
0422:                case Site.l_infraorbitale:
0423:                    vector3d.set(0.0341, 1.6171, 0.0752);
0424:                    break;
0425:                case Site.supramenton:
0426:                    vector3d.set(0.0061, 1.5410, 0.0805);
0427:                    break;
0428:                case Site.r_tragion:
0429:                    vector3d.set(-0.0646, 1.6347, 0.0302);
0430:                    break;
0431:                case Site.r_gonion:
0432:                    vector3d.set(-0.0520, 1.5529, 0.0347);
0433:                    break;
0434:                case Site.l_tragion:
0435:                    vector3d.set(0.0739, 1.6348, 0.0282);
0436:                    break;
0437:                case Site.l_gonion:
0438:                    vector3d.set(0.0631, 1.5530, 0.0330);
0439:                    break;
0440:                case Site.nuchale:
0441:                    vector3d.set(0.0039, 1.5972, -0.0796);
0442:                    break;
0443:                case Site.l_hand_tip:
0444:                    vector3d.set(0.2080, 0.6731, -0.0491);
0445:                    break;
0446:                case Site.r_neck_base:
0447:                    vector3d.set(-0.0419, 1.5149, -0.0220);
0448:                    break;
0449:                case Site.l_neck_base:
0450:                    vector3d.set(0.0646, 1.5141, -0.0380);
0451:                    break;
0452:                case Site.l_thumb_distal_tip:
0453:                    vector3d.set(0.1982, 0.8061, 0.0759);
0454:                    break;
0455:                case Site.l_index_distal_tip:
0456:                    vector3d.set(0.2089, 0.6858, -0.0245);
0457:                    break;
0458:                case Site.l_dactylion:
0459:                    vector3d.set(0.2056, 0.6743, -0.0482);
0460:                    break;
0461:                case Site.l_middle_distal_tip:
0462:                    vector3d.set(0.2080, 0.6731, -0.0491);
0463:                    break;
0464:                case Site.l_ring_distal_tip:
0465:                    vector3d.set(0.2035, 0.6750, -0.0756);
0466:                    break;
0467:                case Site.l_pinky_distal_tip:
0468:                    vector3d.set(0.2014, 0.7009, -0.1012);
0469:                    break;
0470:                case Site.l_metacarpal_pha2:
0471:                    vector3d.set(0.2009, 0.8139, -0.0237);
0472:                    break;
0473:                case Site.l_ulnar_styloid:
0474:                    vector3d.set(-0.2142, 0.8529, -0.0648);
0475:                    break;
0476:                case Site.l_metacarpal_pha5:
0477:                    vector3d.set(0.1929, 0.7860, -0.1122);
0478:                    break;
0479:                case Site.l_radial_styloid:
0480:                    vector3d.set(0.1901, 0.8645, -0.0415);
0481:                    break;
0482:                case Site.l_olecranon:
0483:                    vector3d.set(-0.1962, 1.1375, -0.1123);
0484:                    break;
0485:                case Site.l_humeral_medial_epicn:
0486:                    vector3d.set(0.1735, 1.1272, -0.1113);
0487:                    break;
0488:                case Site.l_radiale:
0489:                    vector3d.set(0.2182, 1.1212, -0.1167);
0490:                    break;
0491:                case Site.l_humeral_lateral_epicn:
0492:                    vector3d.set(0.2280, 1.1482, -0.1100);
0493:                    break;
0494:                case Site.r_hand_tip:
0495:                    vector3d.set(-0.1969, 0.6758, -0.0427);
0496:                    break;
0497:                case Site.l_clavicale:
0498:                    vector3d.set(0.0271, 1.4943, 0.0394);
0499:                    break;
0500:                case Site.l_acromion:
0501:                    vector3d.set(0.2032, 1.4760, -0.0490);
0502:                    break;
0503:                case Site.l_axilla_ant:
0504:                    vector3d.set(0.1777, 1.4065, -0.0075);
0505:                    break;
0506:                case Site.l_axilla_post:
0507:                    vector3d.set(0.1706, 1.4072, -0.0875);
0508:                    break;
0509:                case Site.r_thumb_distal_tip:
0510:                    vector3d.set(-0.1869, 0.8090, 0.0820);
0511:                    break;
0512:                case Site.r_index_distal_tip:
0513:                    vector3d.set(-0.1980, 0.6883, -0.0180);
0514:                    break;
0515:                case Site.r_dactylion:
0516:                    vector3d.set(-0.1941, 0.6772, -0.0423);
0517:                    break;
0518:                case Site.r_middle_distal_tip:
0519:                    vector3d.set(-0.1969, 0.6758, -0.0427);
0520:                    break;
0521:                case Site.r_ring_distal_tip:
0522:                    vector3d.set(-0.1934, 0.6778, -0.0693);
0523:                    break;
0524:                case Site.r_pinky_distal_tip:
0525:                    vector3d.set(-0.1938, 0.7035, -0.0949);
0526:                    break;
0527:                case Site.r_metacarpal_pha2:
0528:                    vector3d.set(-0.1977, 0.8169, -0.0177);
0529:                    break;
0530:                case Site.r_ulnar_styloid:
0531:                    vector3d.set(-0.2117, 0.8562, -0.0584);
0532:                    break;
0533:                case Site.r_metacarpal_pha5:
0534:                    vector3d.set(-0.1929, 0.7890, -0.1064);
0535:                    break;
0536:                case Site.r_radial_styloid:
0537:                    vector3d.set(-0.1884, 0.8676, -0.0360);
0538:                    break;
0539:                case Site.r_olecranon:
0540:                    vector3d.set(-0.1907, 1.1405, -0.1065);
0541:                    break;
0542:                case Site.r_humeral_medial_epicn:
0543:                    vector3d.set(-0.1680, 1.1298, -0.1062);
0544:                    break;
0545:                case Site.r_radiale:
0546:                    vector3d.set(-0.2130, 1.1305, -0.1091);
0547:                    break;
0548:                case Site.r_humeral_lateral_epicn:
0549:                    vector3d.set(-0.2224, 1.1517, -0.1033);
0550:                    break;
0551:                case Site.r_clavicale:
0552:                    vector3d.set(-0.0115, 1.4943, 0.0400);
0553:                    break;
0554:                case Site.r_acromion:
0555:                    vector3d.set(-0.1905, 1.4791, -0.0431);
0556:                    break;
0557:                case Site.r_axilla_ant:
0558:                    vector3d.set(-0.1626, 1.4072, -0.0031);
0559:                    break;
0560:                case Site.r_axilla_post:
0561:                    vector3d.set(-0.1603, 1.4098, -0.0826);
0562:                    break;
0563:                case Site.suprasternale:
0564:                    vector3d.set(0.0084, 1.4714, 0.0551);
0565:                    break;
0566:                case Site.cervicale:
0567:                    vector3d.set(0.0064, 1.520, -0.0815);
0568:                    break;
0569:                case Site.r_thelion:
0570:                    vector3d.set(-0.0736, 1.3385, 0.1217);
0571:                    break;
0572:                case Site.l_thelion:
0573:                    vector3d.set(0.0918, 1.3382, 0.1192);
0574:                    break;
0575:                case Site.substernale:
0576:                    vector3d.set(0.0085, 1.2995, 0.1147);
0577:                    break;
0578:                case Site.r_rib10:
0579:                    vector3d.set(-0.0711, 1.1941, 0.1016);
0580:                    break;
0581:                case Site.l_rib10:
0582:                    vector3d.set(0.0871, 1.1925, 0.0992);
0583:                    break;
0584:                case Site.rib10_midspine:
0585:                    vector3d.set(0.0871, 1.1925, 0.0992);
0586:                    break;
0587:                case Site.waist_preferred_post:
0588:                    vector3d.set(0.2900, 1.0915, -0.1091);
0589:                    break;
0590:                case Site.navel:
0591:                    vector3d.set(0.0069, 1.0966, 0.1017);
0592:                    break;
0593:                default:
0594:                    //No default value
0595:                    break;
0596:                }
0597:
0598:            }
0599:
0600:            /**
0601:             * Gets the static identifier for the String name passed as argument. If no Site is found matching the argument then the identifier Site.NonStandard is returned
0602:             * @param String the name of the Site to get the identifier from
0603:             * @return the static identifier for the Site named siteName
0604:             * @see com.db.hanim.Site#getSiteIdentifierName(int)
0605:             */
0606:            public static int getSiteIdentifierNumber(String siteName) {
0607:
0608:                if (siteName.equals("l_middistal_tip")) {
0609:                    return Site.l_middistal_tip;
0610:                } else if (siteName.equals("l_forefoot_tip")) {
0611:                    return Site.l_forefoot_tip;
0612:                } else if (siteName.equals("l_metatarsal_pha5")) {
0613:                    return Site.l_metatarsal_pha5;
0614:                } else if (siteName.equals("l_digit2")) {
0615:                    return Site.l_digit2;
0616:                } else if (siteName.equals("l_metatarsal_pha1")) {
0617:                    return Site.l_metatarsal_pha1;
0618:                } else if (siteName.equals("l_lateral_malleolus")) {
0619:                    return Site.l_lateral_malleolus;
0620:                } else if (siteName.equals("l_medial_malleolus")) {
0621:                    return Site.l_medial_malleolus;
0622:                } else if (siteName.equals("l_sphyrion")) {
0623:                    return Site.l_sphyrion;
0624:                } else if (siteName.equals("l_calcaneous_post")) {
0625:                    return Site.l_calcaneous_post;
0626:                } else if (siteName.equals("l_knee_crease")) {
0627:                    return Site.l_knee_crease;
0628:                } else if (siteName.equals("l_femoral_lateral_epicn")) {
0629:                    return Site.l_femoral_lateral_epicn;
0630:                } else if (siteName.equals("l_femoral_medial_epicn")) {
0631:                    return Site.l_femoral_medial_epicn;
0632:                } else if (siteName.equals("r_middistal_tip")) {
0633:                    return Site.r_middistal_tip;
0634:                } else if (siteName.equals("r_forefoot_tip")) {
0635:                    return Site.r_forefoot_tip;
0636:                } else if (siteName.equals("r_metatarsal_pha5")) {
0637:                    return Site.r_metatarsal_pha5;
0638:                } else if (siteName.equals("r_digit2")) {
0639:                    return Site.r_digit2;
0640:                } else if (siteName.equals("r_metatarsal_pha1")) {
0641:                    return Site.r_metatarsal_pha1;
0642:                } else if (siteName.equals("r_lateral_malleolus")) {
0643:                    return Site.r_lateral_malleolus;
0644:                } else if (siteName.equals("r_medial_malleolus")) {
0645:                    return Site.r_medial_malleolus;
0646:                } else if (siteName.equals("r_sphyrion")) {
0647:                    return Site.r_sphyrion;
0648:                } else if (siteName.equals("r_calcaneous_post")) {
0649:                    return Site.r_calcaneous_post;
0650:                } else if (siteName.equals("r_knee_crease")) {
0651:                    return Site.r_knee_crease;
0652:                } else if (siteName.equals("r_femoral_lateral_epicn")) {
0653:                    return Site.r_femoral_lateral_epicn;
0654:                } else if (siteName.equals("r_femoral_medial_epicn")) {
0655:                    return Site.r_femoral_medial_epicn;
0656:                } else if (siteName.equals("r_iliocristale")) {
0657:                    return Site.r_iliocristale;
0658:                } else if (siteName.equals("r_trochanterion")) {
0659:                    return Site.r_trochanterion;
0660:                } else if (siteName.equals("l_iliocristale")) {
0661:                    return Site.l_iliocristale;
0662:                } else if (siteName.equals("l_trochanterion")) {
0663:                    return Site.l_trochanterion;
0664:                } else if (siteName.equals("r_asis")) {
0665:                    return Site.r_asis;
0666:                } else if (siteName.equals("l_asis")) {
0667:                    return Site.l_asis;
0668:                } else if (siteName.equals("r_psis")) {
0669:                    return Site.r_psis;
0670:                } else if (siteName.equals("l_psis")) {
0671:                    return Site.l_psis;
0672:                } else if (siteName.equals("crotch")) {
0673:                    return Site.crotch;
0674:                } else if (siteName.equals("skull_tip")) {
0675:                    return Site.skull_tip;
0676:                } else if (siteName.equals("sellion")) {
0677:                    return Site.sellion;
0678:                } else if (siteName.equals("r_infraorbitale")) {
0679:                    return Site.r_infraorbitale;
0680:                } else if (siteName.equals("l_infraorbitale")) {
0681:                    return Site.l_infraorbitale;
0682:                } else if (siteName.equals("supramenton")) {
0683:                    return Site.supramenton;
0684:                } else if (siteName.equals("r_tragion")) {
0685:                    return Site.r_tragion;
0686:                } else if (siteName.equals("r_gonion")) {
0687:                    return Site.r_gonion;
0688:                } else if (siteName.equals("l_tragion")) {
0689:                    return Site.l_tragion;
0690:                } else if (siteName.equals("l_gonion")) {
0691:                    return Site.l_gonion;
0692:                } else if (siteName.equals("nuchale")) {
0693:                    return Site.nuchale;
0694:                } else if (siteName.equals("l_hand_tip")) {
0695:                    return Site.l_hand_tip;
0696:                } else if (siteName.equals("r_neck_base")) {
0697:                    return Site.r_neck_base;
0698:                } else if (siteName.equals("l_neck_base")) {
0699:                    return Site.l_neck_base;
0700:                } else if (siteName.equals("l_thumb_distal_tip")) {
0701:                    return Site.l_thumb_distal_tip;
0702:                } else if (siteName.equals("l_index_distal_tip")) {
0703:                    return Site.l_index_distal_tip;
0704:                } else if (siteName.equals("l_dactylion")) {
0705:                    return Site.l_dactylion;
0706:                } else if (siteName.equals("l_middle_distal_tip")) {
0707:                    return Site.l_middle_distal_tip;
0708:                } else if (siteName.equals("l_ring_distal_tip")) {
0709:                    return Site.l_ring_distal_tip;
0710:                } else if (siteName.equals("l_pinky_distal_tip")) {
0711:                    return Site.l_pinky_distal_tip;
0712:                } else if (siteName.equals("l_metacarpal_pha2")) {
0713:                    return Site.l_metacarpal_pha2;
0714:                } else if (siteName.equals("l_ulnar_styloid")) {
0715:                    return Site.l_ulnar_styloid;
0716:                } else if (siteName.equals("l_metacarpal_pha5")) {
0717:                    return Site.l_metacarpal_pha5;
0718:                } else if (siteName.equals("l_radial_styloid")) {
0719:                    return Site.l_radial_styloid;
0720:                } else if (siteName.equals("l_olecranon")) {
0721:                    return Site.l_olecranon;
0722:                } else if (siteName.equals("l_humeral_medial_epicn")) {
0723:                    return Site.l_humeral_medial_epicn;
0724:                } else if (siteName.equals("l_radiale")) {
0725:                    return Site.l_radiale;
0726:                } else if (siteName.equals("l_humeral_lateral_epicn")) {
0727:                    return Site.l_humeral_lateral_epicn;
0728:                } else if (siteName.equals("r_hand_tip")) {
0729:                    return Site.r_hand_tip;
0730:                } else if (siteName.equals("l_clavicale")) {
0731:                    return Site.l_clavicale;
0732:                } else if (siteName.equals("l_acromion")) {
0733:                    return Site.l_acromion;
0734:                } else if (siteName.equals("l_axilla_ant")) {
0735:                    return Site.l_axilla_ant;
0736:                } else if (siteName.equals("l_axilla_post")) {
0737:                    return Site.l_axilla_post;
0738:                } else if (siteName.equals("r_thumb_distal_tip")) {
0739:                    return Site.r_thumb_distal_tip;
0740:                } else if (siteName.equals("r_index_distal_tip")) {
0741:                    return Site.r_index_distal_tip;
0742:                } else if (siteName.equals("r_dactylion")) {
0743:                    return Site.r_dactylion;
0744:                } else if (siteName.equals("r_middle_distal_tip")) {
0745:                    return Site.r_middle_distal_tip;
0746:                } else if (siteName.equals("r_ring_distal_tip")) {
0747:                    return Site.r_ring_distal_tip;
0748:                } else if (siteName.equals("r_pinky_distal_tip")) {
0749:                    return Site.r_pinky_distal_tip;
0750:                } else if (siteName.equals("r_metacarpal_pha2")) {
0751:                    return Site.r_metacarpal_pha2;
0752:                } else if (siteName.equals("r_ulnar_styloid")) {
0753:                    return Site.r_ulnar_styloid;
0754:                } else if (siteName.equals("r_metacarpal_pha5")) {
0755:                    return Site.r_metacarpal_pha5;
0756:                } else if (siteName.equals("r_radial_styloid")) {
0757:                    return Site.r_radial_styloid;
0758:                } else if (siteName.equals("r_olecranon")) {
0759:                    return Site.r_olecranon;
0760:                } else if (siteName.equals("r_humeral_medial_epicn")) {
0761:                    return Site.r_humeral_medial_epicn;
0762:                } else if (siteName.equals("r_radiale")) {
0763:                    return Site.r_radiale;
0764:                } else if (siteName.equals("r_humeral_lateral_epicn")) {
0765:                    return Site.r_humeral_lateral_epicn;
0766:                } else if (siteName.equals("r_clavicale")) {
0767:                    return Site.r_clavicale;
0768:                } else if (siteName.equals("r_acromion")) {
0769:                    return Site.r_acromion;
0770:                } else if (siteName.equals("r_axilla_ant")) {
0771:                    return Site.r_axilla_ant;
0772:                } else if (siteName.equals("r_axilla_post")) {
0773:                    return Site.r_axilla_post;
0774:                } else if (siteName.equals("suprasternale")) {
0775:                    return Site.suprasternale;
0776:                } else if (siteName.equals("cervicale")) {
0777:                    return Site.cervicale;
0778:                } else if (siteName.equals("r_thelion")) {
0779:                    return Site.r_thelion;
0780:                } else if (siteName.equals("l_thelion")) {
0781:                    return Site.l_thelion;
0782:                } else if (siteName.equals("substernale")) {
0783:                    return Site.substernale;
0784:                } else if (siteName.equals("r_rib10")) {
0785:                    return Site.r_rib10;
0786:                } else if (siteName.equals("l_rib10")) {
0787:                    return Site.l_rib10;
0788:                } else if (siteName.equals("rib10_midspine")) {
0789:                    return Site.rib10_midspine;
0790:                } else if (siteName.equals("waist_preferred_post")) {
0791:                    return Site.waist_preferred_post;
0792:                } else if (siteName.equals("navel")) {
0793:                    return Site.navel;
0794:                } else
0795:                    return Site.NonStandard;
0796:
0797:            }
0798:
0799:            /**
0800:             * Gets the official Site name for the static identifier passed as argument. If no Site is found matching the argument then a new empty String is returned.
0801:             * @param the static identifier for the Site
0802:             * @return String the name of the Site to get the identifier from
0803:             * @see com.db.hanim.Site#getSiteIdentifierNumber(String)
0804:             */
0805:            public static String getSiteIdentifierName(int value) {
0806:
0807:                switch (value) {
0808:                case Site.l_middistal_tip:
0809:                    return new String("l_middistal_tip");
0810:                case Site.l_forefoot_tip:
0811:                    return new String("l_forefoot_tip");
0812:                case Site.l_metatarsal_pha5:
0813:                    return new String("l_metatarsal_pha5");
0814:                case Site.l_digit2:
0815:                    return new String("l_digit2");
0816:                case Site.l_metatarsal_pha1:
0817:                    return new String("l_metatarsal_pha1");
0818:                case Site.l_lateral_malleolus:
0819:                    return new String("l_lateral_malleolus");
0820:                case Site.l_medial_malleolus:
0821:                    return new String("l_medial_malleolus");
0822:                case Site.l_sphyrion:
0823:                    return new String("l_sphyrion");
0824:                case Site.l_calcaneous_post:
0825:                    return new String("l_calcaneous_post");
0826:                case Site.l_knee_crease:
0827:                    return new String("l_knee_crease");
0828:                case Site.l_femoral_lateral_epicn:
0829:                    return new String("l_femoral_lateral_epicn");
0830:                case Site.l_femoral_medial_epicn:
0831:                    return new String("l_femoral_medial_epicn");
0832:                case Site.r_middistal_tip:
0833:                    return new String("r_middistal_tip");
0834:                case Site.r_forefoot_tip:
0835:                    return new String("r_forefoot_tip");
0836:                case Site.r_metatarsal_pha5:
0837:                    return new String("r_metatarsal_pha5");
0838:                case Site.r_digit2:
0839:                    return new String("r_digit2");
0840:                case Site.r_metatarsal_pha1:
0841:                    return new String("r_metatarsal_pha1");
0842:                case Site.r_lateral_malleolus:
0843:                    return new String("r_lateral_malleolus");
0844:                case Site.r_medial_malleolus:
0845:                    return new String("r_medial_malleolus");
0846:                case Site.r_sphyrion:
0847:                    return new String("r_sphyrion");
0848:                case Site.r_calcaneous_post:
0849:                    return new String("r_calcaneous_post");
0850:                case Site.r_knee_crease:
0851:                    return new String("r_knee_crease");
0852:                case Site.r_femoral_lateral_epicn:
0853:                    return new String("r_femoral_lateral_epicn");
0854:                case Site.r_femoral_medial_epicn:
0855:                    return new String("r_femoral_medial_epicn");
0856:                case Site.r_iliocristale:
0857:                    return new String("r_iliocristale");
0858:                case Site.r_trochanterion:
0859:                    return new String("r_trochanterion");
0860:                case Site.l_iliocristale:
0861:                    return new String("l_iliocristale");
0862:                case Site.l_trochanterion:
0863:                    return new String("l_trochanterion");
0864:                case Site.r_asis:
0865:                    return new String("r_asis");
0866:                case Site.l_asis:
0867:                    return new String("l_asis");
0868:                case Site.r_psis:
0869:                    return new String("r_psis");
0870:                case Site.l_psis:
0871:                    return new String("l_psis");
0872:                case Site.crotch:
0873:                    return new String("crotch");
0874:                case Site.skull_tip:
0875:                    return new String("skull_tip");
0876:                case Site.sellion:
0877:                    return new String("sellion");
0878:                case Site.r_infraorbitale:
0879:                    return new String("r_infraorbitale");
0880:                case Site.l_infraorbitale:
0881:                    return new String("l_infraorbitale");
0882:                case Site.supramenton:
0883:                    return new String("supramenton");
0884:                case Site.r_tragion:
0885:                    return new String("r_tragion");
0886:                case Site.r_gonion:
0887:                    return new String("r_gonion");
0888:                case Site.l_tragion:
0889:                    return new String("l_tragion");
0890:                case Site.l_gonion:
0891:                    return new String("l_gonion");
0892:                case Site.nuchale:
0893:                    return new String("nuchale");
0894:                case Site.l_hand_tip:
0895:                    return new String("l_hand_tip");
0896:                case Site.r_neck_base:
0897:                    return new String("r_neck_base");
0898:                case Site.l_neck_base:
0899:                    return new String("l_neck_base");
0900:                case Site.l_thumb_distal_tip:
0901:                    return new String("l_thumb_distal_tip");
0902:                case Site.l_index_distal_tip:
0903:                    return new String("l_index_distal_tip");
0904:                case Site.l_dactylion:
0905:                    return new String("l_dactylion");
0906:                case Site.l_middle_distal_tip:
0907:                    return new String("l_middle_distal_tip");
0908:                case Site.l_ring_distal_tip:
0909:                    return new String("l_ring_distal_tip");
0910:                case Site.l_pinky_distal_tip:
0911:                    return new String("l_pinky_distal_tip");
0912:                case Site.l_metacarpal_pha2:
0913:                    return new String("l_metacarpal_pha2");
0914:                case Site.l_ulnar_styloid:
0915:                    return new String("l_ulnar_styloid");
0916:                case Site.l_metacarpal_pha5:
0917:                    return new String("l_metacarpal_pha5");
0918:                case Site.l_radial_styloid:
0919:                    return new String("l_radial_styloid");
0920:                case Site.l_olecranon:
0921:                    return new String("l_olecranon");
0922:                case Site.l_humeral_medial_epicn:
0923:                    return new String("l_humeral_medial_epicn");
0924:                case Site.l_radiale:
0925:                    return new String("l_radiale");
0926:                case Site.l_humeral_lateral_epicn:
0927:                    return new String("l_humeral_lateral_epicn");
0928:                case Site.r_hand_tip:
0929:                    return new String("r_hand_tip");
0930:                case Site.l_clavicale:
0931:                    return new String("l_clavicale");
0932:                case Site.l_acromion:
0933:                    return new String("l_acromion");
0934:                case Site.l_axilla_ant:
0935:                    return new String("l_axilla_ant");
0936:                case Site.l_axilla_post:
0937:                    return new String("l_axilla_post");
0938:                case Site.r_thumb_distal_tip:
0939:                    return new String("r_thumb_distal_tip");
0940:                case Site.r_index_distal_tip:
0941:                    return new String("r_index_distal_tip");
0942:                case Site.r_dactylion:
0943:                    return new String("r_dactylion");
0944:                case Site.r_middle_distal_tip:
0945:                    return new String("r_middle_distal_tip");
0946:                case Site.r_ring_distal_tip:
0947:                    return new String("r_ring_distal_tip");
0948:                case Site.r_pinky_distal_tip:
0949:                    return new String("r_pinky_distal_tip");
0950:                case Site.r_metacarpal_pha2:
0951:                    return new String("r_metacarpal_pha2");
0952:                case Site.r_ulnar_styloid:
0953:                    return new String("r_ulnar_styloid");
0954:                case Site.r_metacarpal_pha5:
0955:                    return new String("r_metacarpal_pha5");
0956:                case Site.r_radial_styloid:
0957:                    return new String("r_radial_styloid");
0958:                case Site.r_olecranon:
0959:                    return new String("r_olecranon");
0960:                case Site.r_humeral_medial_epicn:
0961:                    return new String("r_humeral_medial_epicn");
0962:                case Site.r_radiale:
0963:                    return new String("r_radiale");
0964:                case Site.r_humeral_lateral_epicn:
0965:                    return new String("r_humeral_lateral_epicn");
0966:                case Site.r_clavicale:
0967:                    return new String("r_clavicale");
0968:                case Site.r_acromion:
0969:                    return new String("r_acromion");
0970:                case Site.r_axilla_ant:
0971:                    return new String("r_axilla_ant");
0972:                case Site.r_axilla_post:
0973:                    return new String("r_axilla_post");
0974:                case Site.suprasternale:
0975:                    return new String("suprasternale");
0976:                case Site.cervicale:
0977:                    return new String("cervicale");
0978:                case Site.r_thelion:
0979:                    return new String("r_thelion");
0980:                case Site.l_thelion:
0981:                    return new String("l_thelion");
0982:                case Site.substernale:
0983:                    return new String("substernale");
0984:                case Site.r_rib10:
0985:                    return new String("r_rib10");
0986:                case Site.l_rib10:
0987:                    return new String("l_rib10");
0988:                case Site.rib10_midspine:
0989:                    return new String("rib10_midspine");
0990:                case Site.waist_preferred_post:
0991:                    return new String("waist_preferred_post");
0992:                case Site.navel:
0993:                    return new String("navel");
0994:                default:
0995:                    return new String("");
0996:                }
0997:
0998:            }
0999:
1000:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.