public class Ilv3DModel extends Object
Ilv3DComponent
objects and an Ilv3DSymbolManager
. To render this
3D model, it must be connected to an Ilv3DView
.Constructor and Description |
---|
Ilv3DModel(IlvManager manager)
Constructs an
Ilv3DModel object from the specified parameter |
Modifier and Type | Method and Description |
---|---|
void |
add3DComponent(Ilv3DComponent component)
Adds an
Ilv3DComponent to this 3D model. |
void |
buildTerrain(double lonMin,
double latMin,
double lonMax,
double latMax)
Creates internal 3D terrain structure for the specified region.
|
void |
buildTerrain(double lonMin,
double latMin,
double lonMax,
double latMax,
int tilingLevel)
Creates internal 3D terrain structure for the specified region.
|
void |
dispose()
Releases any resource held by this
Ilv3DModel , and removes any listener that it
had added. |
Collection |
get3DComponents()
Returns a collection containing all
Ilv3DComponent objects contained by this 3D model |
Ilv3DDoubleVector |
getCentroid()
Returns the centroid (i.e. the center of gravity) of the current terrain.
|
double |
getGroundHeightAt(double x,
double z)
Computes and returns the elevation (above ground) at the specified location in 3D space coordinates.
|
IlvManager |
getManager()
Returns the
IlvManager associated with this Ilv3DModel . |
Ilv3DView |
getModelView()
Returns the
Ilv3DView currently associated with this 3D model. |
double |
getRadius()
Returns the radius of the smallest sphere containing the terrain.
|
Ilv3DSymbolManager |
getSymbolManager()
Returns the
Ilv3DSymbolManager that manages 3D symbols for this 3D model. |
int |
getTextureOversampling()
Returns the factor that forces higher resolution texture.
|
Ilv3DTile[] |
getTiles()
Returns the current list of
Ilv3DTile objects used by the 3D model to represent the
region built by the last call to buildTerrain method . |
boolean |
isKeepElevationDataCache()
Returns whether the model must keep a copy of downsampled elevation data (depending on the camera position), or rather compute it at rendering time.
|
boolean |
isUse2DViewAsTexture()
Returns whether the associated 2D view must be used as a texture for the 3D terrain.
|
void |
regenerateTerrainTexture()
Forces terrain texture refresh.
|
Ilv3DComponent |
remove3DComponent(Ilv3DComponent component)
Removes an
Ilv3DComponent from this 3D model. |
void |
setKeepElevationDataCache(boolean keepElevationDataCache)
Sets whether the model should keep a copy of downsampled elevation data (depending on the camera position), or rather compute it at rendering time.
|
void |
setModelView(Ilv3DView modelView)
Sets the
Ilv3DView currently associated with this 3D model. |
void |
setSymbolManager(Ilv3DSymbolManager symbolmanager)
Sets the
Ilv3DSymbolManager that manages 3D symbols for this 3D model. |
void |
setTextureOversampling(int level)
Sets the factor that forces higher resolution texture.
|
void |
setUse2DViewAsTexture(boolean use2DViewAsTexture)
Sets whether the associated 2D view must be use as a texture for the 3D terrain.
|
public Ilv3DModel(IlvManager manager)
Ilv3DModel
object from the specified parametermanager
- The IlvManager
containing the map description to build the 3D terrain model upon.public void dispose()
Ilv3DModel
, and removes any listener that it
had added.public void add3DComponent(Ilv3DComponent component)
Ilv3DComponent
to this 3D model.component
- The Ilv3DComponent
to add to the 3D scene.public Ilv3DComponent remove3DComponent(Ilv3DComponent component)
Ilv3DComponent
from this 3D model.component
- The Ilv3DComponent
to remove.null
if it was not found in the 3D modelpublic Collection get3DComponents()
Ilv3DComponent
objects contained by this 3D modelIlv3DComponent
objects.public double getGroundHeightAt(double x, double z)
x
- The X coordinate of the point, in 3D model space.z
- The Z coordinate of the point, in 3D model space.public Ilv3DTile[] getTiles()
Ilv3DTile
objects used by the 3D model to represent the
region built by the last call to buildTerrain
method .Ilv3DTile
objects.public double getRadius()
Ilv3DView
.public Ilv3DDoubleVector getCentroid()
public void setSymbolManager(Ilv3DSymbolManager symbolmanager)
Ilv3DSymbolManager
that manages 3D symbols for this 3D model.symbolmanager
- The Ilv3DSymbolManager
public Ilv3DSymbolManager getSymbolManager()
Ilv3DSymbolManager
that manages 3D symbols for this 3D model.
The Ilv3DSymbolManager
stores and displays a list of 3D symbols in sync with a specified
IlvSDMEngine
symbology container.Ilv3DSymbolManager
.Ilv3DSymbolManager
public Ilv3DView getModelView()
Ilv3DView
currently associated with this 3D model.Ilv3DView
currently associated with this 3D model.public void setModelView(Ilv3DView modelView)
Ilv3DView
currently associated with this 3D model.modelView
- The Ilv3DView
currently associated with this 3D model.public void buildTerrain(double lonMin, double latMin, double lonMax, double latMax)
lonMin
- The minimum longitude of the region in radians.latMin
- The minimum latitude of the region in radians.lonMax
- The maximum longitude of the region in radians.latMax
- The maximum latitude of the region in radians.public void buildTerrain(double lonMin, double latMin, double lonMax, double latMax, int tilingLevel)
lonMin
- The minimum longitude of the region in radians.latMin
- The minimum latitude of the region in radians.lonMax
- The maximum longitude of the region in radians.latMax
- The maximum latitude of the region in radians.tilingLevel
- The area subdivision level when creating tiles.
level n+1 corresponds to a split in half (if need be) of a level n tile.public IlvManager getManager()
IlvManager
associated with this Ilv3DModel
.IlvManager
associated with this Ilv3DModel
.public boolean isKeepElevationDataCache()
true
, the higher the frame rate of the view, but also the bigger the memory usage (as part
of the elevation data is duplicated).true
if the model caches its elevation data.public void setKeepElevationDataCache(boolean keepElevationDataCache)
true
, the higher the frame rate of the view, but also the bigger the memory usage (as part
of the elevation data is duplicated).keepElevationDataCache
- true
if the model caches its elevation data.public boolean isUse2DViewAsTexture()
false
,
the terrain texture is generated from the color model of the elevation data source.true
if the 2D view is rendered as a texture for the 3D terrain.public void setUse2DViewAsTexture(boolean use2DViewAsTexture)
false
,
the terrain texture is generated from the color model of the elevation data source.use2DViewAsTexture
- true
if the 2D view is rendered as a texture for the 3D terrain.public void regenerateTerrainTexture()
public void setTextureOversampling(int level)
level
- The level of oversampling.public int getTextureOversampling()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.