public class ObserverCameraController extends java.lang.Object implements Controller
Modifier and Type | Class and Description |
---|---|
static class |
ObserverCameraController.Property
The properties that may be edited by the view associated to this controller.
|
Constructor and Description |
---|
ObserverCameraController(Home home,
UserPreferences preferences,
ViewFactory viewFactory)
Creates the controller of 3D view with undo support.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(ObserverCameraController.Property property,
java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this controller. |
void |
displayView(View parentView)
Displays the view controlled by this controller.
|
float |
getElevation()
Returns the edited camera elevation.
|
float |
getFieldOfView()
Returns the edited observer field of view in radians.
|
int |
getFieldOfViewInDegrees()
Returns the edited observer field of view in degrees.
|
float |
getMinimumElevation()
Returns the minimum elevation.
|
float |
getPitch()
Returns the edited pitch in radians.
|
int |
getPitchInDegrees()
Returns the edited pitch in degrees.
|
DialogView |
getView()
Returns the view associated with this controller.
|
float |
getX()
Returns the edited abscissa.
|
float |
getY()
Returns the edited ordinate.
|
float |
getYaw()
Returns the edited yaw in radians.
|
int |
getYawInDegrees()
Returns the edited yaw in degrees.
|
boolean |
isElevationAdjusted()
Returns
true if the observer elevation should be adjusted according
to the elevation of the selected level. |
boolean |
isObserverCameraElevationAdjustedEditable()
Returns
true if the adjustment of the observer camera according to the current level is modifiable. |
void |
modifyObserverCamera()
Controls the modification of the observer camera of the edited home.
|
void |
removePropertyChangeListener(ObserverCameraController.Property property,
java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this controller. |
void |
setElevation(float elevation)
Sets the edited camera elevation.
|
void |
setElevationAdjusted(boolean observerCameraElevationAdjusted)
Sets whether the observer elevation should be adjusted according
to the elevation of the selected level.
|
void |
setFieldOfView(float fieldOfView)
Sets the edited observer field of view in radians.
|
void |
setFieldOfViewInDegrees(int fieldOfViewInDegrees)
Sets the edited observer field of view in degrees.
|
void |
setFieldOfViewInDegrees(int fieldOfViewInDegrees,
boolean updateFieldOfView) |
void |
setPitch(float pitch)
Sets the edited pitch in radians.
|
void |
setPitchInDegrees(int pitchInDegrees)
Sets the edited pitch in degrees.
|
void |
setX(float x)
Sets the edited abscissa.
|
void |
setY(float y)
Sets the edited ordinate.
|
void |
setYaw(float yaw)
Sets the edited yaw in radians.
|
void |
setYawInDegrees(int yawInDegrees)
Sets the edited yaw in degrees.
|
protected void |
updateProperties()
Updates edited properties from the 3D attributes of the home edited by this controller.
|
public ObserverCameraController(Home home, UserPreferences preferences, ViewFactory viewFactory)
public DialogView getView()
getView
in interface Controller
public void displayView(View parentView)
public void addPropertyChangeListener(ObserverCameraController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter to this controller.public void removePropertyChangeListener(ObserverCameraController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter from this controller.protected void updateProperties()
public void setX(float x)
public float getX()
public void setY(float y)
public float getY()
public void setElevation(float elevation)
public float getElevation()
public float getMinimumElevation()
public boolean isElevationAdjusted()
true
if the observer elevation should be adjusted according
to the elevation of the selected level.public void setElevationAdjusted(boolean observerCameraElevationAdjusted)
public boolean isObserverCameraElevationAdjustedEditable()
true
if the adjustment of the observer camera according to the current level is modifiable.public void setYawInDegrees(int yawInDegrees)
public int getYawInDegrees()
public void setYaw(float yaw)
public float getYaw()
public void setPitchInDegrees(int pitchInDegrees)
public int getPitchInDegrees()
public void setPitch(float pitch)
public float getPitch()
public void setFieldOfViewInDegrees(int fieldOfViewInDegrees)
public void setFieldOfViewInDegrees(int fieldOfViewInDegrees, boolean updateFieldOfView)
public int getFieldOfViewInDegrees()
public void setFieldOfView(float fieldOfView)
public float getFieldOfView()
public void modifyObserverCamera()
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License