PageRenderTime 22ms CodeModel.GetById 11ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/src/org/mt4j/input/inputProcessors/componentProcessors/rotateProcessor/RotateEvent.java

http://mt4j.googlecode.com/
Java | 163 lines | 51 code | 24 blank | 88 comment | 0 complexity | 14ad8d7fd5b5675c974dd38536631850 MD5 | raw file
  1/***********************************************************************
  2 * mt4j Copyright (c) 2008 - 2009, C.Ruff, Fraunhofer-Gesellschaft All rights reserved.
  3 *  
  4 *   This program is free software: you can redistribute it and/or modify
  5 *   it under the terms of the GNU General Public License as published by
  6 *   the Free Software Foundation, either version 3 of the License, or
  7 *   (at your option) any later version.
  8 *
  9 *   This program is distributed in the hope that it will be useful,
 10 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 11 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 12 *   GNU General Public License for more details.
 13 *
 14 *   You should have received a copy of the GNU General Public License
 15 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 16 *
 17 ***********************************************************************/
 18package org.mt4j.input.inputProcessors.componentProcessors.rotateProcessor;
 19
 20import org.mt4j.components.interfaces.IMTComponent3D;
 21import org.mt4j.input.inputData.InputCursor;
 22import org.mt4j.input.inputProcessors.IInputProcessor;
 23import org.mt4j.input.inputProcessors.MTGestureEvent;
 24import org.mt4j.util.math.Vector3D;
 25
 26
 27/**
 28 * The Class RotateEvent.
 29 * @author Christopher Ruff
 30 */
 31public class RotateEvent extends MTGestureEvent {
 32	
 33	/** The first finger motion. */
 34	private InputCursor firstFingerMotion;
 35	
 36	/** The second finger motion. */
 37	private InputCursor secondFingerMotion;
 38	
 39	/** The rotation point. */
 40	private Vector3D rotationPoint;
 41	
 42	/** The translation vector. */
 43	private Vector3D translationVector;
 44	
 45	/** The rotation degrees. */
 46	private float rotationDegrees;
 47	
 48
 49	/**
 50	 * Instantiates a new rotate event.
 51	 * 
 52	 * @param source the source
 53	 * @param id the id
 54	 * @param targetComponent the target component
 55	 * @param firstFingerMotion the first finger motion
 56	 * @param secondFingerMotion the second finger motion
 57	 * @param translationVector the translation vector
 58	 * @param rotationPoint the rotation point
 59	 * @param rotationDegrees the rotation degrees
 60	 */
 61	public RotateEvent(IInputProcessor source, int id, IMTComponent3D targetComponent, InputCursor firstFingerMotion, InputCursor secondFingerMotion, Vector3D translationVector, Vector3D rotationPoint, float rotationDegrees) {
 62		super(source, id, targetComponent);
 63		this.firstFingerMotion = firstFingerMotion;
 64		this.secondFingerMotion = secondFingerMotion;
 65		this.translationVector = translationVector;
 66		this.rotationPoint = rotationPoint;
 67		this.rotationDegrees = rotationDegrees;
 68	}
 69
 70	/**
 71	 * Gets the first finger motion.
 72	 * 
 73	 * @return the first finger motion
 74	 */
 75	public InputCursor getFirstCursor() {
 76		return firstFingerMotion;
 77	}
 78
 79	/**
 80	 * Gets the rotation point.
 81	 * 
 82	 * @return the rotation point
 83	 */
 84	public Vector3D getRotationPoint() {
 85		return rotationPoint;
 86	}
 87
 88	/**
 89	 * Gets the second finger motion.
 90	 * 
 91	 * @return the second finger motion
 92	 */
 93	public InputCursor getSecondCursor() {
 94		return secondFingerMotion;
 95	}
 96
 97	/**
 98	 * Gets the translation vector.
 99	 * 
100	 * @return the translation vector
101	 */
102	public Vector3D getTranslationVector() {
103		return translationVector;
104	}
105
106	/**
107	 * Gets the rotation degrees.
108	 * 
109	 * @return the rotation degrees
110	 */
111	public float getRotationDegrees() {
112		return rotationDegrees;
113	}
114
115	/**
116	 * Sets the first finger motion.
117	 * 
118	 * @param firstFingerMotion the new first finger motion
119	 */
120	public void setFirstCursor(InputCursor firstFingerMotion) {
121		this.firstFingerMotion = firstFingerMotion;
122	}
123
124	/**
125	 * Sets the rotation degrees.
126	 * 
127	 * @param rotationDegrees the new rotation degrees
128	 */
129	public void setRotationDegrees(float rotationDegrees) {
130		this.rotationDegrees = rotationDegrees;
131	}
132
133	/**
134	 * Sets the rotation point.
135	 * 
136	 * @param rotationPoint the new rotation point
137	 */
138	public void setRotationPoint(Vector3D rotationPoint) {
139		this.rotationPoint = rotationPoint;
140	}
141
142	/**
143	 * Sets the second finger motion.
144	 * 
145	 * @param secondFingerMotion the new second finger motion
146	 */
147	public void setSecondCursor(InputCursor secondFingerMotion) {
148		this.secondFingerMotion = secondFingerMotion;
149	}
150
151	/**
152	 * Sets the translation vector.
153	 * 
154	 * @param translationVector the new translation vector
155	 */
156	public void setTranslationVector(Vector3D translationVector) {
157		this.translationVector = translationVector;
158	}
159	
160	
161	
162
163}