View Javadoc

1   /* -------------------------------------------------------------------
2    * Java source file for the class Stimulus
3    * 
4    * Copyright (c), 2003, Masahiro Takatsuka.
5    * All Rights Researved.
6    * 
7    * Original Author: Masahiro Takatsuka (masa@jbeans.net)
8    * $Author: takatsukam $
9    * 
10   * $Date: 2004/03/03 11:53:07 $
11   * 
12   * $Id: Stimulus.java,v 1.3 2004/03/03 11:53:07 takatsukam Exp $
13   * 
14   * Reference:		Document no:
15   * ___				___
16   * 
17   * To Do:
18   * ___
19   * 
20  ------------------------------------------------------------------- */
21  
22  /* --------------------------- Package ---------------------------- */
23  package net.jbeans.j3d.util.manipulator;
24  
25  /* ------------------ Import classes (packages) ------------------- *//package-summary/html">class="comment"> ------------------ Import classes (packages) ------------------- *//package-summary.html">class="comment">/* ------------------ Import classes (packages) ------------------- *//package-summary.html">class="comment"> ------------------ Import classes (packages) ------------------- */
26  import javax.media.j3d.*;
27  
28  /*====================================================================
29                     Implementation of class Stimulus                   
30  ====================================================================*/
31  /***
32   * generally describe Stimulus in here
33   * 
34   * @version $Revision: 1.3 $
35   * @author Masahiro Takatsuka (masa@jbeans.net)
36   */
37  
38  public class Stimulus {
39  	int x;
40  	int y;
41      int x_last;
42      int y_last;
43  	int x_center;
44  	int y_center;
45  	TransformGroup topTG;
46  	
47  	public Stimulus() {
48  		this.x = 0;
49  		this.y = 0;
50  		this.x_last = 0;
51  		this.y_last = 0;
52  		this.x_center = 0;
53  		this.y_center = 0;
54  		this.topTG = null;
55  	}
56  
57  	public void reset() {
58  		this.x = 0;
59  		this.y = 0;
60  		this.x_last = 0;
61  		this.y_last = 0;
62  		this.x_center = 0;
63  		this.y_center = 0;
64  		this.topTG = null;
65  	}
66  	
67  	public void setTopTransformGroup(TransformGroup tg) {
68  		this.topTG = tg;
69  	}
70  
71  	public TransformGroup getTopTransformGroup() {
72  		return this.topTG;
73  	}
74  	
75  	public int getX() {
76  		return this.x;
77  	}
78  
79  	public int getY() {
80  		return this.y;
81  	}
82  
83  	public void setX(int x) {
84  		this.x = x;
85  	}
86  
87  	public void setY(int y) {
88  		this.y = y;
89  	}
90  
91  	public int getLastX() {
92  		return this.x_last;
93  	}
94  
95  	public int getLastY() {
96  		return this.y_last;
97  	}
98  
99  	public void setLastX(int x) {
100 		this.x_last = x;
101 	}
102 
103 	public void setLastY(int y) {
104 		this.y_last = y;
105 	}
106 
107 	public int getCenterX() {
108 		return this.x_center;
109 	}
110 
111 	public int getCenterY() {
112 		return this.y_center;
113 	}
114 
115 	public void setCenterX(int x) {
116 		this.x_center = x;
117 	}
118 
119 	public void setCenterY(int y) {
120 		this.y_center = y;
121 	}
122 }