/Users/lyon/j4p/src/j3d/cr325/BulletBehavior.java

1    package j3d.cr325; 
2     
3    import javax.media.j3d.BoundingSphere; 
4    import javax.media.j3d.Alpha; 
5    import javax.media.j3d.PositionInterpolator; 
6    import javax.vecmath.Point3d; 
7     
8    /** 
9     * DocJava, Inc. 
10    * http://www.docjava.com 
11    * Programmer: dlyon 
12    * Date: Apr 6, 2004 
13    * Time: 3:49:26 PM 
14    */ 
15   public class BulletBehavior { 
16          private final BoundingSphere bsBounds 
17            = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0); 
18        private final Alpha bulletAlpha = new Alpha(1, 0, 0, 500, 0, 0); 
19    
20        public Alpha getAlpha() { 
21            return bulletAlpha; 
22        } 
23    
24        /** 
25         * Used to move the bullet. 
26         */ 
27        private PositionInterpolator bulletInterpolator = null; 
28    
29        public PositionInterpolator getBulletInterpolator() { 
30            return bulletInterpolator; 
31        } 
32    
33        public void setBulletInterpolator(PositionInterpolator bulletInterpolator) { 
34            this.bulletInterpolator = bulletInterpolator; 
35            bulletInterpolator.setSchedulingBounds(bsBounds); 
36        } 
37    } 
38