Game Development Reference
In-Depth Information
Figure 4-2 . The javafx.scene package and its 16-core Scene Graph, Scene utility, Lighting, Camera, and Cursor
classes
I have grouped these 16 javafx.scene package classes logically. The Scene class is
inside the Scene Graph section of the diagram, because Scene objects, which are cre-
ated using the Scene class, contain Scene Graph objects, which are created using these
four Scene Graph-related classes (Node, Parent, Group, SubScene) and their sub-
classes. I will be covering the Scene Graph classes in detail later in the chapter (see the
section “JavaFX Scene Graph: Organizing Scenes, Using Parent Nodes.”
Scene Graph architecting classes in JavaFX start at the highest level, with a Node
superclass, and its Parent class, and include the Group and SubScene classes, which
are subclasses of the Parent class. These core classes are used to create the JavaFX
Scene Graph hierarchy and to organize and group objects that have been created using
the other JavaFX classes in the JavaFX packages.
There are three Scene utility classes, as I call them, which allow you to take a snap-
shot (like a screenshot) of your scene or any of its Scene Graph nodes at any time as
well as to turn SceneAntialiasing on and off if you are using 3D primitives in a scene.
The other half (eight) of the classes in the javafx.scene package are used for scene
lighting, scene cameras, and cursor control for your scene. I will be discussing these
classes later in the chapter (see the section “JavaFx Scene Content: Lights, Camera,
Cursor, Action!”), after you take a look at the Scene Graph classes, which create,
group, manage, and manipulate your JavaFX scene content. Thus, I will be covering
the javafx.scene package classes shown in the figure, from the left-hand side of the dia-
gram to the right-hand side, in the order in which you are most likely to use them, from
least to most.
 
Search WWH ::




Custom Search