Sweet Home 3D 4.0

com.eteks.sweethome3d.model
Class Camera

java.lang.Object
  extended by com.eteks.sweethome3d.model.Camera
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ObserverCamera

public class Camera
extends Object
implements Serializable, Cloneable

Camera characteristics in home.

Author:
Emmanuel Puybaret
See Also:
Serialized Form

Nested Class Summary
static class Camera.Lens
          The kind of lens that can be used with a camera.
static class Camera.Property
          The properties of a camera that may change.
 
Constructor Summary
Camera(float x, float y, float z, float yaw, float pitch, float fieldOfView)
          Creates a camera at given location and angles at midday and using a pinhole lens.
Camera(float x, float y, float z, float yaw, float pitch, float fieldOfView, long time, Camera.Lens lens)
          Creates a camera at given location and angles.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds the property change listener in parameter to this camera.
 Camera clone()
          Returns a clone of this camera.
static long convertTimeToTimeZone(long utcTime, String timeZone)
          Returns a time expressed in UTC time zone converted to the given time zone.
 float getFieldOfView()
          Returns the field of view in radians of this camera.
 Camera.Lens getLens()
          Returns the lens of this camera.
 String getName()
          Returns the name of this camera.
 float getPitch()
          Returns the pitch angle in radians of this camera.
 long getTime()
          Returns the time in milliseconds when this camera is used.
 float getX()
          Returns the abscissa of this camera.
 float getY()
          Returns the ordinate of this camera.
 float getYaw()
          Returns the yaw angle in radians of this camera.
 float getZ()
          Returns the elevation of this camera.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes the property change listener in parameter from this camera.
 void setCamera(Camera camera)
          Sets the location and angles of this camera from the camera in parameter.
 void setFieldOfView(float fieldOfView)
          Sets the field of view in radians of this camera.
 void setLens(Camera.Lens lens)
          Sets the lens of this camera.
 void setName(String name)
          Sets the name of this camera and notifies listeners of this change.
 void setPitch(float pitch)
          Sets the pitch angle in radians of this camera.
 void setTime(long time)
          Sets the use time in milliseconds since the Epoch in UTC time zone, and notifies listeners of this 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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Camera

public Camera(float x,
              float y,
              float z,
              float yaw,
              float pitch,
              float fieldOfView)
Creates a camera at given location and angles at midday and using a pinhole lens.


Camera

public Camera(float x,
              float y,
              float z,
              float yaw,
              float pitch,
              float fieldOfView,
              long time,
              Camera.Lens lens)
Creates a camera at given location and angles.

Since:
3.0
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds the property change listener in parameter to this camera.


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes the property change listener in parameter from this camera.


getName

public String getName()
Returns the name of this camera.

Since:
3.0

setName

public void setName(String name)
Sets the name of this camera and notifies listeners of this change.

Since:
3.0

getYaw

public float getYaw()
Returns the yaw angle in radians of this camera.


setYaw

public void setYaw(float yaw)
Sets the yaw angle in radians of this camera.


getPitch

public float getPitch()
Returns the pitch angle in radians of this camera.


setPitch

public void setPitch(float pitch)
Sets the pitch angle in radians of this camera.


getFieldOfView

public float getFieldOfView()
Returns the field of view in radians of this camera.


setFieldOfView

public void setFieldOfView(float fieldOfView)
Sets the field of view in radians of this camera.


getX

public float getX()
Returns the abscissa of this camera.


setX

public void setX(float x)
Sets the abscissa of this camera.


getY

public float getY()
Returns the ordinate of this camera.


setY

public void setY(float y)
Sets the ordinate of this camera.


getZ

public float getZ()
Returns the elevation of this camera.


setZ

public void setZ(float z)
Sets the elevation of this camera.


getTime

public long getTime()
Returns the time in milliseconds when this camera is used.

Returns:
a time in milliseconds since the Epoch in UTC time zone
Since:
3.0

setTime

public void setTime(long time)
Sets the use time in milliseconds since the Epoch in UTC time zone, and notifies listeners of this change.

Since:
3.0

convertTimeToTimeZone

public static long convertTimeToTimeZone(long utcTime,
                                         String timeZone)
Returns a time expressed in UTC time zone converted to the given time zone.

Since:
3.0

getLens

public Camera.Lens getLens()
Returns the lens of this camera.

Since:
3.0

setLens

public void setLens(Camera.Lens lens)
Sets the lens of this camera.

Since:
3.0

setCamera

public void setCamera(Camera camera)
Sets the location and angles of this camera from the camera in parameter.

Since:
2.3

clone

public Camera clone()
Returns a clone of this camera.

Overrides:
clone in class Object
Since:
2.3

Sweet Home 3D 4.0

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License