public class ObserverCamera extends Camera implements Selectable
Modifier and Type | Class and Description |
---|---|
static class |
ObserverCamera.Property
The additional properties of an observer camera that may change.
|
Camera.Lens
Constructor and Description |
---|
ObserverCamera(float x,
float y,
float z,
float yaw,
float pitch,
float fieldOfView)
Creates a camera at given location and angle.
|
ObserverCamera(java.lang.String id,
float x,
float y,
float z,
float yaw,
float pitch,
float fieldOfView)
Creates a camera at given location and angle.
|
Modifier and Type | Method and Description |
---|---|
ObserverCamera |
clone()
Returns a clone of this camera.
|
boolean |
containsPoint(float x,
float y,
float margin)
Returns
true if this camera contains
the point at (x , y )
with a given margin . |
float |
getDepth()
Returns the depth of this observer camera according to
human proportions with an eyes elevation at z.
|
float |
getHeight()
Returns the height of this observer camera according to
human proportions with an eyes elevation at z.
|
float |
getPlanScale()
Returns the scale used to paint this camera in the plan.
|
float[][] |
getPoints()
Returns the points of each corner of the rectangle surrounding this camera.
|
float |
getWidth()
Returns the width of this observer camera according to
human proportions with an eyes elevation at z.
|
boolean |
intersectsRectangle(float x0,
float y0,
float x1,
float y1)
Returns
true if this camera intersects
with the horizontal rectangle which opposite corners are at points
(x0 , y0 ) and (x1 , y1 ). |
boolean |
isFixedSize()
Returns
true if the camera size doesn't change according to its elevation. |
void |
move(float dx,
float dy)
Moves this camera of (
dx , dy ) units. |
void |
setFixedSize(boolean fixedSize)
Sets whether camera size should depends on its elevation and will notify listeners
bound to size properties of the size change.
|
void |
setPlanScale(float scale)
Sets the scale used to paint this camera and will notify listeners
bound to size properties of the size change.
|
void |
setX(float x)
Sets the abscissa of this camera.
|
void |
setY(float y)
Sets the ordinate of this camera.
|
void |
setYaw(float yaw)
Sets the yaw angle in radians of this camera.
|
void |
setZ(float z)
Sets the elevation of this camera.
|
convertTimeToTimeZone, getFieldOfView, getLens, getName, getPitch, getRenderer, getTime, getX, getY, getYaw, getZ, setCamera, setFieldOfView, setLens, setName, setPitch, setRenderer, setTime
addPropertyChangeListener, addPropertyChangeListener, createId, duplicate, firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, removePropertyChangeListener, removePropertyChangeListener, setProperty, setProperty
public ObserverCamera(float x, float y, float z, float yaw, float pitch, float fieldOfView)
public ObserverCamera(java.lang.String id, float x, float y, float z, float yaw, float pitch, float fieldOfView)
public void setFixedSize(boolean fixedSize)
public boolean isFixedSize()
true
if the camera size doesn't change according to its elevation.public void setPlanScale(float scale)
public float getPlanScale()
public void setYaw(float yaw)
public float getWidth()
public float getDepth()
public float getHeight()
public float[][] getPoints()
getPoints
in interface Selectable
public boolean intersectsRectangle(float x0, float y0, float x1, float y1)
true
if this camera intersects
with the horizontal rectangle which opposite corners are at points
(x0
, y0
) and (x1
, y1
).intersectsRectangle
in interface Selectable
public boolean containsPoint(float x, float y, float margin)
true
if this camera contains
the point at (x
, y
)
with a given margin
.containsPoint
in interface Selectable
public void move(float dx, float dy)
dx
, dy
) units.move
in interface Selectable
public ObserverCamera clone()
clone
in interface Selectable
clone
in class Camera
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License