KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > buchuki > ensmer > input > command > navigation > OrientedMoveCommand


1 /*
2  * Copyright 2004 Dusty Phillips
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package com.buchuki.ensmer.input.command.navigation;
18
19 import com.buchuki.ensmer.EnsmerManager;
20 import com.buchuki.ensmer.input.Accelerator;
21 import javax.vecmath.Vector3f;
22
23 /**
24  *
25  * @author Dusty Phillips [dusty@buchuki.com]
26  */

27 public class OrientedMoveCommand extends MoveCommand{
28     
29     /**
30      * Creates a new instance of OrientedMoveCommand
31      */

32     public OrientedMoveCommand(Transformable3D transformable, Accelerator accel,
33     float accelMod, MoveCommand.Axis axis) {
34         super(transformable, accel, accelMod, axis);
35     }
36     
37     /**
38      * Transform the vector according to the user's current view
39      *
40      * @param vector the Vector3f to associate with
41      */

42     @Override JavaDoc
43     protected void transformVector(Vector3f vector) {
44         EnsmerManager.instance().getInterfaceManager().
45             getViewPosition().transform(vector);
46     }
47 }
48
Popular Tags