|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.presentation.Shape
com.xj.anylogic.engine.presentation.ShapeControl
com.xj.anylogic.engine.presentation.ShapeWindow3D
public class ShapeWindow3D
The window showing 3D world on the model animation.
This is a shape like any control which is located on the model animation
canvas. It draws the 3D scene from the field of view of selected
camera.
3D window has custom context popup menu with additional items:
NAVIGATION_FULL - works only when the window isn't linked with
camera
NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO - works only when the window
isn't linked with camera
NAVIGATION_ROTATION_ONLY
NAVIGATION_NONE
| Field Summary | |
|---|---|
static int |
NAVIGATION_FULL
Navigation is fully allowed |
static int |
NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO
Navigation is only allowed above Z=0 plane |
static int |
NAVIGATION_NONE
Navigation is prohibited. |
static int |
NAVIGATION_ROTATION_ONLY
Navigation mode where user is able to rotate view only. |
| Fields inherited from class com.xj.anylogic.engine.presentation.ShapeControl |
|---|
TYPE_DOUBLE, TYPE_INT, TYPE_STRING |
| Fields inherited from class com.xj.anylogic.engine.presentation.Shape |
|---|
UNKNOWN_NAME |
| Constructor Summary | |
|---|---|
ShapeWindow3D(Presentable p,
boolean ispublic,
int x,
int y,
int width,
int height,
int navigationMode)
Creates a (persistent) 3d scene window control. |
|
| Method Summary | |
|---|---|
void |
action()
Does nothing since 3D Window has no action. |
Camera3D |
createCamera()
Returns new instance of Camera3D having camera parameters
currently used in this 3D Window |
Element3D_xjal |
get3DElement_xjal()
This method is internal and shouldn't be accessed by user. |
javax.swing.JComponent |
getJComponent()
Returns the embedded JPanel. |
void |
set3DElement_xjal(Element3D_xjal element3D)
This method is internal and shouldn't be accessed by user. |
void |
setCamera(Camera3D camera)
Sets the 3D Window to the given camera (and doesn't follow the camera) |
void |
setCamera(Camera3D camera,
boolean follow)
Sets the 3D Window to the given camera and optionally starts following it. |
void |
setCamera(Camera3D camera,
boolean follow,
long transitionTimeout)
Sets the 3D Window to the given camera and optionally starts following it. |
void |
setNavigationMode(int mode)
Sets the navigation mode (the freedom level of camera manipulation using mouse). |
void |
setValueToDefault()
Does nothing since window has no default value. |
| Methods inherited from class com.xj.anylogic.engine.presentation.ShapeControl |
|---|
clone, contains, draw, getHeight, getPresentable, getWidth, isEnabled, onClickAt, restoreOwner, setEnabled, setHeight, setWidth, update |
| Methods inherited from class com.xj.anylogic.engine.presentation.Shape |
|---|
canHandleClick, getGroup, getName, getRotation, getScaleX, getScaleY, getX, getY, isVisible, onClick, setPos, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NAVIGATION_NONE
public static final int NAVIGATION_FULL
public static final int NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO
public static final int NAVIGATION_ROTATION_ONLY
| Constructor Detail |
|---|
public ShapeWindow3D(Presentable p,
boolean ispublic,
int x,
int y,
int width,
int height,
int navigationMode)
p - the presentable object owning this controlispublic - if true, the control is visible on container's presentationx - the x coordinatey - the y coordinatewidth - the widthheight - the heightnavigationMode - the navigation mode (the freedom level of
camera manipulation using mouse). Supported modes are:
NAVIGATION_FULL - works only when the window isn't linked with camera
NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO - works only when the window isn't linked with camera
NAVIGATION_ROTATION_ONLY
NAVIGATION_NONE
| Method Detail |
|---|
public final void action()
action in class ShapeControlpublic javax.swing.JComponent getJComponent()
getJComponent in class ShapeControlpublic final void setValueToDefault()
setValueToDefault in class ShapeControlpublic void setNavigationMode(int mode)
NAVIGATION_FULL - works only when the window isn't linked with camera
NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO - works only when the window isn't linked with camera
NAVIGATION_ROTATION_ONLY
NAVIGATION_NONE
setCamera(Camera3D, boolean)) and
navigation mode isn't supported, the latter will be set to NAVIGATION_NONE
mode - the navigation modepublic void setCamera(Camera3D camera)
camera - the camera for the 3D Window
public void setCamera(Camera3D camera,
boolean follow)
camera - the camera for the 3D Windowfollow - if true this window will track camera movements.
'Follow' mode supports only 2 navigation modes:
NAVIGATION_NONE and NAVIGATION_ROTATION_ONLY. If
navigation mode is not supported, it will be set to NAVIGATION_NONE
public void setCamera(Camera3D camera,
boolean follow,
long transitionTimeout)
camera - the camera for the 3D Windowfollow - if true this window will track camera movements.
'Follow' mode supports only 2 navigation modes:
NAVIGATION_NONE and NAVIGATION_ROTATION_ONLY. If
navigation mode is not supported, it will be set to NAVIGATION_NONEtransitionTimeout - if non-zero, then the current camera position and
orientation will evolve to the given camera during the
given timeout of real milliseconds (i.e. not model-time units)public Camera3D createCamera()
Camera3D having camera parameters
currently used in this 3D Window
public Element3D_xjal get3DElement_xjal()
com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
get3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjalpublic void set3DElement_xjal(Element3D_xjal element3D)
com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
set3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||