Parameter objects

This section contains the documentation of classes that are usually passed as simple parameters.

Class list

Author

G Element Germanium team

Version

Represents a version number.

You can compare 2 Version objects using the operators ‘<’ and ‘>’.  To test equality, you use the function IsEqualTo .

Warning

Do NOT use the equality operator “==” to test if two Version objects are equal.  Instead, use the function IsEqualTo .

Example

Suppose you want check if the plugin installed in the user’s computer is older than plugin version 1.1.0.0.  You can do so as follows:

<script>
if (germ.GetPluginVersion() < germ.CreateVersion(1, 1, 0, 0))
{
    // do something
    ...
}
</script>

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

See also

Since

Version 0.1.0.2

Summary
Properties
major {int} Major version
minor {int} Minor version
build {int} Build number
revision {int} Revision number
Functions
IsEqualTo Returns true if inVer is equal to this object.
ToString Returns the string representation of a Version object.

Properties

major {int}

Major version

minor {int}

Minor version

build {int}

Build number

revision {int}

Revision number

Functions

IsEqualTo

IsEqualTo : function (inVer)

Returns true if inVer is equal to this object.

Parameter

{Version} inVerVersion object to be compared with this object

Returns

bool

Since

Version 0.1.0.2

ToString

ToString : function ()

Returns the string representation of a Version object.

Returns

string

Since

Version 0.1.0.2

Exception

Contains information describing the cause of an error.

For the full list of Exceptions, refer to the section on Exception names .

Handling exceptions

To catch and handle exceptions thrown by GermaniumWeb, use a try/catch block.  Place the code that may throw an exception into the try block, and place the code that handles the exception in the catch block.

For example, the function below includes a try/catch block to catch an invalid_argument Exception , i.e. if input is not a valid number.

function myGetPlacemarkByIndex(input)
{
    var pmark, exc;
    try {
        pmark = germ.GetPlacemarkByIndex(input);
        return pmark;
    } catch (exc) {
        if (exc.name == Germanium.Exception.InvalidArgument)
        {
            alert("Invalid argument");
        }
        else
        {
            alert("Exception: \n" +
                  exc.name + "\n" +
                  exc.message);
        }
    }
}

You should not instantiate the Exception class using the JavaScript keyword ‘new’.  Instead, only catch Exceptions.

Since

Version 0.0.8

Summary
Properties
name {string} Name of this Exception.
message {string} Description of this Exception.
Exception names

Properties

name {string}

Name of this Exception.  See list of Exception names you can handle.

message {string}

Description of this Exception.

Exception names

You use exception names in your code like this example: Germanium.Exception.BadAlloc

BadAllocNot enough memory to allocate a new object.
IOFailureAn I/O (input/output) operation failed.
InvalidArgumentPassing one or more incorrect arguments to a function.
LengthErrorPassing wrong number of arguments to a function.
OutOfRangePassing an argument outside the expected range.
UninitPluginObjPlugin object has not been properly initialized, usually by calling new on a class directly instead of calling the appropriate WebControl .Create* function.

Event

Contains the name and properties of an event that has occurred.

Event types

When an event occurs, an Event object is created that contains the name of the event and properties (if any) that contain information about the event.  There are several types of events that may occur:

Mouse eventsgenerates an Event object that contains Mouse event properties and Modifier key properties
Keyboard eventsgenerates an Event object that contains Keyboard event properties and Modifier key properties
Eye eventsgenerates an Event object that contains Eye event properties .
File load eventsgenerates an Event object that contains File loading event properties .
BBL eventsgenerates an Event object that contains BBL event properties .
Placemark eventsgenerates an Event object that contains the Placemark event property .
Clip plane eventsgenerates an Event object that contains ClipPlane event properties .
Callout eventsgenerates an Event object that contains event name only
Critical error eventsgenerates an Event object that contains event name only

For the full list of Events, refer to the section on Event names .

Handling events

To perform a task when an event occurs, you may register a function, called an event handler, to be executed when the event occurs.  The event handler may accept as input the Event object created by the event, which you can use to obtain the properties of the Event .

For example, the event handler function below displays some of the properties of a mouse event.

function AnnounceMouseEvent(eventArgs)
{
    // List which mouse button was clicked, and its screen position
    var strOut = "Event name = " + eventArgs.name + "\n";
    var strMouseButton = "";
    switch (eventArgs.mouseButton) {
        case Germanium.MouseButtons.Left:
            strMouseButton = "left button";
            break;
        case Germanium.MouseButtons.Middle:
            strMouseButton = "middle button";
            break;
        case Germanium.MouseButtons.Right:
            strMouseButton = "right button";
            break;
        default:
            break;
    }
    strOut += "mouseButton = " + strMouseButton + "\n";
    strOut += "windowX = " + eventArgs.windowX + "\n";
    strOut += "windowY = " + eventArgs.windowY + "\n";
    alert("Event properties:\n" + strOut);
}

Event handlers are added to an event using WebControl.AddEventHandler .  You may attach multiple event handlers to the same event.  In the example below, we add the event handler to the OnMouseClick event.

germ.AddEventHandler(Germanium.Event.OnMouseClick, AnnounceMouseEvent);

After the event handler is added, whenever the user clicks the mouse over the plugin area, the function AnnounceMouseEvent() will be called.

When the event handler is no longer required, it can be removed using WebControl.RemoveEventHandler .

germ.RemoveEventHandler(Germanium.Event.OnMouseClick, AnnounceEvent);

Event objects are created by the API.  There is no need for you to instantiate them yourself.

Since

Version 0.0.10

