Class Index | File Index

Classes


Class HomeController3D


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HomeController3D(home, planController, preferences, viewFactory, contentManager, undoSupport)
Creates the controller of home 3D view.
Method Summary
Method Attributes Method Name and Description
 
deleteCameras(cameras)
Deletes the given list of cameras from the ones stored in home.
 
Makes all levels visible.
 
Makes the selected level and below visible.
 
Elevates home camera of delta.
 
Escapes of current editing action.
 
Returns the observer camera state.
 
Returns the top camera state.
 
Returns the view associated with this controller.
 
goToCamera(camera)
Switches to observer or top camera and move camera to the values as the current camera.
 
Returns true if this controller is moving items.
 
Controls the edition of 3D attributes.
 
Modifies home camera field of view of delta.
 
moveCamera(delta)
Moves home camera of delta.
 
Moves home camera sideways of delta.
 
moveMouse(x, y)
Processes a mouse button moved event.
 
pressMouse(x, y, clickCount, shiftDown, alignmentActivated, duplicationActivated, magnetismToggled, pointerType)
Processes a mouse button pressed event.
 
Processes a mouse button released event.
 
Rotates home camera pitch angle of delta radians.
 
Rotates home camera yaw angle of delta radians.
 
setAlignmentActivated(alignmentActivated)
Activates or deactivates alignment feature during editing action.
 
Changes current state of controller.
 
setDuplicationActivated(duplicationActivated)
Activates or deactivates duplication feature during editing action.
 
Stores a clone of the current camera in home under the given name.
 
toggleMagnetism(magnetismToggled)
Toggles temporary magnetism feature of user preferences during editing action.
 
Changes home camera for {@link Home#getObserverCamera() observer camera}.
 
Changes home camera for {@link Home#getTopCamera() top camera}.
Class Detail
HomeController3D(home, planController, preferences, viewFactory, contentManager, undoSupport)
Creates the controller of home 3D view.
Author: Emmanuel Puybaret.
Parameters:
{Home} home
the home edited by this controller and its view
{PlanController} planController
{UserPreferences} preferences
{Object} viewFactory
{Object} contentManager
{javax.swing.undo.UndoableEditSupport} undoSupport
Method Detail
deleteCameras(cameras)
Deletes the given list of cameras from the ones stored in home.
Parameters:
{Camera[]} cameras

displayAllLevels()
Makes all levels visible.

displaySelectedLevel()
Makes the selected level and below visible.

elevateCamera(delta)
Elevates home camera of delta.
Parameters:
{number} delta
the value in cm that the camera should move down (with a negative delta) or up (with a positive delta)

escape()
Escapes of current editing action.

{HomeController3D.CameraControllerState} getObserverCameraState()
Returns the observer camera state.
Returns:
{HomeController3D.CameraControllerState}

{HomeController3D.CameraControllerState} getTopCameraState()
Returns the top camera state.
Returns:
{HomeController3D.CameraControllerState}

{Object} getView()
Returns the view associated with this controller.
Returns:
{Object}

goToCamera(camera)
Switches to observer or top camera and move camera to the values as the current camera.
Parameters:
{Camera} camera

{boolean} isEditingState()
Returns true if this controller is moving items.
Returns:
{boolean}

modifyAttributes()
Controls the edition of 3D attributes.

modifyFieldOfView(delta)
Modifies home camera field of view of delta.
Parameters:
{number} delta
the value in rad that should be added the field of view to get a narrower view (with a negative delta) or a wider view (with a positive delta)

moveCamera(delta)
Moves home camera of delta.
Parameters:
{number} delta
the value in cm that the camera should move forward (with a negative delta) or backward (with a positive delta)

moveCameraSideways(delta)
Moves home camera sideways of delta.
Parameters:
{number} delta
the value in cm that the camera should move left (with a negative delta) or right (with a positive delta)

moveMouse(x, y)
Processes a mouse button moved event.
Parameters:
{number} x
{number} y

pressMouse(x, y, clickCount, shiftDown, alignmentActivated, duplicationActivated, magnetismToggled, pointerType)
Processes a mouse button pressed event.
Parameters:
{number} x
{number} y
{number} clickCount
{boolean} shiftDown
{boolean} alignmentActivated
{boolean} duplicationActivated
{boolean} magnetismToggled
{View.PointerType} pointerType

releaseMouse(x, y)
Processes a mouse button released event.
Parameters:
{number} x
{number} y

rotateCameraPitch(delta)
Rotates home camera pitch angle of delta radians.
Parameters:
{number} delta
the value in rad that the camera should turn around pitch axis

rotateCameraYaw(delta)
Rotates home camera yaw angle of delta radians.
Parameters:
{number} delta
the value in rad that the camera should turn around yaw axis

setAlignmentActivated(alignmentActivated)
Activates or deactivates alignment feature during editing action.
Parameters:
{boolean} alignmentActivated
if true then alignment is active.

setCameraState(state)
Changes current state of controller.
Parameters:
{HomeController3D.CameraControllerState} state

setDuplicationActivated(duplicationActivated)
Activates or deactivates duplication feature during editing action.
Parameters:
{boolean} duplicationActivated
if true then duplication is active.

storeCamera(name)
Stores a clone of the current camera in home under the given name.
Parameters:
{string} name

toggleMagnetism(magnetismToggled)
Toggles temporary magnetism feature of user preferences during editing action.
Parameters:
{boolean} magnetismToggled
if true then magnetism feature is toggled.

viewFromObserver()
Changes home camera for {@link Home#getObserverCamera() observer camera}.

viewFromTop()
Changes home camera for {@link Home#getTopCamera() top camera}.

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 21 2024 17:43:23 GMT+0200 (CEST)