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

📄 virtualuniverse.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
     * <td>String</td>     * </tr>     * <tr>     * <td><code>j3d.vendor</code></td>     * <td>String</td>     * </tr>     * <tr>     * <td><code>j3d.specification.version</code></td>     * <td>String</td>     * </tr>     * <tr>     * <td><code>j3d.specification.vendor</code></td>     * <td>String</td>     * </tr>     * <tr>     * <td><code>j3d.pipeline</code></td>     * <td>String</td>     * </tr>     * <tr>     * <td><code>j3d.renderer</code></td>     * <td>String</td>     * </tr>     * </table>     * </ul>     *     * <p>     * The descriptions of the values returned for each key are as follows:     *     * <p>     * <ul>     *     * <li>     * <code>j3d.version</code>     * <ul>     * A String that defines the Java 3D implementation version.     * The portion of the implementation version string before the first     * space must adhere to one of the the following three formats     * (anything after the first space is an optional free-form addendum     * to the version):     * <ul>     * <i>x</i>.<i>y</i>.<i>z</i><br>     * <i>x</i>.<i>y</i>.<i>z</i>_<i>p</i><br>     * <i>x</i>.<i>y</i>.<i>z</i>-<i>ssss</i><br>     * </ul>     * where:     * <ul>     * <i>x</i> is the major version number<br>     * <i>y</i> is the minor version number<br>     * <i>z</i> is the sub-minor version number<br>     * <i>p</i> is the patch revision number <br>     * <i>ssss</i> is a string, identifying a non-release build     * (e.g., beta1, build47, rc1, etc.).  It may only     * contain letters, numbers, periods, dashes, or     * underscores.     * </ul>     * </ul>     * </li>     * <p>     *     * <li>     * <code>j3d.vendor</code>     * <ul>     * String that specifies the Java 3D implementation vendor.     * </ul>     * </li>     * <p>     *     * <li>     * <code>j3d.specification.version</code>     * <ul>     * A String that defines the Java 3D specification version.     * This string must be of the following form:     * <ul>     * <i>x</i>.<i>y</i>     * </ul>     * where:     * <ul>     * <i>x</i> is the major version number<br>     * <i>y</i> is the minor version number<br>     * </ul>     * No other characters are allowed in the specification version string.     * </ul>     * </li>     * <p>     *     * <li>     * <code>j3d.specification.vendor</code>     * <ul>     * String that specifies the Java 3D specification vendor.     * </ul>     * </li>     * <p>     *     * <li>     * <code>j3d.pipeline</code>     * <ul>     * String that specifies the Java 3D rendering pipeline. This could     * be one of: "NATIVE_OGL", "NATIVE_D3D", or "JOGL". Others could be     * added in the future.     * </ul>     * </li>     * <p>     *     * <li>     * <code>j3d.renderer</code>     * <ul>     * String that specifies the underlying rendering library.  This could     * be one of: "OpenGL" or "DirectX". Others could be added in the future.     * </ul>     * </li>     * <p>     *     * </ul>     *     * @return the global Java 3D properties     *     * @since Java 3D 1.3     */    public static final Map getProperties() {	if (properties == null) {	    // Create lists of keys and values	    ArrayList keys = new ArrayList();	    ArrayList values = new ArrayList();            // Implementation version string is obtained from the            // ImplementationVersion class.	    keys.add("j3d.version");	    values.add(VersionInfo.getVersion());	    keys.add("j3d.vendor");	    values.add(VersionInfo.getVendor());	    keys.add("j3d.specification.version");	    values.add(VersionInfo.getSpecificationVersion());	    keys.add("j3d.specification.vendor");	    values.add(VersionInfo.getSpecificationVendor());	    keys.add("j3d.renderer");            values.add(Pipeline.getPipeline().getRendererName());            keys.add("j3d.pipeline");            values.add(Pipeline.getPipeline().getPipelineName());	    // Now Create read-only properties object	    properties =		new J3dQueryProps((String[]) keys.toArray(new String[0]),				  values.toArray());	}  	return properties;    }    /**     * This returns the next available nodeId as a string.     */    // XXXX: reuse of id's imply a slight collision problem in the    // render queue's.    // BUG 4181362    String getNodeId() {        String str; 	if (nodeIdFreeList.size() == 0) {	   str = Long.toString(nodeIdCount);           nodeIdCount++;	} else {            // Issue 496: Remove last object using index to avoid performance            // hit of a needless linear search.           int idx = nodeIdFreeList.size() - 1;           str = (String) nodeIdFreeList.remove(idx);	}        return(str);    }    /**     * This returns the next available viewId     */    Integer getViewId() {	Integer id;	int size;	synchronized (viewIdFreeList) {	    size = viewIdFreeList.size();	    if (size == 0) {		id = new Integer(viewIdCount++);	    } else {		id = (Integer) viewIdFreeList.remove(size-1);	    }	}        return(id);    }    /**     * This returns a viewId to the freelist     */    void addViewIdToFreeList(Integer viewId) {	synchronized (viewIdFreeList) {	    viewIdFreeList.add(viewId);	}    }    void addViewPlatform(ViewPlatformRetained vp) {	vpChanged = true;	viewPlatforms.add(vp);    }    void removeViewPlatform(ViewPlatformRetained vp) {	vpChanged = true;	viewPlatforms.remove(viewPlatforms.indexOf(vp));    }    synchronized Object[] getViewPlatformList() {	if (vpChanged) {	    viewPlatformList = viewPlatforms.toArray();	    vpChanged = false;	}	return viewPlatformList;    }    void checkForEnableEvents() {	enableComponentEvents();	if (enableFocus) {	    enableFocusEvents();	}	if (enableKey) {	    enableKeyEvents();	}	if (enableMouse) {	    enableMouseEvents();	}	if (enableMouseMotion) {	    enableMouseMotionEvents();	}	if (enableMouseWheel) {	    enableMouseWheelEvents();	}    }    void enableComponentEvents() {        // Issue 458 - This method is now a noop        /*	Enumeration cvs;	Canvas3D cv;        ViewPlatformRetained vp;	View views[];	Object[] vps = getViewPlatformList();	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {	            cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null) {		            cv.eventCatcher.enableComponentEvents();                        }	            }		}	    }	}        */    }    void disableFocusEvents() {	Enumeration cvs;	Canvas3D cv;        ViewPlatformRetained vp;	View views[];	Object[] vps = getViewPlatformList();	enableFocus = false;	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {                    cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null)		            cv.eventCatcher.disableFocusEvents();	            }	        }	    }	}    }    void enableFocusEvents() {	Enumeration cvs;	Canvas3D cv;        ViewPlatformRetained vp;	View views[];	Object[] vps = getViewPlatformList();	enableFocus = true;	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {                    cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null)		            cv.eventCatcher.enableFocusEvents();	            }	        }	    }	}    }    void disableKeyEvents() {	Enumeration cvs;	Canvas3D cv;        ViewPlatformRetained vp;	Object[] vps = getViewPlatformList();	View views[];	enableKey = false;	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {                    cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null)			    cv.eventCatcher.disableKeyEvents();	            }	        }	    }	}    }    void enableKeyEvents() {	Enumeration cvs;	Canvas3D cv;        ViewPlatformRetained vp;	Object[] vps = getViewPlatformList();	View views[];	enableKey = true;	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {                    cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null)			    cv.eventCatcher.enableKeyEvents();	            }	        }	    }	}    }   void disableMouseEvents() {	Enumeration cvs;	Canvas3D cv;	View views[];        ViewPlatformRetained vp;	Object[] vps = getViewPlatformList();	enableMouse = false;	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {                    cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null)		            cv.eventCatcher.disableMouseEvents();	            }	        }	    }	}    }    void enableMouseEvents() {	Enumeration cvs;	Canvas3D cv;	View views[];        ViewPlatformRetained vp;	Object[] vps = getViewPlatformList();	enableMouse = true;	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {                    cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null)		            cv.eventCatcher.enableMouseEvents();	            }	        }	    }	}    }    void disableMouseMotionEvents() {	Enumeration cvs;	Canvas3D cv;	View views[];        ViewPlatformRetained vp;	Object[] vps = getViewPlatformList();	enableMouseMotion = false;	if (vps != null) {	    for (int i=0; i<vps.length; i++) {                vp =(ViewPlatformRetained)vps[i];               		views = vp.getViewList();		for (int j=views.length-1; j>=0; j--) {                    cvs = views[j].getAllCanvas3Ds();	            while(cvs.hasMoreElements()) {		        cv = (Canvas3D) cvs.nextElement();                        // offscreen canvas does not have event catcher                        if (cv.eventCatcher != null)

⌨️ 快捷键说明

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