public final class PolylinePrimitive extends Primitive implements IDisposable
PositionInterpolator
to render great arcs or rhumb lines.
Polyline Primitive topicConstructor and Description |
---|
PolylinePrimitive()
Initializes a default polyline primitive.
|
PolylinePrimitive(PolylineType polylineType)
Initializes a polyline primitive with the specified
polylineType.
|
PolylinePrimitive(PolylineType polylineType,
SetHint setHint)
Initializes a new instance of a polyline primitive with the specified
polylineType and setHint.
|
PolylinePrimitive(PositionInterpolator interpolator)
Initializes a polyline primitive with the specified interpolator.
|
PolylinePrimitive(PositionInterpolator interpolator,
SetHint setHint)
Initializes a polyline primitive with the specified interpolator
and setHint.
|
PolylinePrimitive(SetHint setHint)
Initializes a new instance of a polyline 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 the polyline will be clipped by the central body.
|
Color |
getColor()
Gets the primitive's color.
|
boolean |
getDisplayOutline()
Gets whether an outline is rendered around the polyline.
|
static float |
getMaximumWidthSupported()
Gets the maximum width, in pixels, supported by the video card.
|
static float |
getMinimumWidthSupported()
Gets the minimum width, in pixels, supported by the video card.
|
Color |
getOutlineColor()
Gets the outline's color.
|
float |
getOutlineTranslucency()
Gets the translucency of the outline.
|
float |
getOutlineWidth()
Gets the width, in pixels, of the outline around the polyline.
|
boolean |
getPerItemPickingEnabled()
Gets whether individual line indices will be included in the
PickResults returned
from the Scene's Pick method. |
PolylineType |
getPolylineType()
Gets how the polyline interprets the positions passed to
Set methods. |
PositionInterpolator |
getPositionInterpolator()
Gets the
PositionInterpolator applied to
positions passed to Set , SetCartographic , SetSubset ,
and SetSubsetCartographic methods. |
SetHint |
getSetHint()
Gets the primitive's
SetHint . |
float |
getTranslucency()
Gets the primitive's translucency.
|
float |
getWidth()
Gets the line width, in pixels.
|
void |
set(Iterable<Cartesian> positions)
Defines the positions for a polyline primitive.
|
void |
set(Iterable<Cartesian> positions,
Iterable<Color> colors)
Defines the positions and colors of a polyline.
|
void |
set(Iterable<Cartesian> positions,
Iterable<Color> colors,
RenderPassHint renderPassHint)
Defines the positions and colors of a polyline.
|
void |
set(SolidTriangulatorResult solidTriangulatorResult)
Defines the positions of a polyline using the outline positions of the specified solidTriangulatorResult.
|
void |
set(SurfaceShapesResult surfaceShapesResult)
Defines the positions of a polyline using the positions of the specified surfaceShapesResult.
|
void |
set(SurfaceTriangulatorResult surfaceTriangulatorResult)
Defines the positions of a polyline using the boundary positions of the specified surfaceTriangulatorResult.
|
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 the polyline will be clipped by the central body.
|
void |
setColor(Color value)
Sets the primitive's color.
|
void |
setDisplayOutline(boolean value)
Sets whether an outline is rendered around the polyline.
|
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 width, in pixels, of the outline around the polyline.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Color> colors,
Iterable<Integer> indices)
Updates a subset of positions and/or colors in a polyline.
|
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 polyline.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Integer> indices)
Updates a subset of positions in a polyline.
|
void |
setPartial(Iterable<Cartesian> positions,
Iterable<Integer> indices,
IndicesOrderHint indicesOrderHint)
Updates a subset of positions in a polyline.
|
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 line indices will be included in the
PickResults returned
from the Scene's Pick method. |
void |
setSubset(Cartesian[] positions,
int index,
int count)
Defines the positions of a polyline using a subset of input positions.
|
void |
setSubsetCartographic(CentralBody centralBody,
Cartographic[] positions,
int index,
int count)
For convenience.
|
void |
setTranslucency(float value)
Sets the primitive's translucency.
|
void |
setWidth(float value)
Sets the line width, in pixels.
|
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 PolylinePrimitive()
agi.foundation.graphics.polylineprimitive.SetHint
of Frequent
and a
agi.foundation.graphics.polylineprimitive.PolylineType
of LineStrip
.
See PolylinePrimitive.PolylinePrimitive(agi.foundation.graphics.PolylineType,agi.foundation.graphics.SetHint)
for a full discussion.
public PolylinePrimitive(PositionInterpolator interpolator, SetHint setHint)
interpolator
- The PositionInterpolator
applied
to positions passed to Set
methods.
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
.
Use of an
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.
Polyline Primitive topicpublic PolylinePrimitive(PolylineType polylineType, SetHint setHint)
polylineType
- Describes how the polyline should interpret positions passed to Set
methods.
The expected usage for Set
and SetPartial
methods.
See the Set Hint topic for more information on
selecting an appropriate value.UnsupportedCaseException
- polylineType must be a valid enumeration value in
PolylineType
.
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.
Polyline Primitive topicpublic PolylinePrimitive(PositionInterpolator interpolator)
agi.foundation.graphics.polylineprimitive.SetHint
of Frequent
.interpolator
- The PositionInterpolator
applied
to positions passed to Set
methods.
See PolylinePrimitive.PolylinePrimitive(agi.foundation.graphics.PositionInterpolator,agi.foundation.graphics.SetHint)
for a full discussion.
public PolylinePrimitive(SetHint setHint)
SetHint
.
This is equivalent to constructing a polyline with
a PolylineType
of
LineStrip
and the specified
agi.foundation.graphics.polylineprimitive.SetHint
.
The expected usage for Set
and SetPartial
methods.
See the Set Hint topic for more information on
selecting an appropriate value.
See PolylinePrimitive.PolylinePrimitive(agi.foundation.graphics.PolylineType,agi.foundation.graphics.SetHint)
for a full discussion.
public PolylinePrimitive(PolylineType polylineType)
agi.foundation.graphics.polylineprimitive.SetHint
of Frequent
.polylineType
- Describes how the polyline should interpret positions passed to Set
methods.
See PolylinePrimitive.PolylinePrimitive(agi.foundation.graphics.PolylineType,agi.foundation.graphics.SetHint)
for a full discussion.
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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#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.PolylinePrimitive#Set(system.collections.generic.ienumerable`1{agi.foundation.coordinates.Cartesian},system.collections.generic.ienumerable`1{system.drawing.Color})
public final float getWidth()
system.ArgumentOutOfRangeException
- Width is less than 0
.InsufficientVideoCardException
- Width is outside of the range supported by the video card. To verify
a width is supported, check MinimumWidthSupported
and MaximumWidthSupported
. Regardless of
MinimumWidthSupported
, a width of 0
is
always allowed and effectively hides the primitive.
The width is defined in pixels so even if the camera moves very close or
very far from a polyline, the width of the line on the screen does
not change.MinimumWidthSupported
,
MaximumWidthSupported
public final void setWidth(float value)
system.ArgumentOutOfRangeException
- Width is less than 0
.InsufficientVideoCardException
- Width is outside of the range supported by the video card. To verify
a width is supported, check MinimumWidthSupported
and MaximumWidthSupported
. Regardless of
MinimumWidthSupported
, a width of 0
is
always allowed and effectively hides the primitive.
The width is defined in pixels so even if the camera moves very close or
very far from a polyline, the width of the line on the screen does
not change.MinimumWidthSupported
,
MaximumWidthSupported
public static final float getMinimumWidthSupported()
Width
public static final float getMaximumWidthSupported()
Width
public final PositionInterpolator getPositionInterpolator()
PositionInterpolator
applied to
positions passed to Set
, SetCartographic
, SetSubset
,
and SetSubsetCartographic
methods. When this property is null
,
linear interpolation is used.
Polyline Primitive topic - Interpolatorspublic final PolylineType getPolylineType()
Set
methods.
Polyline Primitive topicpublic 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 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 width is supported, check MinimumWidthSupported
and MaximumWidthSupported
.
Similar to
The total polyline width, in pixels, including the
Width
,
MinimumWidthSupported
,
MaximumWidthSupported
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 width is supported, check MinimumWidthSupported
and MaximumWidthSupported
.
Similar to
The total polyline width, in pixels, including the
Width
,
MinimumWidthSupported
,
MaximumWidthSupported
public final boolean getPerItemPickingEnabled()
PickResults
returned
from the Scene's
Pick
method. Each line
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 line
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 polyline.
system.ArgumentNullException
- positions is null
.system.ArgumentException
- When the polyline's PolylineType
is Lines
,
positions must have an even number of elements.
Every two positions define a line segment.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
If the polyline's
Each line segment 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.
Polyline Primitive topic
Performance topicSetPartial
public final void set(Iterable<Cartesian> positions, Iterable<Color> colors)
agi.foundation.graphics.primitive.ReferenceFrame
.
The new positions for the polyline.
The new colors for the polyline. 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.system.ArgumentException
- When the polyline's PolylineType
is Lines
,
positions must have an even number of elements.
Every two positions define a line segment.system.InvalidOperationException
- Cannot define per-position colors when PositionInterpolator
is not null
.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
If the polyline's
Each color in
To create translucent line segments, 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.
Polyline 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 polyline.
The new colors for the polyline. There must be one color for each
position in RenderPass
implied by colors.
Calling this method with a
See
Set
public final void set(SurfaceShapesResult surfaceShapesResult)
surfaceShapesResult
- The surface shapes result used to define the polyline.system.ArgumentNullException
- surfaceShapesResult is null
.
This is equivalent to to calling
Set
with surfaceShapesResult.Positions.
See
Set
for a full discussion.Set
public final void set(SurfaceTriangulatorResult surfaceTriangulatorResult)
surfaceTriangulatorResult
- The surface triangulator result used to define the polyline.system.ArgumentNullException
- surfaceTriangulatorResult is null
.
This is equivalent to to calling
Set
with surfaceTriangulatorResult.BoundaryPositions.
See
Set
for a full discussion.Set
public final void set(SolidTriangulatorResult solidTriangulatorResult)
solidTriangulatorResult
- The solid triangulator result used to define the polyline.system.ArgumentNullException
- solidTriangulatorResult is null
.
This is equivalent to to calling
Set
with solidTriangulatorResult.OutlinePositions.
See
Set
for a full discussion.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 polyline.
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 polyline.
The new colors for the polyline. 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 polyline.
The new colors for the polyline. 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 setSubset(Cartesian[] positions, int index, int count)
system.ArgumentNullException
- positions is null
.system.ArgumentException
- When the polyline's PolylineType
is Lines
,
the subset of positions must have an even
number of elements. Every two positions define a line segment.system.ArgumentOutOfRangeException
- index cannot be less than 0
and
count cannot be less than 1
.
index +
count
can include elements outside of the array's bounds.CouldNotCreateVideoCardResourceException
- Could not allocate video memory for the subset of positions.
When the caller has an array of positions and wants to define a polyline primitive
using a continuous subset of the array, calling SetSubset
is more
convenient and efficient than copying the positions into a temporary array
and calling
Set
Set
public final void setSubsetCartographic(CentralBody centralBody, Cartographic[] positions, int index, int count)
Cartographic
positions.
Longitude and latitude are in radians, and altitude is in meters.
This is equivalent to
converting the subset of positions to
Cartesian
and calling
SetSubset
.centralBody
- The central body the positions are defined on.
An array of positions. The subset of this array defined by
get
)
is not equal to centralBody fixed frame.
See
SetSubset
for a full discussion.SetSubset
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 contain 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 contain 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 contain 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 contain 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 polyline.
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 polyline.
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 polyline.
A collection of new colors used to update a subset of colors in the polyline.
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 polyline.
A collection of new colors used to update a subset of colors in the polyline.
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