public final class MarkerBatchPrimitive extends Primitive implements IDisposable
Renders one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards.
For best performance, avoid creating lots of batches with only a few markers each. See the Batching Performance topic.
Constructor and Description |
---|
MarkerBatchPrimitive()
Initializes a default marker batch primitive.
|
MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource)
Initializes a marker batch primitive with the specified
sizeSource . |
MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource,
MarkerBatchSortOrder sortOrder)
Initializes a marker batch primitive with the specified
sizeSource
and sortOrder . |
MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource,
MarkerBatchSortOrder sortOrder,
SetHint setHint)
Initializes a marker batch primitive with the specified
sizeSource ,
sortOrder , and setHint . |
MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource,
MarkerBatchSortOrder sortOrder,
SetHint setHint,
MarkerBatchRenderingMethod renderingMethod)
Initializes a marker batch primitive with the specified arguments.
|
MarkerBatchPrimitive(SetHint setHint)
Initializes a marker batch primitive with the specified
setHint . |
Modifier and Type | Method and Description |
---|---|
void |
alignToAxis(CentralBody centralBody,
Cartesian axis)
Sets the up vector of the markers to point towards the
axis of
centralBody . |
void |
alignToNorth(CentralBody centralBody)
Sets the up vector of the markers to point towards the north axis of
centralBody . |
void |
alignToScreen()
Sets the up vector of the markers to always be aligned to the up vector of the camera.
|
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.
|
double |
getBoundingSphereScale()
Gets or sets the scale applied to the radius of this primitive's bounding sphere.
|
boolean |
getCentralBodyClipped()
Gets whether the markers are clipped by the central body.
|
boolean |
getClampToPixel()
Gets whether the screen space position of each marker is clamped to a pixel.
|
Color |
getColor()
Gets the colors that affects every marker in the batch.
|
DistanceDisplayCondition |
getDistanceDisplayConditionPerMarker()
Gets a
DistanceDisplayCondition
that is evaluated per marker in the marker batch during rendering. |
Cartesian |
getEyeOffset()
Gets the per-batch eye offset, which is applied to each marker in the batch.
|
Origin |
getOrigin()
Gets the per-batch origin, which is applied to each marker in the batch.
|
boolean |
getPerItemPickingEnabled()
Gets whether individual marker indices will be included in the
PickResults returned
from the Scene's Pick method. |
PointF |
getPixelOffset()
Gets the per-batch pixel offset, which is applied to each marker in the batch.
|
MarkerBatchRenderingMethod |
getRenderingMethod()
Gets the rendering method used to render the marker batch.
|
MarkerBatchRenderPass |
getRenderPass()
Gets the pass during which the marker batch is rendered.
|
double |
getRotation()
Gets the per-batch rotation angle, in radians, which is applied to each marker in the batch.
|
SetHint |
getSetHint()
Gets the primitive's
SetHint . |
DimensionF |
getSize()
Gets the per-batch size, which is applied to each marker in the batch.
|
MarkerBatchSizeSource |
getSizeSource()
Gets the source used for the size of markers in the batch.
|
MarkerBatchUnit |
getSizeUnit()
Gets the unit that each marker's size is defined in.
|
MarkerBatchSortOrder |
getSortOrder()
Gets the order in which markers in the marker batch are sorted before rendering.
|
Texture2D |
getTexture()
Gets the per-batch texture, which is applied to each marker in the batch.
|
TextureCoordinate4DF |
getTextureCoordinate()
Gets the per-batch texture coordinate, which is applied to each marker in the batch.
|
TextureFilter2D |
getTextureFilter()
Gets the filter used for per-marker or per-batch textures.
|
float |
getTranslucency()
Gets the translucency that affects every marker in the batch.
|
boolean |
getWireframe()
Gets or sets whether the primitive is rendered in wireframe.
|
void |
set(Iterable<Cartesian> positions)
Defines the positions of markers in a marker batch.
|
void |
set(Iterable<Cartesian> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters)
Defines the positions and optional per-marker parameters of markers in a
marker batch.
|
void |
set(Iterable<Cartesian> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters,
RenderPassHint renderPassHint)
Defines the positions and optional per-marker parameters of markers in a
marker batch.
|
void |
setBoundingSphereScale(double value)
Gets or sets the scale applied to the radius of this primitive's bounding sphere.
|
void |
setCartographic(CentralBody centralBody,
Iterable<Cartographic> positions)
For convenience.
|
void |
setCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters)
For convenience.
|
void |
setCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters,
RenderPassHint renderPassHint)
For convenience.
|
void |
setCentralBodyClipped(boolean value)
Sets whether the markers are clipped by the central body.
|
void |
setClampToPixel(boolean value)
Sets whether the screen space position of each marker is clamped to a pixel.
|
void |
setColor(Color value)
Sets the colors that affects every marker in the batch.
|
void |
setDistanceDisplayConditionPerMarker(DistanceDisplayCondition inVal)
Sets a
DistanceDisplayCondition
that is evaluated per marker in the marker batch during rendering. |
void |
setEyeOffset(Cartesian value)
Sets the per-batch eye offset, which is applied to each marker in the batch.
|
void |
setOrigin(Origin value)
Sets the per-batch origin, which is applied to each marker in the batch.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Integer> indices)
Updates a subset of marker positions in a marker batch.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint)
Updates a subset of marker positions in a marker batch.
|
void |
setPartial(Iterable<Cartesian> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters,
Iterable<Integer> indices)
Updates a subset of marker positions and/or per-marker parameters in a marker batch.
|
void |
setPartial(Iterable<Cartesian> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint,
RenderPassHint renderPassHint)
Updates a subset of marker positions and/or per-marker parameters in a marker batch.
|
void |
setPartialCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
Iterable<Integer> indices)
For convenience.
|
void |
setPartialCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint)
For convenience.
|
void |
setPartialCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters,
Iterable<Integer> indices)
For convenience.
|
void |
setPartialCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
MarkerBatchPrimitiveOptionalParameters optionalParameters,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint,
RenderPassHint renderPassHint)
For convenience.
|
void |
setPerItemPickingEnabled(boolean value)
Sets whether individual marker indices will be included in the
PickResults returned
from the Scene's Pick method. |
void |
setPixelOffset(PointF value)
Sets the per-batch pixel offset, which is applied to each marker in the batch.
|
void |
setRenderPass(MarkerBatchRenderPass renderPass)
Sets the pass during which the marker batch is rendered.
|
void |
setRotation(double value)
Sets the per-batch rotation angle, in radians, which is applied to each marker in the batch.
|
void |
setSize(DimensionF value)
Sets the per-batch size, which is applied to each marker in the batch.
|
void |
setSizeUnit(MarkerBatchUnit value)
Sets the unit that each marker's size is defined in.
|
void |
setTexture(Texture2D value)
Sets the per-batch texture, which is applied to each marker in the batch.
|
void |
setTextureCoordinate(TextureCoordinate4DF value)
Sets the per-batch texture coordinate, which is applied to each marker in the batch.
|
void |
setTextureFilter(TextureFilter2D value)
Sets the filter used for per-marker or per-batch textures.
|
void |
setTranslucency(float value)
Sets the translucency that affects every marker in the batch.
|
void |
setWireframe(boolean value)
Gets or sets whether the primitive is rendered in wireframe.
|
static boolean |
supported(MarkerBatchRenderingMethod renderingMethod)
Determines whether or not the video card supports the marker batch primitive
with the given
renderingMethod . |
dispose, getAutomaticallyComputeBoundingSphere, getBoundingSphere, getDisplay, getDisplayCondition, getReferenceFrame, getTag, setAutomaticallyComputeBoundingSphere, setBoundingSphere, setDisplay, setDisplayCondition, setReferenceFrame, setTag
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, dispose
public MarkerBatchPrimitive()
MarkerBatchSizeSource
of FromTexture
,
a MarkerBatchSortOrder
of ByTexture
,
a SetHint
of Frequent
, and
a MarkerBatchRenderingMethod
of Automatic
.
See MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
for a full discussion.
public MarkerBatchPrimitive(SetHint setHint)
setHint
.
This is equivalent to constructing a marker batch with
a MarkerBatchSizeSource
of FromTexture
,
a MarkerBatchSortOrder
of ByTexture
,
the specified setHint
, and
a MarkerBatchRenderingMethod
of Automatic
.
See MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
for a full discussion.
setHint
- The expected usage for Set
and SetPartial
methods.
See the Set Hint topic for more information on
selecting an appropriate value.MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
public MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource)
sizeSource
.
This is equivalent to constructing a marker batch with
the specified sizeSource
,
a MarkerBatchSortOrder
of ByTexture
,
a SetHint
of Frequent
, and
a MarkerBatchRenderingMethod
of Automatic
.
See MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
for a full discussion.
sizeSource
- Determines the source used for the size of markers in the batch.MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
public MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource, MarkerBatchSortOrder sortOrder)
sizeSource
and sortOrder
.
This is equivalent to constructing a marker batch with
the specified sizeSource
,
the specified sortOrder
,
a SetHint
of Frequent
, and
a MarkerBatchRenderingMethod
of Automatic
.
See MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
for a full discussion.
sizeSource
- Determines the source used for the size of markers in the batch.sortOrder
- The order in which markers in the batch should be sorted before rendering.MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
public MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource, MarkerBatchSortOrder sortOrder, SetHint setHint)
sizeSource
,
sortOrder
, and setHint
.
This is equivalent to constructing a marker batch with the specified arguments and
a MarkerBatchRenderingMethod
of Automatic
.
See MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
for a full discussion.
sizeSource
- Determines the source used for the size of markers in the batch.sortOrder
- The order in which markers in the batch should be sorted before rendering.setHint
- The expected usage for Set
and SetPartial
methods.
See the Set Hint topic for more information on
selecting an appropriate value.MarkerBatchPrimitive.MarkerBatchPrimitive(agi.foundation.graphics.advanced.MarkerBatchSizeSource,agi.foundation.graphics.advanced.MarkerBatchSortOrder,agi.foundation.graphics.SetHint,agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
public MarkerBatchPrimitive(MarkerBatchSizeSource sizeSource, MarkerBatchSortOrder sortOrder, SetHint setHint, MarkerBatchRenderingMethod renderingMethod)
After constructing the primitive, call a method such as
MarkerBatchPrimitive.set(java.lang.Iterable)
or
MarkerBatchPrimitive.setCartographic(agi.foundation.celestial.CentralBody,java.lang.Iterable)
to provide it with positions for markers.
The primitive's properties are initialized to the following values:
agi.foundation.graphics.primitive.AutomaticallyComputeBoundingSphere
: true
agi.foundation.graphics.primitive.BoundingSphere
: BoundingSphere.MaximumRadiusBoundingSphere
(get
)Color
: White
agi.foundation.graphics.primitive.Display
: true
agi.foundation.graphics.primitive.DisplayCondition
: null
agi.foundation.graphics.primitive.ReferenceFrame
: The earth's agi.foundation.celestial.earthcentralbody.FixedFrame
Translucency
: 0
ClampToPixel
: true
BoundingSphereScale
: 1
DistanceDisplayConditionPerMarker
: null
EyeOffset
: Cartesian.Zero
Origin
: Center
PixelOffset
: [0, 0]
RenderingMethod
: renderingMethod
RenderPass
: BasedOnTranslucency
Rotation
: 0
SetHint
: setHint
Size
: [32, 32]
SizeSource
: sizeSource
SizeUnit
: Pixels
SortOrder
: sortOrder
Texture
: null
TextureCoordinate
: [0, 0, 1, 1]
TextureFilter
: LinearClampToEdge
Wireframe
: false
Once the primitive is constructed, it must be added to
Primitives
(get
) before it will be rendered.
sizeSource
- Determines the source used for the size of markers in the batch.sortOrder
- The order in which markers in the batch should be sorted before rendering.setHint
- The expected usage for Set
and SetPartial
methods.
See the Set Hint topic for more information on
selecting an appropriate value.renderingMethod
- The method used to render the primitive.UnsupportedCaseException
- setHint
must be a valid enumeration value in
SetHint
.UnsupportedCaseException
- sizeSource
must be a valid value in MarkerBatchSizeSource
,
sortOrder
must be a valid value in MarkerBatchSortOrder
, and
renderingMethod
must be a valid value in SurfaceMeshRenderingMethod
.InsufficientVideoCardException
- The renderingMethod is not supported by this video card. Call
MarkerBatchPrimitive.supported(agi.foundation.graphics.advanced.MarkerBatchRenderingMethod)
to determine which rendering methods are supported.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 Color getColor()
If per-marker color and translucency were specified with
MarkerBatchPrimitiveOptionalParameters.SetColors
,
the per-batch color is ignored.
getColor
in class Primitive
IllegalStateException
- Cannot access Color
when the primitive was defined
with per-marker colors and translucency using a method such as a
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
Each marker has a color and translucency, therefore the primitive's
Color
is ignored.MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
,
MarkerBatchPrimitiveOptionalParameters.SetColors
public void setColor(Color value)
If per-marker color and translucency were specified with
MarkerBatchPrimitiveOptionalParameters.SetColors
,
the per-batch color is ignored.
setColor
in class Primitive
IllegalStateException
- Cannot access Color
when the primitive was defined
with per-marker colors and translucency using a method such as a
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
Each marker has a color and translucency, therefore the primitive's
Color
is ignored.MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
,
MarkerBatchPrimitiveOptionalParameters.SetColors
public float getTranslucency()
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.
If per-marker color and translucency were specified with
MarkerBatchPrimitiveOptionalParameters.SetColors
,
the per-batch translucency is ignored.
getTranslucency
in class Primitive
ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.IllegalStateException
- Cannot access Translucency
when the primitive was defined
with per-marker colors and translucency using a method such as a
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
Each marker has a color and translucency, therefore the primitive's
Translucency
is ignored.MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
,
MarkerBatchPrimitiveOptionalParameters.SetColors
public void setTranslucency(float value)
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.
If per-marker color and translucency were specified with
MarkerBatchPrimitiveOptionalParameters.SetColors
,
the per-batch translucency is ignored.
setTranslucency
in class Primitive
ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.IllegalStateException
- Cannot access Translucency
when the primitive was defined
with per-marker colors and translucency using a method such as a
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
Each marker has a color and translucency, therefore the primitive's
Translucency
is ignored.MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
,
MarkerBatchPrimitiveOptionalParameters.SetColors
public final MarkerBatchSizeSource getSizeSource()
When SizeSource
is
FromTexture
,
each marker's size is either the size of Texture
, if a per-batch texture is used, or
the size of the corresponding texture from
MarkerBatchPrimitiveOptionalParameters.SetSizes
,
if per-marker textures are used.
When SizeSource
is
UserDefined
,
each marker's size is either Size
, if per-batch size is used, or
the size corresponding from
MarkerBatchPrimitiveOptionalParameters.SetSizes
if per-marker sizes are used.
Texture
,
Size
,
MarkerBatchPrimitiveOptionalParameters.SetTextures
,
MarkerBatchPrimitiveOptionalParameters.SetSizes
public final MarkerBatchSortOrder getSortOrder()
public final SetHint getSetHint()
SetHint
.
See the Set Hint topic for more information on
selecting an appropriate value to construct the primitive with.public final MarkerBatchRenderingMethod getRenderingMethod()
public final MarkerBatchRenderPass getRenderPass()
UnsupportedCaseException
- RenderPass
must be a valid value in MarkerBatchRenderPass
.public final void setRenderPass(MarkerBatchRenderPass renderPass)
UnsupportedCaseException
- RenderPass
must be a valid value in MarkerBatchRenderPass
.public final double getBoundingSphereScale()
BoundingSphereScale
is only used when
AutomaticallyComputeBoundingSphere
(get
)
is true
.
A BoundingSphereScale
greater than 1
is commonly used to enlarge the primitive's
BoundingSphere
(get
)
so the primitive is conservatively culled. This is useful for primitives defined in screen-space
such as the marker batch and text batch.
IllegalStateException
- Cannot set BoundingSphereScale
when
AutomaticallyComputeBoundingSphere
(get
)
is true
. Set
AutomaticallyComputeBoundingSphere
(get
)
to false
first.ArgumentOutOfRangeException
- BoundingSphereScale
must be greater than or equal to zero.AutomaticallyComputeBoundingSphere (get)
,
BoundingSphere (get)
public final void setBoundingSphereScale(double value)
BoundingSphereScale
is only used when
AutomaticallyComputeBoundingSphere
(get
)
is true
.
A BoundingSphereScale
greater than 1
is commonly used to enlarge the primitive's
BoundingSphere
(get
)
so the primitive is conservatively culled. This is useful for primitives defined in screen-space
such as the marker batch and text batch.
IllegalStateException
- Cannot set BoundingSphereScale
when
AutomaticallyComputeBoundingSphere
(get
)
is true
. Set
AutomaticallyComputeBoundingSphere
(get
)
to false
first.ArgumentOutOfRangeException
- BoundingSphereScale
must be greater than or equal to zero.AutomaticallyComputeBoundingSphere (get)
,
BoundingSphere (get)
public final DistanceDisplayCondition getDistanceDisplayConditionPerMarker()
DistanceDisplayCondition
that is evaluated per marker in the marker batch during rendering. This is different than
agi.foundation.graphics.primitive.DisplayCondition
,
which is evaluated once for the entire marker batch.
When DistanceDisplayConditionPerMarker
is null
,
no per marker display condition is evaluated.
During rendering, first the primitive's
agi.foundation.graphics.primitive.DisplayCondition
is evaluated. If it succeeds, this distance display condition is evaluated
for each marker in the batch before a marker is rendered.
public final void setDistanceDisplayConditionPerMarker(DistanceDisplayCondition inVal)
DistanceDisplayCondition
that is evaluated per marker in the marker batch during rendering. This is different than
agi.foundation.graphics.primitive.DisplayCondition
,
which is evaluated once for the entire marker batch.
When DistanceDisplayConditionPerMarker
is null
,
no per marker display condition is evaluated.
During rendering, first the primitive's
agi.foundation.graphics.primitive.DisplayCondition
is evaluated. If it succeeds, this distance display condition is evaluated
for each marker in the batch before a marker is rendered.
public final Texture2D getTexture()
When no per-batch or per-marker texture is used, no texture is applied and only the per-batch or per-marker color is used.
If per-marker textures were specified with
MarkerBatchPrimitiveOptionalParameters.SetTextures
,
the per-batch texture is ignored.
public final void setTexture(Texture2D value)
When no per-batch or per-marker texture is used, no texture is applied and only the per-batch or per-marker color is used.
If per-marker textures were specified with
MarkerBatchPrimitiveOptionalParameters.SetTextures
,
the per-batch texture is ignored.
public final MarkerBatchUnit getSizeUnit()
public final void setSizeUnit(MarkerBatchUnit value)
public final DimensionF getSize()
To use user-defined per-marker sizes, the marker batch must be
constructed 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
).
If per-marker sizes were specified with
MarkerBatchPrimitiveOptionalParameters.SetSizes
,
the per-batch size is ignored.
IllegalStateException
- Cannot manually set the marker batch's size because the marker batch was not constructed with
MarkerBatchSizeSource.UserDefined
.MarkerBatchPrimitiveOptionalParameters.SetSizes
public final void setSize(DimensionF value)
To use user-defined per-marker sizes, the marker batch must be
constructed 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
).
If per-marker sizes were specified with
MarkerBatchPrimitiveOptionalParameters.SetSizes
,
the per-batch size is ignored.
IllegalStateException
- Cannot manually set the marker batch's size because the marker batch was not constructed with
MarkerBatchSizeSource.UserDefined
.MarkerBatchPrimitiveOptionalParameters.SetSizes
public final Origin getOrigin()
The origin defines where the marker is placed relative to its position.
If per-marker origins were specified with
MarkerBatchPrimitiveOptionalParameters.SetOrigins
,
the per-batch origin is ignored.
public final void setOrigin(Origin value)
The origin defines where the marker is placed relative to its position.
If per-marker origins were specified with
MarkerBatchPrimitiveOptionalParameters.SetOrigins
,
the per-batch origin is ignored.
public final PointF getPixelOffset()
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.
If per-marker pixel offsets were specified with
MarkerBatchPrimitiveOptionalParameters.SetPixelOffsets
,
the per-batch pixel offset is ignored.
public final void setPixelOffset(PointF value)
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.
If per-marker pixel offsets were specified with
MarkerBatchPrimitiveOptionalParameters.SetPixelOffsets
,
the per-batch pixel offset is ignored.
public final Cartesian getEyeOffset()
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.
If per-marker eye offsets were specified with
MarkerBatchPrimitiveOptionalParameters.SetEyeOffsets
,
the per-batch eye offset is ignored.
public final void setEyeOffset(Cartesian value)
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.
If per-marker eye offsets were specified with
MarkerBatchPrimitiveOptionalParameters.SetEyeOffsets
,
the per-batch eye offset is ignored.
public final double getRotation()
Positive rotation angles rotate counter-clockwise in screen-space.
If per-marker rotation angles were specified with
MarkerBatchPrimitiveOptionalParameters.SetRotations
,
the per-batch rotation angle is ignored.
public final void setRotation(double value)
Positive rotation angles rotate counter-clockwise in screen-space.
If per-marker rotation angles were specified with
MarkerBatchPrimitiveOptionalParameters.SetRotations
,
the per-batch rotation angle is ignored.
public final TextureCoordinate4DF getTextureCoordinate()
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 the marker batch
uses an entire texture, the texture coordinates are [s, t, p, q] = [0, 0, 1, 1]
.
If per-marker texture coordinates were specified with
MarkerBatchPrimitiveOptionalParameters.SetTextureCoordinates
,
the per-batch texture coordinate is ignored.
public final void setTextureCoordinate(TextureCoordinate4DF value)
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 the marker batch
uses an entire texture, the texture coordinates are [s, t, p, q] = [0, 0, 1, 1]
.
If per-marker texture coordinates were specified with
MarkerBatchPrimitiveOptionalParameters.SetTextureCoordinates
,
the per-batch texture coordinate is ignored.
public final boolean getClampToPixel()
public final void setClampToPixel(boolean value)
public final boolean getWireframe()
public final void setWireframe(boolean value)
public final boolean getPerItemPickingEnabled()
PickResults
returned
from the Scene's
Pick
method. Each marker
index that is picked will be returned as a BatchPrimitiveIndex
.public final void setPerItemPickingEnabled(boolean value)
PickResults
returned
from the Scene's
Pick
method. Each marker
index that is picked will be returned as a BatchPrimitiveIndex
.public final TextureFilter2D getTextureFilter()
Texture
,
MarkerBatchPrimitiveOptionalParameters.SetTextures
public final void setTextureFilter(TextureFilter2D value)
Texture
,
MarkerBatchPrimitiveOptionalParameters.SetTextures
public final boolean getCentralBodyClipped()
public final void setCentralBodyClipped(boolean value)
public final void set(Iterable<Cartesian> positions)
agi.foundation.graphics.primitive.ReferenceFrame
.
This call overwrites the primitive's previous markers. To update a subset of markers, use
MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable)
Each marker is rendered using the following per-batch parameters:
Color
Translucency
EyeOffset
Origin
PixelOffset
Rotation
Size
Texture
TextureCoordinate
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
.
If this method is called frequently, it is recommended to construct the primitive with
agi.foundation.graphics.SetHint#Frequent
,
which is the default. If this method will be called only once or infrequently, construct the primitive with
agi.foundation.graphics.SetHint#Infrequent
.
See the Set Hint topic for more information.
If the primitive's
AutomaticallyComputeBoundingSphere
(get
)
property is true
, the primitive's
BoundingSphere
(get
)
is computed based on positions
.
Otherwise, it is the caller's responsibility to update the primitive's
BoundingSphere
(get
)
to a sphere that encompasses all the positions.
positions
- The new positions for markers in the marker batch.ArgumentNullException
- positions
is null
.CouldNotCreateVideoCardResourceException
- Could not allocate video memory for positions
.MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable)
public final void set(Iterable<Cartesian> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters)
agi.foundation.graphics.primitive.ReferenceFrame
.
This call overwrites the primitive's previous markers. To update a subset of markers, use
MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable)
.
When a per-marker parameter is not specified in optionalParameters
,
its corresponding per-batch value is used. For example, if optionalParameters
did not have a texture array defined with
MarkerBatchPrimitiveOptionalParameters.SetTextures
,
each marker uses the batch's Texture
.
If this method is called frequently, it is recommended to construct the primitive with
agi.foundation.graphics.SetHint#Frequent
,
which is the default. If this method will be called only once or infrequently, construct the primitive with
agi.foundation.graphics.SetHint#Infrequent
.
See the Set Hint topic for more information.
If the primitive's
AutomaticallyComputeBoundingSphere
(get
)
property is true
, the primitive's
BoundingSphere
(get
)
is computed based on positions
.
Otherwise, it is the caller's responsibility to update the primitive's
BoundingSphere
(get
)
to a sphere that encompasses all the positions.
positions
- The new positions for markers in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.ArgumentNullException
- positions
is null
.ArgumentException
- Each per-marker parameter in optionalParameters
must have
the same number of elements as positions
.ArgumentException
- Cannot provide per-marker sizes because the marker batch was not constructed with
MarkerBatchSizeSource.UserDefined
.CouldNotCreateVideoCardResourceException
- Could not allocate video memory for positions
.MarkerBatchPrimitive.setPartial(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,java.lang.Iterable)
public final void set(Iterable<Cartesian> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters, RenderPassHint renderPassHint)
agi.foundation.graphics.primitive.ReferenceFrame
.
renderPassHint
is provided for efficiency.
Calling this method with a renderPassHint
of Unknown
is equivalent to calling
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
with just positions
and optionalParameters
. When a more specific
renderPassHint
is used, this method can be more efficient.
See
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
for a full discussion.
positions
- The new positions for markers in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.renderPassHint
- An optimization hint indicating the RenderPass
implied by per-marker colors defined in optionalParameters
.MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
public final void setCartographic(CentralBody centralBody, Iterable<Cartographic> positions)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
MarkerBatchPrimitive.set(java.lang.Iterable)
.
centralBody
is used to convert positions
to
Cartesian
.
The primitive's
ReferenceFrame
(get
)
must be equal to the centralBody
fixed frame. If the primitive's
ReferenceFrame
(get
)
is changed after calling this method, the
Cartesian
positions stored by the primitive are not modified and are unlikely to represent the original
Cartographic
positions provided to this method.
See
MarkerBatchPrimitive.set(java.lang.Iterable)
for a full discussion.
centralBody
- The central body the positions are defined on.positions
- The new positions for markers in the marker batch.ArgumentNullException
- centralBody
is null
.IllegalStateException
- The primitive's ReferenceFrame
(get
)
is not equal to centralBody
fixed frame.MarkerBatchPrimitive.set(java.lang.Iterable)
public final void setCartographic(CentralBody centralBody, Iterable<Cartographic> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
.
centralBody
is used to convert positions
to
Cartesian
.
The primitive's
ReferenceFrame
(get
)
must be equal to the centralBody
fixed frame. If the primitive's
ReferenceFrame
(get
)
is changed after calling this method, the
Cartesian
positions stored by the primitive are not modified and are unlikely to represent the original
Cartographic
positions provided to this method.
See
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
for a full discussion.
centralBody
- The central body the positions are defined on.positions
- The new positions for markers in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.ArgumentNullException
- centralBody
is null
.IllegalStateException
- The primitive's ReferenceFrame
(get
)
is not equal to centralBody
fixed frame.MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters)
public final void setCartographic(CentralBody centralBody, Iterable<Cartographic> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters, RenderPassHint renderPassHint)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
renderPassHint
is provided for efficiency.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,agi.foundation.graphics.advanced.RenderPassHint)
.
centralBody
is used to convert positions
to
Cartesian
.
The primitive's
ReferenceFrame
(get
)
must be equal to the centralBody
fixed frame. If the primitive's
ReferenceFrame
(get
)
is changed after calling this method, the
Cartesian
positions stored by the primitive are not modified and are unlikely to represent the original
Cartographic
positions provided to this method.
See
MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,agi.foundation.graphics.advanced.RenderPassHint)
for a full discussion.
centralBody
- The central body the positions are defined on.positions
- The new positions for markers in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.renderPassHint
- An optimization hint indicating the RenderPass
implied by per-marker colors defined in optionalParameters
.ArgumentNullException
- centralBody
is null
.IllegalStateException
- The primitive's ReferenceFrame
(get
)
is not equal to centralBody
fixed frame.MarkerBatchPrimitive.set(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,agi.foundation.graphics.advanced.RenderPassHint)
public final void setPartial(Iterable<Cartesian> positions, Iterable<Integer> indices)
To call SetPartial
, the primitive must be constructed with
agi.foundation.graphics.SetHint#Partial
so the primitive builds the data structures necessary for partial
updates. See the Set Hint topic for more information on
selecting an appropriate value.
If the primitive's
AutomaticallyComputeBoundingSphere
(get
)
property is true
, the primitive's
BoundingSphere
(get
)
is computed based the primitive's unmodified positions and the updated positions from the
positions
collection.
Otherwise, it is the caller's responsibility to update the primitive's
BoundingSphere
(get
)
to a sphere that encompasses all the positions in the primitive.
positions
- A collection of new positions used to update a subset of positions in the marker batch.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.IllegalStateException
- The primitive's SetHint
property is not
agi.foundation.graphics.SetHint#Partial
.
Construct the primitive using
agi.foundation.graphics.SetHint#Partial
to order to call this method.IllegalStateException
- Cannot call this method until the primitive is first defined with Set
. It is not possible to partially
update an empty primitive.ArgumentNullException
- positions
or indices
is null
.ArgumentException
- positions
must contain at least one element.public final void setPartial(Iterable<Cartesian> positions, Iterable<Integer> indices, IndicesOrderHint indicesOrderHint)
To call SetPartial
, the primitive must be constructed with
agi.foundation.graphics.SetHint#Partial
so the primitive builds the data structures necessary for partial
updates. See the Set Hint topic for more information on
selecting an appropriate value.
If the primitive's
AutomaticallyComputeBoundingSphere
(get
)
property is true
, the primitive's
BoundingSphere
(get
)
is computed based the primitive's unmodified positions and the updated positions from the
positions
collection.
Otherwise, it is the caller's responsibility to update the primitive's
BoundingSphere
(get
)
to a sphere that encompasses all the positions in the primitive.
positions
- A collection of new positions used to update a subset of positions in the marker batch.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.indicesOrderHint
- An optimization hint indicating how indices
are sorted.IllegalStateException
- The primitive's SetHint
property is not
agi.foundation.graphics.SetHint#Partial
.
Construct the primitive using
agi.foundation.graphics.SetHint#Partial
to order to call this method.IllegalStateException
- Cannot call this method until the primitive is first defined with Set
. It is not possible to partially
update an empty primitive.ArgumentNullException
- positions
or indices
is null
.ArgumentException
- positions
must contain at least one element.public final void setPartial(Iterable<Cartesian> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters, Iterable<Integer> indices)
To call SetPartial
, the primitive must be constructed with
agi.foundation.graphics.SetHint#Partial
so the primitive builds the data structures necessary for partial
updates. See the Set Hint topic for more information on
selecting an appropriate value.
If the primitive's
AutomaticallyComputeBoundingSphere
(get
)
property is true
, the primitive's
BoundingSphere
(get
)
is computed based the primitive's unmodified positions and the updated positions from the
positions
collection.
Otherwise, it is the caller's responsibility to update the primitive's
BoundingSphere
(get
)
to a sphere that encompasses all the positions in the primitive.
positions
- A collection of new positions used to update a subset of positions in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.IllegalStateException
- The primitive's SetHint
property is not
agi.foundation.graphics.SetHint#Partial
.
Construct the primitive using
agi.foundation.graphics.SetHint#Partial
to order to call this method.IllegalStateException
- Cannot call this method until the primitive is first defined with Set
. It is not possible to partially
update an empty primitive.ArgumentNullException
- indices
is null
.ArgumentException
- Every specified collection from positions
and optionalParameters
must have the same number of elements and at least one element each.public final void setPartial(Iterable<Cartesian> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters, Iterable<Integer> indices, IndicesOrderHint indicesOrderHint, RenderPassHint renderPassHint)
To call SetPartial
, the primitive must be constructed with
agi.foundation.graphics.SetHint#Partial
so the primitive builds the data structures necessary for partial
updates. See the Set Hint topic for more information on
selecting an appropriate value.
If the primitive's
AutomaticallyComputeBoundingSphere
(get
)
property is true
, the primitive's
BoundingSphere
(get
)
is computed based the primitive's unmodified positions and the updated positions from the
positions
collection.
Otherwise, it is the caller's responsibility to update the primitive's
BoundingSphere
(get
)
to a sphere that encompasses all the positions in the primitive.
positions
- A collection of new positions used to update a subset of positions in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.indicesOrderHint
- An optimization hint indicating how indices
are sorted.renderPassHint
- An optimization hint indicating the RenderPass
implied by per-marker colors defined in optionalParameters
.IllegalStateException
- The primitive's SetHint
property is not
agi.foundation.graphics.SetHint#Partial
.
Construct the primitive using
agi.foundation.graphics.SetHint#Partial
to order to call this method.IllegalStateException
- Cannot call this method until the primitive is first defined with Set
. It is not possible to partially
update an empty primitive.ArgumentNullException
- indices
is null
.ArgumentException
- Every specified collection from positions
and optionalParameters
must have the same number of elements and at least one element each.public final void setPartialCartographic(CentralBody centralBody, Iterable<Cartographic> positions, Iterable<Integer> indices)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable)
.
centralBody
is used to convert positions
to
Cartesian
.
The primitive's
ReferenceFrame
(get
)
must be equal to the centralBody
fixed frame. If the primitive's
ReferenceFrame
(get
)
is changed after calling this method, the
Cartesian
positions stored by the primitive are not modified and are unlikely to represent the original
Cartographic
positions provided to this method.
See
MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable)
for a full discussion.
centralBody
- The central body the positions are defined on.positions
- A collection of new positions used to update a subset of positions in the marker batch.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.ArgumentNullException
- centralBody
is null
.IllegalStateException
- The primitive's ReferenceFrame
(get
)
is not equal to centralBody
fixed frame.MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable)
public final void setPartialCartographic(CentralBody centralBody, Iterable<Cartographic> positions, Iterable<Integer> indices, IndicesOrderHint indicesOrderHint)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable,agi.foundation.graphics.advanced.IndicesOrderHint)
.
centralBody
is used to convert positions
to
Cartesian
.
The primitive's
ReferenceFrame
(get
)
must be equal to the centralBody
fixed frame. If the primitive's
ReferenceFrame
(get
)
is changed after calling this method, the
Cartesian
positions stored by the primitive are not modified and are unlikely to represent the original
Cartographic
positions provided to this method.
See
MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable,agi.foundation.graphics.advanced.IndicesOrderHint)
for a full discussion.
centralBody
- The central body the positions are defined on.positions
- A collection of new positions used to update a subset of positions in the marker batch.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.indicesOrderHint
- An optimization hint indicating how indices
are sorted.ArgumentNullException
- centralBody
is null
.IllegalStateException
- The primitive's ReferenceFrame
(get
)
is not equal to centralBody
fixed frame.MarkerBatchPrimitive.setPartial(java.lang.Iterable,java.lang.Iterable,agi.foundation.graphics.advanced.IndicesOrderHint)
public final void setPartialCartographic(CentralBody centralBody, Iterable<Cartographic> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters, Iterable<Integer> indices)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
MarkerBatchPrimitive.setPartial(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,java.lang.Iterable)
.
centralBody
is used to convert positions
to
Cartesian
.
The primitive's
ReferenceFrame
(get
)
must be equal to the centralBody
fixed frame. If the primitive's
ReferenceFrame
(get
)
is changed after calling this method, the
Cartesian
positions stored by the primitive are not modified and are unlikely to represent the original
Cartographic
positions provided to this method.
See
MarkerBatchPrimitive.setPartial(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,java.lang.Iterable)
for a full discussion.
centralBody
- The central body the positions are defined on.positions
- A collection of new positions used to update a subset of positions in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.ArgumentNullException
- centralBody
is null
.IllegalStateException
- The primitive's ReferenceFrame
(get
)
is not equal to centralBody
fixed frame.MarkerBatchPrimitive.setPartial(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,java.lang.Iterable)
public final void setPartialCartographic(CentralBody centralBody, Iterable<Cartographic> positions, MarkerBatchPrimitiveOptionalParameters optionalParameters, Iterable<Integer> indices, IndicesOrderHint indicesOrderHint, RenderPassHint renderPassHint)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
renderPassHint
is provided for efficiency.
This is equivalent to
converting each position in positions
to
Cartesian
and calling
MarkerBatchPrimitive.setPartial(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,java.lang.Iterable,agi.foundation.graphics.advanced.IndicesOrderHint,agi.foundation.graphics.advanced.RenderPassHint)
.
centralBody
is used to convert positions
to
Cartesian
.
The primitive's
ReferenceFrame
(get
)
must be equal to the centralBody
fixed frame. If the primitive's
ReferenceFrame
(get
)
is changed after calling this method, the
Cartesian
positions stored by the primitive are not modified and are unlikely to represent the original
Cartographic
positions provided to this method.
See
MarkerBatchPrimitive.setPartial(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,java.lang.Iterable,agi.foundation.graphics.advanced.IndicesOrderHint,agi.foundation.graphics.advanced.RenderPassHint)
for a full discussion.
centralBody
- The central body the positions are defined on.positions
- A collection of new positions used to update a subset of positions in the marker batch.optionalParameters
- Optional per-marker parameters corresponding to positions
.
Each per-marker parameter must have the same number of elements as positions
.indices
- A collection of zero-based indices that map a corresponding position in
positions
to a position already in the primitive.
For example, if a primitive is first given 5
positions with
a call to Set
, positions 1
and 3
can be modified
with SetPartial
by passing in positions
containing
two new positions and an indices
collection with two
elements, e.g. [1, 3]
. The first position in positions
will modify the position at index 1
in the primitive and the second
will modify the position at index 3
.indicesOrderHint
- An optimization hint indicating how indices
are sorted.renderPassHint
- An optimization hint indicating the RenderPass
implied by per-marker colors defined in optionalParameters
.ArgumentNullException
- centralBody
is null
.IllegalStateException
- The primitive's ReferenceFrame
(get
)
is not equal to centralBody
fixed frame.MarkerBatchPrimitive.setPartial(java.lang.Iterable,agi.foundation.graphics.MarkerBatchPrimitiveOptionalParameters,java.lang.Iterable,agi.foundation.graphics.advanced.IndicesOrderHint,agi.foundation.graphics.advanced.RenderPassHint)
public final void alignToScreen()
public final void alignToNorth(CentralBody centralBody)
centralBody
. It will be
aligned with the tangent vector of the surface that points north.centralBody
- The central body that the marker will point towards the north axis of.MarkerBatchPrimitive.AlignToAxis
,
MarkerBatchPrimitive.AlignToScreen
public final void alignToAxis(CentralBody centralBody, Cartesian axis)
axis
of
centralBody
. It will be
aligned with the tangent vector of the surface that points towards the axis
.
Setting axis
to the north axis of the centralBody
will have the same effect as calling
MarkerBatchPrimitive.AlignToNorth
.centralBody
- The central body that the marker will point towards the axis
of.axis
- The axis to align each marker's up vector to.MarkerBatchPrimitive.AlignToNorth
,
MarkerBatchPrimitive.AlignToScreen
public static final boolean supported(MarkerBatchRenderingMethod renderingMethod)
renderingMethod
.renderingMethod
- The rendering method to check support for.true
if the video card supports the marker batch primitive using
the given renderingMethod
; otherwise, false
.UnsupportedCaseException
- renderingMethod
must be a valid value in MarkerBatchRenderingMethod
.