Logo
Developer

VisioWeb 1.17.1

Class

visioweb.Floor

VisioWeb's Floor class.
Encapsulates map data for a given floor.
Can be composed of several LODs.

Constructor

new Floor()

See:

Members summary


Name Description
heightMax Maximum height of floor
heightMin Minimum height of floor
index index starting at 0
name Floor name

Methods summary


Name Description
fadeIn enable this floor by animating its opacity to do a "fade in" effect
fadeOut disable this floor by animating its opacity to do a "fade out" effect
getLODs Retrieves the list of LODs (level of detail) associated with the current floor.
getPosition Retrieves the current position of the floor, usually {x: 0,y: 0, z: 0}
isAutoUpdateLOD Used to know if the current floor will update its LODs as function of camera distance
isContentEnabled Queries to see if the floor content (like POIs, labels, icons, and models) is enabled. To actually see the shapes the LOD of the floor has to be enabled.
isEnabled Queries to see if the floor content (like POIs, labels, icons, models and its Surfaces) is enabled. To actually see the shapes the LOD of the floor has to be enabled. To actually see any user-added POIs or Paths, the content should be enabled
setActive sets floor's LODs and content LOD active, which means the user will be able to interact with them.
setAutoUpdateLOD If set to true, there will be one LOD enabled for this floor as a function of distance. when setting to true, the actual LOD will not be enabled until the next screen refresh (automatic) if false, you would have to enable a specific LOD of this floor in order to see it.
setContentEnabled Enables the display of the POIs on a given floor (while still showing the surfaces). The floor itself must be enabled for the content to be visible.
setEnabled Enables the floor content (like POIs, labels, icons, and models), you need to enable the LOD separately If disabled, all the LODs will not be visible, even if they are enabled. When enabling floors by hand, the mapviewer.getCurrentFloor() and mapviewer.changeFloor() will probably no longer be valid.
setLODEnabled enables one LOD and disables the others
setOpacity set opacity for floor
setPosition Moves the whole floor (its content and its LODs) to a new position

Members detail

heightMax :number

Maximum height of floor

heightMin :number

Minimum height of floor

index :number

index starting at 0

name :string

Floor name

Methods detail

fadeIn(duration)

enable this floor by animating its opacity to do a "fade in" effect
Parameters:
Name Type Description
duration number
Since:
  • 1.8.4

fadeOut(duration)

disable this floor by animating its opacity to do a "fade out" effect
Parameters:
Name Type Description
duration number
Since:
  • 1.8.4

getLODs() → {Array}

Retrieves the list of LODs (level of detail) associated with the current floor.
Since:
  • 1.7.14
See:
Returns:
of visioweb.LOD list of LODs
Type
Array

getPosition() → {point}

Retrieves the current position of the floor, usually {x: 0,y: 0, z: 0}
Since:
  • 1.7.14
See:
Returns:
default value is {x: 0,y: 0, z: 0}
Type
point

isAutoUpdateLOD() → {boolean}

Used to know if the current floor will update its LODs as function of camera distance
Since:
  • 1.7.17
See:
Returns:
Type
boolean

isContentEnabled() → {boolean}

Queries to see if the floor content (like POIs, labels, icons, and models) is enabled. To actually see the shapes the LOD of the floor has to be enabled.
Since:
  • 1.7.17
See:
Returns:
true if the floor content is enabled.
Type
boolean

isEnabled() → {boolean}

Queries to see if the floor content (like POIs, labels, icons, models and its Surfaces) is enabled. To actually see the shapes the LOD of the floor has to be enabled. To actually see any user-added POIs or Paths, the content should be enabled
Since:
  • 1.7.14
See:
Returns:
true if the floor is enabled.
Type
boolean

setActive(active)

sets floor's LODs and content LOD active, which means the user will be able to interact with them.
Parameters:
Name Type Description
active boolean
Since:
  • 1.9.8

setAutoUpdateLOD(value)

If set to true, there will be one LOD enabled for this floor as a function of distance. when setting to true, the actual LOD will not be enabled until the next screen refresh (automatic) if false, you would have to enable a specific LOD of this floor in order to see it.
Parameters:
Name Type Description
value boolean
Since:
  • 1.7.17
See:

setContentEnabled(enabled)

Enables the display of the POIs on a given floor (while still showing the surfaces). The floor itself must be enabled for the content to be visible.
Parameters:
Name Type Description
enabled boolean
Since:
  • 1.7.17
See:

setEnabled(enabled)

Enables the floor content (like POIs, labels, icons, and models), you need to enable the LOD separately If disabled, all the LODs will not be visible, even if they are enabled. When enabling floors by hand, the mapviewer.getCurrentFloor() and mapviewer.changeFloor() will probably no longer be valid.
Parameters:
Name Type Description
enabled boolean
Since:
  • 1.7.14
See:

setLODEnabled(lodIndex)

enables one LOD and disables the others
Parameters:
Name Type Description
lodIndex number the targeted LOD's index
Since:
  • 1.9.8

setOpacity(alpha:)

set opacity for floor
Parameters:
Name Type Description
alpha: number must be between 0.0 and 1.0
Since:
  • 1.17.0

setPosition(position)

Moves the whole floor (its content and its LODs) to a new position
Parameters:
Name Type Description
position point object of the form {x: 0,y: 0, z: N}
Since:
  • 1.7.14