...
Specifying a Fixed Camera (existing 2.2 API)
Code Block |
---|
// Create a camera and add it to the Scene
Camera camera = new PerspectiveCamera();
scene.setCamera(camera);
|
Specifying a Movable Camera
Code Block |
---|
// Create a camera and add it to the Scene
Camera camera = new PerspectiveCamera();
scene.setCamera(camera);
// Add camera to scene graph (so it can move)
Group cameraGroup = new Group();
cameraGroup.getChildren().add(camera);
root.getChildren().add(cameraGroup);
// Rotate the camera
camera.rotate(45);
// Move the cameraGroup (camera moves with it)
cameraGroup.setTranslateZ(-75);
|
3D primitives
- Added two type of 3D shapes, extending from an abstract Shape3D base class:
- User-defined shapes (MeshView)
- Predefined shapes
User-defined shapes
- User defined mesh (geometry) of a shape by specifying a set of points, texture coordinates, and faces (triangles that describe the topology)
- User defined smoothing group to specify group of faces that are part of the same curved surface
- A mesh is sharable among mutiple user-defined shapes
Predefined shapes
- Three commonly used predefined 3D shapes are introduced: Box, Cylinder and Sphere
...
Shape3D Class Hierarchy
...
XXXXXXXXXXXxXXXXXXXXXXXXXx
Overview
Content Tools
ThemeBuilder