public class PeasyCam
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
PeasyCam.AbstractInterp |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
VERSION |
Constructor and Description |
---|
PeasyCam(processing.core.PApplet parent,
double distance) |
PeasyCam(processing.core.PApplet parent,
double lookAtX,
double lookAtY,
double lookAtZ,
double distance) |
PeasyCam(processing.core.PApplet parent,
processing.core.PGraphics pg,
double distance) |
PeasyCam(processing.core.PApplet parent,
processing.core.PGraphics pg,
double lookAtX,
double lookAtY,
double lookAtZ,
double distance) |
Modifier and Type | Method and Description |
---|---|
void |
beginHUD()
begin screen-aligned 2D-drawing.
|
void |
endHUD()
end screen-aligned 2D-drawing.
|
void |
feed() |
processing.core.PGraphics |
getCanvas() |
double |
getDistance() |
float[] |
getLookAt() |
PeasyDragHandler |
getPanDragHandler() |
float[] |
getPosition()
Where is the PeasyCam in world space?
|
PeasyDragHandler |
getRotateDragHandler() |
float[] |
getRotations()
Express the current camera rotation as an equivalent series
of world rotations, in X, Y, Z order.
|
CameraState |
getState() |
int[] |
getViewport() |
PeasyWheelHandler |
getWheelHandler() |
double |
getWheelScale() |
PeasyDragHandler |
getZoomDragHandler() |
PeasyWheelHandler |
getZoomWheelHandler() |
boolean |
insideViewport(double x,
double y) |
boolean |
isActive() |
void |
lookAt(double x,
double y,
double z) |
void |
lookAt(double x,
double y,
double z,
double distance) |
void |
lookAt(double x,
double y,
double z,
double distance,
long animationTimeMillis) |
void |
lookAt(double x,
double y,
double z,
long animationTimeMillis) |
void |
pan(double dx,
double dy) |
void |
reset() |
void |
reset(long animationTimeInMillis) |
void |
rotateX(double angle) |
void |
rotateY(double angle) |
void |
rotateZ(double angle) |
void |
setActive(boolean active) |
void |
setCenterDragHandler(PeasyDragHandler handler) |
void |
setDistance(double newDistance) |
void |
setDistance(double newDistance,
long animationTimeMillis) |
void |
setFreeRotationMode()
Permit arbitrary rotation.
|
void |
setLeftDragHandler(PeasyDragHandler handler) |
void |
setMaximumDistance(double maximumDistance) |
void |
setMinimumDistance(double minimumDistance) |
void |
setMouseControlled(boolean isMouseControlled)
Deprecated.
|
void |
setPitchRotationMode()
Only permit pitch.
|
void |
setResetOnDoubleClick(boolean resetOnDoubleClick) |
void |
setRightDragHandler(PeasyDragHandler handler) |
void |
setRollRotationMode()
Only permit roll.
|
void |
setRotations(double pitch,
double yaw,
double roll) |
void |
setState(CameraState state) |
void |
setState(CameraState state,
long animationTimeMillis) |
void |
setSuppressRollRotationMode()
Only suppress roll.
|
void |
setViewport(int x,
int y,
int w,
int h) |
void |
setWheelHandler(PeasyWheelHandler wheelHandler) |
void |
setWheelScale(double wheelScale) |
void |
setYawRotationMode()
Only permit yaw.
|
java.lang.String |
version() |
public final java.lang.String VERSION
public PeasyCam(processing.core.PApplet parent, double distance)
public PeasyCam(processing.core.PApplet parent, double lookAtX, double lookAtY, double lookAtZ, double distance)
public PeasyCam(processing.core.PApplet parent, processing.core.PGraphics pg, double distance)
public PeasyCam(processing.core.PApplet parent, processing.core.PGraphics pg, double lookAtX, double lookAtY, double lookAtZ, double distance)
public void setActive(boolean active)
public boolean isActive()
@Deprecated public void setMouseControlled(boolean isMouseControlled)
setActive(boolean)
Turn on or off default mouse-handling behavior:
left-drag | rotate camera around look-at point |
center-drag | pan camera (change look-at point) |
right-drag | zoom |
wheel | zoom |
isMouseControlled
- public double getWheelScale()
public void setWheelScale(double wheelScale)
public PeasyDragHandler getPanDragHandler()
public PeasyDragHandler getRotateDragHandler()
public PeasyDragHandler getZoomDragHandler()
public PeasyWheelHandler getZoomWheelHandler()
public void setLeftDragHandler(PeasyDragHandler handler)
public void setCenterDragHandler(PeasyDragHandler handler)
public void setRightDragHandler(PeasyDragHandler handler)
public PeasyWheelHandler getWheelHandler()
public void setWheelHandler(PeasyWheelHandler wheelHandler)
public java.lang.String version()
public void setViewport(int x, int y, int w, int h)
public int[] getViewport()
public processing.core.PGraphics getCanvas()
public boolean insideViewport(double x, double y)
public double getDistance()
public void setDistance(double newDistance)
public void setDistance(double newDistance, long animationTimeMillis)
public float[] getLookAt()
public void lookAt(double x, double y, double z)
public void lookAt(double x, double y, double z, double distance)
public void lookAt(double x, double y, double z, long animationTimeMillis)
public void lookAt(double x, double y, double z, double distance, long animationTimeMillis)
public void feed()
public float[] getPosition()
public void reset()
public void reset(long animationTimeInMillis)
public void pan(double dx, double dy)
public void rotateX(double angle)
public void rotateY(double angle)
public void rotateZ(double angle)
public CameraState getState()
public void setFreeRotationMode()
public void setYawRotationMode()
public void setPitchRotationMode()
public void setRollRotationMode()
public void setSuppressRollRotationMode()
public void setMinimumDistance(double minimumDistance)
public void setMaximumDistance(double maximumDistance)
public void setResetOnDoubleClick(boolean resetOnDoubleClick)
public void setState(CameraState state)
public void setState(CameraState state, long animationTimeMillis)
public void setRotations(double pitch, double yaw, double roll)
public float[] getRotations()
float[] rotations = cam.getRotations(rotations); rotateX(rotations[0]); rotateY(rotations[1]); rotateZ(rotations[2]); text("Here I am!", 0, 0, 0);
public void beginHUD()
beginHUD() disabled depth test disabled lights ortho endHUD()
public void endHUD()
processing library peasycam by Jonathan Feinberg. (c) 2013