Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## shout3d.core
Class TimeSensor

    java.lang.Object
      |
      +--shout3d.core.Node
            |
            +--shout3d.core.TimeSensor

public class TimeSensor
extends Node

A TimeSensor

Field Summary
`DoubleField` | `cycleInterval`
`DoubleField` | `cycleTime`
`DoubleField` | `elapsedSeconds`
`BooleanField` | `enabled`
`FloatField` | `fraction`
`BooleanField` | `isActive`
`BooleanField` | `loop`
`IntField` | `numLoops`
`DoubleField` | `startTime`
`DoubleField` | `stopTime`
`DoubleField` | `time`

Constructor Summary
`TimeSensor()` Constructs a default TimeSensor
`TimeSensor(Shout3DViewer viewer)` Constructs a default TimeSensor

Method Summary
`boolean` | `isPaused()` Gets whether this timeSensor is paused or not
`void` | `setPaused(boolean nowPaused)` Pauses or unpauses this TimeSensor.
`void` | `setViewer(Shout3DViewer viewer)` Overrides base class to additionally store the clock.
`void` | `start()` Starts this timeSensor by setting startTime to the current time.
`void` | `stop()` Stops this timeSensor by setting stopTime to the current time.
`void` | `update()` Updates the outputs of the TimeSensor based on the values of its fields.

Methods inherited from class shout3d.core.Node
`getDEFName, getField, getFieldByIndex, getFieldName, getNumFields, getTypeName, isOfType, setDEFName`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### cycleInterval

    public final DoubleField cycleInterval

### cycleTime

    public final DoubleField cycleTime

### elapsedSeconds

    public final DoubleField elapsedSeconds

### enabled

    public final BooleanField enabled

### fraction

    public final FloatField fraction

### isActive

    public final BooleanField isActive

### loop

    public final BooleanField loop

### numLoops

    public final IntField numLoops

### startTime

    public final DoubleField startTime

### stopTime

    public final DoubleField stopTime

### time

    public final DoubleField time

Constructor Detail

### TimeSensor

    public TimeSensor()

  Constructs a default TimeSensor

### TimeSensor

    public TimeSensor(Shout3DViewer viewer)

  Constructs a default TimeSensor

Method Detail

### setViewer

    public void setViewer(Shout3DViewer viewer)

  Overrides base class to additionally store the clock.
  Overrides:
    setViewer in class Node

### start

    public void start()

  Starts this timeSensor by setting startTime to the current time.

### stop

    public void stop()

  Stops this timeSensor by setting stopTime to the current time.

### setPaused

    public void setPaused(boolean nowPaused)

  Pauses or unpauses this TimeSensor. Calling `setPaused(false)` on a TimeSensor which is not paused has no effect.
  Parameters:
    `nowPaused` - is this timeSensor paused now

### isPaused

    public boolean isPaused()

  Gets whether this timeSensor is paused or not
  Returns:
    is paused or not

### update

    public void update()

  Updates the outputs of the TimeSensor based on the values of its fields. Called automatically by the Shout3DPanel once per render, but may also be called separately to propagate times that come between renders. The output will always be based on the time in the viewer's clock.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD