Maven module :un.engine : engine-opengl :
Class : un.engine.opengl.control.OrbitController
Extends/Implements : un.engine.opengl.animation.Updater un.api.event.EventListener
Subclasses : -

Controller orbiting around a given target.
author  Johann Sorel


Variables : -
Functions : OrbitController, OrbitController, OrbitController, isEnable, setEnable, configureDefault, getGestureTasks, getWarpPointer, setWarpPointer, getDistance, setDistance, getHorizontalAngle, setHorizontalAngle, getVerticalAngle, setVerticalAngle, getRollAngle, setRollAngle, getMinDistance, setMinDistance, getMaxDistance, setMaxDistance, isLinear, setLinear, getStep, setStep, update, receiveEvent




Create a right handed orbit camera with default up(0,1,0) and right(1,0,0) axis.
param  source mouse and keyboard event source
param  target node to focus on
public void OrbitController (EventSource source, GLNode target)


Create a right handed orbit camera.
param  source mouse and keyboard event source
param  up upward direction
param  right right direction
param  target node to focus on
public void OrbitController (EventSource source, Vector up, Vector right, GLNode target)


Create an orbit camera.
param  source mouse and keyboard event source
param  up upward direction
param  right right direction
param  target node to focus on
param  rightHanded true for right handed coordinate system, false for leftHanded.
public void OrbitController (EventSource source, Vector up, Vector right, GLNode target, boolean rightHanded)

public boolean isEnable ()

public void setEnable (boolean enable)


Configure a default orbit controller.
return
public OrbitController configureDefault ()

public Sequence getGestureTasks ()


Get pointer warp position.
Works ony if event source is a NewtFrame.
On each mouse event the mouse position is reset to this coordinate.
This allow to avoid mouse hitting the frame borders.
return  Tuple can be null
public Tuple getWarpPointer ()

public void setWarpPointer (Tuple autoWarp)


Get distance from target.
return  float, distance.
public float getDistance ()


Set distance from target.
param  distance
public void setDistance (float distance)


Get horizontal angle.
return  horizontal angle in Radians
public double getHorizontalAngle ()


Set horizontal angle.
param  horizontalAngle in Radians
public void setHorizontalAngle (double horizontalAngle)


Get vertical angle.
return  horizontal angle in Radians
public double getVerticalAngle ()


Set vertical angle.
param  verticalAngle in Radians
public void setVerticalAngle (double verticalAngle)


Get roll angle.
return  roll angle
public double getRollAngle ()


Set roll angle.
param  rollAngle
public void setRollAngle (double rollAngle)


Get minimum camera distance to target.
return  minimum camera distance
public double getMinDistance ()


Set minimum camera distance to target
param  mindistance minimum camera distance
public void setMinDistance (double mindistance)


Get maximum camera distance to target.
return  maximum camera distance
public double getMaxDistance ()


Set maximum camera distance to target
param  maxdistance maximum camera distance
public void setMaxDistance (double maxdistance)


When zooming In/Out ,indicate if the step value
is linear or relative to current distance.
If not linear, the distance value must be in range [0..1]
return  true if linear
public boolean isLinear ()


Set camera distance calculation type.
param  linear true for linear, false for proportional
public void setLinear (boolean linear)


Get step used when zooming In/Out.
return  step
public double getStep ()


Set step used when zooming In/Out.
param  step
public void setStep (double step)

public void update (RenderContext context, GLNode node)

public void receiveEvent (Event event)