Buildings, Blocks, Levels

This section documents classes you can use to work with a building.

GermaniumWeb models the scene as a set of Buildings .  Each building is in turn a set of Blocks and each block is a set of Levels .  This organization is called the “BBL” (Building, Block, Level).

You can learn how to use a building from the Building class documentation.

Class list

Author

G Element Germanium team

Entity

An abstract class.

Inheritance diagram

Object BBLObject Placemark Block Building Level

Since

Version 0.0.10

Summary
Constants
Entity types Deprecated; use Germanium Types instead.
Entity properties
GetName Gets the name of this Entity .
SetName Sets the name of this Entity .
GetDescription Gets the description of this Entity .
GetContent Gets the content property of this Entity .
SetContent Sets the content property of this Entity .
SetMoreInfoUrl Sets the URL link to a page providing more info about this Entity .
GetMoreInfoUrl Gets URL to the “more info” page about this Entity .
General properties
GetType Returns the type of this Entity .
GetHandle Gets the Handle of this Entity .
Visibility property
GetVisibility Gets the visibility state of this Entity .
SetVisibility Sets the visibility state of this Entity .
Show Makes this Entity visible.
Hide Hides this Entity .
IsHidden Returns true if this Entity is currently hidden.

Constants

Entity types

Deprecated; use Germanium Types instead.

Germanium.Entity.BuildingSee Building .
Germanium.Entity.BlockSee Block .
Germanium.Entity.LevelSee Level .
Germanium.Entity.PlacemarkSee Placemark .

Entity properties

GetName

GetName : function ()

Gets the name of this Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

SetName

SetName : function (name)

Sets the name of this Entity .

Returns

void

Throws

Since

Version 0.1.0.12

GetDescription

GetDescription : function ()

Gets the description of this Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

GetContent

GetContent : function ()

Gets the content property of this Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

SetContent

SetContent : function (content)

Sets the content property of this Entity .

Notes

  • Is user-specified text giving a full description of this Entity .
  • HTML is supported.

Parameter

{string} contentString to be assigned as content of this Entity

Returns

void

Throws

Since

Version 0.1.0.21

SetMoreInfoUrl

SetMoreInfoUrl : function (url)

Sets the URL link to a page providing more info about this Entity .

Parameter

{string} urlURL to be set.

Returns

void

Throws

Since

Version 0.1.0.21

GetMoreInfoUrl

GetMoreInfoUrl : function ()

Gets URL to the “more info” page about this Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

General properties

GetType

GetType : function ()

Returns the type of this Entity .  See Germanium Types for possible types.

Inherited from Object .

Returns

string

Since

Version 0.3.3.0

GetHandle

GetHandle : function ()

Gets the Handle of this Entity .  Handles are system-generated and non-persistent.  Use a handle as a fast, lightweight alternative to passing around an Entity.

Inherited from Object .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.0.0.1

Visibility property

GetVisibility

GetVisibility : function ()

Gets the visibility state of this Entity .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

SetVisibility

SetVisibility : function (bVal)

Sets the visibility state of this Entity .

Parameter

{bool} bVal

Inherited from Hideable .

Returns

void

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

Show

Show : function ()

Makes this Entity visible.  Equivalent to SetVisibility(true).

Inherited from Hideable .

Returns

void

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

Hide

Hide : function ()

Hides this Entity .  Equivalent to SetVisibility(false).

Inherited from Hideable .

Returns

void

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

IsHidden

IsHidden : function ()

Returns true if this Entity is currently hidden.  This function returns the opposite value as GetVisibility .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

GetVisibility

BBLObject

An abstract class; base class for Building , Block , and Level classes.

Inheritance diagram

Entity Hideable Block Building Level

Since

Version 1.3.12.0

Summary
BBL properties
GetBBLId Gets the BBLId of this BBLObject .
GetNumberOfAttachedVisualObjects Returns the number of VisualObjects attached to this BBLObject .
GetAttachedVisualObjectByIndex Gets the VisualObject attached to this BBLObject that has the specified index.
GetAttachedVisualObjectByHandle Gets the VisualObject attached to this BBLObject that has the specified handle.
GetAttachedVisualObjectByName Gets the VisualObject attached to this BBLObject that has the specified name.
General properties
GetType Returns the type of this BBLObject .
GetHandle Gets the Handle of this BBLObject .
Visibility property
GetVisibility Gets the visibility state of this BBLObject .
SetVisibility Sets the visibility state of this BBLObject .
Show Makes this BBLObject visible.
Hide Hides this BBLObject .
IsHidden Returns true if this BBLObject is currently hidden.
Entity properties
GetName Gets the name of this BBLObject .
SetName Sets the name of this BBLObject .
GetContent Gets the content property of this BBLObject .
SetContent Sets the content property of this BBLObject .
GetMoreInfoUrl Gets URL to the “more info” page about this BBLObject .
SetMoreInfoUrl Sets the URL link to a page providing more info about this BBLObject .

BBL properties

GetBBLId

GetBBLId : function ()

Gets the BBLId of this BBLObject .  Use the BBLId instead of name to retrieve buildings, blocks and levels of datasets which you have prepared.  This allows you to change their names later without affecting your application.

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.3.6.0

GetNumberOfAttachedVisualObjects

GetNumberOfAttachedVisualObjects : function ()

Returns the number of VisualObjects attached to this BBLObject .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.3

GetAttachedVisualObjectByIndex

GetAttachedVisualObjectByIndex : function (index)

Gets the VisualObject attached to this BBLObject that has the specified index.

Parameter

{int} indexIndex of attached VisualObject to be retrieved

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByHandle

GetAttachedVisualObjectByHandle : function (handle)

Gets the VisualObject attached to this BBLObject that has the specified handle.  Returns null if there is no matching VisualObject found.

Parameter

{string} handleHandle of attached VisualObject to be retrieved.  Handles are system-generated and non persistent.

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByName

Gets the VisualObject attached to this BBLObject that has the specified name.  Returns null if there is no matching VisualObject found.  If there are multiple VisualObjects with the same name, only the first one found is returned.

Parameter

{string} nameName of attached VisualObject to be retrieved.

Returns

VisualObject

Throws

Since

Version 1.3.13.3

General properties

GetType

GetType : function ()

Returns the type of this BBLObject .  See Germanium Types for possible types.

Inherited from Object .

Returns

string

Since

Version 0.3.3.0

GetHandle

GetHandle : function ()

Gets the Handle of this BBLObject .  Handles are system-generated and non-persistent.  Use a handle as a fast, lightweight alternative to passing around a BBLObject.

Inherited from Object .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.0.0.1

Visibility property

GetVisibility

GetVisibility : function ()

Gets the visibility state of this BBLObject .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

SetVisibility

SetVisibility : function (bVal)

Sets the visibility state of this BBLObject .

Parameter

{bool} bVal

Inherited from Hideable .

Returns

void

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

Show

Show : function ()

Makes this BBLObject visible.  Equivalent to SetVisibility(true).

Inherited from Hideable .

Returns

void

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

Hide

Hide : function ()

Hides this BBLObject .  Equivalent to SetVisibility(false).

Inherited from Hideable .

Returns

void

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

IsHidden

IsHidden : function ()

Returns true if this BBLObject is currently hidden.  This function returns the opposite value as GetVisibility .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

GetVisibility

Entity properties

GetName

GetName : function ()

Gets the name of this BBLObject .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

SetName

SetName : function (name)

Sets the name of this BBLObject .

Inherited from Entity .

Returns

void

Throws

Since

Version 0.1.0.12

GetContent

GetContent : function ()

Gets the content property of this BBLObject .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

SetContent

SetContent : function (content)

Sets the content property of this BBLObject .

