TEntity
- The type of entity.public class ViewEntityFromOffset<TEntity extends IEntityPosition> extends Object
Camera
(get
/ set
).
By default, Insight3D allows the user to control the view with the mouse, and this class does not interfere
with that. While this view is active, the user can use the mouse to zoom in and out as well as rotate around
the specified entity, even while this view makes sure the entity remains the focus point of the camera. If you
would like to lock the view to a specific offset, you must disable Insight3D's default mouse handling. See
MouseOptions
(get
) for details on adjusting mouse handling. This class
only modifies camera properties related to Position
(get
/ set
)
and ReferencePoint
(get
/ set
). All other properties can still be adjusted manually.
ViewFromTo
,
Visualization with Insight3D topicConstructor and Description |
---|
ViewEntityFromOffset(TypeLiteral<TEntity> typeLiteralTEntity)
Initializes a new instance.
|
ViewEntityFromOffset(TypeLiteral<TEntity> typeLiteralTEntity,
Camera camera,
TEntity entity,
Cartesian offset,
CentralBody centralBody)
Creates a new instance, specifying all parameters.
|
Modifier and Type | Method and Description |
---|---|
Camera |
getCamera()
|
CentralBody |
getCentralBody()
|
TEntity |
getEntity()
Gets the entity to track.
|
Cartesian |
getOffset()
Gets the initial offset from the entity to place the camera,
specified as
AxesEastNorthUp . |
void |
resetView(Transaction transaction)
Resets the camera view to look at the entity from the initial offset.
|
void |
setCamera(Camera value)
|
void |
setCentralBody(CentralBody value)
|
void |
setEntity(TEntity value)
Sets the entity to track.
|
void |
setOffset(Cartesian value)
Sets the initial offset from the entity to place the camera,
specified as
AxesEastNorthUp . |
void |
update(Transaction transaction)
Moves the camera's reference point to the position of the tracked
entity while offsetting the camera position by amount of entity movement.
|
public ViewEntityFromOffset(TypeLiteral<TEntity> typeLiteralTEntity)
typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.public ViewEntityFromOffset(TypeLiteral<TEntity> typeLiteralTEntity, Camera camera, TEntity entity, @Nonnull Cartesian offset, CentralBody centralBody)
typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.camera
- The camera to use.entity
- The entity to track.offset
- The initial offset of the camera specified as AxesEastNorthUp
from the entity's position.centralBody
- The CentralBody
(get
/ set
) about which to rotate the camera.public final Camera getCamera()
public final void setCamera(Camera value)
public final TEntity getEntity()
public final void setEntity(TEntity value)
@Nonnull public final Cartesian getOffset()
AxesEastNorthUp
.public final void setOffset(@Nonnull Cartesian value)
AxesEastNorthUp
.public final CentralBody getCentralBody()
public final void setCentralBody(CentralBody value)
public final void resetView(Transaction transaction)
transaction
- The transaction to use.public final void update(Transaction transaction)
transaction
- The transaction to use.ArgumentNullException
- Thrown if transaction is null
.PropertyInvalidException
- Thrown if Camera
(get
/ set
) is null
.PropertyInvalidException
- Thrown if Entity
(get
/ set
) is null
.