public abstract class AbstractViewport3d extends java.lang.Object implements IViewport3d
Modifier and Type | Field and Description |
---|---|
protected IVector3 |
areaSize_
Maximum displayable area
|
protected java.awt.Canvas |
canvas_
Canvas for graphical output.
|
protected java.util.Set<java.lang.Object> |
drawObjects_
Known drawable Objects.
|
protected Vector2Double |
paddedSize_
Real size of the viewport including padding.
|
protected IPerspective |
perspective
IPropertyObject holding properties for layers.
|
protected IVector2 |
pixPosition_
Pixel-corrected viewport position.
|
protected IVector3 |
position_
Virtual Viewport position.
|
protected boolean |
preserveAR_
Flag aspect ratio preservation.
|
protected boolean |
rendering
Flag to indicate that rendering is in progress.
|
protected Vector3Double |
size_
Size of the viewport without padding.
|
protected ISpaceController |
spacecontroller
The Space Controller
|
Constructor and Description |
---|
AbstractViewport3d(IPerspective perspective,
IVector3 areasize,
boolean isGrid,
boolean shader,
java.lang.String camera,
ISpaceController spaceController) |
Modifier and Type | Method and Description |
---|---|
void |
addViewportListener(IViewportListener listener)
Adds a IViewportListener
|
IVector3 |
getAreaSize()
Gets the maximum displayable size.
|
IVector3 |
getAreaSize3d()
Gets the maximum displayable size.
|
java.lang.String |
getCamera() |
java.awt.Canvas |
getCanvas()
Returns the canvas that is used for displaying the objects.
|
IVector2 |
getCanvasSize()
Returns the size of the canvas as a vector.
|
IVector2 |
getPaddedSize()
Returns the padded size
|
IPerspective |
getPerspective()
Get the perspective.
|
IVector3 |
getPosition()
Gets the position of the viewport.
|
IVector3 |
getSize()
Gets the size of the display area.
|
ISpaceController |
getSpaceController() |
void |
getSpaceController(ISpaceController spacecontroller) |
void |
isGridSpace(boolean isGrid) |
boolean |
isShader() |
boolean |
isShowing()
Checks if this IViewport is showing on screen.
|
void |
removeViewportListener(IViewportListener listener)
Removes a IViewportListener
|
void |
setAreaSize(IVector3 areaSize)
Sets the maximum displayable size.
|
void |
setCamera(java.lang.String camera) |
void |
setShader(boolean shader) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMarker, getSelected, pauseApp, refresh, setSelected, startApp, stopApp
protected ISpaceController spacecontroller
protected java.awt.Canvas canvas_
protected Vector3Double size_
protected boolean preserveAR_
protected IVector3 areaSize_
protected Vector2Double paddedSize_
protected java.util.Set<java.lang.Object> drawObjects_
protected IVector3 position_
protected IVector2 pixPosition_
protected IPerspective perspective
protected volatile boolean rendering
public AbstractViewport3d(IPerspective perspective, IVector3 areasize, boolean isGrid, boolean shader, java.lang.String camera, ISpaceController spaceController)
public java.awt.Canvas getCanvas()
getCanvas
in interface IViewport3d
public IVector3 getSize()
public IVector3 getAreaSize()
getAreaSize
in interface IViewport3d
public IVector3 getAreaSize3d()
public void setAreaSize(IVector3 areaSize)
setAreaSize
in interface IViewport3d
areaSize
- maximum area size.public IVector2 getPaddedSize()
public IVector2 getCanvasSize()
public IVector3 getPosition()
public boolean isShowing()
public void addViewportListener(IViewportListener listener)
listener
- new listenerpublic void removeViewportListener(IViewportListener listener)
listener
- the listenerpublic IPerspective getPerspective()
getPerspective
in interface IViewport3d
public void isGridSpace(boolean isGrid)
isGridSpace
in interface IViewport3d
public boolean isShader()
public void setShader(boolean shader)
public java.lang.String getCamera()
public void setCamera(java.lang.String camera)
public ISpaceController getSpaceController()
getSpaceController
in interface IViewport3d
public void getSpaceController(ISpaceController spacecontroller)