Notes

  • Is user-specified text giving a full description of this BBLObject .
  • HTML is supported.

Parameter

{string} contentString to be assigned as content of this BBLObject

Inherited from Entity .

Returns

void

Throws

Since

Version 0.1.0.21

GetMoreInfoUrl

GetMoreInfoUrl : function ()

Gets URL to the “more info” page about this BBLObject .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

SetMoreInfoUrl

SetMoreInfoUrl : function (url)

Sets the URL link to a page providing more info about this BBLObject .

Parameter

{string} urlURL to be set.

Inherited from Entity .

Returns

void

Throws

Since

Version 0.1.0.21

Building

Represents a building (for example “Suntec City”).

You will typically use a building in your web application as follows :

  1. You add a building to the scene.
  2. You gain access to the loaded building.
  3. You manipulate the building.
  4. You remove a building you no longer need.

Here is how you can achieve the steps above.

You add a building to the scene by loading a building file.  You do this by calling the function WebControl.Load .  Note that you should not instantiate the Building class using ‘new’.

You can register to the OnBuildingAdded Event to detect when a Building has been loaded and added to the scene.

You gain access to a building by :

indexIndex is the simplest to use.  Use it when you want to retrieve all buildings in the scene one by one.  Be careful however, as any further data loading or unloading may change the index ordering.  See WebControl.GetBuildingByIndex .
BBL IDThe BBL ID allows you to consistently retrieve buildings if you know in advance which building you are going to load.  See WebControl.GetBuildingByBBLId .
nameThe first building found with a matching name will be returned.  See WebControl.GetBuildingByName .
handleA handle is a system-generated runtime id.  Use it as a fast, lightweight alternative to passing around a building object that you have previously retrieved.  Unlike the index, a handle is guaranteed to be persistent for the rest of the plugin’s lifespan.  See WebControl.GetBuildingByHandle .

You manipulate the building by calling any function provided by Building , Block , or Level class.

You remove a building you no longer need by calling WebControl.UnloadAll .

Inheritance diagram

BBLObject

Since

Version 0.0.6

See also

Related classes

Summary
Building functions
ShowAllBlocks Shows all Blocks in this Building .
HideAllBlocks Hides all Blocks in this Building .
GetNumberOfBlocks Returns the number of Block s in this Building .
GetBlockByBBLId Returns the Block in this Building with the specified BBL ID.
GetBlockByIndex Returns the Block in this Building with the specified index.
GetBlockByHandle Returns the Block in this Building with the specified Handle.
GetBlockByName Returns the Block in this Building with the specified name.
General properties
GetType Returns the type of this Building .
GetHandle Gets the Handle of this Building .
Visibility property
GetVisibility Gets the visibility state of this Building .
SetVisibility Sets the visibility state of this Building .
Show Makes this Building visible.
Hide Hides this Building .
IsHidden Returns true if this Building is currently hidden.
Entity properties
GetName Gets the name of this Building .
GetDescription Gets the description of this Building .
GetContent Gets the content property of this Building .
GetMoreInfoUrl Gets URL to the “more info” page about this Building .
BBL properties
GetBBLId Gets the BBLId of this Building .
GetNumberOfAttachedVisualObjects Returns the number of VisualObjects attached to this Building .
GetAttachedVisualObjectByIndex Gets the VisualObject attached to this Building that has the specified index.
GetAttachedVisualObjectByHandle Gets the VisualObject attached to this Building that has the specified handle.
GetAttachedVisualObjectByName Gets the VisualObject attached to this Building that has the specified name.

Building functions

ShowAllBlocks

ShowAllBlocks : function (bUpdateChildren)

Shows all Blocks in this Building .

Parameter

{bool} bUpdateChildren(optional) Specifies if all the Levels in this Building should also be shown.  Setting this true causes only programmatic difference but no visual difference.  See example below for illustration.

Returns

void

Events

  • OnBlockShown
  • OnLevelShown if bUpdateChildren is set true

Throws

”uninitialized_plugin_object” Exception

Example

Let us assume that this Building object is stored the variable bldg.

bldg.ShowAllBlocks(true);

is programmatically equivalent to

bldg.ShowAllBlocks();
for (i=0; i<bldg.GetNumberOfBlocks(); i++) {
    var blk = bldg.GetBlockByIndex(i);
    for (j=0; j<blk.GetNumberOfLevels(); j++) {
        blk.GetLevelByIndex(j).Show();
    }
}

Since

Version 1.3.5.2

HideAllBlocks

HideAllBlocks : function (bUpdateChildren)

Hides all Blocks in this Building .

Parameter

{bool} bUpdateChildren(optional) Specifies if all the Levels in this Building should also be hidden.  Setting this true causes only programmatic difference but no visual difference.  See example below for illustration.

Returns

void

Events

  • OnBlockHidden
  • OnLevelHidden if bUpdateChildren is set true

Throws

”uninitialized_plugin_object” Exception

Example

Let us assume that this Building object is stored the variable bldg.

bldg.HideAllBlocks(true);

is programmatically equivalent to

bldg.HideAllBlocks();
for (i=0; i<bldg.GetNumberOfBlocks(); i++) {
    var blk = bldg.GetBlockByIndex(i);
    for (j=0; j<blk.GetNumberOfLevels(); j++) {
        blk.GetLevelByIndex(j).Hide();
    }
}

Since

Version 1.3.5.2

GetNumberOfBlocks

GetNumberOfBlocks : function ()

Returns the number of Block s in this Building .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.4

GetBlockByBBLId

GetBlockByBBLId : function (strBBLId)

Returns the Block in this Building with the specified BBL ID.  Returns null if no such Block exists.

Parameter

{string} strBBLIdBBL ID of the Block to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Block

Throws

  • ”invalid_argument” Exception
  • ”uninitialized_plugin_object” Exception

More information

GermaniumWeb provides you 4 ways to access a block:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

Since

Version 1.0.1.0

GetBlockByIndex

GetBlockByIndex : function (idx)

Returns the Block in this Building with the specified index.

Parameter

{int} idxIndex of the Block to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Block

Throws

  • ”invalid_argument” Exception
  • ”out_of_range” Exception
  • ”uninitialized_plugin_object” Exception

More information

GermaniumWeb provides you 4 ways to access a block:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

Since

Version 0.0.4

GetBlockByHandle

GetBlockByHandle : function (strHandle)

Returns the Block in this Building with the specified Handle.  Returns null if no such Block exists.

Parameter

{string} strHandleHandle of the Block to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Block

Throws

More information

GermaniumWeb provides you 4 ways to access a block:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

Since

Version 0.3.6.1

GetBlockByName

GetBlockByName : function (name)

Returns the Block in this Building with the specified name.  Returns null if no such Block exists.

Parameter

{string} nameName of Block to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Block

Throws

More information

GermaniumWeb provides you 4 ways to access a block:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

Since

Version 0.1.0.23

General properties

GetType

GetType : function ()

Returns the type of this Building .  See Germanium Types for possible types.

Inherited from Object .

Returns

string

Since

Version 0.3.3.0

GetHandle

GetHandle : function ()

Gets the Handle of this Building .  Handles are system-generated and non-persistent.  Use a handle as a fast, lightweight alternative to passing around a Building.

Inherited from Object .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.0.0.1

Visibility property

GetVisibility

GetVisibility : function ()

Gets the visibility state of this Building .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

SetVisibility

SetVisibility : function (bVal)

Sets the visibility state of this Building .

Parameter

{bool} bVal

Inherited from Hideable .

Returns

void

Events

  • OnBuildingHidden if bVal is false
  • OnBuildingShown if bVal is true

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

Show

Show : function ()

Makes this Building visible.  Equivalent to SetVisibility(true).

