InteractionSource
DrawingPanel3D
public interface DrawingPanel3D extends InteractionSource
Title: DrawingPanel3D
Description: DrawingPanel3D is the basic 3D drawing panel
Modifier and Type | Interface | Description |
---|---|---|
static class |
DrawingPanel3D.Loader |
Modifier and Type | Field | Description |
---|---|---|
static int |
AMBIENT_LIGHT |
|
static int |
BACKGROUND |
|
static int |
BOTTOM_LEFT |
Message box location
|
static int |
BOTTOM_RIGHT |
Message box location
|
static int |
DIRECTIONAL_LIGHT |
|
static int |
MODE_XYZ |
Axis Modes
|
static int |
MODE_XZY |
|
static int |
MODE_YXZ |
|
static int |
MODE_YZX |
|
static int |
MODE_ZXY |
|
static int |
MODE_ZYX |
|
static int |
POINT_LIGHT |
|
static int |
SPOT_LIGHT |
|
static int |
TARGET_PANEL |
The panel itself as the only target of the panel
|
static int |
TOP_LEFT |
Message box location
|
static int |
TOP_RIGHT |
Message box location
|
Modifier and Type | Method | Description |
---|---|---|
void |
addElement(Element element) |
Adds an Element to this DrawingPanel3D.
|
int |
getAxesMode() |
Returns the axes mode
|
java.lang.String |
getBackgroundImage() |
Returns the background image
|
Camera |
getCamera() |
Provides the Camera object used to project the scene in 3D modes.
|
java.awt.Component |
getComponent() |
Getting the pointer to the real JPanel in it
|
java.util.List<Element> |
getElements() |
Gets the (cloned) list of Elements.
|
double |
getPreferredMaxX() |
Gets the preferred maximum in the X coordinate
|
double |
getPreferredMaxY() |
Gets the preferred maximum in the Y coordinate
|
double |
getPreferredMaxZ() |
Gets the preferred maximum in the Z coordinate
|
double |
getPreferredMinX() |
Gets the preferred minimum in the X coordinate
|
double |
getPreferredMinY() |
Gets the preferred minimum in the Y coordinate
|
double |
getPreferredMinZ() |
Gets the preferred minimum in the Z coordinate
|
double |
getScaleFactorX() |
Gets the scale factor in the X axis
|
double |
getScaleFactorY() |
Gets the scale factor in the Y axis
|
double |
getScaleFactorZ() |
Gets the scale factor in the Z axis
|
VideoTool |
getVideoTool() |
Gets the video capture tool.
|
VisualizationHints |
getVisualizationHints() |
Provides the list of visualization hints that the panel uses
to display the 3D scene
|
boolean |
isSquareAspect() |
Whether the panel tries to keep a square aspect.
|
void |
removeAllElements() |
Removes all Elements from this DrawingPanel3D
|
void |
removeElement(Element element) |
Removes an Element from this DrawingPanel3D
|
java.awt.image.BufferedImage |
render() |
Paints the panel immediately from within the calling thread.
|
java.awt.image.BufferedImage |
render(java.awt.image.BufferedImage image) |
Paints the scene using the graphic context of the provided image
|
void |
repaint() |
Repaints the panel using the event queue.
|
void |
setAxesMode(int mode) |
Sets the axes mode
|
void |
setBackgroundImage(java.lang.String imageFile) |
Sets the background image
|
void |
setLightEnabled(boolean _state,
int nlight) |
Enable disable a light
|
void |
setPreferredMinMax(double minX,
double maxX,
double minY,
double maxY,
double minZ,
double maxZ) |
Sets the preferred extrema for the panel.
|
void |
setScaleFactor(double factorX,
double factorY,
double factorZ) |
Sets the scale factor of the scene in X,Y,Z axis.
|
void |
setSquareAspect(boolean square) |
Whether the panel should try to keep a square aspect.
|
void |
setVideoTool(VideoTool videoTool) |
Sets the video capture tool.
|
void |
zoomToFit() |
Sets the preferred min and max in each dimension so that all
elements currently in the panel are visible.
|
addInteractionListener, getInteractionTarget, removeInteractionListener
static final int TARGET_PANEL
static final int BOTTOM_LEFT
static final int BOTTOM_RIGHT
static final int TOP_RIGHT
static final int TOP_LEFT
static final int MODE_XYZ
static final int MODE_YXZ
static final int MODE_XZY
static final int MODE_YZX
static final int MODE_ZYX
static final int MODE_ZXY
static final int BACKGROUND
static final int AMBIENT_LIGHT
static final int DIRECTIONAL_LIGHT
static final int POINT_LIGHT
static final int SPOT_LIGHT
java.awt.Component getComponent()
void setBackgroundImage(java.lang.String imageFile)
imageFile
- java.lang.String getBackgroundImage()
void setPreferredMinMax(double minX, double maxX, double minY, double maxY, double minZ, double maxZ)
minX
- doublemaxX
- doubleminY
- doublemaxY
- doubleminZ
- doublemaxZ
- doubleCamera
double getPreferredMinX()
double getPreferredMaxX()
double getPreferredMinY()
double getPreferredMaxY()
double getPreferredMinZ()
double getPreferredMaxZ()
void setScaleFactor(double factorX, double factorY, double factorZ)
factorX
- doublefactorY
- doublefactorZ
- doubledouble getScaleFactorX()
double getScaleFactorY()
double getScaleFactorZ()
void setAxesMode(int mode)
mode
- intint getAxesMode()
void zoomToFit()
void setSquareAspect(boolean square)
square
- booleanboolean isSquareAspect()
VisualizationHints getVisualizationHints()
VisualizationHints
Camera getCamera()
Camera
VideoTool getVideoTool()
void setVideoTool(VideoTool videoTool)
videoCap
- the video capture tooljava.awt.image.BufferedImage render()
java.awt.image.BufferedImage render(java.awt.image.BufferedImage image)
image
- Imagevoid repaint()
void addElement(Element element)
element
- ElementElement
void removeElement(Element element)
element
- ElementElement
void removeAllElements()
Element
java.util.List<Element> getElements()
void setLightEnabled(boolean _state, int nlight)
_state
- nlight
-