Class RaytracingCamera
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle
eu.svjatoslav.sixth.e3d.renderer.octree.raytracer.RaytracingCamera
Raytracing camera that renders a scene to a texture.
It is represented on the scene as a textured rectangle showing the raytraced view.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSize of the rendered image in pixels.static final intSize of the camera view in world units.Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle
bottomLeft, bottomRight, textureBottomLeft, textureBottomRight, textureTopLeft, textureTopRight, topLeft, topRightFields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
cachedBoundingBox, mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionRaytracingCamera(Camera camera, double zoom) Creates a raytracing camera at the specified camera position. -
Method Summary
Modifier and TypeMethodDescriptionReturns the camera view used for ray tracing.Loads a sprite image from the classpath.Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle
getTexture, initializeMethods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
addShape, addShape, beforeTransformHook, extractSolidPolygons, getBoundingBox, getGroup, getLocation, getSubShapesRegistry, getTransform, getViewSpaceTracker, hideGroup, intersect, removeGroup, setBackfaceCulling, setCacheNeedsRebuild, setColor, setGroupForUngrouped, setMouseInteractionController, setRootComposite, setShadingEnabled, setTransform, showGroup, subtract, transform, unionMethods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
invalidateBounds
-
Field Details
-
SIZE
public static final int SIZESize of the camera view in world units.- See Also:
-
IMAGE_SIZE
public static final int IMAGE_SIZESize of the rendered image in pixels.- See Also:
-
-
Constructor Details
-
RaytracingCamera
Creates a raytracing camera at the specified camera position.- Parameters:
camera- the camera to use for the viewzoom- the zoom level
-
-
Method Details
-
getCameraView
Returns the camera view used for ray tracing.- Returns:
- the camera view
-
getSprite
Loads a sprite image from the classpath.- Parameters:
ref- the resource path- Returns:
- the loaded image
- Throws:
IOException- if the image cannot be loaded
-