public final class PointBatchPrimitive extends Primitive implements IDisposable
Renders one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each. See the Batching Performance topic.
Point Batch Primitive topic Performance topicConstructor and Description |
---|
PointBatchPrimitive()
Initializes a default point batch primitive.
|
PointBatchPrimitive(SetHint setHint)
Initializes a new instance of a point batch primitive with the specified
SetHint . |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
getCentralBodyClipped()
Gets whether individual points will be clipped by the central body.
|
Color |
getColor()
Gets the color that affects every point in the batch.
|
boolean |
getDisplayOutline()
Gets whether an outline is rendered around each point in the batch.
|
DistanceDisplayCondition |
getDistanceDisplayConditionPerPoint()
Gets a
DistanceDisplayCondition
that is evaluated per point in the point batch during rendering. |
static float |
getMaximumPixelSizeSupported()
Gets the maximum pixel size supported by the video card.
|
static float |
getMinimumPixelSizeSupported()
Gets the minimum pixel size supported by the video card.
|
Color |
getOutlineColor()
Gets the outline's color.
|
float |
getOutlineTranslucency()
Gets the translucency of the outline.
|
float |
getOutlineWidth()
Gets the size, in pixels, of the outline around each point in the batch.
|
boolean |
getPerItemPickingEnabled()
Gets whether individual point indices will be included in the
PickResults returned
from the Scene's Pick method. |
float |
getPixelSize()
Gets the size, in pixels, of each point in the point batch.
|
SetHint |
getSetHint()
Gets the primitive's
SetHint . |
float |
getTranslucency()
Gets the translucency that affects every point in the batch.
|
void |
set(Iterable<Cartesian> positions)
Defines the positions of points in a point batch.
|
void |
set(Iterable<Cartesian> positions,
Iterable<Color> colors)
Defines the positions and colors of points in a point batch.
|
void |
set(Iterable<Cartesian> positions,
Iterable<Color> colors,
RenderPassHint renderPassHint)
Defines the positions and colors of points in a point batch.
|
void |
setCartographic(CentralBody centralBody,
Iterable<Cartographic> positions)
For convenience.
|
void |
setCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
Iterable<Color> colors)
For convenience.
|
void |
setCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
Iterable<Color> colors,
RenderPassHint renderPassHint)
For convenience.
|
void |
setCentralBodyClipped(boolean value)
Sets whether individual points will be clipped by the central body.
|
void |
setColor(Color value)
Sets the color that affects every point in the batch.
|
void |
setDisplayOutline(boolean value)
Sets whether an outline is rendered around each point in the batch.
|
void |
setDistanceDisplayConditionPerPoint(DistanceDisplayCondition value)
Sets a
DistanceDisplayCondition
that is evaluated per point in the point batch during rendering. |
void |
setOutlineColor(Color value)
Sets the outline's color.
|
void |
setOutlineTranslucency(float value)
Sets the translucency of the outline.
|
void |
setOutlineWidth(float value)
Sets the size, in pixels, of the outline around each point in the batch.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Color> colors,
Iterable<Integer> indices)
Updates a subset of positions and/or colors in a point batch.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Color> colors,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint,
RenderPassHint renderPassHint)
Updates a subset of positions and/or colors in a point batch.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Integer> indices)
Updates a subset of positions in a point batch.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint)
Updates a subset of positions in a point batch.
|
void |
setPartialCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
Iterable<Color> colors,
Iterable<Integer> indices)
For convenience.
|
void |
setPartialCartographic(CentralBody centralBody,
Iterable<Cartographic> positions,
Iterable<Color> colors,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint,
RenderPassHint renderPassHint)
For convenience.
|
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 |
setPerItemPickingEnabled(boolean value)
Sets whether individual point indices will be included in the
PickResults returned
from the Scene's Pick method. |
void |
setPixelSize(float value)
Sets the size, in pixels, of each point in the point batch.
|
void |
setTranslucency(float value)
Sets the translucency that affects every point in the batch.
|
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 PointBatchPrimitive()
agi.foundation.graphics.pointbatchprimitive.SetHint
of Frequent
.
public PointBatchPrimitive(SetHint setHint)
SetHint
.
The expected usage for Set
and SetPartial
methods.
See the Set Hint topic for more information on
selecting an appropriate value.
setHint must be a valid enumeration value in
SetHint
.
After constructing the primitive, call a method such as
The primitive's properties are initialized to the following values:
get
) before it will be rendered.
Performance topicagi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian})
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()
getColor
in class Primitive
system.InvalidOperationException
- Cannot access Color
when the primitive was defined
with per-position colors and translucency using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
.
Each position has a color and translucency, therefore the primitive's
Color
is ignored.
If per-position color and translucency were specified using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
,
the primitive's Color
is ignored.agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
public void setColor(Color value)
setColor
in class Primitive
system.InvalidOperationException
- Cannot access Color
when the primitive was defined
with per-position colors and translucency using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
.
Each position has a color and translucency, therefore the primitive's
Color
is ignored.
If per-position color and translucency were specified using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
,
the primitive's Color
is ignored.agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
public float getTranslucency()
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.getTranslucency
in class Primitive
system.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.system.InvalidOperationException
- Cannot access Translucency
when the primitive was defined
with per-position colors and translucency using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
.
Each position has a color and translucency, therefore the primitive's
Translucency
is ignored.
If per-position color and translucency were specified using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
,
the primitive's Translucency
is ignored.agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
public void setTranslucency(float value)
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.setTranslucency
in class Primitive
system.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.system.InvalidOperationException
- Cannot access Translucency
when the primitive was defined
with per-position colors and translucency using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
.
Each position has a color and translucency, therefore the primitive's
Translucency
is ignored.
If per-position color and translucency were specified using a method such as
agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
,
the primitive's Translucency
is ignored.agi.foundation.graphics.PointBatchPrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
public final boolean getDisplayOutline()
OutlineColor
, OutlineTranslucency
,
and OutlineWidth
properties.OutlineColor
,
OutlineTranslucency
,
OutlineWidth
public final void setDisplayOutline(boolean value)
OutlineColor
, OutlineTranslucency
,
and OutlineWidth
properties.OutlineColor
,
OutlineTranslucency
,
OutlineWidth
public final Color getOutlineColor()
OutlineTranslucency
public final void setOutlineColor(Color value)
OutlineTranslucency
public final float getOutlineTranslucency()
0
and 1
, where 0
is opaque and 1
is transparent.system.ArgumentOutOfRangeException
- The translucency must be between 0
and 1
.OutlineColor
public final void setOutlineTranslucency(float value)
0
and 1
, where 0
is opaque and 1
is transparent.system.ArgumentOutOfRangeException
- The translucency must be between 0
and 1
.OutlineColor
public final float getOutlineWidth()
system.ArgumentOutOfRangeException
- OutlineWidth
is less than 0
.InsufficientVideoCardException
- OutlineWidth
is outside of the range supported by the video card. To verify
a pixel size is supported, check MinimumPixelSizeSupported
and MaximumPixelSizeSupported
.
Similar to
The total pixel size of a point, including the
PixelSize
,
MinimumPixelSizeSupported
,
MaximumPixelSizeSupported
public final void setOutlineWidth(float value)
system.ArgumentOutOfRangeException
- OutlineWidth
is less than 0
.InsufficientVideoCardException
- OutlineWidth
is outside of the range supported by the video card. To verify
a pixel size is supported, check MinimumPixelSizeSupported
and MaximumPixelSizeSupported
.
Similar to
The total pixel size of a point, including the
PixelSize
,
MinimumPixelSizeSupported
,
MaximumPixelSizeSupported
public final float getPixelSize()
system.ArgumentOutOfRangeException
- PixelSize
is less than 0
.InsufficientVideoCardException
- PixelSize
is outside of the range supported by the video card. To verify
a pixel size is supported, check MinimumPixelSizeSupported
and MaximumPixelSizeSupported
. Regardless of
MinimumPixelSizeSupported
, a pixel size of 0
is
always allowed and effectively hides the primitive.
The size is defined in pixels so even if the camera moves very close or
very far from a point batch, the size of each point on the screen does
not change.MinimumPixelSizeSupported
,
MaximumPixelSizeSupported
public final void setPixelSize(float value)
system.ArgumentOutOfRangeException
- PixelSize
is less than 0
.InsufficientVideoCardException
- PixelSize
is outside of the range supported by the video card. To verify
a pixel size is supported, check MinimumPixelSizeSupported
and MaximumPixelSizeSupported
. Regardless of
MinimumPixelSizeSupported
, a pixel size of 0
is
always allowed and effectively hides the primitive.
The size is defined in pixels so even if the camera moves very close or
very far from a point batch, the size of each point on the screen does
not change.MinimumPixelSizeSupported
,
MaximumPixelSizeSupported
public static final float getMinimumPixelSizeSupported()
PixelSize
public static final float getMaximumPixelSizeSupported()
PixelSize
public final DistanceDisplayCondition getDistanceDisplayConditionPerPoint()
DistanceDisplayCondition
that is evaluated per point in the point batch during rendering. This is different than
agi.foundation.graphics.primitive.DisplayCondition
,
which is evaluated once for the entire point batch.
When DistanceDisplayConditionPerPoint
is null
, no per point display condition is evaluated.
During rendering, first the primitive's
public final void setDistanceDisplayConditionPerPoint(DistanceDisplayCondition value)
DistanceDisplayCondition
that is evaluated per point in the point batch during rendering. This is different than
agi.foundation.graphics.primitive.DisplayCondition
,
which is evaluated once for the entire point batch.
When DistanceDisplayConditionPerPoint
is null
, no per point display condition is evaluated.
During rendering, first the primitive's
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 boolean getPerItemPickingEnabled()
PickResults
returned
from the Scene's
Pick
method. Each point
index that is picked will be returned as a BatchPrimitiveIndex
.
Picking topicpublic final void setPerItemPickingEnabled(boolean value)
PickResults
returned
from the Scene's
Pick
method. Each point
index that is picked will be returned as a BatchPrimitiveIndex
.
Picking topicpublic final boolean getCentralBodyClipped()
public final void setCentralBodyClipped(boolean value)
public final void set(Iterable<Cartesian> positions)
agi.foundation.graphics.primitive.ReferenceFrame
.
The new positions for the point batch.
system.ArgumentNullException
- positions is null
.CouldNotCreateVideoCardResourceException
- Could not allocate video memory for positions.
This call overwrites the primitive's previous positions and per-position colors. To update a subset
of positions, use
Each point is rendered with the same color and translucency, which is defined by the primitive's
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 , 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.
Point Batch Primitive topic
Performance topicSetPartial
public final void set(Iterable<Cartesian> positions, Iterable<Color> colors)
agi.foundation.graphics.primitive.ReferenceFrame
.
The new positions for the point batch.
The new colors for the point batch. There must be one color for each
position in system.ArgumentNullException
- positions or colors is null
.system.ArgumentException
- positions and colors
must have the same number of elements.CouldNotCreateVideoCardResourceException
- Could not allocate video memory for positions and
colors.
This call overwrites the primitive's previous positions and per-position colors. To update a subset
of positions and colors, use
Each color in
To create translucent points, use the
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 , 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.
Point Batch Primitive topic
Performance topicSetPartial
public final void set(Iterable<Cartesian> positions, Iterable<Color> colors, RenderPassHint renderPassHint)
agi.foundation.graphics.primitive.ReferenceFrame
.
renderPassHint is provided for efficiency.
The new positions for the point batch.
The new colors for the point batch. There must be one color for each
position in RenderPass
implied by colors.
Calling this method with a
See
Set
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
Set
.centralBody
- The central body the positions are defined on.
The new positions for the point batch.
centralBody is .
The primitive's ReferenceFrame (get
)
is not equal to centralBody fixed frame.
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
Set
public final void setCartographic(CentralBody centralBody, Iterable<Cartographic> positions, Iterable<Color> colors)
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
Set
.centralBody
- The central body the positions are defined on.
The new positions for the point batch.
The new colors for the point batch. There must be one color for each
position in get
)
is not equal to centralBody fixed frame.
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
Set
public final void setCartographic(CentralBody centralBody, Iterable<Cartographic> positions, Iterable<Color> colors, 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
Set
.centralBody
- The central body the positions are defined on.
The new positions for the point batch.
The new colors for the point batch. There must be one color for each
position in RenderPass
implied by colors.
The primitive's ReferenceFrame (get
)
is not equal to centralBody fixed frame.
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
Set
public final void setPartial(Iterable<Cartesian> positions, Iterable<Integer> indices)
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
.
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.system.ArgumentNullException
- positions or indices is null
.system.ArgumentException
- positions and indices
must have the same number of elements.
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 , 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.
Dynamic Updates topic
Set Hint Performance topicpublic final void setPartial(Iterable<Cartesian> positions, Iterable<Integer> indices, IndicesOrderHint indicesOrderHint)
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
.
An optimization hint indicating how indices are sorted.
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.system.ArgumentNullException
- positions or indices is null
.system.ArgumentException
- positions and indices
must have the same number of elements.
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 , 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.
Dynamic Updates topic
Set Hint Performance topicpublic final void setPartial(Iterable<Cartesian> positions, Iterable<Color> colors, Iterable<Integer> indices)
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
.
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.system.ArgumentNullException
- positions and colors are null
.
Or indices is null
.system.ArgumentException
- positions, colors, and indices
must have the same number of elements.
A collection of colors was provided, but the primitive didn't have per-position colors defined with Set
.
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 , 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.
Dynamic Updates topic
Set Hint Performance topicpublic final void setPartial(Iterable<Cartesian> positions, Iterable<Color> colors, Iterable<Integer> indices, IndicesOrderHint indicesOrderHint, RenderPassHint renderPassHint)
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
.
An optimization hint indicating how indices are sorted.
An optimization hint indicating the RenderPass
implied by colors.
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.system.ArgumentNullException
- positions and colors are null
.
Or indices is null
.system.ArgumentException
- positions, colors, and indices
must have the same number of elements.
A collection of colors was provided, but the primitive didn't have per-position colors defined with Set
.
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 , 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.
Dynamic Updates topic
Set Hint Performance topicpublic 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
SetPartial
centralBody
- The central body the positions are defined on.
A collection of new positions used to update a subset of positions in the point batch.
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
.
centralBody is .
The primitive's ReferenceFrame (get
)
is not equal to centralBody fixed frame.
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
SetPartial
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
SetPartial
centralBody
- The central body the positions are defined on.
A collection of new positions used to update a subset of positions in the point batch.
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
.
An optimization hint indicating how indices are sorted.
centralBody is .
The primitive's ReferenceFrame (get
)
is not equal to centralBody fixed frame.
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
SetPartial
public final void setPartialCartographic(CentralBody centralBody, Iterable<Cartographic> positions, Iterable<Color> colors, 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
SetPartial
centralBody
- The central body the positions are defined on.
A collection of new positions used to update a subset of positions in the point batch.
A collection of new colors used to update a subset of colors in the point batch.
There must be one color for each position in 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
.
centralBody is .
The primitive's ReferenceFrame (get
)
is not equal to centralBody fixed frame.
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
SetPartial
public final void setPartialCartographic(CentralBody centralBody, Iterable<Cartographic> positions, Iterable<Color> colors, Iterable<Integer> indices, IndicesOrderHint indicesOrderHint, RenderPassHint renderPassHint)
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
SetPartial
centralBody
- The central body the positions are defined on.
A collection of new positions used to update a subset of positions in the point batch.
A collection of new colors used to update a subset of colors in the point batch.
There must be one color for each position in 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
.
An optimization hint indicating how indices are sorted.
An optimization hint indicating the RenderPass
implied by colors.
centralBody is .
The primitive's ReferenceFrame (get
)
is not equal to centralBody fixed frame.
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
SetPartial