Class Index | File Index

Classes


Class ObserverCamera


Extends Camera.

Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ObserverCamera(id, x, y, z, yaw, pitch, fieldOfView)
Creates a camera at given location and angle.
Method Summary
Method Attributes Method Name and Description
 
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.
 
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 points of each corner of the rectangle surrounding this camera.
 
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.
 
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, getTime, getX, getY, getYaw, getZ, setCamera, setFieldOfView, setLens, setName, setPitch, setTime
Methods borrowed from class HomeObject:
duplicate, firePropertyChange, getId, getProperty, getPropertyNames, setProperty
Class Detail
ObserverCamera(id, x, y, z, yaw, pitch, fieldOfView)
Creates a camera at given location and angle.
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}

{Array} getPoints()
Returns the points of each corner of the rectangle surrounding this camera.
Returns:
{Array} 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

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

© Copyright 2021 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Mar 02 2021 19:55:52 GMT+0100 (CET)