Summary
General property
name {string} Gets name of this Event .
Mouse event properties
mouseButton {int} Gets which of the MouseButtons is pushed.
mouseWheelDelta {int} Gets the amount the mouse wheel is rotated.
windowX {int} Gets the x-coordinate of the mouse when generating the event.
windowY {int} Gets the y-coordinate of the mouse when generating the event.
Keyboard event properties
keyCode {int} Gets the code of the keyboard key pressed.
Modifier key properties
altKey {bool} Gets if the ALT key was pressed.
ctrlKey {bool} Gets if the CTRL key was pressed.
shiftKey {bool} Gets if the SHIFT key was pressed.
Eye event property
glideCompleted {bool} Gets if glide was completed.
File loading event properties
loadOk {bool} Checks if file loading was successful.
url {string} URL of the file that was loaded.
errorCode {int} Status of file loading process.
errorMessage {string} Describes the error (if any) that occurred while loading scene.
BBL event properties
building {Building} Gets the Building that is involved in the event.
block {Block} Gets the Block that is involved in the event.
level {Level} Gets the Level that is involved in the event.
Placemark event property
placemark {Placemark} Gets the Placemark that was just activated/deactivated.
ClipPlane event properties
clipPlane {ClipPlane} Gets the ClipPlane that is about to be activated/deactivated, shown/hidden, or transformed.
clipPlaneIndex {int} Index of the ClipPlane that is about to be activated/deactivated, shown/hidden, or transformed.
Event names
Critical error events Types of critical error events
Mouse events Types of mouse input events
Keyboard events Types of keyboard input events
Eye events Types of Eye events
File loading events Types of file loading events
BBL events Types of BBL events
ClipPlane events Types of ClipPlane events
Placemark events Types of Placemark events.
Callout events Types of Callout events.
Notes
Placemark and Callout event order This section describes the current order of placemark and callout events when a placemark is activated.

General property

name {string}

Gets name of this Event .  See the complete list in Event names .

Defined in

All events.

Mouse event properties

mouseButton {int}

Gets which of the MouseButtons is pushed.  See list of buttons in MouseButtons .

Defined in

OnMouseClick, OnMouseDblClick, OnMouseDown, OnMouseUp, OnMouseMove, OnMouseWheel

mouseWheelDelta {int}

Gets the amount the mouse wheel is rotated.  This value will be positive when the mouse wheel is rotated away from the user and negative when it is towards the user.  The magnitude of the value indicates how fast the wheel was rotated.  Most - but not all - mice use a value of 120 per wheel ‘notch’.

Defined in

OnMouseWheel

windowX {int}

Gets the x-coordinate of the mouse when generating the event.

Defined in

OnMouseClick, OnMouseDblClick, OnMouseDown, OnMouseUp, OnMouseMove, OnMouseWheel

windowY {int}

Gets the y-coordinate of the mouse when generating the event.

Defined in

OnMouseClick, OnMouseDblClick, OnMouseDown, OnMouseUp, OnMouseMove, OnMouseWheel

Keyboard event properties

keyCode {int}

Gets the code of the keyboard key pressed.  The values are the same as what the JavaScript event onkeypress returns.  See KeyboardKeys .

Defined in

OnKeyDown, OnKeyUp

See also

Since

Version 1.4.9.7

Modifier key properties

altKey {bool}

Gets if the ALT key was pressed.

Defined in

  • OnMouseClick, OnMouseDblClick, OnMouseDown, OnMouseUp, OnMouseMove, OnMouseWheel
  • OnKeyDown, OnKeyUp

Since

Version 0.0.12.2

ctrlKey {bool}

Gets if the CTRL key was pressed.

Defined in

  • OnMouseClick, OnMouseDblClick, OnMouseDown, OnMouseUp, OnMouseMove, OnMouseWheel
  • OnKeyDown, OnKeyUp

Since

Version 0.0.12.2

shiftKey {bool}

Gets if the SHIFT key was pressed.

Defined in

  • OnMouseClick, OnMouseDblClick, OnMouseDown, OnMouseUp, OnMouseMove, OnMouseWheel
  • OnKeyDown, OnKeyUp

Since

Version 0.0.12.2

Eye event property

glideCompleted {bool}

Gets if glide was completed.

  • true if glide was completed (i.e. the Eye is now at the destination position)
  • false if glide was cancelled (i.e. the Eye is now at some mid-glide position)

Defined in

OnGlideEnded

Since

Version 1.4.4.1

File loading event properties

loadOk {bool}

Checks if file loading was successful.

Defined in

OnLoadEnds, OnModelLoadEnds

url {string}

URL of the file that was loaded.

Defined in

OnLoadEnds, OnModelLoadEnds

errorCode {int}

Status of file loading process.  See list of error codes in LoadEventErrorCodes .

Defined in

OnLoadEnds, OnModelLoadEnds

errorMessage {string}

Describes the error (if any) that occurred while loading scene.

Defined in

OnLoadEnds, OnModelLoadEnds

BBL event properties

building {Building}

Gets the Building that is involved in the event.

Defined in

  • OnBuildingAdd, OnBuildingAdded, OnBuildingRemove, OnBuildingRemoved
  • OnBuildingHidden, OnBuildingShown, OnBlockHidden, OnBlockShown, OnLevelHidden, OnLevelShown

block {Block}

Gets the Block that is involved in the event.

Defined in

  • OnBlockAdd, OnBlockAdded, OnBlockRemove, OnBlockRemoved
  • OnBlockHidden, OnBlockShown, OnLevelHidden, OnLevelShown

level {Level}

Gets the Level that is involved in the event.

Defined in

  • OnLevelAdd, OnLevelAdded, OnLevelRemove, OnLevelRemoved
  • OnLevelHidden, OnLevelShown

Placemark event property

placemark {Placemark}

Gets the Placemark that was just activated/deactivated.

Defined in

OnPlacemarkActivated, OnPlacemarkDeactivate

ClipPlane event properties

clipPlane {ClipPlane}

Gets the ClipPlane that is about to be activated/deactivated, shown/hidden, or transformed.

Defined in

  • OnClipPlaneEnabled, OnClipPlaneDisabled
  • OnClipPlaneHidden, OnClipPlaneShown
  • OnClipPlaneTransformed

clipPlaneIndex {int}

Index of the ClipPlane that is about to be activated/deactivated, shown/hidden, or transformed.

Defined in

  • OnClipPlaneEnabled, OnClipPlaneDisabled
  • OnClipPlaneHidden, OnClipPlaneShown
  • OnClipPlaneTransformed

Event names

Critical error events

Types of critical error events

OnCriticalErrorOccurs when an unrecoverable error has occurred.  The args will contain the internal exception which triggered it, if any.  Note that this event may not always fire as some serious errors will actually make it impossible to do so.

Mouse events

Types of mouse input events

OnMouseClickOccurs when a mouse button is single-clicked.
OnMouseDblClickOccurs when a mouse button is double-clicked.
OnMouseDownOccurs when a mouse button is pushed down.
OnMouseUpOccurs when a mouse button is released.
OnMouseMoveOccurs when the mouse cursor moves on top of the plugin region.
OnMouseWheelOccurs when the mouse wheel is rolled.

Keyboard events

Types of keyboard input events

