TEntity
- The type of entity.public abstract class EntityVisualizer<TEntity extends IEntityIdentifier & IEntityPosition> extends Object implements IDisposable
Modifier | Constructor and Description |
---|---|
protected |
EntityVisualizer(TypeLiteral<TEntity> typeLiteralTEntity)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases any resources associated with this instance.
|
protected abstract void |
dispose(boolean disposing)
Releases any resources associated with this instance.
|
abstract Color |
getColor()
Gets the color.
|
abstract boolean |
getDisplay()
Gets a value indicating whether the entities are displayed.
|
abstract DisplayCondition |
getDisplayCondition()
Gets the
DisplayCondition . |
abstract EntitySet<TEntity> |
getEntities()
Gets the entities being visualized.
|
abstract float |
getTranslucency()
Gets the translucency.
|
abstract Iterable<TEntity> |
pick(PickResult pickResult)
Given a
PickResult , returns the entities that were picked. |
protected <TPrimitive extends Primitive> |
pick(PickResult pickResult,
Iterable<TPrimitive> primitives)
Given a list of primitives and a
PickResult , returns
the primitives that were picked. |
protected Iterable<TEntity> |
pick(PickResult pickResult,
Primitive primitive)
Given a
PickResult and Primitive ,
returns a list of entities that were picked. |
abstract void |
setColor(Color value)
Sets the color.
|
abstract void |
setDisplay(boolean value)
Sets a value indicating whether the entities are displayed.
|
abstract void |
setDisplayCondition(DisplayCondition value)
Sets the
DisplayCondition . |
abstract void |
setEntities(EntitySet<TEntity> value)
Sets the entities being visualized.
|
abstract void |
setTranslucency(float value)
Sets the translucency.
|
abstract void |
update(Transaction transaction)
Updates all graphics to reflect the entities in the provided transaction.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
protected EntityVisualizer(TypeLiteral<TEntity> typeLiteralTEntity)
typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.public final void dispose()
dispose
in interface IDisposable
protected abstract void dispose(boolean disposing)
disposing
- true
to release both managed and unmanaged resources;
false
to release only unmanaged resources.public abstract void setEntities(EntitySet<TEntity> value)
public abstract float getTranslucency()
public abstract void setTranslucency(float value)
public abstract boolean getDisplay()
public abstract void setDisplay(boolean value)
public abstract DisplayCondition getDisplayCondition()
DisplayCondition
.public abstract void setDisplayCondition(DisplayCondition value)
DisplayCondition
.public abstract void update(@Nonnull Transaction transaction)
transaction
- The transaction to use.@Nonnull public abstract Iterable<TEntity> pick(@Nonnull PickResult pickResult)
PickResult
, returns the entities that were picked.pickResult
- The result of the Insight3D pick.ArgumentNullException
- Thrown if pickResult
is null
.@Nonnull protected final <TPrimitive extends Primitive> Iterable<TEntity> pick(@Nonnull PickResult pickResult, @Nonnull Iterable<TPrimitive> primitives)
PickResult
, returns
the primitives that were picked. The primitives in the list are expected to
contain an entity in their Tag property.TPrimitive
- The type of primitive.pickResult
- The result of the Insight3D pick.primitives
- The list of primitives being used by the visualizer. The primitive Tag property should be an entity.ArgumentNullException
- Thrown if pickResult
is null
.ArgumentNullException
- Thrown if primitives
is null
.@Nonnull protected final Iterable<TEntity> pick(@Nonnull PickResult pickResult, @Nonnull Primitive primitive)
PickResult
and Primitive
,
returns a list of entities that were picked. This is best used
to respond to a pick involving a batch primitive.pickResult
- The result of the Insight3D pick.primitive
- The primitive that was picked.ArgumentNullException
- Thrown if pickResult
is null
.ArgumentNullException
- Thrown if primitive
is null
.