public final class MarkerBatchPrimitiveOptionalParameters extends Object implements IDisposable
MarkerBatchPrimitive
that overrides the marker batch's per-batch parameters. Define per-marker parameters by
creating an instance of MarkerBatchPrimitiveOptionalParameters
, then calling the desired
methods to define per-marker parameters, and finally passing the object to the marker
batch's Set
or SetPartial
method.MarkerBatchPrimitive
Constructor and Description |
---|
MarkerBatchPrimitiveOptionalParameters()
Initializes default marker batch primitive optional parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting
unmanaged resources.
|
protected void |
dispose(boolean disposing) |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
void |
setColors(Iterable<Color> colors)
Defines a collection of colors, one for each marker in the batch.
|
void |
setDisplays(Iterable<Boolean> displays)
Defines a collection of boolean display flags,
one for each marker in the batch.
|
void |
setEyeOffsets(Iterable<Cartesian> eyeOffsets)
Defines a collection of eye offsets, one for each marker in the batch.
|
void |
setOrigins(Iterable<Origin> origins)
Defines a collection of origins, one for each marker in the batch.
|
void |
setPixelOffsets(Iterable<PointF> pixelOffsets)
Defines a collection of pixel offsets, one for each marker in the batch.
|
void |
setRotations(Iterable<Double> rotationAngles)
Defines a collection of rotation angles in radians, one for each marker in the batch.
|
void |
setSizes(Iterable<DimensionF> sizes)
Defines a collection of sizes, one for each marker in the batch.
|
void |
setTextureCoordinates(Iterable<TextureCoordinate4DF> textureCoordinates)
Defines a collection of texture coordinates, one for each marker in the batch.
|
void |
setTextures(Iterable<Texture2D> textures)
Defines a collection of textures, one for each marker in the batch.
|
void |
setTimeIntervalDisplayConditions(Iterable<TimeIntervalDisplayCondition> timeIntervals)
Defines a collection of
TimeIntervalDisplayConditions ,
one for each marker in the batch. |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public MarkerBatchPrimitiveOptionalParameters()
protected void finalize() throws Throwable
java.lang.Object
finalize
method to dispose of
system resources or to perform other cleanup.
The general contract of finalize
is that it is invoked
if and when the Java™ virtual
machine has determined that there is no longer any
means by which this object can be accessed by any thread that has
not yet died, except as a result of an action taken by the
finalization of some other object or class which is ready to be
finalized. The finalize
method may take any action, including
making this object available again to other threads; the usual purpose
of finalize
, however, is to perform cleanup actions before
the object is irrevocably discarded. For example, the finalize method
for an object that represents an input/output connection might perform
explicit I/O transactions to break the connection before the object is
permanently discarded.
The finalize
method of class Object
performs no
special action; it simply returns normally. Subclasses of
Object
may override this definition.
The Java programming language does not guarantee which thread will
invoke the finalize
method for any given object. It is
guaranteed, however, that the thread that invokes finalize will not
be holding any user-visible synchronization locks when finalize is
invoked. If an uncaught exception is thrown by the finalize method,
the exception is ignored and finalization of that object terminates.
After the finalize
method has been invoked for an object, no
further action is taken until the Java virtual machine has again
determined that there is no longer any means by which this object can
be accessed by any thread that has not yet died, including possible
actions by other objects or classes which are ready to be finalized,
at which point the object may be discarded.
The finalize
method is never invoked more than once by a Java
virtual machine for any given object.
Any exception thrown by the finalize
method causes
the finalization of this object to be halted, but is otherwise
ignored.
finalize
in class Object
Throwable
- the Exception
raised by this methodWeakReference
,
PhantomReference
public final void dispose()
IDisposable
dispose
in interface IDisposable
protected void dispose(boolean disposing)
public final void setTextures(Iterable<Texture2D> textures)
Per-marker textures override the per-batch texture. Therefore, when
per-marker textures are defined with this method,
MarkerBatchPrimitive.Texture
(get
)
is not used.
textures
- The textures for each marker in the batch. There must be one texture for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.MarkerBatchPrimitive.Texture (get)
public final void setSizes(Iterable<DimensionF> sizes)
To use user-defined per-marker sizes, the marker batch must be
initialized with
MarkerBatchSizeSource.UserDefined
,
otherwise each marker's size is its texture's size.
The size may be interpreted to be pixels or meters depending on
MarkerBatchPrimitive.SizeUnit
(get
).
Per-marker sizes override the per-batch size. Therefore, when
per-marker sizes are defined with this method,
MarkerBatchPrimitive.Size
(get
)
is not used.
sizes
- The sizes for each marker in the batch. There must be one size for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.MarkerBatchPrimitive.Size (get)
,
MarkerBatchSizeSource
public final void setColors(Iterable<Color> colors)
If per-marker or per-batch textures are used, the texture is modulated
with the per-marker color defined with SetColors
.
Per-marker colors override the per-batch color. Therefore, when
per-marker colors are defined with this method, the marker batch's
Color
(get
)
property is ignored.
colors
- The colors for each marker in the batch. There must be one color for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.public final void setOrigins(Iterable<Origin> origins)
The origin defines where the marker is placed relative to its position.
Per-marker origins override the per-batch origin. Therefore, when
per-marker origins are defined with this method,
MarkerBatchPrimitive.Origin
(get
)
is not used.
origins
- The origins for each marker in the batch. There must be one origin for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.MarkerBatchPrimitive.Origin (get)
public final void setPixelOffsets(Iterable<PointF> pixelOffsets)
The pixel offset defines a screen-space translation for a marker from its
position. Positive x
values translate to the right and positive y
values translate up.
This is commonly used when more than one primitive is located
at the same position. For example, if a marker in a marker batch and a
point in a point batch have the same position, the marker may have a
pixel offset applied to it so it doesn't overlap the point.
Per-marker pixel offsets override the per-batch pixel offset. Therefore, when
per-marker pixel offsets are defined with this method,
MarkerBatchPrimitive.PixelOffset
(get
)
is not used.
pixelOffsets
- The pixel offsets for each marker in the batch. There must be one pixel offset for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.MarkerBatchPrimitive.PixelOffset (get)
public final void setEyeOffsets(Iterable<Cartesian> eyeOffsets)
Eye offsets define an eye-space translation in meters. In eye-space, the
x
axis points to the right, the y
axis points up, and the
z
axis points into the screen. Eye offsets are commonly used when more
than one primitive is located at the same position. For example, if a
marker in a marker batch is located at the same position as a model
primitive, an eye offset in the positive y
direction can be applied
to the marker so it appears a specified number of meters above the model.
Per-marker eye offsets override the per-batch eye offset. Therefore, when
per-marker eye offsets are defined with this method,
MarkerBatchPrimitive.EyeOffset
(get
)
is not used.
eyeOffsets
- The eye offsets for each marker in the batch. There must be one eye offset for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.MarkerBatchPrimitive.EyeOffset (get)
public final void setRotations(Iterable<Double> rotationAngles)
Positive rotation angles rotate counter-clockwise in screen-space.
Per-marker rotation angles override the per-batch rotation angle. Therefore, when
per-marker rotation angles are defined with this method,
MarkerBatchPrimitive.Rotation
(get
)
is not used.
rotationAngles
- The rotation angles for each marker in the batch. There must be one rotation angle for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.Rotation (get)
public final void setTextureCoordinates(Iterable<TextureCoordinate4DF> textureCoordinates)
Each texture coordinate component is in the range [0, 1]
. The
s
and t
components define the bottom left corner and the
p
and q
components define the upper right corner. When a marker
uses an entire texture, the texture coordinates are [s, t, p, q] = [0, 0, 1, 1]
.
Per-marker texture coordinates are used to implement a technique called a texture atlas. Instead of creating several small textures and assigning each texture to markers using per-marker textures, one large texture containing all the images is made. This texture is assigned to the marker batch and each marker is given texture coordinates that index the correct part of the texture. This can lead to better performance due to the reduced number of costly texture changes during rendering.
Per-marker texture coordinates override the per-batch texture coordinate. Therefore, when
per-marker texture coordinates are defined with this method, the marker batch's
MarkerBatchPrimitive.TextureCoordinate
(get
)
property is ignored.
textureCoordinates
- The texture coordinates for each marker in the batch. There must be one texture coordinate for
each position passed to the
MarkerBatchPrimitive
's
Set
or SetPartial
method.MarkerBatchPrimitive.TextureCoordinate (get)
public final void setTimeIntervalDisplayConditions(Iterable<TimeIntervalDisplayCondition> timeIntervals)
TimeIntervalDisplayConditions
,
one for each marker in the batch.timeIntervals
- The TimeIntervalDisplayConditions
for each marker in the batch.
There must be one condition for each marker passed to the
primitive's Set
method.