public class Motor3D
extends java.lang.Object
Constructor and Description |
---|
Motor3D(G2DCanvas canvas,
java.awt.Graphics2D g2d,
java.awt.Dimension dim)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clean() |
void |
clearDepth()
Clear the depth buffer
|
void |
draw()
Draw the scene in the Graphics2D
|
void |
draw(DrawingTools drawingTools,
Geometry geometry,
Appearance appearance)
Add the geometry to the scene
|
void |
draw(DrawingTools drawingTools,
Texture texture,
AnchorPosition anchor,
ElementsBuffer positions,
int offset,
int stride,
double rotationAngle) |
void |
draw(DrawingTools drawingTools,
Texture texture,
AnchorPosition anchor,
Vector3d position,
double rotationAngle) |
void |
drawTexture(DrawingTools drawingTools,
java.awt.image.BufferedImage image,
Texture texture) |
Transformation |
getCurrentSingleTransformation() |
Transformation |
getCurrentTransformation() |
boolean |
is2DView() |
void |
reset(java.awt.Color color)
Reset this motor
|
void |
setAntialiased(boolean aa) |
void |
setClippingPlanes(java.util.List<ClippingPlane> clippingPlanes) |
void |
setFaceCullingMode(Geometry.FaceCullingMode mode)
Set the face culling mode
|
void |
setGraphics(java.awt.Graphics2D g2d) |
void |
setTransformation(Transformation transf,
Transformation single)
Set the current transformation
|
public Motor3D(G2DCanvas canvas, java.awt.Graphics2D g2d, java.awt.Dimension dim)
g2d
- a Graphics2D object where to drawdim
- the graphic dimensionspublic void setGraphics(java.awt.Graphics2D g2d)
public void setAntialiased(boolean aa)
public boolean is2DView()
public void setClippingPlanes(java.util.List<ClippingPlane> clippingPlanes)
public void setFaceCullingMode(Geometry.FaceCullingMode mode)
mode
- the mode to setpublic void setTransformation(Transformation transf, Transformation single)
transf
- the transformation to setpublic Transformation getCurrentTransformation()
public Transformation getCurrentSingleTransformation()
public void reset(java.awt.Color color)
color
- the filling colorpublic void clearDepth()
public void draw()
public void clean()
public void drawTexture(DrawingTools drawingTools, java.awt.image.BufferedImage image, Texture texture)
public void draw(DrawingTools drawingTools, Geometry geometry, Appearance appearance)
drawingTools
- the DrawingToolsgeometry
- the geometry to drawappearance
- the appearance to usepublic void draw(DrawingTools drawingTools, Texture texture, AnchorPosition anchor, ElementsBuffer positions, int offset, int stride, double rotationAngle)
public void draw(DrawingTools drawingTools, Texture texture, AnchorPosition anchor, Vector3d position, double rotationAngle)