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

📄 node.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
	    if(!this.getCapability(ALLOW_AUTO_COMPUTE_BOUNDS_READ))		throw new CapabilityNotSetException(J3dI18N.getString("Node6"));	return ((NodeRetained)this.retained).getBoundsAutoCompute();    }    /**     * Retrieves the local coordinates to virtual world coordinates     * transform for this node in the scene graph.  This is the composite     * of all transforms in the scene graph from the root down to     * <code>this</code> node.  It is only valid     * for nodes that are part of a live scene graph.     * If the node is not part of a live scene graph then the coordinates are     * calculated as if the graph was attached at the origin of a locale.     * @param t the object that will receive the local coordinates to     * Vworld coordinates transform.     * @exception RestrictedAccessException if the node is compiled but not      * part of a live scene graph     * @exception CapabilityNotSetException if appropriate capability is     * not set and this node is part of live or compiled scene graph     * @exception IllegalSharingException if the node is a descendant     * of a SharedGroup node.     */    public void getLocalToVworld(Transform3D t) {        if (isLiveOrCompiled()) {            if(!this.getCapability(ALLOW_LOCAL_TO_VWORLD_READ))                    throw new CapabilityNotSetException(J3dI18N.getString("Node8"));        }        	if (!isLive()) {            // TODO Support compiled graphs            if (isCompiled())                throw new RestrictedAccessException(J3dI18N.getString("Node7"));                        // In 1.4 we support getLocalToVworld for non live nodes            ((NodeRetained)this.retained).computeNonLiveLocalToVworld(t, this);	    //throw new RestrictedAccessException(J3dI18N.getString("Node7"));        } else {            ((NodeRetained)this.retained).getLocalToVworld(t);        }    }        /**     * Retrieves the local coordinates to virtual world coordinates     * transform for the particular path in the scene graph ending with     * this node.  This is the composite     * of all transforms in the scene graph from the root down to     * <code>this</code> node via the specified Link nodes.  It is     * only valid for nodes that are part of a live scene graph.     * @param path the specific path from the node to the Locale     * @param t the object that will receive the local coordinates to     * Vworld coordinates transform.     * @exception RestrictedAccessException if the node is <em>not</em>     * part of a live scene graph     * @exception CapabilityNotSetException if appropriate capability is     * not set and this node is part of live scene graph     * @exception IllegalArgumentException if the specified path does     * not contain a valid Locale, or if the last node in the path is     * different from this node     * @exception IllegalSharingException if the node is not a descendant     * of a SharedGroup node.     */    public void getLocalToVworld(SceneGraphPath path, Transform3D t) {	if (!isLive()) {	    throw new RestrictedAccessException(J3dI18N.getString("Node7"));        }                 if(!this.getCapability(ALLOW_LOCAL_TO_VWORLD_READ))            throw new CapabilityNotSetException(J3dI18N.getString("Node8"));        ((NodeRetained)this.retained).getLocalToVworld(path,t);            }    /**     * Retrieves the locale to which this node is attached. If the     * node is not part of a live scene graph, null is returned.     *     * @return the locale to which this node is attached.     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this node is part of live scene graph     * @exception IllegalSharingException if the node is a descendant     * of a SharedGroup node.     *     * @since Java 3D 1.4     */    public Locale getLocale() {	if (!isLive()) {	    return null;	}	if(!this.getCapability(ALLOW_LOCALE_READ)) {	    throw new CapabilityNotSetException(J3dI18N.getString("Node17"));	}	return ((NodeRetained)this.retained).getLocale();    }    /**     * Duplicates all the nodes of the specified sub-graph.  For Group Nodes     * the group node is duplicated via a call to <code>cloneNode</code>     * and then <code>cloneTree</code>     * is called for each child node.  For Leaf Nodes, component     * data can either be duplicated or be made a reference to the original     * data.  Leaf Node cloneTree behavior is determined by the     * <code>duplicateOnCloneTree</code> flag found in every Leaf Node's     * component data class and by the <code>forceDuplicate</code> paramter.     * @return a reference to the cloned sub-graph.     * @exception DanglingReferenceException When a dangling reference is     *  discovered during the cloneTree operation.     * @exception RestrictedAccessException if this object is part of live     * or compiled scene graph     * @exception SceneGraphCycleException if there is a cycle in the     * scene graph     * @see NodeComponent#setDuplicateOnCloneTree     */    public Node cloneTree() {	return cloneTree(new NodeReferenceTable(), false, false);    }    /**     * Duplicates all the nodes of the specified sub-graph.  For Group Nodes     * the group node is duplicated via a call to <code>cloneNode</code>     * and then <code>cloneTree</code> is called for each child node.     * For Leaf Nodes, component     * data can either be duplicated or be made a reference to the original     * data.  Leaf Node cloneTree behavior is determined by the     * <code>duplicateOnCloneTree</code> flag found in every Leaf Node's     * component data class and by the <code>forceDuplicate</code> paramter.     * @param forceDuplicate when set to <code>true</code>, causes the     *  <code>duplicateOnCloneTree</code> flag to be ignored.  When     *  <code>false</code>, the value of each node's     *  <code>duplicateOnCloneTree</code> determines whether data is     *  duplicated or copied.     * @return a reference to the cloned scene graph.     * @exception DanglingReferenceException When a dangling reference is     *  discovered during the cloneTree operation.     * @exception RestrictedAccessException if this object is part of live     * or compiled scene graph     * @exception SceneGraphCycleException if there is a cycle in the     * scene graph     * @see NodeComponent#setDuplicateOnCloneTree     */    public Node cloneTree(boolean forceDuplicate) {	return cloneTree(new NodeReferenceTable(), forceDuplicate, false);    }    /**     * Duplicates all the nodes of the specified sub-graph.  For Group Nodes     * the group node is duplicated via a call to <code>cloneNode</code> and     * then <code>cloneTree</code> is called for each child node.  For     * Leaf Nodes, component     * data can either be duplicated or be made a reference to the original     * data.  Leaf Node cloneTree behavior is determined by the     * <code>duplicateOnCloneTree</code> flag found in every Leaf Node's     * component data class and by the <code>forceDuplicate</code> paramter.     *     * @param forceDuplicate when set to <code>true</code>, causes the     *  <code>duplicateOnCloneTree</code>     *  flag to be ignored.  When <code>false</code>, the value of each node's     *  <code>duplicateOnCloneTree</code> determines whether data is     *  duplicated or copied.     *     * @param allowDanglingReferences when set to <code>true</code> allows     *  the <code>cloneTree</code>     *  method to complete even whan a dangling reference is discovered. When     *  this parameter is <code>false</code> a     *  <code>DanglingReferenceException</code> is generated as     *  soon as cloneTree detects this situation.     *     * @return a reference to the cloned scene graph.     *     * @exception DanglingReferenceException When a dangling reference is     *  discovered during the cloneTree operation and the      *  <code>allowDanglingReference</code> parameter is </code>false</code>.     * @exception RestrictedAccessException if this object is part of live     * or compiled scene graph     * @exception SceneGraphCycleException if there is a cycle in the     * scene graph     *     * @see NodeComponent#setDuplicateOnCloneTree     */    public Node cloneTree(boolean forceDuplicate,			  boolean allowDanglingReferences) {       return cloneTree(new NodeReferenceTable(), 			forceDuplicate, allowDanglingReferences);     }    /**     * Duplicates all the nodes of the specified sub-graph.  For Group Nodes     * the group node is duplicated via a call to <code>cloneNode</code>     * and then <code>cloneTree</code>     * is called for each child node.  For Leaf Nodes, component     * data can either be duplicated or be made a reference to the original     * data.  Leaf Node cloneTree behavior is determined by the     * <code>duplicateOnCloneTree</code> flag found in every Leaf Node's     * component data class and by the <code>forceDuplicate</code> paramter.     * @param referenceTable table that stores the mapping between     *	original and cloned nodes. All previous values in the     *	referenceTable will be cleared before the clone is made.     * @return a reference to the cloned sub-graph.     * @exception DanglingReferenceException When a dangling reference is     *  discovered during the cloneTree operation.     * @exception RestrictedAccessException if this object is part of live     * or compiled scene graph     * @exception SceneGraphCycleException if there is a cycle in the     * scene graph     * @see NodeComponent#setDuplicateOnCloneTree     * @since Java 3D 1.2     */    public Node cloneTree(NodeReferenceTable referenceTable) {	return cloneTree(referenceTable, false, false);    }    /**     * Duplicates all the nodes of the specified sub-graph.  For Group Nodes     * the group node is duplicated via a call to <code>cloneNode</code>     * and then <code>cloneTree</code> is called for each child node.     * For Leaf Nodes, component     * data can either be duplicated or be made a reference to the original     * data.  Leaf Node cloneTree behavior is determined by the     * <code>duplicateOnCloneTree</code> flag found in every Leaf Node's     * component data class and by the <code>forceDuplicate</code> paramter.     * @param referenceTable table that stores the mapping between     *	original and cloned nodes. All previous values in the     *	referenceTable will be cleared before the clone is made.     * @param forceDuplicate when set to <code>true</code>, causes the     *  <code>duplicateOnCloneTree</code> flag to be ignored.  When     *  <code>false</code>, the value of each node's     *  <code>duplicateOnCloneTree</code> determines whether data is     *  duplicated or copied.     * @return a reference to the cloned scene graph.     * @exception DanglingReferenceException When a dangling reference is     *  discovered during the cloneTree operation.     * @exception RestrictedAccessException if this object is part of live     * or compiled scene graph     * @exception SceneGraphCycleException if there is a cycle in the     * scene graph     * @see NodeComponent#setDuplicateOnCloneTree     * @since Java 3D 1.2     */    public Node cloneTree(NodeReferenceTable referenceTable,			  boolean forceDuplicate) {       return cloneTree(referenceTable, forceDuplicate, false);    }    /**     * Duplicates all the nodes of the specified sub-graph.  For Group Nodes     * the group node is duplicated via a call to <code>cloneNode</code>     * and then <code>cloneTree</code> is called for each child node.     * For Leaf Nodes, component     * data can either be duplicated or be made a reference to the original     * data.  Leaf Node cloneTree behavior is determined by the     * <code>duplicateOnCloneTree</code> flag found in every Leaf Node's     * component data class and by the <code>forceDuplicate</code> paramter.     * @param referenceTable table that stores the mapping between     *	original and cloned nodes. All previous values in the     *	referenceTable will be cleared before the clone is made.     * @param forceDuplicate when set to <code>true</code>, causes the     *  <code>duplicateOnCloneTree</code> flag to be ignored.  When     *  <code>false</code>, the value of each node's     *  <code>duplicateOnCloneTree</code> determines whether data is     *  duplicated or copied.     *     * @param allowDanglingReferences when set to <code>true</code> allows     *  the <code>cloneTree</code>     *  method to complete even whan a dangling reference is discovered. When

⌨️ 快捷键说明

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