001: /*
002: * Copyright (c) 2000-2001 Silvere Martin-Michiellot All Rights Reserved.
003: *
004: * Silvere Martin-Michiellot grants you ("Licensee") a non-exclusive,
005: * royalty free, license to use, but not to modify or redistribute this
006: * software in source and binary code form,
007: * provided that i) this copyright notice and license appear on all copies of
008: * the software; and ii) Licensee does not utilize the software in a manner
009: * which is disparaging to Silvere Martin-Michiellot.
010: *
011: * This software is provided "AS IS," without a warranty of any kind. ALL
012: * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
013: * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
014: * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. Silvere Martin-Michiellot
015: * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
016: * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
017: * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
018: * Silvere Martin-Michiellot OR ITS LICENSORS BE LIABLE
019: * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
020: * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
021: * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
022: * OR INABILITY TO USE SOFTWARE, EVEN IF Silvere Martin-Michiellot HAS BEEN
023: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
024: *
025: * This software is not designed or intended for use in on-line control of
026: * aircraft, air traffic, aircraft navigation or aircraft communications; or in
027: * the design, construction, operation or maintenance of any nuclear
028: * facility. Licensee represents and warrants that it will not use or
029: * redistribute the Software for such purposes.
030: *
031: * @Author: Silvere Martin-Michiellot for Digital Biosphere
032: * @Version: 1.1 (to stay in touch with h-anim)
033: *
034: */
035:
036: package com.db.hanim;
037:
038: import java.util.*;
039: import javax.vecmath.*;
040: import javax.media.j3d.*;
041:
042: /**
043: * This class is to implement the H-Anim proposed Segment. It's implementation for Java3D has been mimicked on the VRML97 field description.
044: *
045: * @author Silvere Martin-Michiellot
046: * @version 1.1
047: */
048:
049: public class Segment extends Object {
050:
051: public static final int sacrum = 0;
052: public static final int pelvis = 1;
053: public static final int l_thigh = 2;
054: public static final int l_calf = 3;
055: public static final int l_hindfoot = 4;
056: public static final int l_midproximal = 5;
057: public static final int l_middistal = 6;
058: public static final int l_forefoot = 7;
059: public static final int r_thigh = 8;
060: public static final int r_calf = 9;
061: public static final int r_hindfoot = 10;
062: public static final int r_midproximal = 11;
063: public static final int r_middistal = 12;
064: public static final int r_forefoot = 13;
065: public static final int l5 = 14;
066: public static final int l4 = 15;
067: public static final int l3 = 16;
068: public static final int l2 = 17;
069: public static final int l1 = 18;
070: public static final int t12 = 19;
071: public static final int t11 = 20;
072: public static final int t10 = 21;
073: public static final int t9 = 22;
074: public static final int t8 = 23;
075: public static final int t7 = 24;
076: public static final int t6 = 25;
077: public static final int t5 = 26;
078: public static final int t4 = 27;
079: public static final int t3 = 28;
080: public static final int t2 = 29;
081: public static final int t1 = 30;
082: public static final int c7 = 31;
083: public static final int c6 = 32;
084: public static final int c5 = 33;
085: public static final int c4 = 34;
086: public static final int c3 = 35;
087: public static final int c2 = 36;
088: public static final int c1 = 37;
089: public static final int skull = 38;
090: public static final int l_eyelid = 39;
091: public static final int r_eyelid = 40;
092: public static final int l_eyeball = 41;
093: public static final int r_eyeball = 42;
094: public static final int l_eyebrow = 43;
095: public static final int r_eyebrow = 44;
096: public static final int jaw = 45;
097: public static final int l_clavicle = 46;
098: public static final int l_scapula = 47;
099: public static final int l_upperarm = 48;
100: public static final int l_forearm = 49;
101: public static final int l_hand = 50;
102: public static final int l_thumb_metacarpal = 51;
103: public static final int l_thumb_proximal = 52;
104: public static final int l_thumb_distal = 53;
105: public static final int l_index_metacarpal = 54;
106: public static final int l_index_proximal = 55;
107: public static final int l_index_middle = 56;
108: public static final int l_index_distal = 57;
109: public static final int l_middle_metacarpal = 58;
110: public static final int l_middle_proximal = 59;
111: public static final int l_middle_middle = 60;
112: public static final int l_middle_distal = 61;
113: public static final int l_ring_metacarpal = 62;
114: public static final int l_ring_proximal = 63;
115: public static final int l_ring_middle = 64;
116: public static final int l_ring_distal = 65;
117: public static final int l_pinky_metacarpal = 66;
118: public static final int l_pinky_proximal = 67;
119: public static final int l_pinky_middle = 68;
120: public static final int l_pinky_distal = 69;
121: public static final int r_clavicle = 70;
122: public static final int r_scapula = 71;
123: public static final int r_upperarm = 72;
124: public static final int r_forearm = 73;
125: public static final int r_hand = 74;
126: public static final int r_thumb_metacarpal = 75;
127: public static final int r_thumb_proximal = 76;
128: public static final int r_thumb_distal = 77;
129: public static final int r_index_metacarpal = 78;
130: public static final int r_index_proximal = 79;
131: public static final int r_index_middle = 80;
132: public static final int r_index_distal = 81;
133: public static final int r_middle_metacarpal = 82;
134: public static final int r_middle_proximal = 83;
135: public static final int r_middle_middle = 84;
136: public static final int r_middle_distal = 85;
137: public static final int r_ring_metacarpal = 86;
138: public static final int r_ring_proximal = 87;
139: public static final int r_ring_middle = 88;
140: public static final int r_ring_distal = 89;
141: public static final int r_pinky_metacarpal = 90;
142: public static final int r_pinky_proximal = 91;
143: public static final int r_pinky_middle = 92;
144: public static final int r_pinky_distal = 93;
145: public static final int NonStandard = 94;
146:
147: protected String segmentName;
148: protected Joint joint;
149: protected HashSet sites;
150: protected HashSet displacers;
151: protected Node node;
152: //coord are obtained by getting the geometries from shape3D (subclass of Node) and manipulating them
153: protected Point3d centerOfMass;
154: protected Double mass;
155: //Double is better than Float :-)
156: protected Matrix3d momentsOfInertia;
157: protected BoundingBox boundingBox;
158:
159: /**
160: * @deprecated since 1.0, use Node.getBounds()
161: */
162:
163: /**
164: * Constructs a new Segment
165: * @param segmentName the name of the Segment that describes in a human readable manner the Segment
166: */
167:
168: public Segment(String segmentName) {
169:
170: super ();
171: this .setName(segmentName);
172: sites = new HashSet();
173: displacers = new HashSet();
174: //node is abstract and cannot be instanciated
175: //(only subclasses can)
176: //node = new Node();
177: centerOfMass = new Point3d(0, 0, 0);
178: mass = new Double(0);
179: momentsOfInertia = new Matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0);
180: //h-anim proposed:
181: //bboxCenter = new Vector3d(0, 0, 0);
182: //bboxSize = new Vector3d(-1, -1, -1);
183: //this is meaningless in Java3D but we can set up a no volume boundinxBox
184:
185: }
186:
187: /**
188: * Constructs a new Segment. Prefered constructor.
189: * @param segmentName the name of the Segment that describes in a human readable manner the Segment
190: * @param joint the Joint to which this segment is attached
191: */
192:
193: public Segment(String segmentName, Joint joint) {
194:
195: this (segmentName);
196: this .setJoint(joint);
197:
198: }
199:
200: /**
201: * Gets the Segment name that describes in a human readable manner the Segment
202: * @return the String name of this Segment
203: */
204: public String getName() {
205:
206: return this .segmentName;
207:
208: }
209:
210: /**
211: * Sets the Segment name that describes in a human readable manner the Segment
212: * @param segmentName the name of this Segment
213: */
214: public void setName(String segmentName) {
215:
216: this .segmentName = segmentName;
217:
218: }
219:
220: /**
221: * Gets the Joint that is attached to this segment if any
222: * @return the Joint this Segment is attached to
223: */
224: public Joint getJoint() {
225:
226: return this .joint;
227:
228: }
229:
230: /**
231: * Sets the Joint that is attached to this segment if any
232: * @param joint the Joint this Segment is attached to
233: */
234: public void setJoint(Joint joint) {
235:
236: this .joint = joint;
237:
238: }
239:
240: //following transformations kept for better compatibility with H-Anim spec.
241:
242: /**
243: * Adds a child to this Segment.
244: * @param site the Site to be added to the hierarchy as a child of this Segment
245: * @see com.db.hanim.Segment#addSite(Site)
246: */
247: public void addChild(Site site) {
248:
249: this .addSite(site);
250:
251: }
252:
253: /**
254: * Removes a child from this Segment.
255: * @param site the Site to be removed from the children list of this Segment
256: * @see com.db.hanim.Segment#removeSite(site)
257: */
258: public void removeChild(Site site) {
259:
260: this .removeSite(site);
261:
262: }
263:
264: //end of transformations kept for h-anim
265:
266: /**
267: * Gets the Node that is used for this Segment
268: * @return the Java3D Node in which to put the geometry for this Segment
269: */
270: public Node getNode() {
271: //java3D class Node is the closest class to the all-purpose children defined by h-anim
272:
273: return this .node;
274:
275: }
276:
277: /**
278: * Sets the Node that is used for this Segment.
279: * capability bits for Node should be set up by user before this method.
280: * @param the Java3D Node in which to put the geometry for this Segment
281: */
282: public void setNode(Node node) {
283: //java3D class Node is the closest class to the all-purpose children defined by h-anim
284: //capability bits for Node should be set up by user before userSegment.setNode(userNode);
285:
286: this .node = node;
287:
288: }
289:
290: /**
291: * Retrieves all Sites children of this Segment
292: * @return the HashSet of all direct Sites children of this Segment
293: */
294: public HashSet getSites() {
295:
296: return this .sites;
297:
298: }
299:
300: /**
301: * Adds site to the children list of this Segment. Identical to addChild()
302: * @param site the Site to be added from the children list of this Segment.
303: */
304: public void addSite(Site site) {
305:
306: sites.add(site);
307:
308: }
309:
310: /**
311: * Removes the Site from the children list of this Segment. Identical to removeChild()
312: * @param site the Site to be removed from the children list of this Segment.
313: */
314: public void removeSite(Site site) {
315:
316: sites.remove(site);
317:
318: }
319:
320: /**
321: * Retrieves all Displacers children of this Segment
322: * @return the HashSet of all direct Displacers children of this Segment
323: */
324: public HashSet getDisplacers() {
325:
326: return this .displacers;
327:
328: }
329:
330: /**
331: * Adds site to the children list of this Segment.
332: * @param displacer the Displacer to be added from the children list of this Segment.
333: */
334: public void addDisplacer(Displacer displacer) {
335:
336: displacers.add(displacer);
337:
338: }
339:
340: /**
341: * Removes the Displacer from the children list of this Segment.
342: * @param displacer the Displacer to be removed from the children list of this Segment.
343: */
344: public void removeDisplacer(Displacer displacer) {
345:
346: displacers.remove(displacer);
347:
348: }
349:
350: /**
351: * Gets the Point3d used as CenterOfMass
352: * @return the Point3d defining the CenterOfMass for this Segment
353: */
354: public Point3d getCenterOfMass() {
355:
356: return this .centerOfMass;
357:
358: }
359:
360: /**
361: * Sets the Point3d used as CenterOfMass
362: * @param centerOfMass the Point3d defining the CenterOfMass for this Segment
363: */
364: public void setCenterOfMass(Point3d centerOfMass) {
365:
366: this .centerOfMass = centerOfMass;
367:
368: }
369:
370: /**
371: * Gets the Double used as Mass
372: * @return the Double defining the Mass for this Segment
373: */
374: public Double getMass() {
375:
376: return this .mass;
377:
378: }
379:
380: /**
381: * Sets the Double used as Mass
382: * @param mass the Double defining the Mass for this Segment
383: */
384: public void setMass(Double mass) {
385:
386: this .mass = mass;
387:
388: }
389:
390: /**
391: * Gets the Matrix3d used as MomentsOfInertia
392: * @return the Matrix3d defining the MomentsOfInertia for this Segment
393: */
394: public Matrix3d getMomentsOfInertia() {
395:
396: return this .momentsOfInertia;
397:
398: }
399:
400: /**
401: * Sets the Double used as Mass
402: * @param mass the Double defining the Mass for this Segment
403: */
404: public void setMomentsOfInertia(Matrix3d momentsOfInertia) {
405:
406: this .momentsOfInertia = momentsOfInertia;
407:
408: }
409:
410: /**
411: * Gets the static identifier for the String name passed as argument. If no Segment is found matching the argument then the identifier Segment.NonStandard is returned
412: * @param String the name of the Segment to get the identifier from
413: * @return the static identifier for the Segment named segmentName
414: * @see com.db.hanim.Segment#getSegmentIdentifierName(int)
415: */
416: public static int getSegmentIdentifierNumber(String segmentName) {
417:
418: if (segmentName.equals("sacrum")) {
419: return Segment.sacrum;
420: } else if (segmentName.equals("pelvis")) {
421: return Segment.pelvis;
422: } else if (segmentName.equals("l_thigh")) {
423: return Segment.l_thigh;
424: } else if (segmentName.equals("l_calf")) {
425: return Segment.l_calf;
426: } else if (segmentName.equals("l_hindfoot")) {
427: return Segment.l_hindfoot;
428: } else if (segmentName.equals("l_midproximal")) {
429: return Segment.l_midproximal;
430: } else if (segmentName.equals("l_middistal")) {
431: return Segment.l_middistal;
432: } else if (segmentName.equals("l_forefoot")) {
433: return Segment.l_forefoot;
434: } else if (segmentName.equals("r_thigh")) {
435: return Segment.r_thigh;
436: } else if (segmentName.equals("r_calf")) {
437: return Segment.r_calf;
438: } else if (segmentName.equals("r_hindfoot")) {
439: return Segment.r_hindfoot;
440: } else if (segmentName.equals("r_midproximal")) {
441: return Segment.r_midproximal;
442: } else if (segmentName.equals("r_middistal")) {
443: return Segment.r_middistal;
444: } else if (segmentName.equals("r_forefoot")) {
445: return Segment.r_forefoot;
446: } else if (segmentName.equals("l5")) {
447: return Segment.l5;
448: } else if (segmentName.equals("l4")) {
449: return Segment.l4;
450: } else if (segmentName.equals("l3")) {
451: return Segment.l3;
452: } else if (segmentName.equals("l2")) {
453: return Segment.l2;
454: } else if (segmentName.equals("l1")) {
455: return Segment.l1;
456: } else if (segmentName.equals("t12")) {
457: return Segment.t12;
458: } else if (segmentName.equals("t11")) {
459: return Segment.t11;
460: } else if (segmentName.equals("t10")) {
461: return Segment.t10;
462: } else if (segmentName.equals("t9")) {
463: return Segment.t9;
464: } else if (segmentName.equals("t8")) {
465: return Segment.t8;
466: } else if (segmentName.equals("t7")) {
467: return Segment.t7;
468: } else if (segmentName.equals("t6")) {
469: return Segment.t6;
470: } else if (segmentName.equals("t5")) {
471: return Segment.t5;
472: } else if (segmentName.equals("t4")) {
473: return Segment.t4;
474: } else if (segmentName.equals("t3")) {
475: return Segment.t3;
476: } else if (segmentName.equals("t2")) {
477: return Segment.t2;
478: } else if (segmentName.equals("t1")) {
479: return Segment.t1;
480: } else if (segmentName.equals("c7")) {
481: return Segment.c7;
482: } else if (segmentName.equals("c6")) {
483: return Segment.c6;
484: } else if (segmentName.equals("c5")) {
485: return Segment.c5;
486: } else if (segmentName.equals("c4")) {
487: return Segment.c4;
488: } else if (segmentName.equals("c3")) {
489: return Segment.c3;
490: } else if (segmentName.equals("c2")) {
491: return Segment.c2;
492: } else if (segmentName.equals("c1")) {
493: return Segment.c1;
494: } else if (segmentName.equals("skull")) {
495: return Segment.skull;
496: } else if (segmentName.equals("l_eyelid")) {
497: return Segment.l_eyelid;
498: } else if (segmentName.equals("r_eyelid")) {
499: return Segment.r_eyelid;
500: } else if (segmentName.equals("l_eyeball")) {
501: return Segment.l_eyeball;
502: } else if (segmentName.equals("r_eyeball")) {
503: return Segment.r_eyeball;
504: } else if (segmentName.equals("l_eyebrow")) {
505: return Segment.l_eyebrow;
506: } else if (segmentName.equals("r_eyebrow")) {
507: return Segment.r_eyebrow;
508: } else if (segmentName.equals("jaw")) {
509: return Segment.jaw;
510: } else if (segmentName.equals("l_clavicle")) {
511: return Segment.l_clavicle;
512: } else if (segmentName.equals("l_scapula")) {
513: return Segment.l_scapula;
514: } else if (segmentName.equals("l_upperarm")) {
515: return Segment.l_upperarm;
516: } else if (segmentName.equals("l_forearm")) {
517: return Segment.l_forearm;
518: } else if (segmentName.equals("l_hand")) {
519: return Segment.l_hand;
520: } else if (segmentName.equals("l_thumb_metacarpal")) {
521: return Segment.l_thumb_metacarpal;
522: } else if (segmentName.equals("l_thumb_proximal")) {
523: return Segment.l_thumb_proximal;
524: } else if (segmentName.equals("l_thumb_distal")) {
525: return Segment.l_thumb_distal;
526: } else if (segmentName.equals("l_index_metacarpal")) {
527: return Segment.l_index_metacarpal;
528: } else if (segmentName.equals("l_index_proximal")) {
529: return Segment.l_index_proximal;
530: } else if (segmentName.equals("l_index_middle")) {
531: return Segment.l_index_middle;
532: } else if (segmentName.equals("l_index_distal")) {
533: return Segment.l_index_distal;
534: } else if (segmentName.equals("l_middle_metacarpal")) {
535: return Segment.l_middle_metacarpal;
536: } else if (segmentName.equals("l_middle_proximal")) {
537: return Segment.l_middle_proximal;
538: } else if (segmentName.equals("l_middle_middle")) {
539: return Segment.l_middle_middle;
540: } else if (segmentName.equals("l_middle_distal")) {
541: return Segment.l_middle_distal;
542: } else if (segmentName.equals("l_ring_metacarpal")) {
543: return Segment.l_ring_metacarpal;
544: } else if (segmentName.equals("l_ring_proximal")) {
545: return Segment.l_ring_proximal;
546: } else if (segmentName.equals("l_ring_middle")) {
547: return Segment.l_ring_middle;
548: } else if (segmentName.equals("l_ring_distal")) {
549: return Segment.l_ring_distal;
550: } else if (segmentName.equals("l_pinky_metacarpal")) {
551: return Segment.l_pinky_metacarpal;
552: } else if (segmentName.equals("l_pinky_proximal")) {
553: return Segment.l_pinky_proximal;
554: } else if (segmentName.equals("l_pinky_middle")) {
555: return Segment.l_pinky_middle;
556: } else if (segmentName.equals("l_pinky_distal")) {
557: return Segment.l_pinky_distal;
558: } else if (segmentName.equals("r_clavicle")) {
559: return Segment.r_clavicle;
560: } else if (segmentName.equals("r_scapula")) {
561: return Segment.r_scapula;
562: } else if (segmentName.equals("r_upperarm")) {
563: return Segment.r_upperarm;
564: } else if (segmentName.equals("r_forearm")) {
565: return Segment.r_forearm;
566: } else if (segmentName.equals("r_hand")) {
567: return Segment.r_hand;
568: } else if (segmentName.equals("r_thumb_metacarpal")) {
569: return Segment.r_thumb_metacarpal;
570: } else if (segmentName.equals("r_thumb_proximal")) {
571: return Segment.r_thumb_proximal;
572: } else if (segmentName.equals("r_thumb_distal")) {
573: return Segment.r_thumb_distal;
574: } else if (segmentName.equals("r_index_metacarpal")) {
575: return Segment.r_index_metacarpal;
576: } else if (segmentName.equals("r_index_proximal")) {
577: return Segment.r_index_proximal;
578: } else if (segmentName.equals("r_index_middle")) {
579: return Segment.r_index_middle;
580: } else if (segmentName.equals("r_index_distal")) {
581: return Segment.r_index_distal;
582: } else if (segmentName.equals("r_middle_metacarpal")) {
583: return Segment.r_middle_metacarpal;
584: } else if (segmentName.equals("r_middle_proximal")) {
585: return Segment.r_middle_proximal;
586: } else if (segmentName.equals("r_middle_middle")) {
587: return Segment.r_middle_middle;
588: } else if (segmentName.equals("r_middle_distal")) {
589: return Segment.r_middle_distal;
590: } else if (segmentName.equals("r_ring_metacarpal")) {
591: return Segment.r_ring_metacarpal;
592: } else if (segmentName.equals("r_ring_proximal")) {
593: return Segment.r_ring_proximal;
594: } else if (segmentName.equals("r_ring_middle")) {
595: return Segment.r_ring_middle;
596: } else if (segmentName.equals("r_ring_distal")) {
597: return Segment.r_ring_distal;
598: } else if (segmentName.equals("r_pinky_metacarpal")) {
599: return Segment.r_pinky_metacarpal;
600: } else if (segmentName.equals("r_pinky_proximal")) {
601: return Segment.r_pinky_proximal;
602: } else if (segmentName.equals("r_pinky_middle")) {
603: return Segment.r_pinky_middle;
604: } else if (segmentName.equals("r_pinky_distal")) {
605: return Segment.r_pinky_distal;
606: } else
607: return Segment.NonStandard;
608:
609: }
610:
611: /**
612: * Gets the official Segment name for the static identifier passed as argument. If no Segment is found matching the argument then a new empty String is returned.
613: * @param the static identifier for the Segment
614: * @return String the name of the Segment to get the identifier from
615: * @see com.db.hanim.Segment#getSegmentIdentifierNumber(String)
616: */
617: public static String getSegmentIdentifierName(int value) {
618:
619: switch (value) {
620: case Segment.sacrum:
621: return new String("sacrum");
622: case Segment.pelvis:
623: return new String("pelvis");
624: case Segment.l_thigh:
625: return new String("l_thigh");
626: case Segment.l_calf:
627: return new String("l_calf");
628: case Segment.l_hindfoot:
629: return new String("l_hindfoot");
630: case Segment.l_midproximal:
631: return new String("l_midproximal");
632: case Segment.l_middistal:
633: return new String("l_middistal");
634: case Segment.l_forefoot:
635: return new String("l_forefoot");
636: case Segment.r_thigh:
637: return new String("r_thigh");
638: case Segment.r_calf:
639: return new String("r_calf");
640: case Segment.r_hindfoot:
641: return new String("r_hindfoot");
642: case Segment.r_midproximal:
643: return new String("r_midproximal");
644: case Segment.r_middistal:
645: return new String("r_middistal");
646: case Segment.r_forefoot:
647: return new String("r_forefoot");
648: case Segment.l5:
649: return new String("l5");
650: case Segment.l4:
651: return new String("l4");
652: case Segment.l3:
653: return new String("l3");
654: case Segment.l2:
655: return new String("l2");
656: case Segment.l1:
657: return new String("l1");
658: case Segment.t12:
659: return new String("t12");
660: case Segment.t11:
661: return new String("t11");
662: case Segment.t10:
663: return new String("t10");
664: case Segment.t9:
665: return new String("t9");
666: case Segment.t8:
667: return new String("t8");
668: case Segment.t7:
669: return new String("t7");
670: case Segment.t6:
671: return new String("t6");
672: case Segment.t5:
673: return new String("t5");
674: case Segment.t4:
675: return new String("t4");
676: case Segment.t3:
677: return new String("t3");
678: case Segment.t2:
679: return new String("t2");
680: case Segment.t1:
681: return new String("t1");
682: case Segment.c7:
683: return new String("c7");
684: case Segment.c6:
685: return new String("c6");
686: case Segment.c5:
687: return new String("c5");
688: case Segment.c4:
689: return new String("c4");
690: case Segment.c3:
691: return new String("c3");
692: case Segment.c2:
693: return new String("c2");
694: case Segment.c1:
695: return new String("c1");
696: case Segment.skull:
697: return new String("skull");
698: case Segment.l_eyelid:
699: return new String("l_eyelid");
700: case Segment.r_eyelid:
701: return new String("r_eyelid");
702: case Segment.l_eyeball:
703: return new String("l_eyeball");
704: case Segment.r_eyeball:
705: return new String("r_eyeball");
706: case Segment.l_eyebrow:
707: return new String("l_eyebrow");
708: case Segment.r_eyebrow:
709: return new String("r_eyebrow");
710: case Segment.jaw:
711: return new String("jaw");
712: case Segment.l_clavicle:
713: return new String("l_clavicle");
714: case Segment.l_scapula:
715: return new String("l_scapula");
716: case Segment.l_upperarm:
717: return new String("l_upperarm");
718: case Segment.l_forearm:
719: return new String("l_forearm");
720: case Segment.l_hand:
721: return new String("l_hand");
722: case Segment.l_thumb_metacarpal:
723: return new String("l_thumb_metacarpal");
724: case Segment.l_thumb_proximal:
725: return new String("l_thumb_proximal");
726: case Segment.l_thumb_distal:
727: return new String("l_thumb_distal");
728: case Segment.l_index_metacarpal:
729: return new String("l_index_metacarpal");
730: case Segment.l_index_proximal:
731: return new String("l_index_proximal");
732: case Segment.l_index_middle:
733: return new String("l_index_middle");
734: case Segment.l_index_distal:
735: return new String("l_index_distal");
736: case Segment.l_middle_metacarpal:
737: return new String("l_middle_metacarpal");
738: case Segment.l_middle_proximal:
739: return new String("l_middle_proximal");
740: case Segment.l_middle_middle:
741: return new String("l_middle_middle");
742: case Segment.l_middle_distal:
743: return new String("l_middle_distal");
744: case Segment.l_ring_metacarpal:
745: return new String("l_ring_metacarpal");
746: case Segment.l_ring_proximal:
747: return new String("l_ring_proximal");
748: case Segment.l_ring_middle:
749: return new String("l_ring_middle");
750: case Segment.l_ring_distal:
751: return new String("l_ring_distal");
752: case Segment.l_pinky_metacarpal:
753: return new String("l_pinky_metacarpal");
754: case Segment.l_pinky_proximal:
755: return new String("l_pinky_proximal");
756: case Segment.l_pinky_middle:
757: return new String("l_pinky_middle");
758: case Segment.l_pinky_distal:
759: return new String("l_pinky_distal");
760: case Segment.r_clavicle:
761: return new String("r_clavicle");
762: case Segment.r_scapula:
763: return new String("r_scapula");
764: case Segment.r_upperarm:
765: return new String("r_upperarm");
766: case Segment.r_forearm:
767: return new String("r_forearm");
768: case Segment.r_hand:
769: return new String("r_hand");
770: case Segment.r_thumb_metacarpal:
771: return new String("r_thumb_metacarpal");
772: case Segment.r_thumb_proximal:
773: return new String("r_thumb_proximal");
774: case Segment.r_thumb_distal:
775: return new String("r_thumb_distal");
776: case Segment.r_index_metacarpal:
777: return new String("r_index_metacarpal");
778: case Segment.r_index_proximal:
779: return new String("r_index_proximal");
780: case Segment.r_index_middle:
781: return new String("r_index_middle");
782: case Segment.r_index_distal:
783: return new String("r_index_distal");
784: case Segment.r_middle_metacarpal:
785: return new String("r_middle_metacarpal");
786: case Segment.r_middle_proximal:
787: return new String("r_middle_proximal");
788: case Segment.r_middle_middle:
789: return new String("r_middle_middle");
790: case Segment.r_middle_distal:
791: return new String("r_middle_distal");
792: case Segment.r_ring_metacarpal:
793: return new String("r_ring_metacarpal");
794: case Segment.r_ring_proximal:
795: return new String("r_ring_proximal");
796: case Segment.r_ring_middle:
797: return new String("r_ring_middle");
798: case Segment.r_ring_distal:
799: return new String("r_ring_distal");
800: case Segment.r_pinky_metacarpal:
801: return new String("r_pinky_metacarpal");
802: case Segment.r_pinky_proximal:
803: return new String("r_pinky_proximal");
804: case Segment.r_pinky_middle:
805: return new String("r_pinky_middle");
806: case Segment.r_pinky_distal:
807: return new String("r_pinky_distal");
808: default:
809: return new String("");
810: }
811:
812: }
813:
814: }
|