OnKeyDownOccurs when a key on the keyboard is pushed down.
OnKeyUpOccurs when a key on the keyboard is released.

Eye events

Types of Eye events

OnEyeMovedOccurs when the Eye moves.
OnAutoRotateStartedOccurs when auto-rotation of the Eye object starts.
See [ Eye.EnableRotation ].
OnAutoRotateCancelledOccurs when auto-rotation of the Eye object is stopped.
See [ Eye.DisableRotation ].
OnGlideStartedOccurs when the Eye object starts gliding.
See [ Eye.GlideEyeToPos ].
OnGlideCancelledOccurs when the Eye object stops gliding before reaching its destination.
See [ Eye.CancelGlide ].
OnGlideCompletedOccurs when the Eye object reaches its destination and stops gliding.
See [ Eye.FinishGlide ].
OnGlideEndedOccurs when the Eye object stops gliding.  This event occurs regardless whether the glide is cancelled or finishes successfully.
See [ Eye.CancelGlide ], [ Eye.FinishGlide ].

File loading events

Types of file loading events

OnLoadEndsOccurs when a scene file has finished loading.  To check if loading was successful, check the loadOk property in File loading event properties .
See [ WebControl.Load ].
OnModelLoadEndsOccurs when a ModelGeometry geometry file used by a placemark in the scene has finished loading.  To check if loading was successful, check the loadOk property in File loading event properties .
  • If loading succeeds, subsequent load completion of model placemarks with the same model file will not raise the event again.
  • If loading fails, GermaniumWeb will attempt to reload the model file when another model placemark with the same model file is added to the scene.  OnModelLoadEnds will be raised when the attempted reload completes.
Note that when this event is raised, the textures of the 3D model will not have been loaded yet.
See [ WebControl.CreateModelGeometry ], [ ModelGeometry.SetSourceUrl ].

BBL events

Types of BBL events

OnBuildingAddOccurs when a Building is about to be added to the scene.
See [ WebControl.Load ].
OnBuildingAddedOccurs when a Building has just been added to the scene.
See [ WebControl.Load ].
OnBuildingRemoveOccurs when a Building is about to be removed from the scene.
See [ WebControl.UnloadAll ].
OnBuildingRemovedOccurs when a Building has just been removed from the scene.
See [ WebControl.UnloadAll ].
OnBuildingHiddenOccurs when a Building has just been hidden.
See [ WebControl.HideAllBuildings ], [ Building.Hide ].
OnBuildingShownOccurs when a Building has just been shown.
See [ WebControl.ShowAllBuildings ], [ Building.Show ].
OnBlockAddOccurs when a Block is about to be added to the scene.
See [ WebControl.Load ].
OnBlockAddedOccurs when a Block has just been added to the scene.
See [ WebControl.Load ].
OnBlockRemoveOccurs when a Block is about to be removed from the scene.
See [ WebControl.UnloadAll ].
OnBlockRemovedOccurs when a Block has just been removed from the scene.
See [ WebControl.UnloadAll ].
OnBlockHiddenOccurs when a Block has just been hidden.
See [ Block.Hide ], [ Building.HideAllBlocks ], [ WebControl.HideAllBuildings ].
OnBlockShownOccurs when a Block has just been shown.
See [ Block.Show ], [ Building.ShowAllBlocks ], [ WebControl.HideAllBuildings ].
OnLevelAddOccurs when a Level is about to be added to the scene.
See [ WebControl.Load ].
OnLevelAddedOccurs when a Level has just been added to the scene.
See [ WebControl.Load ].
OnLevelRemoveOccurs when a Level is about to be removed from the scene.
See [ WebControl.UnloadAll ].
OnLevelRemovedOccurs when a Level has just been removed from the scene.
See [ WebControl.UnloadAll ].
OnLevelHiddenOccurs when a Level has just been hidden.
See [ Level.Hide ], [ Block.HideAllLevels ], [ WebControl.HideAllBuildings ].
OnLevelShownOccurs when a Level has just been shown.
See [ Level.Show ], [ Block.ShowAllLevels ], [ WebControl.HideAllBuildings ].

ClipPlane events

Types of ClipPlane events

OnClipPlaneEnabledOccurs when a ClipPlane has just started clipping.
See [ ClipPlane.EnableClipping ].
OnClipPlaneDisabledOccurs when a ClipPlane has just stopped clipping.
See [ ClipPlane.DisableClipping ].
OnClipPlaneHiddenOccurs when a ClipPlane has just been hidden.
See [ ClipPlane.Hide ].
OnClipPlaneShownOccurs when a ClipPlane has just been shown.
See [ ClipPlane.Show ].
OnClipPlaneTransformedOccurs when a ClipPlane has just been moved/rotated.
See [ ClipPlane.Move ], [ ClipPlane.RotateAroundUpVector ], [ ClipPlane.RotateAroundRightVector ], [ ClipPlane.RotateAroundNormalVector ].

Placemark events

Types of Placemark events.  Also see Placemark and Callout event order .

OnPlacemarkActivatedOccurs when a Placemark is selected through a user click, or [ WebControl.SetActivePlacemark ].
See [ WebControl.SetActivePlacemark ].
OnPlacemarkDeactivateOccurs just before a Placemark gets unselected through a user click, [ WebControl.UnsetActivePlacemark ], or [ WebControl.SetActivePlacemark ] on another placemark.
See [ WebControl.UnsetActivePlacemark ].
OnPlacemarkDeactivatedOccurs after a Placemark has been unselected through a user click, [ WebControl.UnsetActivePlacemark ], or [ WebControl.SetActivePlacemark ] on another placemark.
See [ WebControl.UnsetActivePlacemark ].

Callout events

Types of Callout events.  Also see Placemark and Callout event order .

OnCalloutCloseButtonClickedOccurs when the close button of a callout is clicked.
OnCalloutOpenedOccurs after the callout has been opened, either through a user click on a placemark, or [ WebControl.SetActivePlacemark ].
OnCalloutCloseOccurs just before the callout is closed.
OnCalloutClosedOccurs after the callout has been closed.

Notes

Placemark and Callout event order

This section describes the current order of placemark and callout events when a placemark is activated.  Note that the order may change in future releases.  The order is described by the two examples below.

1.  User clicks a placemark, activating it, then clicks the close button on its callout.

  • (user clicks placemark)
  • OnPlacemarkActivated
  • OnCalloutOpened
  • (user clicks close button)
  • OnPlacemarkDeactivate
  • OnCalloutClose
  • OnCalloutClosed
  • OnPlacemarkDeactivated
  • OnCalloutCloseButtonClicked