Inherited from Hideable .

Returns

void

Event

OnBuildingShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

Hide

Hide : function ()

Hides this Building .  Equivalent to SetVisibility(false).

Inherited from Hideable .

Returns

void

Event

OnBuildingHidden

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

IsHidden

IsHidden : function ()

Returns true if this Building is currently hidden.  This function returns the opposite value as GetVisibility .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

GetVisibility

Entity properties

GetName

GetName : function ()

Gets the name of this Building .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

GetDescription

GetDescription : function ()

Gets the description of this Building .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

GetContent

GetContent : function ()

Gets the content property of this Building .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

GetMoreInfoUrl

GetMoreInfoUrl : function ()

Gets URL to the “more info” page about this Building .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

BBL properties

GetBBLId

GetBBLId : function ()

Gets the BBLId of this Building .  Use the BBLId instead of name to retrieve buildings, blocks and levels of datasets which you have prepared.  This allows you to change their names later without affecting your application.

Inherited from BBLObject .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.3.6.0

GetNumberOfAttachedVisualObjects

GetNumberOfAttachedVisualObjects : function ()

Returns the number of VisualObjects attached to this Building .

Inherited from BBLObject .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.3

GetAttachedVisualObjectByIndex

GetAttachedVisualObjectByIndex : function (index)

Gets the VisualObject attached to this Building that has the specified index.

Parameter

{int} indexIndex of attached VisualObject to be retrieved

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByHandle

GetAttachedVisualObjectByHandle : function (handle)

Gets the VisualObject attached to this Building that has the specified handle.  Returns null if there is no matching VisualObject found.

Parameter

{string} handleHandle of attached VisualObject to be retrieved.  Handles are system-generated and non persistent.

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByName

GetAttachedVisualObjectByName : function (name)

Gets the VisualObject attached to this Building that has the specified name.  Returns null if there is no matching VisualObject found.  If there are multiple VisualObjects with the same name, only the first one found is returned.

Parameter

{string} nameName of attached VisualObject to be retrieved.

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

Block

Represents a block or a wing (for example “Tower 1” in Suntec City).

You should not instantiate the Block class using ‘new’.  Instead, use WebControl.Load to load Buildings into the scene.  These Buildings will have blocks.  You can then access a block by:

indexIndex is the simplest to use.  Use it when you want to retrieve all blocks in a building one by one.  Be careful however, as any further data loading or unloading may change the index ordering.  See Building.GetBlockByIndex .
BBL IDThe BBL ID allows you to consistently retrieve blocks if you know in advance which building you are going to load.  See Building.GetBlockByBBLId .
nameThe first block found with a matching name will be returned.  See Building.GetBlockByName .
handleA handle is a system-generated runtime id.  Use it as a fast, lightweight alternative to passing around a block object that you have previously retrieved.  Unlike the index, a handle is guaranteed to be persistent for the rest of the plugin’s lifespan.  See Building.GetBlockByHandle .

Inheritance diagram

BBLObject

Since

Version 0.0.6

See also

Related classes

Summary
Block functions
ShowAllLevels Shows all Levels in this Block .
HideAllLevels Hides all Levels in this Block .
GetNumberOfLevels Returns the number of Level s in this Block .
GetLevelByBBLId Returns the Level in this Block with the specified BBL ID.
GetLevelByIndex Returns the Level in this Block with the specified index.
GetLevelByHandle Returns the Level in this Block with the specified Handle.
GetLevelByName Returns the Level in this Block with the specified name.
GetTopLevel Returns the Level at the top of this Block .
GetBottomLevel Returns the Level at the bottom of this Block .
GetParentBuilding Returns the Building in which this Block is located.
General properties
GetType Returns the type of this Block .
GetHandle Gets the Handle of this Block .
Visibility property
GetVisibility Gets the visibility state of this Block .
SetVisibility Sets the visibility state of this Block .
Show Makes this Block visible.
Hide Hides this Block .
IsHidden Returns true if this Block is currently hidden.
Entity properties
GetName Gets the name of this Block .
GetDescription Gets the description of this Block .
GetContent Gets the content property of this Block .
GetMoreInfoUrl Gets URL to the “more info” page about this Block .
BBL properties
GetBBLId Gets the BBLId of this Block .
GetNumberOfAttachedVisualObjects Returns the number of VisualObjects attached to this Block .
GetAttachedVisualObjectByIndex Gets the VisualObject attached to this Block that has the specified index.
GetAttachedVisualObjectByHandle Gets the VisualObject attached to this Block that has the specified handle.
GetAttachedVisualObjectByName Gets the VisualObject attached to this Block that has the specified name.

Block functions

ShowAllLevels

ShowAllLevels : function ()

Shows all Levels in this Block .

Returns

void

Event

OnLevelShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.5.2

HideAllLevels

HideAllLevels : function ()

Hides all Levels in this Block .

Returns

void

Event

OnLevelHidden

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.5.2

GetNumberOfLevels

GetNumberOfLevels : function ()

Returns the number of Level s in this Block .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.4

GetLevelByBBLId

GetLevelByBBLId : function (strBBLId)

Returns the Level in this Block with the specified BBL ID.  Returns null if no such Level found.

Parameter

{string} strBBLIdBBL ID of the Level to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Level

Throws

More information

GermaniumWeb provides you 4 ways to access a level:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

Since

Version 1.0.1.0

GetLevelByIndex

GetLevelByIndex : function (idx)

Returns the Level in this Block with the specified index.  Note that GermaniumWeb does not index levels in order.  Thus, Level 2 may have a higher index than Level 3.

Parameter

{int} idxIndex of the Level to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Level

Throws

More information

GermaniumWeb provides you 4 ways to access a level:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

See also

Since

Version 0.0.4

GetLevelByHandle

GetLevelByHandle : function (strHandle)

Returns the Level in this Block with the specified Handle.  Returns null if no such Level found.

Parameter

{string} strHandleHandle of the Level to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Level

Throws

More information

GermaniumWeb provides you 4 ways to access a level:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

Since

Version 0.3.6.1

GetLevelByName

GetLevelByName : function (name)

Returns the Level in this Block with the specified name.  Returns null if no such Level exists.

Parameter

{string} nameName of Level to be retrieved.  See WebControl.Using handle, index, & BBL ID .

Returns

Level

Throws

More information

GermaniumWeb provides you 4 ways to access a level:

  1. by index,
  2. by BBL ID,
  3. by name, and
  4. by handle.
See their comparison in the section WebControl.Using handle, index, & BBL ID .

Since

Version 0.1.0.23

GetTopLevel

GetTopLevel : function ()

Returns the Level at the top of this Block .

Returns

Level

Throws

See also

Since

Version 0.0.4

GetBottomLevel

GetBottomLevel : function ()

Returns the Level at the bottom of this Block .

Returns

Level

Throws

See also

Since

Version 0.0.4

GetParentBuilding

GetParentBuilding : function ()

Returns the Building in which this Block is located.

Returns

Building

Throws

Since

Version 0.2.0.13

General properties

GetType

GetType : function ()

Returns the type of this Block .  See Germanium Types for possible types.

Inherited from Object .

Returns

string

Since

Version 0.3.3.0

GetHandle

GetHandle : function ()

Gets the Handle of this Block .  Handles are system-generated and non-persistent.  Use a handle as a fast, lightweight alternative to passing around a Block.

Inherited from Object .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.0.0.1

Visibility property

GetVisibility

GetVisibility : function ()

Gets the visibility state of this Block .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

SetVisibility

SetVisibility : function (bVal)

Sets the visibility state of this Block .

Parameter

{bool} bVal

Inherited from Hideable .

Returns

void

