package: com.sun.j3d.utils.applet
MainFrame makes an applet into an application. A class derived from applet may have a main() method
which calls the MainFrame constructor. MainFrame extends java.awt.Frame and implements
java.lang.Runnable, java.applet.AppletStub, and java.applet.AppletContext.
The MainFrame class is Copyright © 1996-1998 by Jef Poskanzer email: jef@acme.com
1.6.1 Java 3D Classes Used in HelloJava3Da
To add to the understanding of the Java 3D API and the HelloJava3Da example a synopsis of each of
the Java 3D API classes used in the HelloJava3Da example program are presented here.
BranchGroup Class
Objects of this type are used to form scene graphs. Instances of BranchGroup are the root of subgraphs.
BranchGroup objects are the only objects allowed to be children of Locale objects. BranchGroup objects
can have multiple children. The children of a BranchGroup object can be other Group or Leaf objects.
BranchGroup Default Constructor
BranchGroup()
Instances of BranchGroup serve as roots of scene graph branches; BranchGroup objects are the only
objects that can be inserted into a Locale's set of objects.
Canvas3D Class
The Canvas3D class is derived from the Canvas class of the Abstract Windowing Toolkit (AWT). At
least one Canvas3D object must be referenced in the viewing branch graph of the scene graph3
. For more
information on the Canvas class, consult a reference on the AWT. A list of references appears in
Appendix B.
Canvas3D Constructor
Canvas3D(GraphicsConfiguration graphicsconfiguration)
Constructs and initializes a new Canvas3D object that Java 3D can render given a valid
GraphicsConfiguration object. It is an extension of the AWT Canvas class. For more information on the
GraphicsConfiguration object see the Java 2D specification, which is part of the AWT in JDK 1.2.
Transform3D Class
Transform3D objects represent transformations of 3D geometry such as translation and rotation. These
objects are typically only used in the creation of a TransformGroup object. First, the Transform3D
object is constructed, possibly from a combination of Transform3D objects. Then the TransformGroup
object is constructed using the Transform3D object.
Transform3D Default Constructor
A generalized transform object is represented internally as a 4x4 double precision floating-point matrix.
The mathematical representation is row major. A Transform3D object is not used in a scene graph. It is
used to specify the transformation of a TransformGroup object.
Transform3D()
Constructs a Transform3D object that represents the identity matrix (no transformation).
A Transform3D object can represent translation, rotation, scaling, or a combination of these. When
specifying a rotation, the angle is expressed in radians. One full rotation is 2 PI radians. One way to
specify angles is to use the constant Math.PI. Another way is to specify values directly. Some
approximations are: 45 degrees is 0.785, 90 degrees is 1.57, and 180 degrees is 3.14.
package: com.sun.j3d.utils.appletMainFrame makes an applet into an application. A class derived from applet may have a main() methodwhich calls the MainFrame constructor. MainFrame extends java.awt.Frame and implementsjava.lang.Runnable, java.applet.AppletStub, and java.applet.AppletContext.The MainFrame class is Copyright © 1996-1998 by Jef Poskanzer email: jef@acme.com1.6.1 Java 3D Classes Used in HelloJava3DaTo add to the understanding of the Java 3D API and the HelloJava3Da example a synopsis of each ofthe Java 3D API classes used in the HelloJava3Da example program are presented here.BranchGroup ClassObjects of this type are used to form scene graphs. Instances of BranchGroup are the root of subgraphs.BranchGroup objects are the only objects allowed to be children of Locale objects. BranchGroup objectscan have multiple children. The children of a BranchGroup object can be other Group or Leaf objects.BranchGroup Default ConstructorBranchGroup()Instances of BranchGroup serve as roots of scene graph branches; BranchGroup objects are the onlyobjects that can be inserted into a Locale's set of objects.Canvas3D ClassThe Canvas3D class is derived from the Canvas class of the Abstract Windowing Toolkit (AWT). Atleast one Canvas3D object must be referenced in the viewing branch graph of the scene graph3. For moreinformation on the Canvas class, consult a reference on the AWT. A list of references appears inAppendix B.Canvas3D ConstructorCanvas3D(GraphicsConfiguration graphicsconfiguration)Constructs and initializes a new Canvas3D object that Java 3D can render given a validGraphicsConfiguration object. It is an extension of the AWT Canvas class. For more information on theGraphicsConfiguration object see the Java 2D specification, which is part of the AWT in JDK 1.2.Transform3D ClassTransform3D objects represent transformations of 3D geometry such as translation and rotation. Theseobjects are typically only used in the creation of a TransformGroup object. First, the Transform3Dobject is constructed, possibly from a combination of Transform3D objects. Then the TransformGroupobject is constructed using the Transform3D object.Transform3D Default ConstructorA generalized transform object is represented internally as a 4x4 double precision floating-point matrix.The mathematical representation is row major. A Transform3D object is not used in a scene graph. It isused to specify the transformation of a TransformGroup object.Transform3D()Constructs a Transform3D object that represents the identity matrix (no transformation).A Transform3D object can represent translation, rotation, scaling, or a combination of these. Whenspecifying a rotation, the angle is expressed in radians. One full rotation is 2 PI radians. One way tospecify angles is to use the constant Math.PI. Another way is to specify values directly. Someapproximations are: 45 degrees is 0.785, 90 degrees is 1.57, and 180 degrees is 3.14.
การแปล กรุณารอสักครู่..