2.  User has placemark ‘pm1’ activated and its callout open.  User clicks another placemark ‘pm2’.

  • (user clicks pm2)
  • OnPlacemarkDeactivate - for pm1.
  • OnCalloutClose
  • OnCalloutClosed
  • OnPlacemarkDeactivated - for pm1.
  • OnPlacemarkActivated - for pm2.
  • OnCalloutOpened

Coordinates

Represents a point in 3D Cartesian space.  Unit is meters.

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

See also

WebControl.CreateCoordinates

Since

Version 0.0.10

Summary
Position property
x {float} X-axis component (in meters).
y {float} Y-axis component (in meters).
z {float} Z-axis component (in meters).
Set Sets the parameters of this Coordinates .
Arithmetic functions
Add Adds to the x, y, z, components of this Coordinates
Subtract Subtracts from the x, y, z components of this Coordinates
ValueEquals Tests if this Coordinates has the same x, y, & z values as the specified inCoord.
Utility functions
GetCopy Returns a copy of this Coordinates .
ToString Returns the string representation of this Coordinates .

Position property

x {float}

X-axis component (in meters).

y {float}

Y-axis component (in meters).

z {float}

Z-axis component (in meters).

Set

Set : function (X,
y,
z)

Sets the parameters of this Coordinates .

Parameters

{mixed} Xa Coordinates object, a Vector3 object, or x-position (a float)
{float} y(optional) y-position
{float} z(optional) z-position

Returns

void

Usage

Set(X)Specify parameters as the Coordinates object X.
Set(X, y ,z)Specify parameters as the triple float (X, y, z).

Throws

Since

Version 1.3.17.1

Arithmetic functions

Add

Add : function (X,
y,
z)

Adds to the x, y, z, components of this Coordinates

Parameters

{mixed} Xx component (a float)/ a Vector3 object/ a Coordinates object
{float} y(Optional) y component
{float} z(Optional) z component

Returns

void

Usage

Set(X)Specify parameters as the Vector3 or Coordinates object X.
Set(X, y ,z)Specify parameters as the triple float (X, y, z).

Throws

Since

Version 1.4.17.2

Subtract

Subtract : function (X,
y,
z)

Subtracts from the x, y, z components of this Coordinates

Parameters

{mixed} Xx component (a float)/ a Vector3 object/ a Coordinates object
{float} y(Optional) y component
{float} z(Optional) z component

Returns

void

Usage

Set(X)Specify parameters as the Vector3 or Coordinates object X.
Set(X, y ,z)Specify parameters as the triple float (X, y, z).

Throws

Since

Version 1.4.17.2

ValueEquals

ValueEquals : function (inCoord)

Tests if this Coordinates has the same x, y, & z values as the specified inCoord.

Parameters

{Coordinates} inCoordthe Coordinates object to which we compare this Coordinates

Returns

bool

Throws

Since

Version 1.4.17.2

Utility functions

GetCopy

GetCopy : function ()

Returns a copy of this Coordinates .

Returns

Coordinates

Since

Version 1.4.16.0

ToString

ToString : function ()

Returns the string representation of this Coordinates .

Returns

string

Since

Version 0.1.0.2

EulerAngle

Represents an orientation in 3D space in the form of Euler angles.  Unit is radians.  The rotation order in GermaniumWeb is ZXY.  In other words, to put an object in the specified EulerAngle orientation, the object is rotated in the following order:

  • around the World’s Z-axis, then
  • around the World’s X-axis, and finally
  • around the World’s Y-axis.

Most of us think in degrees; so GermaniumWeb provides the conversion functions Germanium.DegreeToRadian and Germanium.RadianToDegree to make life easier.

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

Since

Version 0.0.10

See also

Summary
Rotation angle properties
x {float} Rotation about X-axis in radians.
y {float} Rotation about Y-axis in radians.
z {float} Rotation about Z-axis in radians.
Set Sets the parameters of this EulerAngle .
Utility function
GetCopy Returns a copy of this EulerAngle .
ToString Returns the string representation of this EulerAngle .

Rotation angle properties

x {float}

Rotation about X-axis in radians.

y {float}

Rotation about Y-axis in radians.

z {float}

Rotation about Z-axis in radians.

Set

Set : function (X,
y,
z)

Sets the parameters of this EulerAngle .

Parameters

{mixed} Xan EulerAngle or x-rotation angle (a float)
{float} y(optional) y-rotation angle
{float} z(optional) z-rotation angle

Returns

void

Usage

Set(X)Specify parameters as X, an EulerAngle object.
Set(X, y, z)Specify parameters as the triple float (X, y, z).

Since

Version 1.3.17.1

Utility function

GetCopy

GetCopy : function ()

Returns a copy of this EulerAngle .

Returns

EulerAngle

Since

Version 1.4.16.0

ToString

ToString : function (bDegree)

Returns the string representation of this EulerAngle .

Parameter

{bool} bDegree(optional) if set true, output string uses degrees as unit.

Returns

string

Since

Version 0.1.0.2

Color

Represents a color.  A color is either a RGB triplet or a RGBA quadruplet.  Each color component is an integer that ranges from 0 to 255.

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

See also

WebControl.CreateColor

Since

Version 0.1.0.12

Summary
Color components
GetR Returns the red component of this Color .
GetG Returns the green component of this Color .
GetB Returns the blue component of this Color .
GetA Returns the alpha component of this Color .
Set Sets the components of this Color .
SetR Sets the red component of this Color .
SetG Sets the green component of this Color .
SetB Sets the blue component of this Color .
SetA Sets the alpha value of this Color .
Utility functions
ToWebColorRGB Returns a RGB hex triplet, without a leading ‘#’.
ToWebColorRGBA Returns a RGBA hex quartet, without a leading ‘#’.
Equals Returns whether the specified Color is equal to this Color.
Multiply Multiplies R, G, B components by the specified factor.
Divide Divides R, G, B components by the specified factor.
GetCopy Returns a copy of this Color
ToString Returns the string representation of this Color .

Color components

GetR

GetR : function ()

Returns the red component of this Color .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.12

GetG

GetG : function ()

Returns the green component of this Color .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.12

GetB

GetB : function ()

Returns the blue component of this Color .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.12

GetA

GetA : function ()

Returns the alpha component of this Color .

Returns

int

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.12

Set

Set : function (R,
g,
b,
a)

Sets the components of this Color .

Parameters

{mixed} RRed color component (an int) / a web color RGB hex triplet (a string) / a web color RGBA hex quartet (a string) / a Color object
{int} g(Optional) green color component
{int} b(Optional) blue color component
{int} a(Optional) alpha color component.

Returns

void

Sample usage

Set(“ffff00”)Specify the color yellow as a web color RGB hex triplet.
Set(“ffff00ff”)Specify the color yellow as a web color RGBA hex quartet.
Set(255, 255, 0)Specify the color yellow as red, green, & blue color components.
Set(null, 255, 255, null)Specify only the green and blue color components.  Using similar calls, you can set any combination of color components.

Throws

Since

Version 0.1.0.12

SetR

SetR : function (r)

Sets the red component of this Color .

Parameters

{int} rRed color component

Returns

void

Throws

Since

Version 1.4.17.1

SetG

SetG : function (g)

Sets the green component of this Color .

Parameters

{int} gGreen color component

Returns

void

Throws

Since

Version 1.4.17.1

SetB

SetB : function (b)

Sets the blue component of this Color .

Parameters

{int} bblue color component

Returns

void

Throws

Since

Version 1.4.17.1

SetA

SetA : function (a)

Sets the alpha value of this Color .

Parameters

{int} aalpha value

Returns

void

Throws

Since

Version 1.4.17.1

Utility functions

ToWebColorRGB

ToWebColorRGB : function ()

Returns a RGB hex triplet, without a leading ‘#’.

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.12

ToWebColorRGBA

ToWebColorRGBA : function ()

Returns a RGBA hex quartet, without a leading ‘#’.

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.12

Equals

Equals : function (inColor)

Returns whether the specified Color is equal to this Color.

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.12

Multiply

Multiply : function (factor)

Multiplies R, G, B components by the specified factor.

Returns

Color

Throws

Since

Version 0.1.0.12

Divide

Divide : function (factor)

Divides R, G, B components by the specified factor.

Returns

Color

Throws

Since

Version 0.1.0.12

GetCopy

GetCopy : function()

Returns a copy of this Color

Returns

Color

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.16.0

ToString

ToString : function ()

Returns the string representation of this Color .

Returns

string

Since

Version 1.3.17.1

Image

Represets a 2D image.  At the moment, only IconStyle class uses images.

The Image class makes it easier for you to use images with GermaniumWeb.  You use an image as follows :

  • specify the image URL by calling SetSourceUrl
  • set the image to the object that uses it (an IconStyle for example)

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

See also

Since

Version 1.1.5.1

Summary
SourceUrl property
SetSourceUrl Sets the source URL of this Image .
GetSourceUrl Gets the source URL of this Image .
HasSourceUrl Returns true if this Image has a source URL.
Utility functions
GetCopy Returns a copy of this Image
ToString Returns the string representation of this Image .

SourceUrl property

SetSourceUrl

SetSourceUrl : function (url)

Sets the source URL of this Image .

Parameter

{string} urlURL from which the image file will be fetched.  GermaniumWeb supports absolute and relative paths.  For relative paths, GermaniumWeb uses window.location as the document base URL to resolve relative paths.  You can change it by calling WebControl.SetDocumentBase .

Returns

void

Throws

  • ”invalid_argument” Exception
  • ”uninitialized_plugin_object” Exception

Since

Version 1.1.5.1

GetSourceUrl

GetSourceUrl : function ()

Gets the source URL of this Image .  The returned URL is always an absolute path.

Returns

string

Throws

”uninitialized_plugin_object” Exception

See also

SetSourceUrl

Since

Version 1.1.5.1

HasSourceUrl

HasSourceUrl : function ()

Returns true if this Image has a source URL.

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.1.5.1

Utility functions

GetCopy

GetCopy : function ()

Returns a copy of this Image

Returns

Image

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.16.1

ToString

ToString : function ()

Returns the string representation of this Image .

Returns

string

Since

Version 1.4.16.1

Vector2

Represents a vector with 2 components.  GermaniumWeb uses this class to represent vertices for PolygonGeometry .

You should not instantiate the Vector2 class using ‘new’.  Instead, use the function WebControl.CreateVector2 .

See also

WebControl.CreateVector2

Related class

PolygonGeometry

Since

Version 1.3.13.0

Summary
Position property
SetX Sets the x-component of this Vector2 .
GetX Gets the value of the x-component of this Vector2 .
SetY Sets the y-component of this Vector2 .
GetY Gets the value of the y-component of this Vector2 .
Set Sets the x-component & y-component of this Vector2 .
Utility functions
ValueEquals Tests if this Vector2 has the same x and y values as the specified Vector2.
GetCopy Returns a copy of this Vector2 .
ToString Returns the string representation of this Vector2 .

Position property

SetX

SetX: function (inX)

Sets the x-component of this Vector2 .

Parameter

{float} inXthe value to be set as x-component

Returns

void

Throws

Since

Version 1.3.13.0

GetX

GetX: function ()

Gets the value of the x-component of this Vector2 .

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.0

SetY

SetY: function (inY)

Sets the y-component of this Vector2 .

Parameter

{float} inYthe value to be set as y-component

Returns

void

Throws

Since

Version 1.3.13.0

GetY

GetY: function ()

Gets the value of the y-component of this Vector2 .

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.0

Set

Set: function (inX,
inY)

Sets the x-component & y-component of this Vector2 .

Parameters

{float} inXthe value to be set as x-component
{float} inYthe value to be set as y-component

Returns

void

Throws

Since

Version 1.3.13.0

Utility functions

ValueEquals

ValueEquals: function (inVector)

Tests if this Vector2 has the same x and y values as the specified Vector2.

Parameter

{Vector2} inVectorthe Vector2 object to which we compare this Vector2

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.0

GetCopy

GetCopy: function ()

Returns a copy of this Vector2 .

Returns

Vector2

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.13.2

ToString

ToString: function ()

Returns the string representation of this Vector2 .

Returns

string

Since

Version 1.3.13.0

Vector3

Represents a vector with 3 components.  GermaniumWeb uses this class to represent:

You should not instantiate the Vector3 class using ‘new’.  Instead, use the function WebControl.CreateVector3 .

See also

WebControl.CreateVector3

Related classes

Since

Version 1.3.2.1

Summary
Position property
SetX Sets the x-component of this Vector3 .
GetX Gets the value of the x-component of this Vector3 .
SetY Sets the y-component of this Vector3 .
GetY Gets the value of the y-component of this Vector3 .
SetZ Sets the z-component of this Vector3 .
GetZ Gets the value of the z-component of this Vector3 .
Set Sets the x-, y-, & z-components of this Vector3 .
Length property
GetLength Gets the length of this Vector3 .
GetLengthSquared Gets the square of the length of this Vector3 .
Arithmetic functions
Add Adds the specified inVector to this Vector3 and stores the result in this Vector3 .
Subtract Subtracts the specified inVector from this Vector3 and stores the result in this Vector3 .
Multiply Multiplies this Vector3 by the specified inScale and stores the result in this Vector3 .
Divide Divides this Vector3 by the specified inScale and stores the result in this Vector3 .
ValueEquals Tests if this Vector3 has the same x, y, & z values as the specified inVector.
Vector functions
Normalize Normalizes this Vector3 into a vector of unit length.
Dot Returns the dot product of this Vector3 and the specified inVector
Cross Returns the cross product of this Vector3 and the specified inVector.
Utility functions
GetCopy Returns a copy of this Vector3 .
ToString Returns the string representation of this Vector3 .

Position property

SetX

SetX: function (inX)

Sets the x-component of this Vector3 .

Parameter

{float} inXthe value to be set as x-component

Returns

void

Throws

Since

Version 1.3.2.1

GetX

GetX: function ()

Gets the value of the x-component of this Vector3 .

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

SetY

SetY: function (inY)

Sets the y-component of this Vector3 .

Parameter

{float} inYthe value to be set as y-component

Returns

void

Throws

Since

Version 1.3.2.1

GetY

GetY: function ()

Gets the value of the y-component of this Vector3 .

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

SetZ

SetZ: function (inZ)

Sets the z-component of this Vector3 .

Parameter

{float} inZthe value to be set as z-component

Returns

void

Throws

Since

Version 1.3.2.1

GetZ

GetZ: function ()

Gets the value of the z-component of this Vector3 .

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

Set

Set: function (X,
y,
z)

Sets the x-, y-, & z-components of this Vector3 .

Parameters

{mixed} Xa Vector3 , a Coordinates , or a float
{float} y(optional) the value to be set as y-component
{float} z(optional) the value to be set as z-component

Returns

void

Usage

Set(X)Specify components as X, a Vector3 object or a Coordinates object.
Set(X, y, z)Specify components as the triple float (X, y , z).

Throws

Since

Version 1.3.2.1

Length property

GetLength

GetLength: function ()

Gets the length of this Vector3 .

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

GetLengthSquared

GetLengthSquared: function ()

Gets the square of the length of this Vector3 .  This is mainly for convenience.

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

Arithmetic functions

Add

Add: function (inVector)

Adds the specified inVector to this Vector3 and stores the result in this Vector3 .

Parameter

{Vector3} inVectorthe Vector3 to be added to this Vector3

Returns

This Vector3

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

Subtract

Subtract: function (inVector)

Subtracts the specified inVector from this Vector3 and stores the result in this Vector3 .

Parameter

{Vector3} inVectorthe Vector3 to be subtracted from this Vector3

Returns

This Vector3

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

Multiply

Multiply: function (inScale)

Multiplies this Vector3 by the specified inScale and stores the result in this Vector3 .

Parameter

{float} inScalethe scalar to multiply this Vector3 with

Returns

This Vector3

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

Divide

Divide: function (inScale)

Divides this Vector3 by the specified inScale and stores the result in this Vector3 .

Parameter

{float} inScalethe scalar to divide this Vector3 with

Returns

This Vector3

Since

Version 1.3.2.1

ValueEquals

ValueEquals: function (inVector)

Tests if this Vector3 has the same x, y, & z values as the specified inVector.

Parameter

{Vector3} inVectorthe Vector3 object to which we compare this Vector3

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

Vector functions

Normalize

Normalize: function ()

Normalizes this Vector3 into a vector of unit length.

Return

void

Throws

Since

Version 1.3.2.1

Dot

Dot: function (inVector)

Returns the dot product of this Vector3 and the specified inVector

Parameter

{Vector3} inVector

Returns

float

Throws

Since

Version 1.3.2.1

Cross

Cross: function (inVector)

Returns the cross product of this Vector3 and the specified inVector.

Parameter

{Vector3} inVector

Returns

Vector3

Throws

Since

Version 1.3.2.1

Utility functions

GetCopy

GetCopy: function ()

Returns a copy of this Vector3 .

Returns

Vector3

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.2.1

ToString

Returns the string representation of this Vector3 .

Returns

string

Since

Version 1.3.2.1

InitErrorCodes

Error enumeration in case GermaniumWeb plugin fails to initialize.

Since

Version 1.3.2.0

Error codes

You use error codes in your code like this example: Germanium.InitErrorCodes.ElementContainerNotFound

ElementContainerNotFoundHTML element to contain GermaniumWeb plugin was not found.
OSNotSupportedOperating System not supported.
BrowserNotSupportedBrowser not supported.
PluginNotInstalledGermaniumWeb plugin not installed.
OutdatedPluginNewer plugin version needed.
Init3DFailureFailed initializing 3D hardware.
DiskFailureOn-disk resources cannot be initialized.  This is usually caused by a corrupted installation; reinstalling may fix the problem.
OtherFailureCatch-all for all errors that do not fit other types.

LoadEventErrorCodes

Status enumeration for loading building files.

Since

Version 0.2.0.31

Error codes

You use error codes in your code like this example: Germanium.LoadEventErrorCodes.None

NoneSuccess.
OtherCatch-all for all errors that do not fit into other types.
PluginNotInitializedGermaniumWeb plugin has not been initialized yet.
InvalidFilepathThe specified filepath is invalid.  This may mean that
  1. the specified filepath is not a string or
  2. the filepath is site root-relative (e.g.  “/directory/file.xlcl”) even though the document base URL is local.
The second case can be fixed by either
  1. specifying a document-relative filepath (e.g.  “./directory/file.xlcl” or “directory/file.xlcl”) or
  2. setting a remote document base URL (e.g.  “ http://www.remotesite.com/directory/ ” or “//remoteserver/directory/”).
InvalidResourcesRequired system/application resources missing or invalid.
RetrievalFailureFailure during download, or retrieval from cache.
IOFailureUnable to open or read file.  This may mean one of the following:
  1. the file cannot be found,
  2. access to the file is denied, or
  3. the file is locked and cannot be read.
DataErrorInvalid or missing data.  This means that the file can be opened, but the contents cannot be processed.
UnsupportedFileFormatFile format not supported.
LocalFilesBlockedUser did not allow local files.
TerminatedLoad process was terminated by user.

MouseButtons

Enumeration of mouse buttons.

Since

Version 0.2.0.32

Mouse buttons

You use mouse buttons in your code like this example: Germanium.MouseButtons.Left

Leftleft mouse button
Middlemiddle mouse button
Rightright mouse button

KeyboardKeys

Enumeration of keyboard keys.

Since

Version 1.4.8.1

Keyboard keys

You use keyboard keys in your code like this: Germanium.KeyboardKeys.Esc

Escthe ESC key
F1the F1 key
F2the F2 key
......
F12the F12 key
0the 0 key
1the 1 key
......
9the 9 key
Athe A key
Bthe B key
......
Zthe Z key
Shiftthe SHIFT key
Ctrlthe CTRL key
Altthe ALT key
Spacebarthe SPACEBAR key
Enterthe ENTER key
DownArrowthe DOWN ARROW key
LeftArrowthe LEFT ARROW key
RightArrowthe RIGHT ARROW key
UpArrowthe UP ARROW key

You can see more keys at MSDN: http://msdn.microsoft.com/en-us/library/system.windows.forms.keys%28VS.71%29.aspx

Navigation

Enumeration of navigation modes in GermaniumWeb.

Since

Version 1.4.6.3

Navigation

You can use this with WebControl.SetNavigationMode , WebControl.GetNavigationMode , and WebControl.IsInNavigationMode .

Germanium.Navigation.DisabledKeyboard and mouse control are disabled, but Placemarks can still be clicked.  See also Options.Disabled Navigation settings .
Germanium.Navigation.OrbitGermaniumWeb navigates the scene as if it is a miniature (default).  See also Options.Orbit Navigation settings .
Germanium.Navigation.FirstPersonGermaniumWeb navigates in first person point of view.  See also Options.First Person Navigation settings .

RotateDirection

Enumeration of rotate directions.

Since

Version 1.4.11.0

RotateDirection

You can use this with Options.SetAutoRotationDirection & Options.GetAutoRotationDirection .

Germanium.RotateDirection.Clockwiseclockwise rotation
Germanium.RotateDirection.AntiClockwiseanti clockwise rotation

NormalAxis

Enumeration of normal vector directions for PolygonGeometry .

Since

Version 1.4.11.1

NormalAxis

Tells GermaniumWeb to which axis the normal vector of a PolygonGeometry should be aligned.  See PolygonGeometry.Set3DVertices .

Germanium.NormalAxis.XPositivesets the normal to positive X axis
Germanium.NormalAxis.XNegativesets the normal to negative X axis
Germanium.NormalAxis.YPositivesets the normal to positive Y axis
Germanium.NormalAxis.YNegativesets the normal to negative Y axis
Germanium.NormalAxis.ZPositivesets the normal to positive Z axis
Germanium.NormalAxis.ZNegativesets the normal to negative Z axis
Germanium.NormalAxis.BestFitsets the normal to be perpendicular to Y axis; that is, the plane is vertical.
IsEqualTo : function (inVer)
Returns true if inVer is equal to this object.
ToString : function ()
Returns the string representation of a Version object.
Contains the name and properties of an event that has occurred.
Enumeration of mouse buttons.
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).
Represents a position marker.
Represents a special plane that allows us to temporarily cut through the scene and see the cross section of the scene.
Set : function (X,
y,
z)
Sets the parameters of this Coordinates.
Represents a point in 3D Cartesian space.
Add : function (X,
y,
z)
Adds to the x, y, z, components of this Coordinates
Subtract : function (X,
y,
z)
Subtracts from the x, y, z components of this Coordinates
ValueEquals : function (inCoord)
Tests if this Coordinates has the same x, y, & z values as the specified inCoord.
GetCopy : function ()
Returns a copy of this Coordinates.
ToString : function ()
Returns the string representation of this Coordinates.
Set : function (X,
y,
z)
Sets the parameters of this EulerAngle.
Represents an orientation in 3D space in the form of Euler angles.
GetCopy : function ()
Returns a copy of this EulerAngle.
ToString : function (bDegree)
Returns the string representation of this EulerAngle.
GetR : function ()
Returns the red component of this Color.
Represents a color.
GetG : function ()
Returns the green component of this Color.
GetB : function ()
Returns the blue component of this Color.
GetA : function ()
Returns the alpha component of this Color.
Set : function (R,
g,
b,
a)
Sets the components of this Color.
SetR : function (r)
Sets the red component of this Color.
SetG : function (g)
Sets the green component of this Color.
SetB : function (b)
Sets the blue component of this Color.
SetA : function (a)
Sets the alpha value of this Color.
ToWebColorRGB : function ()
Returns a RGB hex triplet, without a leading ‘#’.
ToWebColorRGBA : function ()
Returns a RGBA hex quartet, without a leading ‘#’.
Equals : function (inColor)
Returns whether the specified Color is equal to this Color.
Multiply : function (factor)
Multiplies R, G, B components by the specified factor.
Divide : function (factor)
Divides R, G, B components by the specified factor.
GetCopy : function()
Returns a copy of this Color
ToString : function ()
Returns the string representation of this Color.
SetSourceUrl : function (url)
Sets the source URL of this Image.
Represets a 2D image.
GetSourceUrl : function ()
Gets the source URL of this Image.
HasSourceUrl : function ()
Returns true if this Image has a source URL.
GetCopy : function ()
Returns a copy of this Image
ToString : function ()
Returns the string representation of this Image.
SetX: function (inX)
Sets the x-component of this Vector2.
Represents a vector with 2 components.
GetX: function ()
Gets the value of the x-component of this Vector2.
SetY: function (inY)
Sets the y-component of this Vector2.
GetY: function ()
Gets the value of the y-component of this Vector2.
Set: function (inX,
inY)
Sets the x-component & y-component of this Vector2.
ValueEquals: function (inVector)
Tests if this Vector2 has the same x and y values as the specified Vector2.
GetCopy: function ()
Returns a copy of this Vector2.
ToString: function ()
Returns the string representation of this Vector2.
SetX: function (inX)
Sets the x-component of this Vector3.
Represents a vector with 3 components.
GetX: function ()
Gets the value of the x-component of this Vector3.
SetY: function (inY)
Sets the y-component of this Vector3.
GetY: function ()
Gets the value of the y-component of this Vector3.
SetZ: function (inZ)
Sets the z-component of this Vector3.
GetZ: function ()
Gets the value of the z-component of this Vector3.
Set: function (X,
y,
z)
Sets the x-, y-, & z-components of this Vector3.
GetLength: function ()
Gets the length of this Vector3.
GetLengthSquared: function ()
Gets the square of the length of this Vector3.
Add: function (inVector)
Adds the specified inVector to this Vector3 and stores the result in this Vector3.
Subtract: function (inVector)
Subtracts the specified inVector from this Vector3 and stores the result in this Vector3.
Multiply: function (inScale)
Multiplies this Vector3 by the specified inScale and stores the result in this Vector3.
Divide: function (inScale)
Divides this Vector3 by the specified inScale and stores the result in this Vector3.
ValueEquals: function (inVector)
Tests if this Vector3 has the same x, y, & z values as the specified inVector.
Normalize: function ()
Normalizes this Vector3 into a vector of unit length.
Dot: function (inVector)
Returns the dot product of this Vector3 and the specified inVector
Cross: function (inVector)
Returns the cross product of this Vector3 and the specified inVector.
GetCopy: function ()
Returns a copy of this Vector3.
this.SetNavigationMode = function (mode)
Sets the navigation mode.
this.GetNavigationMode = function ()
Gets the navigation mode currently enabled.
this.IsInNavigationMode = function (inMode)
Queries if the specified navigation mode is currently enabled.
SetAutoRotationDirection : function (direction)
Sets the direction of auto-rotation.
GetAutoRotationDirection : function ()
Gets the direction of auto-rotation.
Represents a polygon in the 3D scene.
Contains information describing the cause of an error.
Error enumeration in case GermaniumWeb plugin fails to initialize.
Status enumeration for loading building files.
Enumeration of navigation modes in GermaniumWeb.
Represents a version number.
this.CreateVersion = function (major,
minor,
build,
revision)
Creates a Version.
Germanium.GetAPIVersion = function ()
Returns the version of GermaniumWeb API used on a web page.
this.GetPluginVersion = function ()
Returns the version of GermaniumWeb plugin installed on the user’s computer.
The main class for the GermaniumWeb plugin.
this.AddEventHandler = function (eventName,
fnHandler)
Adds a custom event handler to the specified Event.
this.RemoveEventHandler = function (eventName,
fnHandler)
Removes a custom event handler from the specified Event.
Enumeration of keyboard keys.
Represents the eye through which we see the scene.
EnableRotation : function ()
Starts Eye auto-rotation around the scene.
DisableRotation : function ()
Stops Eye auto-rotation around the scene.
GlideEyeToPos : function (X,
y,
z)
Glides the Eye to the specified position.
CancelGlide : function ()
Stops current Eye gliding, leaving the Eye at its current mid-glide position.
FinishGlide : function ()
Stops current Eye gliding, putting the Eye at the destination position of the glide.
this.Load = function (filePath,
options,
successCallback,
failureCallback)
Loads the specified building file and adds Buildings to the scene.
Represents a model in a 3D scene.
this.CreateModelGeometry = function (url,
pos,
ort,
scale)
Creates a ModelGeometry.
SetSourceUrl : function (url)
Sets the source URL of this ModelGeometry.
this.UnloadAll = function ()
Unloads all objects currently in scene.
this.HideAllBuildings = function (bUpdateChildren)
Hides all Buildings currently loaded.
Hide : function ()
Hides this Building.
this.ShowAllBuildings = function (bUpdateChildren)
Shows all Buildings currently loaded.
Show : function ()
Makes this Building visible.
Hide : function ()
Hides this Block.
HideAllBlocks : function (bUpdateChildren)
Hides all Blocks in this Building.
Show : function ()
Makes this Block visible.
ShowAllBlocks : function (bUpdateChildren)
Shows all Blocks in this Building.
Hide : function ()
Hides this Level.
HideAllLevels : function ()
Hides all Levels in this Block.
Show : function ()
Makes this Level visible.
ShowAllLevels : function ()
Shows all Levels in this Block.
EnableClipping : function ()
Enable clipping for this ClipPlane.
DisableClipping : function ()
Disable clipping for this ClipPlane.
Hide : function ()
Hides this ClipPlane.
Show : function ()
Makes this ClipPlane visible.
Move: function (V)
Moves this ClipPlane.
RotateAroundUpVector : function (angle)
Rotates this ClipPlane around its Up vector by the specified angle.
RotateAroundRightVector : function (angle)
Rotates this ClipPlane around its Right vector by the specified angle.
RotateAroundNormalVector : function (angle)
Rotates this ClipPlane around its Normal vector by the specified angle.
This section describes the current order of placemark and callout events when a placemark is activated.
this.SetActivePlacemark = function (placemark,
bOpenCallout)
Makes the specified Placemark to be the active placemark.
this.UnsetActivePlacemark = function ()
Deactivates the active placemark.
this.CreateCoordinates = function (x,
y,
z)
Creates a Coordinates (unit is meters).
Germanium.DegreeToRadian = function (inDeg)
Converts input angle from degrees to radians.
Germanium.RadianToDegree = function (inRad)
Converts input angle from radians to degrees.
this.CreateEulerAngle = function (tilt,
heading,
z)
Creates an EulerAngle (unit is radians).
this.CreateColor = function (R,
g,
b,
a)
Creates a Color.
Gives a Placemark the appearance of a 2D image icon.
this.CreateImage = function (url)
Creates an Image.
SetImage : function (image)
Sets the icon Image of this IconStyle.
this.SetDocumentBase = function (inString)
Sets the document base URL to resolve relative paths.
this.CreateVector2 = function (x,
y)
Creates a Vector2.
Represents a connected group of line segments in the 3D scene.
this.CreateVector3 = function (x,
y,
z)
Creates a Vector3.
This section documents classes that provide placemark-related functionality.
Enforced when Navigation mode is Germanium.Navigation.Disabled.
Enforced when Navigation mode is Germanium.Navigation.Orbit.
Enforced when Navigation mode is Germanium.Navigation.FirstPerson.
Set3DVertices : function (vertexArray,
normalAxis,
position)
Sets this PolygonGeometry to be the polygon defined by the specified array of 3D vertices.