Events

  • OnBlockHidden if bVal is false
  • OnBlockShown if bVal is true

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

Show

Show : function ()

Makes this Block visible.  Equivalent to SetVisibility(true).

Inherited from Hideable .

Returns

void

Event

OnBlockShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

Hide

Hide : function ()

Hides this Block .  Equivalent to SetVisibility(false).

Inherited from Hideable .

Returns

void

Event

OnBlockHidden

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

IsHidden

IsHidden : function ()

Returns true if this Block is currently hidden.  This function returns the opposite value as GetVisibility .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

GetVisibility

Entity properties

GetName

GetName : function ()

Gets the name of this Block .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

GetDescription

GetDescription : function ()

Gets the description of this Block .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

GetContent

GetContent : function ()

Gets the content property of this Block .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

GetMoreInfoUrl

GetMoreInfoUrl : function ()

Gets URL to the “more info” page about this Block .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

BBL properties

GetBBLId

GetBBLId : function ()

Gets the BBLId of this Block .  Use the BBLId instead of name to retrieve buildings, blocks and levels of datasets which you have prepared.  This allows you to change their names later without affecting your application.

Inherited from BBLObject .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.3.6.0

GetNumberOfAttachedVisualObjects

GetNumberOfAttachedVisualObjects : function ()

Returns the number of VisualObjects attached to this Block .

Inherited from BBLObject .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.3

GetAttachedVisualObjectByIndex

GetAttachedVisualObjectByIndex : function (index)

Gets the VisualObject attached to this Block that has the specified index.

Parameter

{int} indexIndex of attached VisualObject to be retrieved

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByHandle

GetAttachedVisualObjectByHandle : function (handle)

Gets the VisualObject attached to this Block that has the specified handle.  Returns null if there is no matching VisualObject found.

Parameter

{string} handleHandle of attached VisualObject to be retrieved.  Handles are system-generated and non persistent.

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByName

GetAttachedVisualObjectByName : function (name)

Gets the VisualObject attached to this Block that has the specified name.  Returns null if there is no matching VisualObject found.  If there are multiple VisualObjects with the same name, only the first one found is returned.

Parameter

{string} nameName of attached VisualObject to be retrieved.

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

Level

Represents a level (for example “basement level” of Tower 1 in Suntec City).

You should not instantiate the Level class using ‘new’.  Instead, use WebControl.Load to load Buildings into the scene.  These Buildings will have levels.  You can then get a level by:

indexIndex is the simplest to use.  Use it when you want to retrieve all levels in a block one by one.  Be careful however, as any further data loading or unloading may change the index ordering.  See Block.GetLevelByIndex .
BBL IDThe BBL ID allows you to consistently retrieve levels if you know in advance which building you are going to load.  See Block.GetLevelByBBLId .
nameThe first level found with a matching name will be returned.  See Block.GetLevelByName .
handleA handle is a system-generated runtime id.  Use it as a fast, lightweight alternative to passing around a level object that you have previously retrieved.  Unlike the index, a handle is guaranteed to be persistent for the rest of the plugin’s lifespan.  See Block.GetLevelByHandle .

Inheritance diagram

BBLObject

Since

Version 0.0.6

See also

Related classes

Summary
Level functions
GetLevelAbove Gets the Level above this level.
GetLevelBelow Gets the Level below this level.
GetFloorHeight Gets the height of this Level ’s floor relative to the Building base (in meters).
GetFalseCeilingHeight Gets the height of this Level ’s false ceiling relative to the Building base (in meters).
GetTrueCeilingHeight Gets the height of this Level ’s ceiling relative to the Building base (in meters).
HideLevelsAbove Hides all levels above this Level .
HideLevelsBelow Hides all levels below this Level .
ShowLevelsAbove Makes visible all levels above this Level .
ShowLevelsBelow Makes visible all levels below this Level .
UnhideLevelsAbove Deprecated; use ShowLevelsAbove .
UnhideLevelsBelow Deprecated; use ShowLevelsBelow .
GetParentBlock Gets the Block in which this Level is located.
General properties
GetType Returns the type of this Level .
GetHandle Gets the Handle of this Level .
Visibility property
GetVisibility Gets the visibility state of this Level .
SetVisibility Sets the visibility state of this Level .
Show Makes this Level visible.
Hide Hides this Level .
IsHidden Returns true if this Level is currently hidden.
Entity properties
GetName Gets the name of this Level .
GetDescription Gets the description of this Level .
GetContent Gets the content property of this Level .
GetMoreInfoUrl Gets URL to the “more info” page about this Level .
BBL properties
GetBBLId Gets the BBLId of this Level .
GetFullyQualifiedBBLId Gets the fully qualified BBLId of this Level .
GetNumberOfAttachedVisualObjects Returns the number of VisualObjects attached to this Level .
GetAttachedVisualObjectByIndex Gets the VisualObject attached to this Level that has the specified index.
GetAttachedVisualObjectByHandle Gets the VisualObject attached to this Level that has the specified handle.
GetAttachedVisualObjectByName Gets the VisualObject attached to this Level that has the specified name.

Level functions

GetLevelAbove

GetLevelAbove : function ()

Gets the Level above this level.  If this level is the highest, then returns null.

Returns

Level

Throws

Since

Version 0.0.6

GetLevelBelow

GetLevelBelow : function ()

Gets the Level below this level.  If this level is the lowest, then returns null.

Returns

Level

Throws

Since

Version 0.0.6

GetFloorHeight

GetFloorHeight : function ()

Gets the height of this Level ’s floor relative to the Building base (in meters).

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.9

GetFalseCeilingHeight

GetFalseCeilingHeight : function ()

Gets the height of this Level ’s false ceiling relative to the Building base (in meters).

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.9

GetTrueCeilingHeight

GetTrueCeilingHeight : function ()

Gets the height of this Level ’s ceiling relative to the Building base (in meters).

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.9

HideLevelsAbove

HideLevelsAbove : function ()

Hides all levels above this Level .

Returns

void

Event

OnLevelHidden

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.16

HideLevelsBelow

HideLevelsBelow : function ()

Hides all levels below this Level .

Returns

void

Event

OnLevelHidden

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.16

ShowLevelsAbove

ShowLevelsAbove : function ()

Makes visible all levels above this Level .

Returns

void

Event

OnLevelShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.3.0

ShowLevelsBelow

ShowLevelsBelow : function ()

Makes visible all levels below this Level .

Returns

void

Event

OnLevelShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.3.0

UnhideLevelsAbove

UnhideLevelsAbove : function ()

Deprecated; use ShowLevelsAbove .  Unhides all levels above this Level .

Returns

void

Event

OnLevelShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.16

Deprecated in

Version 1.3.3.0

UnhideLevelsBelow

UnhideLevelsBelow : function ()

Deprecated; use ShowLevelsBelow .  Unhides all levels below this Level .

Returns

void

Event

OnLevelShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.16

Deprecated in

Version 1.3.3.0

GetParentBlock

GetParentBlock : function ()

Gets the Block in which this Level is located.

Returns

Block

Throws

Since

Version 0.2.0.13

General properties

GetType

GetType : function ()

Returns the type of this Level .  See Germanium Types for possible types.

Inherited from Object .

Returns

string

Since

Version 0.3.3.0

GetHandle

GetHandle : function ()

Gets the Handle of this Level .  Handles are system-generated and non-persistent.  Use a handle as a fast, lightweight alternative to passing around a Level.

Inherited from Object .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.0.0.1

Visibility property

GetVisibility

GetVisibility : function ()

Gets the visibility state of this Level .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

SetVisibility

SetVisibility : function (bVal)

Sets the visibility state of this Level .

Parameter

{bool} bVal

Inherited from Hideable .

Returns

