vrdTurntable¶
-
class
vrdTurntable
¶
(Inherits vrdSceneObject
)
This class provides control over the turntable of a camera.
Here is an example that plays a camera turntable animation for the active camera starting from its current view:
cam = vrCameraService.getActiveCamera()
turntable = cam.getTurntable()
turntable.setAnimationDuration(15)
turntable.setLoop(True)
turntable.updateFromView()
turntable.setPlaying(True)
Summary¶
- Functions:
- getAngle() → float
- getAnimationDuration() → float
- getDirection() → vrCameraTypes.TurntableDirection
- getDistance() → float
- getHeight() → float
- getLoop() → bool
- getPlaying() → bool
- setAngle(angle)
- setAnimationDuration(seconds)
- setDirection(direction)
- setDistance(distance)
- setHeight(height)
- setLoop(enable)
- setPlaying(value)
- updateFromView()
Functions¶
-
vrdTurntable.
getAngle
()¶ Returns the angle of the turntable/.
Returns: The angle of the turntable in degree. Return type: float
-
vrdTurntable.
getAnimationDuration
()¶ Returns the duration of the turntable animation.
Returns: The animation duration in seconds. Return type: float
-
vrdTurntable.
getDirection
()¶ Returns the turntable animation playback direction.
Returns: The playback direction of the turntable animation (clockwise or counter clockwise). Return type: vrCameraTypes.TurntableDirection
-
vrdTurntable.
getDistance
()¶ Returns the distance of the turntable.
Returns: The distance of the turntable. Return type: float
-
vrdTurntable.
getHeight
()¶ Returns the height of the turntable.
Returns: The height of the turntable. Return type: float
-
vrdTurntable.
getLoop
()¶ Returns the state of the turntable animation loop mode.
Returns: True if loop mode is enabled, False otherwise. Return type: bool
-
vrdTurntable.
getPlaying
()¶ Returns the playback state of the turntable animation.
Returns: True if the turntable animation is playing, False otherwise. Return type: bool
-
vrdTurntable.
setAngle
(angle)¶ Sets the angle of the turntable.
Parameters: angle (float) – The angle of the turntable in degree.
-
vrdTurntable.
setAnimationDuration
(seconds)¶ Sets the duration of the turntable animation.
Parameters: seconds (float) – The duration in seconds.
-
vrdTurntable.
setDirection
(direction)¶ Sets the playback direction of the turntable animation.
Parameters: direction (vrCameraTypes.TurntableDirection) – The direction of the turntable animation (clockwise or counter clockwise()
-
vrdTurntable.
setDistance
(distance)¶ Sets the distance of the turntable.
Parameters: distance (float) – The distance of the turntable.
-
vrdTurntable.
setHeight
(height)¶ Sets the height of the turntable.
Parameters: height (float) – The height of the turntable.
-
vrdTurntable.
setLoop
(enable)¶ Sets the turntable animation to loop mode.
Parameters: enable (bool) – True to enable loop mode, False to disable.
-
vrdTurntable.
setPlaying
(value)¶ Starts / stops the turntable animation.
Parameters: value (bool) – True to start the turntable animation, False to stop it.
-
vrdTurntable.
updateFromView
()¶ Update the turntable parameters from the current view.
This functions updates the angle, distance and height properties of the turntable with values taken from the current camera view.