• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Révision5e3650639cb92325b18b46c26eefaa8df0160bc1 (tree)
l'heure2003-10-18 05:45:27
Auteurmojomonkey <mojomonkey@75d0...>
Commitermojomonkey

Message de Log

Base Controller finished.

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@96 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Change Summary

Modification

--- a/src/com/jme/scene/Controller.java
+++ b/src/com/jme/scene/Controller.java
@@ -32,13 +32,105 @@
3232 package com.jme.scene;
3333
3434 /**
35- * <code>Controller</code>
35+ * <code>Controller</code> provides a base class for creation of controllers to
36+ * modify nodes and render states over time. The base controller provides a
37+ * repeat type, min and max time, as well as a phase and frequency. Subclasses
38+ * of this will provide the update method that takes the current time and
39+ * modifies an object in a application specific way.
3640 * @author Mark Powell
37- * @version
41+ * @version $Id: Controller.java,v 1.2 2003-10-17 20:45:27 mojomonkey Exp $
3842 */
39-public class Controller {
43+public abstract class Controller {
44+ public static final int RT_CLAMP = 0;
45+ public static final int RT_WRAP = 1;
46+ public static final int RT_CYCLE = 2;
47+
48+ private int repeatType;
49+ private float minTime;
50+ private float maxTime;
51+ private float phase;
52+ private float frequency;
53+ private boolean active;
54+
55+ /**
56+ * <code>getFrequency</code>
57+ * @return
58+ */
59+ public float getFrequency() {
60+ return frequency;
61+ }
62+
63+ /**
64+ * <code>setFrequency</code>
65+ * @param frequency
66+ */
67+ public void setFrequency(float frequency) {
68+ this.frequency = frequency;
69+ }
70+
71+ /**
72+ * <code>getMaxTime</code>
73+ * @return
74+ */
75+ public float getMaxTime() {
76+ return maxTime;
77+ }
78+
79+ /**
80+ * <code>setMaxTime</code>
81+ * @param maxTime
82+ */
83+ public void setMaxTime(float maxTime) {
84+ this.maxTime = maxTime;
85+ }
86+
87+ /**
88+ * <code>getMinTime</code>
89+ * @return
90+ */
91+ public float getMinTime() {
92+ return minTime;
93+ }
4094
41- public void update(float time) {
42-
95+ /**
96+ * <code>setMinTime</code>
97+ * @param minTime
98+ */
99+ public void setMinTime(float minTime) {
100+ this.minTime = minTime;
43101 }
102+
103+ /**
104+ * <code>getPhase</code>
105+ * @return
106+ */
107+ public float getPhase() {
108+ return phase;
109+ }
110+
111+ /**
112+ * <code>setPhase</code>
113+ * @param phase
114+ */
115+ public void setPhase(float phase) {
116+ this.phase = phase;
117+ }
118+
119+ /**
120+ * <code>getRepeatType</code>
121+ * @return
122+ */
123+ public int getRepeatType() {
124+ return repeatType;
125+ }
126+
127+ /**
128+ * <code>setRepeatType</code>
129+ * @param repeatType
130+ */
131+ public void setRepeatType(int repeatType) {
132+ this.repeatType = repeatType;
133+ }
134+
135+ public abstract void update(float time);
44136 }