void

Events

  • OnLevelHidden if bVal is false
  • OnLevelShown if bVal is true

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

Show

Show : function ()

Makes this Level visible.  Equivalent to SetVisibility(true).

Inherited from Hideable .

Returns

void

Event

OnLevelShown

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

Hide

Hide : function ()

Hides this Level .  Equivalent to SetVisibility(false).

Inherited from Hideable .

Returns

void

Event

OnLevelHidden

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

SetVisibility

IsHidden

IsHidden : function ()

Returns true if this Level is currently hidden.  This function returns the opposite value as GetVisibility .

Inherited from Hideable .

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

See also

GetVisibility

Entity properties

GetName

GetName : function ()

Gets the name of this Level .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

GetDescription

GetDescription : function ()

Gets the description of this Level .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

GetContent

GetContent : function ()

Gets the content property of this Level .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

GetMoreInfoUrl

GetMoreInfoUrl : function ()

Gets URL to the “more info” page about this Level .

Inherited from Entity .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.21

BBL properties

GetBBLId

GetBBLId : function ()

Gets the BBLId of this Level .  Use the BBLId instead of name to retrieve buildings, blocks and levels of datasets which you have prepared.  This allows you to change their names later without affecting your application.

Inherited from BBLObject .

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.3.6.0

GetFullyQualifiedBBLId

GetFullyQualifiedBBLId : function ()

Gets the fully qualified BBLId of this Level .  A fully qualified BBLId is of the format “[BuildingBBLId]::[BlockBBLId]::[LevelBBLId]”

Returns

string

Throws

Since

Version 1.5.0.0

GetNumberOfAttachedVisualObjects

GetNumberOfAttachedVisualObjects : function ()

Returns the number of VisualObjects attached to this Level .

Inherited from BBLObject .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.3

GetAttachedVisualObjectByIndex

GetAttachedVisualObjectByIndex : function (index)

Gets the VisualObject attached to this Level that has the specified index.

Parameter

{int} indexIndex of attached VisualObject to be retrieved

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByHandle

GetAttachedVisualObjectByHandle : function (handle)

Gets the VisualObject attached to this Level that has the specified handle.  Returns null if there is no matching VisualObject found.

Parameter

{string} handleHandle of attached VisualObject to be retrieved.  Handles are system-generated and non persistent.

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

GetAttachedVisualObjectByName

GetAttachedVisualObjectByName : function (name)

Gets the VisualObject attached to this Level that has the specified name.  Returns null if there is no matching VisualObject found.  If there are multiple VisualObjects with the same name, only the first one found is returned.

Parameter

{string} nameName of attached VisualObject to be retrieved.

Inherited from BBLObject .

Returns

VisualObject

Throws

Since

Version 1.3.13.3

LevelCursor

Warning: Experimental feature.  These functions are likely to have breaking changes in future API releases.  If you use these functions, expect to have to modify your application at the next API release.

You should not instantiate the LevelCursor class using the JavaScript keyword ‘new’.  Instead, use the function WebControl.GetLevelCursor .

Using the LevelCursor is not essential; you may want to use it to keep track of which level you are on in the scene (state persistence) and to move around from there (delta operations).  The LevelCursor provides you a way to explore the scene in an analogous way as the cursor in a text editor.

The text cursor marks the position of a character instead of a line or a page (even though modern text editors allow us to select multiple characters, the exact position of the cursor is still a character).  Similarly, the LevelCursor can be set only at a particular Level ; not a Block or a Building .  Think of Levels as analogous to characters, Blocks to lines, and Buildings to pages.

When you populate an empty scene with buildings (by calling WebControl.Load ), the LevelCursor is set to the first Building (index 0), the first Block (index 0), the bottom Level .  When you empty the scene (by calling WebControl.UnloadAll ), the LevelCursor is set to null.

You can manipulate the LevelCursor in a similar way as how you move the text cursor :

moving up/down one Levelanalogous to moving cursor one character at a time
jumping up/down multiple Levelsanalogous to moving between words
jumping to the bottom/top Levelanalogous to going to the start/end of line
jumping to the next/previous Blockanalogous to moving cursor to the next/previous line
jumping to the next/previous Buildinganalogous to moving cursor to the next/previous page

There are other ways that do not have the equivalent in text cursor that you may still find useful, such as jumping to a building, block, or level by specifying their BBL ID, handle, or index.

Note that there is no visual cue to tell you where the LevelCursor is currently set at.  LevelCursor is a programming concept, not a graphical interface.

After you have moved the LevelCursor to where you want, you can perform multiple operations.  For example, you can view the current level as follows (assuming that you store the LevelCursor in the variable cursor):

cursor.GetLevel().Show();
cursor.GetLevel().ShowLevelsBelow();
cursor.GetLevel().HideLevelsAbove();

See also

Related classes

Since

Version 1.3.7.0

Summary
Basic functions
GetLevel Gets the Level to which the LevelCursor is set.
IsNull Returns true if the LevelCursor is set to null.
Using option parameter This section documents how you can use the option parameter when moving the LevelCursor .
Jumping behavior This section documents the LevelCursor behavior when jumping to another Block or another Building .
Moving to a Level
JumpToLevel Moves the LevelCursor to the specified Level .
JumpToLevelByBBLId Moves the LevelCursor to the Level with the specified BBL ID.
JumpToLevelByIndex Moves the LevelCursor to the Level with the specified index.
JumpToLevelByHandle Moves the LevelCursor to the Level with the specified handle.
JumpToBottomLevel Moves the LevelCursor to the bottom Level in the current Block .
JumpToTopLevel Moves the LevelCursor to the top Level in the current Block .
MoveUp Moves the LevelCursor up one Level .
MoveDown Moves the LevelCursor down one Level .
JumpUp Moves the LevelCursor up the specified number of Levels .
JumpDown Moves the LevelCursor down the specified number of Levels .
Moving to a Block
JumpToBlock Moves the LevelCursor to the specified Block .
JumpToBlockByBBLId Moves the LevelCursor to the Block with the specified BBL ID.
JumpToBlockByIndex Moves the LevelCursor to the Block with the specified index.
JumpToBlockByHandle Moves the LevelCursor to the Block with the specified handle.
JumpToFirstBlock Moves the LevelCursor to the first Block in the current Building .
JumpToLastBlock Moves the LevelCursor to the last Block in the current Building .
JumpToNextBlock Moves the LevelCursor to the next Block in the current Building .
JumpToPreviousBlock Moves the LevelCursor to the previous Block in the current Building .
Moving to a Building
JumpToBuilding Moves the LevelCursor to the specified Building .
JumpToBuildingByBBLId Moves the LevelCursor to the Building with the specified BBL ID.
JumpToBuildingByIndex Moves the LevelCursor to the Building with the specified index.
JumpToBuildingByHandle Moves the LevelCursor to the Building with the specified handle.
JumpToFirstBuilding Moves the LevelCursor to the first Building in the scene.
JumpToLastBuilding Moves the LevelCursor to the last Building in the scene.
JumpToNextBuilding Moves the LevelCursor to the next Building in the scene.
JumpToPreviousBuilding Moves the LevelCursor to the previous Building in the scene.

Basic functions

GetLevel

GetLevel : function ()

Gets the Level to which the LevelCursor is set.  Returns null if the scene is empty.

Returns

Level

Since

Version 1.3.7.0

IsNull

IsNull : function ()

Returns true if the LevelCursor is set to null.  This happens when the scene is empty.

Returns

bool

Since

Version 1.3.7.0

Using option parameter

This section documents how you can use the option parameter when moving the LevelCursor .

