Class ObserverCamera
Extends
Camera.
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
ObserverCamera(id, x, y, z, yaw, pitch, fieldOfView)
Creates a camera at given location and angle.
|
Method Attributes | Method Name and Description |
---|---|
clone()
Returns a clone of this camera.
|
|
containsPoint(x, y, margin)
Returns
true if this camera contains
the point at (x , y )
with a given margin . |
|
getDepth()
Returns the depth of this observer camera according to
human proportions with an eyes elevation at z.
|
|
Returns the height of this observer camera according to
human proportions with an eyes elevation at z.
|
|
Returns the scale used to paint this camera in the plan.
|
|
Returns the points of each corner of the rectangle surrounding this camera.
|
|
getWidth()
Returns the width of this observer camera according to
human proportions with an eyes elevation at z.
|
|
intersectsRectangle(x0, y0, x1, y1)
Returns
true if this camera intersects
with the horizontal rectangle which opposite corners are at points
(x0 , y0 ) and (x1 , y1 ). |
|
Returns
true if the camera size doesn't change according to its elevation. |
|
move(dx, dy)
Moves this camera of (
dx , dy ) units. |
|
setFixedSize(fixedSize)
Sets whether camera size should depends on its elevation and will notify listeners
bound to size properties of the size change.
|
|
setPlanScale(scale)
Sets the scale used to paint this camera and will notify listeners
bound to size properties of the size change.
|
|
setX(x)
Sets the abscissa of this camera.
|
|
setY(y)
Sets the ordinate of this camera.
|
|
setYaw(yaw)
Sets the yaw angle in radians of this camera.
|
|
setZ(z)
Sets the elevation of this camera.
|
- Methods borrowed from class Camera:
- getFieldOfView, getLens, getName, getPitch, getRenderer, getTime, getX, getY, getYaw, getZ, setCamera, setFieldOfView, setLens, setName, setPitch, setRenderer, setTime
- Methods borrowed from class HomeObject:
- duplicate, firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, setProperty
Class Detail
ObserverCamera(id, x, y, z, yaw, pitch, fieldOfView)
Creates a camera at given location and angle.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {string} id
- {number} x
- {number} y
- {number} z
- {number} yaw
- {number} pitch
- {number} fieldOfView
Method Detail
{ObserverCamera}
clone()
Returns a clone of this camera.
- Returns:
- {ObserverCamera}
{boolean}
containsPoint(x, y, margin)
Returns
true
if this camera contains
the point at (x
, y
)
with a given margin
.
- Parameters:
- {number} x
- {number} y
- {number} margin
- Returns:
- {boolean}
{number}
getDepth()
Returns the depth of this observer camera according to
human proportions with an eyes elevation at z.
- Returns:
- {number}
{number}
getHeight()
Returns the height of this observer camera according to
human proportions with an eyes elevation at z.
- Returns:
- {number}
{number}
getPlanScale()
Returns the scale used to paint this camera in the plan.
- Returns:
- {number}
{float[][]}
getPoints()
Returns the points of each corner of the rectangle surrounding this camera.
- Returns:
- {float[][]} an array of the 4 (x,y) coordinates of the camera corners.
{number}
getWidth()
Returns the width of this observer camera according to
human proportions with an eyes elevation at z.
- Returns:
- {number}
{boolean}
intersectsRectangle(x0, y0, x1, y1)
Returns
true
if this camera intersects
with the horizontal rectangle which opposite corners are at points
(x0
, y0
) and (x1
, y1
).
- Parameters:
- {number} x0
- {number} y0
- {number} x1
- {number} y1
- Returns:
- {boolean}
{boolean}
isFixedSize()
Returns
true
if the camera size doesn't change according to its elevation.
- Returns:
- {boolean}
move(dx, dy)
Moves this camera of (
dx
, dy
) units.
- Parameters:
- {number} dx
- {number} dy
setFixedSize(fixedSize)
Sets whether camera size should depends on its elevation and will notify listeners
bound to size properties of the size change.
- Parameters:
- {boolean} fixedSize
setPlanScale(scale)
Sets the scale used to paint this camera and will notify listeners
bound to size properties of the size change.
- Parameters:
- {number} scale
setX(x)
Sets the abscissa of this camera.
- Parameters:
- {number} x
setY(y)
Sets the ordinate of this camera.
- Parameters:
- {number} y
setYaw(yaw)
Sets the yaw angle in radians of this camera.
- Parameters:
- {number} yaw
setZ(z)
Sets the elevation of this camera.
- Parameters:
- {number} z