/** * Sets the geometric bounds of a node. * @param bounds the bounding object for a node * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setBounds(Bounds bounds) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Node1")); ((NodeRetained)this.retained).setBounds(bounds); }
/** * Sets the collidable value; determines whether this node and any of its * children, if a group node, can be considered for collision purposes. * @param collidable the new collidable value for this node */ public void setCollidable( boolean collidable ) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_COLLIDABLE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Node4")); ((NodeRetained)retained).setCollidable(collidable); }
/** * Gets the value indicating if the automatic calcuation of geometric bounds of a node is on/off. * @return the node's auto compute flag for the geometric bounding object * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public boolean getBoundsAutoCompute() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_AUTO_COMPUTE_BOUNDS_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Node6")); return ((NodeRetained)this.retained).getBoundsAutoCompute(); }
/** * Returns true if this <code>Node</code> is pickable, * false if it is not pickable. */ public boolean getPickable() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_PICKABLE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Node3")); return ((NodeRetained)retained).getPickable(); }
boolean allowDanglingReferences) { if (!isLiveOrCompiled()) {
/** * Turns the automatic calcuation of geometric bounds of a node on/off. * @param autoCompute indicates if the node's bounding object is * automatically computed. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setBoundsAutoCompute(boolean autoCompute) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_AUTO_COMPUTE_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Node5")); ((NodeRetained)this.retained).setBoundsAutoCompute(autoCompute); }
/** * When set to <code>true</code> this <code>Node</code> can be Picked. * Setting to false indicates that this node and it's children * are ALL unpickable. * * @param pickable Indicates if this node should be pickable or not */ public void setPickable( boolean pickable ) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_PICKABLE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Node14")); ((NodeRetained)retained).setPickable(pickable); }
/** * Returns the collidable value; this value determines whether this node * and it's children, if a group node, can be considered for collision * purposes; if it is set to false, then neither this node nor any * children nodes will be traversed for collision purposes; the default * value is true. The collidable setting is the way that an * application can perform collision culling. * @return the present collidable value for this node */ public boolean getCollidable() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_COLLIDABLE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Node16")); return ((NodeRetained)retained).getCollidable(); }
/** * @return the parent of this node, or null if this node has no parent * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public Node getParent() { if (isLiveOrCompiled()) { if(!this.getCapability(ALLOW_PARENT_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("Node0")); } } NodeRetained nr = ((NodeRetained)this.retained).getParent(); return (nr == null ? null : (Node) nr.getSource()); }
/** * Returns the bounding object of a node. * @return the node's bounding object * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * @exception SceneGraphCycleException if there is a cycle in the * scene graph */ public Bounds getBounds() { if (isLiveOrCompiled()) { if(!this.getCapability(ALLOW_BOUNDS_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("Node2")); } } else { // this will throw a SceneGraphCycleException if there is // a cycle checkForCycle(); } return ((NodeRetained)this.retained).getBounds(); }
if (originalNode.isLiveOrCompiled()) { throw new RestrictedAccessException(J3dI18N.getString("Node13"));
if (isLiveOrCompiled()) { if(!this.getCapability(ALLOW_LOCAL_TO_VWORLD_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Node8"));