The functions JumpToLevelByBBLId , JumpToLevelByIndex , JumpToBlockByBBLId , and JumpToBlockByIndex accept an option parameter.  option is a JavaScript associative array that defines the API’s search scope for the destination Level / Block .  Valid option keys are :

  • buildingHandle, buildingBBLId, buildingIndex
  • blockHandle, blockBBLId, blockIndex

Here is how they work.  (See example usage in documentation of the 4 functions mentioned above.)

Jumping to a Block

When jumping to a Block , the relevant option keys are buildingHandle, buildingBBLId, and buildingIndex.

  • If option is not specified, the LevelCursor uses the current Building as destination Building .  The current Building is the Building that contains the Level to which the LevelCursor is set.
  • If one of the relevant option keys above is specified, the LevelCursor first uses the option value (which can be a handle, a BBL ID, or an index of a Building ) to get the destination Building .  If you specify more than one option keys, the LevelCursor will use the key with the highest priority.  The priority, from highest to lowest, is buildingHandle, buildingBBLId, buildingIndex.

The LevelCursor then looks for the destination Block in the destination Building .

Jumping to a Level

When jumping to a Level , all option keys are relevant.  There are 3 steps involved :

  1. First, LevelCursor gets destination Building .
    LevelCursor gets the destination Building is the same way as when jumping to a Block described above.
  2. Then, it gets destination Block from destination Building
    • if blockHandle key is specified, the LevelCursor uses its value to get the destination Block .  Note that destination Building is ignored in this case.
    • if LevelCursor successfully gets a destination Building , it then attempts to get destination Block using either blockBBLId key or blockIndex key.  If you specify both keys, the LevelCursor will use the blockBBLId key.
    • finally, if LevelCursor still fails to get a destination Block , it uses the current Block as destination Block .
  3. The LevelCursor then looks for the destination Level in the destination Block .

Jumping behavior

This section documents the LevelCursor behavior when jumping to another Block or another Building .

The LevelCursor can only be set to a Level .  Therefore, when jumping to another Block or another Building , it follows these steps to decide which Level it will be set after the jump:

To illustrate, consider the following scenario.

The green line represents the height the LevelCursor attempts to retain.

  • If jumping to the orange block on the left, the LevelCursor will be set to level 5 after the jump.
  • If jumping to the blue block on the right, the LevelCursor will be set to level 3. 
    • After jumping to the blue block, if we then jump the LevelCursor back to the grey block in the middle, the LevelCursor will be set to the same level as before jumping to the blue block.

This behavior is similar to how the cursor in a text editor attempts to retain its distance from the left margin when moving from one line to a neighboring line or when jumping between pages.

Caution: This behavior relies on the loaded building file to provide correct floor heights.  If a file has missing or erroneous floor height values, then LevelCursor will behave unexpectedly.

Moving to a Level

JumpToLevel

JumpToLevel: function (level)

Moves the LevelCursor to the specified Level .  If the LevelCursor is already set at the specified Level , this function returns false.

Parameter

{Level} levelthe destination Level

Returns

booltrue if LevelCursor jumps, false otherwise.

Since

Version 1.3.7.0

JumpToLevelByBBLId

JumpToLevelByBBLId : function (levelBBLId,
option)

Moves the LevelCursor to the Level with the specified BBL ID.

Parameters

{string} levelBBLIdBBL ID of destination Level .
See the section WebControl.Using handle, index, & BBL ID .
{assocArray} option(optional) defines the search scope for the level with the specified BBL ID.  option can contain any of the following keys: buildingBBLId, buildingIndex, buildingHandle, blockBBLId, blockIndex, blockHandle.
See the section Using option parameter .

Returns

booltrue if jump is successful, false otherwise

Sample usage

Assume that GermaniumWeb plugin object is stored in variable germ.

var cursor = germ.GetLevelCursor();
cursor.JumpToLevelByBBLId('Basement_1',
    {buildingBBLId: 'SuntecCity', blockBBLId: 'Tower'});

Since

Version 1.3.7.0

JumpToLevelByIndex

JumpToLevelByIndex : function (levelIndex,
option)

Moves the LevelCursor to the Level with the specified index.

Parameters

{int} levelIndexindex of the destination Level .
See the section WebControl.Using handle, index, & BBL ID .
{assocArray} option(optional) defines the scope to get the destination Leveloption can contain any of the following keys: buildingBBLId, buildingIndex, buildingHandle, blockBBLId, blockIndex, blockHandle.
See the section Using option parameter .

Returns

booltrue if LevelCursor jumps, false otherwise

Sample usage

Assume that GermaniumWeb plugin object is stored in variable germ.

var cursor = germ.GetLevelCursor();
cursor.JumpToLevelByIndex(0,
    {buildingBBLId: 'SuntecCity', blockBBLId: 'Tower'});

Since

Version 1.3.7.0

JumpToLevelByHandle

JumpToLevelByHandle: function (levelHandle)

Moves the LevelCursor to the Level with the specified handle.  This function does not need option parameter because a handle is guaranteed to be unique in the scene.

Parameters

{string} levelHandlehandle of the destination Level .
See the section WebControl.Using handle, index, & BBL ID .

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToBottomLevel

JumpToBottomLevel: function ()

Moves the LevelCursor to the bottom Level in the current Block .

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToTopLevel

JumpToTopLevel: function ()

Moves the LevelCursor to the top Level in the current Block .

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

MoveUp

MoveUp: function ()

Moves the LevelCursor up one Level .  The LevelCursor remains unchanged if it is already set to the top Level .

Returns

booltrue if LevelCursor moves, false otherwise

Since

Version 1.3.7.0

MoveDown

MoveDown: function ()

Moves the LevelCursor down one Level .  The LevelCursor remains unchanged if it is already set to the bottom Level .

Returns

booltrue if LevelCursor moves, false otherwise

Since

Version 1.3.7.0

JumpUp

JumpUp: function (N)

Moves the LevelCursor up the specified number of Levels .  If the LevelCursor reaches the top Level in fewer steps than the specified number, it stays at the top Level .

Parameter

{int} Nthe number of steps the LevelCursor should move

Returns

booltrue if LevelCursor moves at least 1 step, false otherwise

Since

Version 1.3.7.0

JumpDown

JumpDown: function (N)

Moves the LevelCursor down the specified number of Levels .  If the LevelCursor reaches the bottom Level in fewer steps than the specified number, it stays at the bottom Level .

Parameter

{int} Nthe number of steps the LevelCursor should move

Returns

booltrue if LevelCursor moves at least 1 step, false otherwise

Since

Version 1.3.7.0

Moving to a Block

JumpToBlock

JumpToBlock: function (block)

Moves the LevelCursor to the specified Block .  The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Parameter

{Block} blockthe destination Block

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToBlockByBBLId

JumpToBlockByBBLId: function (blkBBLId,
option)

Moves the LevelCursor to the Block with the specified BBL ID.  The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Parameters

{string} blkBBLIdBBL ID of destination Block .
See the section WebControl.Using handle, index, & BBL ID .
{assocArray} option(optional) defines the search scope for the Block with the specified BBL ID.  option can contain any of the following keys: buildingBBLId, buildingIndex, buildingHandle.
See the section Using option parameter .

Returns

booltrue if LevelCursor jumps, false otherwise

Sample usage

Assume that GermaniumWeb plugin object is stored in variable germ.

var cursor = germ.GetLevelCursor();
cursor.JumpToBlockByBBLId('Tower', {buildingBBLId: 'SuntecCity'});

Since

Version 1.3.7.0

JumpToBlockByIndex

JumpToBlockByIndex: function (blkIndex,
option)

Moves the LevelCursor to the Block with the specified index.  The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Parameters

