TEntity
- The type of entity.public class MarkerVisualizer<TEntity extends IEntityIdentifier & IEntityPosition> extends EntityVisualizer<TEntity>
EntityVisualizer
which creates a marker for each entity.
This visualizer uses a MarkerBatchPrimitive
to efficiently render each entity marker.
Constructor and Description |
---|
MarkerVisualizer(TypeLiteral<TEntity> typeLiteralTEntity)
Initializes a new instance.
|
MarkerVisualizer(TypeLiteral<TEntity> typeLiteralTEntity,
EntitySet<TEntity> entities,
MarkerCallback<TEntity> callback)
Creates a new instance with the provided
EntitySet and MarkerCallback . |
MarkerVisualizer(TypeLiteral<TEntity> typeLiteralTEntity,
EntitySet<TEntity> entities,
MarkerCallback<TEntity> callback,
SetHint setHint)
|
Modifier and Type | Method and Description |
---|---|
protected void |
dispose(boolean disposing)
Releases any resources associated with this instance.
|
MarkerCallback<TEntity> |
getCallback()
Gets the
MarkerCallback used to determine the marker. |
Color |
getColor()
Gets the color.
|
boolean |
getDisplay()
Gets a value indicating whether the entities are displayed.
|
DisplayCondition |
getDisplayCondition()
Gets the
DisplayCondition . |
EntitySet<TEntity> |
getEntities()
Gets the entities being visualized.
|
Cartesian |
getEyeOffset()
Gets the eye offset of each marker from the position of the entity.
|
Origin |
getOrigin()
Gets the origin of each marker.
|
PointF |
getPixelOffset()
Gets the pixel offset of each marker from the position of the entity.
|
SetHint |
getSetHint()
Gets the
SetHint (get ) of the underlying primitive. |
DimensionF |
getSize()
|
MarkerBatchSizeSource |
getSizeSource()
Gets the size source.
|
MarkerBatchUnit |
getSizeUnit()
Gets the size unit.
|
float |
getTranslucency()
Gets the translucency.
|
Iterable<TEntity> |
pick(PickResult pickResult)
Given a
PickResult , returns the entities that were picked. |
void |
setCallback(MarkerCallback<TEntity> value)
Sets the
MarkerCallback used to determine the marker. |
void |
setColor(Color value)
Sets the color.
|
void |
setDisplay(boolean value)
Sets a value indicating whether the entities are displayed.
|
void |
setDisplayCondition(DisplayCondition value)
Sets the
DisplayCondition . |
void |
setEntities(EntitySet<TEntity> value)
Sets the entities being visualized.
|
void |
setEyeOffset(Cartesian value)
Sets the eye offset of each marker from the position of the entity.
|
void |
setOrigin(Origin value)
Sets the origin of each marker.
|
void |
setPixelOffset(PointF value)
Sets the pixel offset of each marker from the position of the entity.
|
void |
setSize(DimensionF value)
|
void |
setSizeSource(MarkerBatchSizeSource value)
Sets the size source.
|
void |
setSizeUnit(MarkerBatchUnit value)
Sets the size unit.
|
void |
setTranslucency(float value)
Sets the translucency.
|
void |
update(Transaction transaction)
Updates the underlying primitive to reflect the latest entity state.
|
dispose, pick, pick
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public MarkerVisualizer(TypeLiteral<TEntity> typeLiteralTEntity)
typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.public MarkerVisualizer(TypeLiteral<TEntity> typeLiteralTEntity, EntitySet<TEntity> entities, MarkerCallback<TEntity> callback)
EntitySet
and MarkerCallback
.typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.entities
- The entities to be visualized.callback
- The callback used to determine each entity's marker.public MarkerVisualizer(TypeLiteral<TEntity> typeLiteralTEntity, EntitySet<TEntity> entities, MarkerCallback<TEntity> callback, @Nonnull SetHint setHint)
typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.entities
- The entities to be visualized.callback
- The callback used to determine each entity's marker.setHint
- The SetHint
(get
) to use for the underlying primitives./>protected void dispose(boolean disposing)
dispose
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
disposing
- true
to release both managed and unmanaged resources;
false
to release only unmanaged resources.@Nonnull public final DimensionF getSize()
public final void setSize(@Nonnull DimensionF value)
@Nonnull public final MarkerBatchUnit getSizeUnit()
public final void setSizeUnit(@Nonnull MarkerBatchUnit value)
@Nonnull public final MarkerBatchSizeSource getSizeSource()
SizeSource
(get
) for details.public final void setSizeSource(@Nonnull MarkerBatchSizeSource value)
SizeSource
(get
) for details.public final MarkerCallback<TEntity> getCallback()
MarkerCallback
used to determine the marker.public final void setCallback(MarkerCallback<TEntity> value)
MarkerCallback
used to determine the marker.@Nonnull public final SetHint getSetHint()
SetHint
(get
) of the underlying primitive.public EntitySet<TEntity> getEntities()
getEntities
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public void setEntities(EntitySet<TEntity> value)
setEntities
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
@Nonnull public Color getColor()
EntityVisualizer
getColor
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public void setColor(@Nonnull Color value)
EntityVisualizer
setColor
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public float getTranslucency()
getTranslucency
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public void setTranslucency(float value)
setTranslucency
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public boolean getDisplay()
getDisplay
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public void setDisplay(boolean value)
setDisplay
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public DisplayCondition getDisplayCondition()
EntityVisualizer
DisplayCondition
.getDisplayCondition
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public void setDisplayCondition(DisplayCondition value)
EntityVisualizer
DisplayCondition
.setDisplayCondition
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
public void update(Transaction transaction)
update
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
transaction
- The transaction to use.ArgumentNullException
- Thrown if transaction
is null
.PropertyInvalidException
- Thrown if Entities
(get
/ set
) is null
.PropertyInvalidException
- Thrown if Callback
(get
/ set
) is null
.public Iterable<TEntity> pick(PickResult pickResult)
PickResult
, returns the entities that were picked.pick
in class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition>
pickResult
- The result of the Insight3D pick.ArgumentNullException
- Thrown if pickResult
is null
.