public class TLspBounds3DIcon extends Object implements ILsp3DIcon
ILsp3DIcon
that paints the 3D bounds of a delegate
ILcdBounded
object.
NOTE: this icon implementation only paints the 3D bounds of the delegate bounded, it is up to the user to make sure that the delegate bounded itself is also painted.
Constructor and Description |
---|
TLspBounds3DIcon(ILcdBounded aDelegate)
Creates a new icon that paints the bounds of
aDelegate |
Modifier and Type | Method and Description |
---|---|
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
Color |
getColor()
Returns the color that is used when painting the bounds.
|
void |
paint(ILspGLState aGLState,
ILcdGLDrawable aGLDrawable,
TLspPaintPass aPass,
TLspContext aContext)
Paints the icon to the specified ILcdGLDrawable.
|
void |
setColor(Color aColor)
Sets the color that is to be used to paint the bounds.
|
public TLspBounds3DIcon(ILcdBounded aDelegate)
aDelegate
aDelegate
- The delegate icon from which the bounds to be painted is
derived.public final Color getColor()
public final void setColor(Color aColor)
aColor
- The new color to use.public void paint(ILspGLState aGLState, ILcdGLDrawable aGLDrawable, TLspPaintPass aPass, TLspContext aContext)
ILsp3DIcon
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.
paint
in interface ILsp3DIcon
aGLState
- 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.