{int} blkIndexindex of the destination Block .
See the section WebControl.Using handle, index, & BBL ID .
{assocArray} option(optional) defines the scope to get the destination Blockoption can contain any of the following keys: buildingBBLId, buildingIndex, buildingHandle.
See the section Using option parameter .

Returns

booltrue if LevelCursor jumps, false otherwise

Sample usage

Assume that GermaniumWeb plugin object is stored in variable germ.

var cursor = germ.GetLevelCursor();
cursor.JumpToBlockByIndex(0, {buildingBBLId: 'SuntecCity'});

Since

Version 1.3.7.0

JumpToBlockByHandle

JumpToBlockByHandle: function (blkHandle)

Moves the LevelCursor to the Block with the specified handle.  The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Parameters

{string} blkHandlehandle of the destination Block .
See the section WebControl.Using handle, index, & BBL ID .

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToFirstBlock

JumpToFirstBlock: function ()

Moves the LevelCursor to the first Block in the current Building .  The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToLastBlock

JumpToLastBlock: function ()

Moves the LevelCursor to the last Block in the current Building .  The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToNextBlock

JumpToNextBlock: function ()

Moves the LevelCursor to the next Block in the current Building .  If the current Block is the last in the current Building , the LevelCursor does not jump.

The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Returns

booltrue if the LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToPreviousBlock

JumpToPreviousBlock: function ()

Moves the LevelCursor to the previous Block in the current Building .  If the current Block is the first one in the current Building , the LevelCursor does not jump.

The LevelCursor will attempt to keep its height constant when jumping to another Block .  See Jumping behavior section.

Returns

booltrue if the LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

Moving to a Building

JumpToBuilding

JumpToBuilding: function (building)

Moves the LevelCursor to the specified Building .

When jumping to another Building , the LevelCursor will :

Parameter

{Building} buildingthe destination Building

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToBuildingByBBLId

JumpToBuildingByBBLId: function (bldgBBLId)

Moves the LevelCursor to the Building with the specified BBL ID.

When jumping to another Building , the LevelCursor will :

Parameter

{string} bldgBBLIdBBL ID of the destination Building .
See the section WebControl.Using handle, index, & BBL ID .

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToBuildingByIndex

JumpToBuildingByIndex: function (bldgIndex)

Moves the LevelCursor to the Building with the specified index.

When jumping to another Building , the LevelCursor will :

Parameter

{int} bldgIndexindex of the destination Building .
See the section WebControl.Using handle, index, & BBL ID .

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToBuildingByHandle

JumpToBuildingByHandle: function (bldgHandle)

Moves the LevelCursor to the Building with the specified handle.

When jumping to another Building , the LevelCursor will :

Parameter

{string} bldgHandlehandle of the destination Building .
See the section WebControl.Using handle, index, & BBL ID .

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToFirstBuilding

JumpToFirstBuilding: function ()

Moves the LevelCursor to the first Building in the scene.

When jumping to another Building , the LevelCursor will :

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToLastBuilding

JumpToLastBuilding: function ()

Moves the LevelCursor to the last Building in the scene.

When jumping to another Building , the LevelCursor will :

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToNextBuilding

JumpToNextBuilding: function ()

Moves the LevelCursor to the next Building in the scene.

When jumping to another Building , the LevelCursor will :

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

JumpToPreviousBuilding

JumpToPreviousBuilding: function ()

Moves the LevelCursor to the previous Building in the scene.

When jumping to another Building , the LevelCursor will :

Returns

booltrue if LevelCursor jumps, false otherwise

Since

Version 1.3.7.0

