⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configureduniverse.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
     *  MultiTransformGroup object to be created     * @param localeFactory the factory object used to create the Locale     *     * @since Java 3D 1.5.1     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     * @see MultiTransformGroup     */    public ConfiguredUniverse(Canvas3D[] canvases, int transformCount, LocaleFactory localeFactory ) {	this(transformCount, canvases, null, localeFactory, null, true);    }    /**     * Reads the configuration specified by the given URL to create a Locale,     * one or more ViewingPlatforms, and at least one Viewer object.  The     * configuration file may also create InputDevice, Sensor, and     * ViewPlatformBehavior instances.     *     * @param userConfig the URL to the user's configuration file; passing in     *  null creates a default Viewer and ViewingPlatform     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     */    public ConfiguredUniverse(URL userConfig) {        this(1, null, userConfig, null, null, true);    }    /**     * Reads the configuration specified by the given URL to create a Locale,     * one or more ViewingPlatforms with the specified number of transforms,     * and at least one Viewer object.  The configuration file may also create     * InputDevice, Sensor, and ViewPlatformBehavior instances.     *     * @param userConfig the URL to the user's configuration file; passing in     *  null creates a default Viewer and ViewingPlatform with the specified     *  number of transforms     * @param transformCount the number of transforms in the     *  MultiTransformGroup objects to be created     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     * @see MultiTransformGroup     */    public ConfiguredUniverse(URL userConfig, int transformCount) {	this(transformCount, null, userConfig, null, null, true);    }    /**     * Reads the configuration specified by the given URL to create a Locale,     * one or more ViewingPlatforms with the specified number of transforms,     * and at least one Viewer object with optional visibility.  AWT     * components used by the Viewers will remain invisible unless the     * <code>setVisible</code> flag is true.  The configuration file may also     * create InputDevice, Sensor, and ViewPlatformBehavior instances.     *     * @param userConfig the URL to the user's configuration file; passing in     *  null creates a default Viewer with the specified visibility and a     *  ViewingPlatform with the specified number of transforms     * @param transformCount the number of transforms in the     *  MultiTransformGroup object to be created     * @param setVisible if true, calls <code>setVisible(true)</code> on all     *  created window components; otherwise, they remain invisible     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     * @see MultiTransformGroup     */    public ConfiguredUniverse(URL userConfig,			      int transformCount, boolean setVisible) {	this(transformCount, null, userConfig, null, null, setVisible);    }    /**     * Reads the configuration specified by the given URL to create a Locale     * using the given LocaleFactory, one or more ViewingPlatforms, and at     * least one Viewer object.  The configuration file may also create     * InputDevice, Sensor, and ViewPlatformBehavior instances.     *     * @param userConfig the URL to the user's configuration file; passing in     *  null creates a default Viewer and ViewingPlatform with the specified     *  number of transforms     * @param localeFactory the factory object used to create the Locale     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     */    public ConfiguredUniverse(URL userConfig, LocaleFactory localeFactory) {        this(1, null, userConfig, localeFactory, null, true);    }    /**     * Reads the configuration specified by the given URL to create a Locale     * using the given LocaleFactory, one or more ViewingPlatforms, and at     * least one Viewer object with optional visibility.  The configuration     * file may also create InputDevice, Sensor, and ViewPlatformBehavior     * instances.  Window components used by the Viewers will remain invisible     * unless the <code>setVisible</code> flag is true.     *     * @param userConfig the URL to the user's configuration file; passing in     *  null creates a default Viewer with the specified visibility and a     *  default ViewingPlatform     * @param localeFactory the factory object used to create the Locale     * @param setVisible if true, calls <code>setVisible(true)</code> on all     *  created window components; otherwise, they remain invisible     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     */    public ConfiguredUniverse(URL userConfig,			      LocaleFactory localeFactory,			      boolean setVisible) {        this(1, null, userConfig, localeFactory, null, setVisible);    }    /**     * Reads the configuration specified by the given URL to create a Locale     * using the specified LocaleFactory with the given origin, one or more     * ViewingPlatforms with the specified number of transforms, and at least     * one Viewer object with optional visibility.  Window components used by     * the Viewers will remain invisible unless the <code>setVisible</code>     * flag is true.  The configuration file may also create InputDevice,     * Sensor, and ViewPlatformBehavior instances.     *     * @param userConfig the URL to the user's configuration file; passing in     *  null creates a default Viewer with the specified visibility and a     *  ViewingPlatform with the specified number of transforms     * @param localeFactory the factory object used to create the Locale     * @param origin the origin used to set the origin of the Locale object;     *  if this object is null, then 0.0 is used     * @param transformCount the number of transforms in the     *  MultiTransformGroup object to be created     * @param setVisible if true, calls <code>setVisible(true)</code> on all     *  created window components; otherwise, they remain invisible     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     * @see MultiTransformGroup     */    public ConfiguredUniverse(URL userConfig, LocaleFactory localeFactory,			      HiResCoord origin, int transformCount,			      boolean setVisible) {        this(transformCount, null, userConfig,	     localeFactory, origin, setVisible);    }    /**     * Retrieves view-side scenegraph components from the given container to     * create a universe with one Locale, one or more ViewingPlatforms, and at     * least one Viewer object.  Equivalent to     * <code>ConfiguredUniverse(ConfigContainer, null, null)</code>.     *     * @param userConfig container holding viewing configuration components;     *  must not be null     *     * @see #ConfiguredUniverse(ConfigContainer, LocaleFactory, HiResCoord)     * @see Locale     * @see Viewer     * @see ViewingPlatform     * @since Java 3D 1.3.1     */    public ConfiguredUniverse(ConfigContainer userConfig) {	this(userConfig, null, null);    }    /**     * Retrieves view-side scenegraph components from the given container to     * create a universe with one Locale created from the specified     * LocaleFactory and origin, one or more ViewingPlatforms, and at least     * one Viewer object.  The container may also provide InputDevice, Sensor,     * and ViewPlatformBehavior instances which will be incorporated into the     * universe if they are referenced by any of the Viewer or ViewingPlatform     * instances.<p>     *     * This constructor and <code>ConfiguredUniverse(ConfigContainer)</code>     * both accept ConfigContainer references directly and are the preferred     * interfaces for constructing universes from configuration files.  They     * differ from the constructors that accept URL objects in the     * following ways:<p>     * <ul>     * <li>A Viewer will be attached to a default ViewingPlatform only if     *     no ViewingPlatforms are provided in the ConfigContainer.  If one     *     or more ViewingPlatforms are provided by the ConfigContainer, then     *     Viewers must be attached to them explicitly in the configuration.<p>     * </li>     * <li>ViewPlatformBehaviors will be attached to their specified     *     ViewingPlatforms before ConfiguredUniverse can set a reference to     *     itself in the ViewingPlatform.  This means that a behavior can't     *     get a reference to the universe at the time its     *     <code>setViewingPlatform</code> method is called; it must wait     *     until its <code>initialize</code> method is called.<p>     * </li>     * <li>All Java properties used by Java 3D may be set in the beginning of     *     the configuration file as long as there is no reference to a     *     VirtualUniverse prior to creating the ConfigContainer.  Note     *     however, that some Java 3D utilities and objects such as     *     Transform3D can cause static references to VirtualUniverse and     *     trigger the evaluation of Java properties before they are set by     *     ConfigContainer.<p>     * </li>     * </ul>     * @param userConfig container holding viewing configuration components;     *  must not be null     * @param localeFactory the factory object used to create the Locale, or     *  null      * @param origin the origin used to set the origin of the Locale object;     *  if this object is null, then 0.0 is used     *     * @see Locale     * @see Viewer     * @see ViewingPlatform     * @since Java 3D 1.3.1     */    public ConfiguredUniverse(ConfigContainer userConfig,			      LocaleFactory localeFactory,			      HiResCoord origin) {        super(origin, localeFactory);	configContainer = userConfig;	Collection c = configContainer.getViewers();	if (c == null || c.size() == 0)	    throw new IllegalArgumentException(                    "no views defined in configuration file");	viewer = (Viewer[])c.toArray(new Viewer[1]);		c = configContainer.getViewingPlatforms();	if (c == null || c.size() == 0) {	    createDefaultViewingPlatform		(configContainer.getViewPlatformTransformCount());	}	else {	    Iterator i = c.iterator();	    while (i.hasNext()) {		ViewingPlatform vp = (ViewingPlatform)i.next();		vp.setUniverse(this);		locale.addBranchGraph(vp);	    }	}    }    /**     * Package-scope constructor that creates the view side of the     * scene graph.  The passed in parameters override the default     * values where appropriate.  Note that the userCanvases parameter     * is ignored when the userConfig is non-null.     *     * @param transformCount the number of transforms in the     *  MultiTransformGroup object to be created     * @param canvases the canvases to associate with the Viewer object;     *  passing in null will cause this parameter to be ignored and a canvas      *  to be created by the utility     * @param userConfig the URL to the user's configuration file; passing in     *  null causes the default values to be used.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -