Model Functions

The following functions provide various routines for adding, removing, and updating Models in Google Earth. More...

Functions

int GE_GetModelCount ()
 Returns the current number of Models added to the Google Earth map by the GE SDK.
BOOL GE_RefreshModel (STRING model_name)
 Forces an update to the Model with the given Model name.
BOOL GE_AddModel (STRING model_name, STRING model_url, double lat, double lon, double alt, double heading)
 Adds a new Model to Google Earth.
BOOL GE_DeleteModel (STRING model_name)
 Removes the Model with the given name from the Google Earth map.
BOOL GE_ModelExists (STRING model_name, int *index)
 Determines if a Model with the given name has been added to Google Earth by the GE SDK.
BOOL GE_ModelVisible (STRING model_name)
 Determines if the Model with the given name is currently visible in Google Earth.
BOOL GE_ShowModel (STRING model_name)
 Sets the Model with the given name to visible.
BOOL GE_HideModel (STRING model_name)
 Sets the Model with the given name to invisible.
STRING GE_GetModelName (int index)
 Retrieves the name of the Model at the given index.
BOOL GE_SetModelName (STRING model_name, STRING new_name)
 Changes the name of a Model.
STRING GE_GetModelSnippet (STRING model_name)
 Retrieves a Model's snippet.
BOOL GE_SetModelSnippet (STRING model_name, STRING snippet)
 Changes the snippet of the given Model.
int GE_GetModelSnippetMaxLines (STRING model_name)
 Retrieves the given Model's snippet maxLines attribute value.
BOOL GE_SetModelSnippetMaxLines (STRING model_name, int max_lines)
 Changes the snippet maxLines attribute value for the given Model.
STRING GE_GetModelKML (STRING model_name)
 Retrieves the KML content that makes up the given Model.
STRING GE_GetModelDescription (STRING model_name)
 Retrieves the description of the given Model.
BOOL GE_SetModelDescription (STRING model_name, STRING description)
 Sets the description of the given Model.
int GE_GetModelAltMode (STRING model_name)
 Retrieves the altitude mode of the given Model.
BOOL GE_SetModelAltMode (STRING model_name, int alt_mode)
 Sets the altitude mode of the given Model.
STRING GE_GetModelUrl (STRING model_name)
 Retrieves the full path to the model file of the given Model.
BOOL GE_SetModelUrl (STRING model_name, STRING url)
 Sets the overlay image for the given Model.
double * GE_GetModelLocation (STRING model_name)
 Retrieves a 3-element array of the current geographical location of the given Model.
BOOL GE_SetModelLocation (STRING model_name, double lat, double lon, double alt)
 Changes the current location of the given Model.
double GE_GetModelAltitude (STRING model_name)
 Retrieves the current altitude of the given Model.
BOOL GE_SetModelAltitude (STRING model_name, double alt)
 Sets the roll orientation angle of the given Model.
double * GE_GetModelOrientation (STRING model_name)
 Returns a 3-element array of the given Model's orientation angles.
BOOL GE_SetModelOrientation (STRING model_name, double heading, double tilt, double roll)
 Updates the current roll, tilt, and heading orientation angles of the given Model.
double GE_GetModelHeading (STRING model_name)
 Retrieves the current heading orientation angle of the given Model.
BOOL GE_SetModelHeading (STRING model_name, double heading)
 Sets the heading orientation angle of the given Model.
double GE_GetModelTilt (STRING model_name)
 Retrieves the current tilt orientation angle of the given Model.
BOOL GE_SetModelTilt (STRING model_name, double tilt)
 Sets the tilt orientation angle of the given Model.
double GE_GetModelRoll (STRING model_name)
 Retrieves the current roll orientation angle of the given Model.
BOOL GE_SetModelRoll (STRING model_name, double roll)
 Sets the roll orientation angle of the given Model.
double * GE_GetModelScale (STRING model_name)
 Returns a 3-element array of the given Model's scale values.
BOOL GE_SetModelScale (STRING model_name, double x, double y, double z)
 Sets the given Model's scale values.
BOOL GE_SetModelScaleX (STRING model_name, double x)
 Sets the given Model's x scale value.
BOOL GE_SetModelScaleY (STRING model_name, double y)
 Sets the given Model's y scale value.
BOOL GE_SetModelScaleZ (STRING model_name, double z)
 Sets the given Model's z scale value.

Detailed Description

The following functions provide various routines for adding, removing, and updating Models in Google Earth.

Models represent a 3D graphical COLLADA object that may be placed into the Google Earth environment. The COLLADA model can be placed on the Earth at a particular location and orientation and moved and/or rescaled. Common uses of Models can be for representing 3D buildings, vehicles, terrain, etc.


Function Documentation

int GE_GetModelCount (  ) 

Returns the current number of Models added to the Google Earth map by the GE SDK.

Returns:
The current number of Models added to Google Earth; -1 otherwise
BOOL GE_RefreshModel ( STRING  model_name  ) 

Forces an update to the Model with the given Model name.

Parameters:
model_name The name of the Model to update
Returns:
TRUE if the function executed properly; FALSE otherwise
BOOL GE_AddModel ( STRING  model_name,
STRING  model_url,
double  lat,
double  lon,
double  alt,
double  heading 
)

Adds a new Model to Google Earth.

Parameters:
model_name The unique name for the Model
model_url The full path or URL to a valid COLLADA model file (*.dae)
lat Latitude in degrees of the Model
lon Longitude in degrees of the Model
alt Altitude in meters of the Model
heading The heading angle in degrees of the Model
Returns:
TRUE if the function executed properly; FALSE otherwise
BOOL GE_DeleteModel ( STRING  model_name  ) 

Removes the Model with the given name from the Google Earth map.

Parameters:
model_name The name of the Model to remove
Returns:
TRUE if the function executed properly; FALSE otherwise
BOOL GE_ModelExists ( STRING  model_name,
int *  index 
)

Determines if a Model with the given name has been added to Google Earth by the GE SDK.

If the function returns TRUE, then the index parameter will contain a value that represents the index into the GE SDK internal Model collection.

Parameters:
model_name The name of the Model
index The index into the internal Model collection where model_name exists if found
Returns:
TRUE if a Model with name model_name exists in the internal Model collection; FALSE otherwise
BOOL GE_ModelVisible ( STRING  model_name  ) 

Determines if the Model with the given name is currently visible in Google Earth.

Parameters:
model_name The name of the Model
Returns:
TRUE if the given Model is visible; FALSE if not visible
BOOL GE_ShowModel ( STRING  model_name  ) 

Sets the Model with the given name to visible.

Parameters:
model_name The name of the Model
Returns:
TRUE if the function executed properly; FALSE otherwise
BOOL GE_HideModel ( STRING  model_name  ) 

Sets the Model with the given name to invisible.

Parameters:
model_name The name of the Model
Returns:
TRUE if the function executed properly; FALSE otherwise
STRING GE_GetModelName ( int  index  ) 

Retrieves the name of the Model at the given index.

Parameters:
index The index into the internal Model collection
Returns:
The name of the Model at the given index; otherwise the empty string ("") is returned
BOOL GE_SetModelName ( STRING  model_name,
STRING  new_name 
)

Changes the name of a Model.

Parameters:
model_name The name of an existing Model to be renamed
new_name The new name to be given to the Model
Returns:
TRUE if the function executed properly; FALSE otherwise
STRING GE_GetModelSnippet ( STRING  model_name  ) 

Retrieves a Model's snippet.

Parameters:
model_name The name of the Model
Returns:
The snippet of the given Model; otherwise the empty string ("") is returned
BOOL GE_SetModelSnippet ( STRING  model_name,
STRING  snippet 
)

Changes the snippet of the given Model.

Parameters:
model_name The name of the Model
snippet The snippet to be applied to the given Model
Returns:
TRUE if the function executed properly; FALSE otherwise
int GE_GetModelSnippetMaxLines ( STRING  model_name  ) 

Retrieves the given Model's snippet maxLines attribute value.

Parameters:
model_name The name of the Model
Returns:
The snippet maxLines attribute value; -1 otherwise
BOOL GE_SetModelSnippetMaxLines ( STRING  model_name,
int  max_lines 
)

Changes the snippet maxLines attribute value for the given Model.

Parameters:
model_name The name of the Model
max_lines The value to be applied to the maxLines attribute
Returns:
TRUE if the function executed properly; FALSE otherwise
STRING GE_GetModelKML ( STRING  model_name  ) 

Retrieves the KML content that makes up the given Model.

Parameters:
model_name The name of the Model
Returns:
A string containing the KML data of the given Model; otherwise the empty string ("") is returned
STRING GE_GetModelDescription ( STRING  model_name  ) 

Retrieves the description of the given Model.

Parameters:
model_name The name of the Model
Returns:
The current description for the given Model; otherwise the empty string ("") is returned
BOOL GE_SetModelDescription ( STRING  model_name,
STRING  description 
)

Sets the description of the given Model.

Parameters:
model_name The name of the Model
description The description to apply to the Model
Returns:
TRUE if the function executed properly; FALSE otherwise
int GE_GetModelAltMode ( STRING  model_name  ) 

Retrieves the altitude mode of the given Model.

Parameters:
model_name The name of the Model
Returns:
Altitude mode for the given Model (relativeToGround (0), absolute (1), or clampToGround (2)); -1 otherwise
BOOL GE_SetModelAltMode ( STRING  model_name,
int  alt_mode 
)

Sets the altitude mode of the given Model.

Parameters:
model_name The name of the Model
alt_mode Altitude mode for the given Model (relativeToGround (0), absolute (1), or clampToGround (2))
Returns:
TRUE if the function executed properly; FALSE otherwise
STRING GE_GetModelUrl ( STRING  model_name  ) 

Retrieves the full path to the model file of the given Model.

Parameters:
model_name The name of the Model
Returns:
The full path to the model file; otherwise the empty string ("") is returned
BOOL GE_SetModelUrl ( STRING  model_name,
STRING  url 
)

Sets the overlay image for the given Model.

Parameters:
model_name The name of the Model
url The full path to the model file
Returns:
TRUE if the function executed properly; FALSE otherwise
double* GE_GetModelLocation ( STRING  model_name  ) 

Retrieves a 3-element array of the current geographical location of the given Model.

Parameters:
model_name The name of the Model
Returns:
A 3-element array of the following decimal values: [latitude, longitude, altitude] where latitude and longitude are expressed in degrees and altitude is expressed in meters; NULL otherwise
BOOL GE_SetModelLocation ( STRING  model_name,
double  lat,
double  lon,
double  alt 
)

Changes the current location of the given Model.

Parameters:
model_name The name of the Model
lat The latitude in degrees
lon The longitude in degrees
alt The altitude in meters
Returns:
TRUE if the function executed properly; FALSE otherwise
double GE_GetModelAltitude ( STRING  model_name  ) 

Retrieves the current altitude of the given Model.

Parameters:
model_name The name of the Model
Returns:
The Model's current altitude in meters; BAD_DOUBLE otherwise
BOOL GE_SetModelAltitude ( STRING  model_name,
double  alt 
)

Sets the roll orientation angle of the given Model.

Parameters:
model_name The name of the Model
alt The altitude in meters
Returns:
TRUE if the function executed properly; FALSE otherwise
double* GE_GetModelOrientation ( STRING  model_name  ) 

Returns a 3-element array of the given Model's orientation angles.

Parameters:
model_name The name of the Model
Returns:
A 3-element array of the following decimal values: [roll, tilt, heading] where each value is expressed in degrees; NULL otherwise
BOOL GE_SetModelOrientation ( STRING  model_name,
double  heading,
double  tilt,
double  roll 
)

Updates the current roll, tilt, and heading orientation angles of the given Model.

Parameters:
model_name The name of the Model
heading The heading angle in degrees
tilt The tilt angle in degrees
roll The roll angle in degrees
Returns:
TRUE if the function executed properly; FALSE otherwise
double GE_GetModelHeading ( STRING  model_name  ) 

Retrieves the current heading orientation angle of the given Model.

Parameters:
model_name The name of the Model
Returns:
The Model's current heading orientation angle; BAD_DOUBLE otherwise
BOOL GE_SetModelHeading ( STRING  model_name,
double  heading 
)

Sets the heading orientation angle of the given Model.

Parameters:
model_name The name of the Model
heading Heading angle in degrees
Returns:
TRUE if the function executed properly; FALSE otherwise
double GE_GetModelTilt ( STRING  model_name  ) 

Retrieves the current tilt orientation angle of the given Model.

Parameters:
model_name The name of the Model
Returns:
The Model's current tilt orientation angle; BAD_DOUBLE otherwise
BOOL GE_SetModelTilt ( STRING  model_name,
double  tilt 
)

Sets the tilt orientation angle of the given Model.

Parameters:
model_name The name of the Model
tilt Tilt angle in degrees
Returns:
TRUE if the function executed properly; FALSE otherwise
double GE_GetModelRoll ( STRING  model_name  ) 

Retrieves the current roll orientation angle of the given Model.

Parameters:
model_name The name of the Model
Returns:
The Model's current roll orientation angle; BAD_DOUBLE otherwise
BOOL GE_SetModelRoll ( STRING  model_name,
double  roll 
)

Sets the roll orientation angle of the given Model.

Parameters:
model_name The name of the Model
roll Roll angle in degrees
Returns:
TRUE if the function executed properly; FALSE otherwise
double* GE_GetModelScale ( STRING  model_name  ) 

Returns a 3-element array of the given Model's scale values.

Parameters:
model_name The name of the Model
Returns:
A 3-element array of the Model's scale values: [x, y, z] where each value is expressed in degrees; NULL otherwise
BOOL GE_SetModelScale ( STRING  model_name,
double  x,
double  y,
double  z 
)

Sets the given Model's scale values.

Parameters:
model_name The name of the Model
x The scale along the x-axis
y The scale along the y-axis
z The scale along the z-axis
Returns:
TRUE if the function executed properly; FALSE otherwise
BOOL GE_SetModelScaleX ( STRING  model_name,
double  x 
)

Sets the given Model's x scale value.

Parameters:
model_name The name of the Model
x The scale along the x-axis
Returns:
TRUE if the function executed properly; FALSE otherwise
BOOL GE_SetModelScaleY ( STRING  model_name,
double  y 
)

Sets the given Model's y scale value.

Parameters:
model_name The name of the Model
y The scale along the y-axis
Returns:
TRUE if the function executed properly; FALSE otherwise
BOOL GE_SetModelScaleZ ( STRING  model_name,
double  z 
)

Sets the given Model's z scale value.

Parameters:
model_name The name of the Model
z The scale along the z-axis
Returns:
TRUE if the function executed properly; FALSE otherwise

Generated on Wed Sep 16 23:50:34 2009 for Google Earth SDK by  doxygen 1.6.1