GetName : function ()
Gets the name of this Entity.
An abstract class.
SetName : function (name)
Sets the name of this Entity.
GetDescription : function ()
Gets the description of this Entity.
GetContent : function ()
Gets the content property of this Entity.
SetContent : function (content)
Sets the content property of this Entity.
SetMoreInfoUrl : function (url)
Sets the URL link to a page providing more info about this Entity.
GetMoreInfoUrl : function ()
Gets URL to the “more info” page about this Entity.
GetType : function ()
Returns the type of this Entity.
GetHandle : function ()
Gets the Handle of this Entity.
GetVisibility : function ()
Gets the visibility state of this Entity.
SetVisibility : function (bVal)
Sets the visibility state of this Entity.
Show : function ()
Makes this Entity visible.
Hide : function ()
Hides this Entity.
IsHidden : function ()
Returns true if this Entity is currently hidden.
Represents a building (for example “Suntec City”).
Represents a block or a wing (for example “Tower 1” in Suntec City).
Represents a level (for example “basement level” of Tower 1 in Suntec City).
GetBBLId : function ()
Gets the BBLId of this BBLObject.
An abstract class; base class for Building, Block, and Level classes.
GetNumberOfAttachedVisualObjects : function ()
Returns the number of VisualObjects attached to this BBLObject.
An abstract class; base class for Placemark class.
GetAttachedVisualObjectByIndex : function (index)
Gets the VisualObject attached to this BBLObject that has the specified index.
GetAttachedVisualObjectByHandle : function (handle)
Gets the VisualObject attached to this BBLObject that has the specified handle.
GetType : function ()
Returns the type of this BBLObject.
GetHandle : function ()
Gets the Handle of this BBLObject.
GetVisibility : function ()
Gets the visibility state of this BBLObject.
SetVisibility : function (bVal)
Sets the visibility state of this BBLObject.
Show : function ()
Makes this BBLObject visible.
Hide : function ()
Hides this BBLObject.
IsHidden : function ()
Returns true if this BBLObject is currently hidden.
GetName : function ()
Gets the name of this BBLObject.
SetName : function (name)
Sets the name of this BBLObject.
GetContent : function ()
Gets the content property of this BBLObject.
SetContent : function (content)
Sets the content property of this BBLObject.
GetMoreInfoUrl : function ()
Gets URL to the “more info” page about this BBLObject.
SetMoreInfoUrl : function (url)
Sets the URL link to a page providing more info about this BBLObject.
ShowAllBlocks : function (bUpdateChildren)
Shows all Blocks in this Building.
HideAllBlocks : function (bUpdateChildren)
Hides all Blocks in this Building.
GetNumberOfBlocks : function ()
Returns the number of Blocks in this Building.
GetBlockByBBLId : function (strBBLId)
Returns the Block in this Building with the specified BBL ID.
GetBlockByIndex : function (idx)
Returns the Block in this Building with the specified index.
GetBlockByHandle : function (strHandle)
Returns the Block in this Building with the specified Handle.
GetBlockByName : function (name)
Returns the Block in this Building with the specified name.
GetType : function ()
Returns the type of this Building.
GetHandle : function ()
Gets the Handle of this Building.
GetVisibility : function ()
Gets the visibility state of this Building.
SetVisibility : function (bVal)
Sets the visibility state of this Building.
Show : function ()
Makes this Building visible.
Hide : function ()
Hides this Building.
IsHidden : function ()
Returns true if this Building is currently hidden.
GetName : function ()
Gets the name of this Building.
GetDescription : function ()
Gets the description of this Building.
GetContent : function ()
Gets the content property of this Building.
GetMoreInfoUrl : function ()
Gets URL to the “more info” page about this Building.
GetBBLId : function ()
Gets the BBLId of this Building.
GetNumberOfAttachedVisualObjects : function ()
Returns the number of VisualObjects attached to this Building.
GetAttachedVisualObjectByIndex : function (index)
Gets the VisualObject attached to this Building that has the specified index.
GetAttachedVisualObjectByHandle : function (handle)
Gets the VisualObject attached to this Building that has the specified handle.
GetAttachedVisualObjectByName : function (name)
Gets the VisualObject attached to this Building that has the specified name.
ShowAllLevels : function ()
Shows all Levels in this Block.
HideAllLevels : function ()
Hides all Levels in this Block.
GetNumberOfLevels : function ()
Returns the number of Levels in this Block.
GetLevelByBBLId : function (strBBLId)
Returns the Level in this Block with the specified BBL ID.
GetLevelByIndex : function (idx)
Returns the Level in this Block with the specified index.
GetLevelByHandle : function (strHandle)
Returns the Level in this Block with the specified Handle.
GetLevelByName : function (name)
Returns the Level in this Block with the specified name.
GetTopLevel : function ()
Returns the Level at the top of this Block.
GetBottomLevel : function ()
Returns the Level at the bottom of this Block.
GetParentBuilding : function ()
Returns the Building in which this Block is located.
GetType : function ()
Returns the type of this Block.
GetHandle : function ()
Gets the Handle of this Block.
GetVisibility : function ()
Gets the visibility state of this Block.
SetVisibility : function (bVal)
Sets the visibility state of this Block.
Show : function ()
Makes this Block visible.
Hide : function ()
Hides this Block.
IsHidden : function ()
Returns true if this Block is currently hidden.
GetName : function ()
Gets the name of this Block.
GetDescription : function ()
Gets the description of this Block.
GetContent : function ()
Gets the content property of this Block.
GetMoreInfoUrl : function ()
Gets URL to the “more info” page about this Block.
GetBBLId : function ()
Gets the BBLId of this Block.
GetNumberOfAttachedVisualObjects : function ()
Returns the number of VisualObjects attached to this Block.
GetAttachedVisualObjectByIndex : function (index)
Gets the VisualObject attached to this Block that has the specified index.
GetAttachedVisualObjectByHandle : function (handle)
Gets the VisualObject attached to this Block that has the specified handle.
GetAttachedVisualObjectByName : function (name)
Gets the VisualObject attached to this Block that has the specified name.
GetLevelAbove : function ()
Gets the Level above this level.
GetLevelBelow : function ()
Gets the Level below this level.
GetFloorHeight : function ()
Gets the height of this Level’s floor relative to the Building base (in meters).
GetFalseCeilingHeight : function ()
Gets the height of this Level’s false ceiling relative to the Building base (in meters).
GetTrueCeilingHeight : function ()
Gets the height of this Level’s ceiling relative to the Building base (in meters).
HideLevelsAbove : function ()
Hides all levels above this Level.
HideLevelsBelow : function ()
Hides all levels below this Level.
ShowLevelsAbove : function ()
Makes visible all levels above this Level.
ShowLevelsBelow : function ()
Makes visible all levels below this Level.
UnhideLevelsAbove : function ()
Deprecated; use ShowLevelsAbove.
UnhideLevelsBelow : function ()
Deprecated; use ShowLevelsBelow.
GetParentBlock : function ()
Gets the Block in which this Level is located.
GetType : function ()
Returns the type of this Level.
GetHandle : function ()
Gets the Handle of this Level.
GetVisibility : function ()
Gets the visibility state of this Level.
SetVisibility : function (bVal)
Sets the visibility state of this Level.
Show : function ()
Makes this Level visible.
Hide : function ()
Hides this Level.
IsHidden : function ()
Returns true if this Level is currently hidden.
GetName : function ()
Gets the name of this Level.
GetDescription : function ()
Gets the description of this Level.
GetContent : function ()
Gets the content property of this Level.
GetMoreInfoUrl : function ()
Gets URL to the “more info” page about this Level.
GetBBLId : function ()
Gets the BBLId of this Level.
GetFullyQualifiedBBLId : function ()
Gets the fully qualified BBLId of this Level.
GetNumberOfAttachedVisualObjects : function ()
Returns the number of VisualObjects attached to this Level.
GetAttachedVisualObjectByIndex : function (index)
Gets the VisualObject attached to this Level that has the specified index.
GetAttachedVisualObjectByHandle : function (handle)
Gets the VisualObject attached to this Level that has the specified handle.
GetAttachedVisualObjectByName : function (name)
Gets the VisualObject attached to this Level that has the specified name.
GetLevel : function ()
Gets the Level to which the LevelCursor is set.
Warning: Experimental feature.
IsNull : function ()
Returns true if the LevelCursor is set to null.
JumpToLevel: function (level)
Moves the LevelCursor to the specified Level.
JumpToLevelByBBLId : function (levelBBLId,
option)
Moves the LevelCursor to the Level with the specified BBL ID.
JumpToLevelByIndex : function (levelIndex,
option)
Moves the LevelCursor to the Level with the specified index.
JumpToLevelByHandle: function (levelHandle)
Moves the LevelCursor to the Level with the specified handle.
JumpToBottomLevel: function ()
Moves the LevelCursor to the bottom Level in the current Block.
JumpToTopLevel: function ()
Moves the LevelCursor to the top Level in the current Block.
MoveUp: function ()
Moves the LevelCursor up one Level.
MoveDown: function ()
Moves the LevelCursor down one Level.
JumpUp: function (N)
Moves the LevelCursor up the specified number of Levels.
JumpDown: function (N)
Moves the LevelCursor down the specified number of Levels.
JumpToBlock: function (block)
Moves the LevelCursor to the specified Block.
JumpToBlockByBBLId: function (blkBBLId,
option)
Moves the LevelCursor to the Block with the specified BBL ID.
JumpToBlockByIndex: function (blkIndex,
option)
Moves the LevelCursor to the Block with the specified index.
JumpToBlockByHandle: function (blkHandle)
Moves the LevelCursor to the Block with the specified handle.
JumpToFirstBlock: function ()
Moves the LevelCursor to the first Block in the current Building.
JumpToLastBlock: function ()
Moves the LevelCursor to the last Block in the current Building.
JumpToNextBlock: function ()
Moves the LevelCursor to the next Block in the current Building.
JumpToPreviousBlock: function ()
Moves the LevelCursor to the previous Block in the current Building.
JumpToBuilding: function (building)
Moves the LevelCursor to the specified Building.
JumpToBuildingByBBLId: function (bldgBBLId)
Moves the LevelCursor to the Building with the specified BBL ID.
JumpToBuildingByIndex: function (bldgIndex)
Moves the LevelCursor to the Building with the specified index.
JumpToBuildingByHandle: function (bldgHandle)
Moves the LevelCursor to the Building with the specified handle.
JumpToFirstBuilding: function ()
Moves the LevelCursor to the first Building in the scene.
JumpToLastBuilding: function ()
Moves the LevelCursor to the last Building in the scene.
JumpToNextBuilding: function ()
Moves the LevelCursor to the next Building in the scene.
JumpToPreviousBuilding: function ()
Moves the LevelCursor to the previous Building in the scene.
Represents a position marker.
Contains information describing the cause of an error.
An abstract class; provides type and handle properties.
An abtract class; provides visibility functionality.
this.Load = function (filePath,
options,
successCallback,
failureCallback)
Loads the specified building file and adds Buildings to the scene.
Contains the name and properties of an event that has occurred.
this.GetBuildingByIndex = function (index)
Gets the Building in the scene with the specified index.
this.GetBuildingByBBLId = function (strBBLId)
Gets the Building in the scene with the specified BBL ID.
this.GetBuildingByName = function (name)
Gets the Building in the scene with the specified name.
this.GetBuildingByHandle = function (strHandle)
Gets the Building in the scene with the specified handle.
this.UnloadAll = function ()
Unloads all objects currently in scene.
This section explains how you can get BBL objects using handle, index, & BBL ID.
this.GetLevelCursor = function ()
Gets the LevelCursor that allows us to explore the BBL structure of the scene.
This section documents how you can use the option parameter when moving the LevelCursor.
This section documents the LevelCursor behavior when jumping to another Block or another Building.