Package snap.gfx3d
Class Renderer2D
java.lang.Object
snap.gfx3d.Renderer
snap.gfx3d.Renderer2D
This Renderer subclass tries to render the Scene using the standard Painter (2D).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A default implementation. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFacetShapeInCameraCoords
(FacetShape facetShape, List<FacetShape> facetShapeList) Adds given FacetShape in camera space if visible.protected void
addFacetShapesInCameraCoords
(Shape3D aShape, List<FacetShape> facetShapeList) Adds the paths for shape.protected void
Override to rebuild FacetShapes for camera changes.protected List<FacetShape>
Returns a list of all Scene FacetShapes in camera coords.Returns a list of all Scene FacetShapes in view coords.protected List<FacetShape>
Returns a list of all Scene FacetShape in view coords.getName()
Returns the name.Returns the bounding rect of scene in view coords.boolean
Returns whether to sort surfaces.protected void
paintFacetShape
(Painter aPntr, FacetShape aFacetShape) Paints a Path3D.void
paintFacetShapes
(Painter aPntr) Paints shape children.protected void
Called to indicate that FacetShapes list needs to be rebuilt.void
renderAndPaint
(Painter aPntr) Renders scene for given painter, camera and scene.protected void
Called when scene changes.void
setSortSurfaces
(boolean aValue) Sets whether to sort surfaces.Methods inherited from class snap.gfx3d.Renderer
getCamera, getScene, newRenderer
-
Constructor Details
-
Renderer2D
Constructor.
-
-
Method Details
-
getName
Returns the name. -
isSortSurfaces
public boolean isSortSurfaces()Returns whether to sort surfaces. -
setSortSurfaces
public void setSortSurfaces(boolean aValue) Sets whether to sort surfaces. -
getFacetShapesInViewCoords
Returns a list of all Scene FacetShapes in view coords. -
getFacetShapesInViewCoordsImpl
Returns a list of all Scene FacetShape in view coords. -
getFacetShapesInCameraCoords
Returns a list of all Scene FacetShapes in camera coords. -
addFacetShapesInCameraCoords
Adds the paths for shape. -
addFacetShapeInCameraCoords
Adds given FacetShape in camera space if visible. -
getSceneBoundsInView
Returns the bounding rect of scene in view coords.- Overrides:
getSceneBoundsInView
in classRenderer
-
rebuildFacetShapes
protected void rebuildFacetShapes()Called to indicate that FacetShapes list needs to be rebuilt. -
cameraDidPropChange
Override to rebuild FacetShapes for camera changes.- Overrides:
cameraDidPropChange
in classRenderer
-
sceneDidChange
protected void sceneDidChange()Called when scene changes.- Overrides:
sceneDidChange
in classRenderer
-
renderAndPaint
Renders scene for given painter, camera and scene.- Specified by:
renderAndPaint
in classRenderer
-
paintFacetShapes
Paints shape children. -
paintFacetShape
Paints a Path3D.
-