|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ engine overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.xerox.VTM.engine
Class Camera

java.lang.Objectcom.xerox.VTM.engine.Camera
- public class Camera
- extends java.lang.Object
a Camera is used to observe the virtual space which owns it - all cameras have unique IDs, as glyph - (x,y) coordinates, observation altitude and focal distance can be changed
| Field Summary | |
float |
altitude
altitude of observation |
(package private) boolean |
eager
Lazy camera, true if the camera only repaints when explicitely asked |
(package private) boolean |
enabled
camera is enabled or not (disabling does not destroy) |
float |
focal
focal distance |
(package private) java.lang.Integer |
ID
camera ID |
(package private) int |
index
camera index (wrt the owning virtual space) |
(package private) VirtualSpace |
parentSpace
virtual space to which this camera belongs to |
long |
posx
coordinates in virtual space |
long |
posy
coordinates in virtual space |
(package private) boolean |
shouldRepaint
when in lazy mode, tells the camera to repaint next time the owning view goes through its paint loop |
(package private) View |
view
View using this camera as one of its layer(s) |
| Constructor Summary | |
(package private) |
Camera(long x,
long y,
float alt,
float f,
int i)
|
(package private) |
Camera(long x,
long y,
float alt,
float f,
int i,
boolean l)
|
| Method Summary | |
void |
altitudeOffset(float a)
set camera altitude (relative value) |
void |
disable()
disable camera |
void |
enable()
enable camera |
float |
getAltitude()
get camera altitude |
float |
getFocal()
get camera focal distance |
java.lang.Integer |
getID()
get camera ID |
int |
getIndex()
get camera index (w.r.t owning virtual space) |
boolean |
getLaziness()
get camera repaint mode (eager or lazy) |
net.claribole.zvtm.engine.Location |
getLocation()
get camera location |
VirtualSpace |
getOwningSpace()
get virtual space owning this camera |
View |
getOwningView()
get view owning this camera |
void |
repaintNow()
the content seen thourhg this camera will be repainted in the next owning view's paint loop |
void |
setAltitude(float a)
set camera altitude (absolute value) |
void |
setFocal(float f)
set camera focal distance (absolute value) |
void |
setID(java.lang.Integer ident)
set new ID for this camera (make sure there is no conflict) |
void |
setLaziness(boolean b)
set eager or lazy mode |
void |
setLocation(long x,
long y)
set camera position (absolute value) - will trigger a repaint, whereas directly assigning values to posx,posy will not |
protected void |
setOwningSpace(VirtualSpace vs)
set virtual space owning this camera |
protected void |
setOwningView(View vi)
set view owning this camera |
protected boolean |
shouldRepaint()
|
java.lang.String |
toString()
returns a String with ID, position, altitude and focal distance |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
ID
java.lang.Integer ID
- camera ID
index
int index
- camera index (wrt the owning virtual space)
posx
public long posx
- coordinates in virtual space
posy
public long posy
- coordinates in virtual space
altitude
public float altitude
- altitude of observation
focal
public float focal
- focal distance
enabled
boolean enabled
- camera is enabled or not (disabling does not destroy)
parentSpace
VirtualSpace parentSpace
- virtual space to which this camera belongs to
view
View view
- View using this camera as one of its layer(s)
eager
boolean eager
- Lazy camera, true if the camera only repaints when explicitely asked
shouldRepaint
boolean shouldRepaint
- when in lazy mode, tells the camera to repaint next time the owning view goes through its paint loop
| Constructor Detail |
Camera
Camera(long x,
long y,
float alt,
float f,
int i)
Camera
Camera(long x,
long y,
float alt,
float f,
int i,
boolean l)
| Method Detail |
setLocation
public void setLocation(long x,
long y)
- set camera position (absolute value) - will trigger a repaint, whereas directly assigning values to posx,posy will not
setAltitude
public void setAltitude(float a)
- set camera altitude (absolute value)
altitudeOffset
public void altitudeOffset(float a)
- set camera altitude (relative value)
getAltitude
public float getAltitude()
- get camera altitude
getLocation
public net.claribole.zvtm.engine.Location getLocation()
- get camera location
setFocal
public void setFocal(float f)
- set camera focal distance (absolute value)
getFocal
public float getFocal()
- get camera focal distance
getIndex
public int getIndex()
- get camera index (w.r.t owning virtual space)
getID
public java.lang.Integer getID()
- get camera ID
setID
public void setID(java.lang.Integer ident)
- set new ID for this camera (make sure there is no conflict)
setOwningSpace
protected void setOwningSpace(VirtualSpace vs)
- set virtual space owning this camera
getOwningSpace
public VirtualSpace getOwningSpace()
- get virtual space owning this camera
setOwningView
protected void setOwningView(View vi)
- set view owning this camera
getOwningView
public View getOwningView()
- get view owning this camera
enable
public void enable()
- enable camera
disable
public void disable()
- disable camera
setLaziness
public void setLaziness(boolean b)
- set eager or lazy mode
getLaziness
public boolean getLaziness()
- get camera repaint mode (eager or lazy)
repaintNow
public void repaintNow()
- the content seen thourhg this camera will be repainted in the next owning view's paint loop
shouldRepaint
protected boolean shouldRepaint()
toString
public java.lang.String toString()
- returns a String with ID, position, altitude and focal distance
|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ engine overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.xerox.VTM.engine.Camera