public class TLspMesh3DIcon extends Object implements ILsp3DIcon
ILsp3DIcon
that paints an ILcd3DMesh
.Constructor and Description |
---|
TLspMesh3DIcon(ILcd3DMesh a3DMesh)
Creates a new 3D mesh icon for the given 3D mesh.
|
Modifier and Type | Method and Description |
---|---|
void |
addTextureSearchPath(String aPath)
Adds a directory to the list of paths to be searched for texture files.
|
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
ILcdInputStreamFactory |
getInputStreamFactory()
Returns the input stream factory used to load texture files.
|
double |
getScale()
Returns the current icon scale.
|
void |
paint(ILspGLState aIconTransformationState,
ILcdGLDrawable aGLDrawable,
TLspPaintPass aPass,
TLspContext aContext)
Paints the icon to the specified ILcdGLDrawable.
|
void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Sets the input stream factory used to load texture files.
|
void |
setScale(double aScale)
Sets a scale factor for the icon to consider in its paint() method.
|
public TLspMesh3DIcon(ILcd3DMesh a3DMesh)
a3DMesh
- the 3D mesh for which a new 3D icon is createdpublic void addTextureSearchPath(String aPath)
aPath
- the name of a directory containing texture imagespublic void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
aInputStreamFactory
- the input stream factory used to load texture filespublic ILcdInputStreamFactory getInputStreamFactory()
public final void paint(ILspGLState aIconTransformationState, ILcdGLDrawable aGLDrawable, TLspPaintPass aPass, TLspContext aContext)
The caller is responsible for setting up any desired transformations or other application-specific OpenGL state beforehand.
The icon should not paint anything outside of the bounding box it returns from its getBounds() method. Note: Any GL state changes (such as calls made by wrapper methods) done before this method will have no effect on the painting of the mesh.
paint
in interface ILsp3DIcon
aIconTransformationState
- a GL state that defines transformations that must be applied to
the basic icon before painting it.aGLDrawable
- an ILcdGLDrawableaPass
- the current paint passaContext
- provides context informationpublic ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public double getScale()
setScale(double)
public void setScale(double aScale)
aScale
- the new scale factor