Class TLspMesh3DIcon
java.lang.Object
com.luciad.view.lightspeed.painter.mesh.TLspMesh3DIcon
- All Implemented Interfaces:
ILcdBounded
,ILsp3DIcon
An implementation of
ILsp3DIcon
that paints an ILcd3DMesh
.- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionTLspMesh3DIcon
(ILcd3DMesh a3DMesh) Creates a new 3D mesh icon for the given 3D mesh. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTextureSearchPath
(String aPath) Adds a directory to the list of paths to be searched for texture files.Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.Returns the input stream factory used to load texture files.double
getScale()
Returns the current icon scale.final 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.
-
Constructor Details
-
TLspMesh3DIcon
Creates a new 3D mesh icon for the given 3D mesh.- Parameters:
a3DMesh
- the 3D mesh for which a new 3D icon is created
-
-
Method Details
-
addTextureSearchPath
Adds a directory to the list of paths to be searched for texture files.- Parameters:
aPath
- the name of a directory containing texture images
-
setInputStreamFactory
Sets the input stream factory used to load texture files.- Parameters:
aInputStreamFactory
- the input stream factory used to load texture files
-
getInputStreamFactory
Returns the input stream factory used to load texture files.- Returns:
- the input stream factory used to load texture files
-
paint
public final void paint(ILspGLState aIconTransformationState, ILcdGLDrawable aGLDrawable, TLspPaintPass aPass, TLspContext aContext) Paints the icon to the specified ILcdGLDrawable.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.
- Specified by:
paint
in interfaceILsp3DIcon
- Parameters:
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 information
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
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 ofTLcdLonLatBounds
orTLcdXYBounds
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
getScale
public double getScale()Returns the current icon scale.- Returns:
- the current icon scale
- See Also:
-
setScale
public void setScale(double aScale) Sets a scale factor for the icon to consider in its paint() method. This allows icons to be rescaled to different units of measure if required. The default value is 1.0.- Parameters:
aScale
- the new scale factor
-