/** * Creates the retained mode ClipRetained object that this * Clip component object will point to. */ @Override void createRetained() { this.retained = new ClipRetained(); this.retained.setSource(this); }
ClipRetained rt = (ClipRetained) retained; rt.initBackDistance(attr.getBackDistance()); rt.initApplicationBounds(attr.getApplicationBounds()); rt.initApplicationBoundingLeaf(attr.getApplicationBoundingLeaf());
void updateImmediateTransformChange() { // If bounding leaf is null, tranform the bounds object if (boundingLeaf == null) { if (applicationRegion != null) { transformedRegion = (Bounds)applicationRegion.clone(); transformedRegion.transform(applicationRegion, getCurrentLocalToVworld()); } } }
/** * Set the Clip's application region. * @param region a region that contains the Clip's new application bounds */ final void setApplicationBounds(Bounds region) { initApplicationBounds(region); // Don't send the message if there is a valid boundingleaf if (boundingLeaf == null) { sendMessage(BOUNDS_CHANGED, (region != null ? region.clone(): null), null); } }
public void updateNodeReferences(NodeReferenceTable referenceTable) { ClipRetained rt = (ClipRetained) retained; BoundingLeaf bl = rt.getApplicationBoundingLeaf(); rt.initApplicationBoundingLeaf((BoundingLeaf) o);
/** * Set the Clip's application region to the specified bounds. * This is used when the application bounding leaf is set to null. * @param region the bounds that contains the Clip's new application * region. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setApplicationBounds(Bounds region) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Clip2")); if (isLive()) ((ClipRetained)this.retained).setApplicationBounds(region); else ((ClipRetained)this.retained).initApplicationBounds(region); }
/** * Set the Clip's application region to the specified bounding leaf. * When set to a value other than null, this overrides the application * bounds object. * @param region the bounding leaf node used to specify the Clip * node's new application region. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setApplicationBoundingLeaf(BoundingLeaf region) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Clip2")); if (isLive()) ((ClipRetained)this.retained).setApplicationBoundingLeaf(region); else ((ClipRetained)this.retained).initApplicationBoundingLeaf(region); }
/** * Sets the back clip distance to the specified value. * There are several considerations that need to be taken into * account when choosing values for the front and back clip * distances. These are enumerated in the description of * <a href=View.html#setFrontClipDistance(double)> * View.setFrontClipDistance</a>. * @param backDistance the new back clip distance in meters * @see View#setFrontClipDistance * @see View#setBackClipDistance */ public void setBackDistance(double backDistance) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_BACK_DISTANCE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Clip0")); if (isLive()) ((ClipRetained)this.retained).setBackDistance(backDistance); else ((ClipRetained)this.retained).initBackDistance(backDistance); }
/** * Constructs a Clip node with the specified back clip distance. */ public Clip(double backDistance) { // set default read capabilities setDefaultReadCapabilities(readCapabilities); ((ClipRetained)this.retained).initBackDistance(backDistance); }
void initMirrorObject() { Transform3D lastLocalToVworld = getLastLocalToVworld(); if (boundingLeaf != null) { transformedRegion = boundingLeaf.mirrorBoundingLeaf.transformedRegion; } else { // Evaluate applicationRegion if not null if (applicationRegion != null) { transformedRegion = (Bounds)applicationRegion.clone(); transformedRegion.transform(applicationRegion, lastLocalToVworld); } else { transformedRegion = null; } } backDistanceInVworld = backDistance * lastLocalToVworld.getDistanceScale(); }
/** * Retrieves the Clip node's application bounds. * @return this Clip's application bounds information * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public Bounds getApplicationBounds() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Clip3")); return ((ClipRetained)this.retained).getApplicationBounds(); }
/** * Retrieves the back clip distance. * @return the current back clip distance, in meters */ public double getBackDistance() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_BACK_DISTANCE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Clip1")); return ((ClipRetained)this.retained).getBackDistance(); }
/** * Retrieves the Clip node's application bounding leaf. * @return this Clip's application bounding leaf information * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public BoundingLeaf getApplicationBoundingLeaf() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Clip3")); return ((ClipRetained)this.retained).getApplicationBoundingLeaf(); }
initMirrorObject(); if ((s.viewScopedNodeList != null) && (s.viewLists != null)) { s.viewScopedNodeList.add(this);
/** Note: This routine will only be called on * the mirror object - will update the object's * cached region and transformed region */ @Override void updateBoundingLeaf() { if (boundingLeaf != null && boundingLeaf.mirrorBoundingLeaf.switchState.currentSwitchOn) { transformedRegion = boundingLeaf.mirrorBoundingLeaf.transformedRegion; } else { // Evaluate applicationRegion if not null if (applicationRegion != null) { transformedRegion = applicationRegion.copy(transformedRegion); transformedRegion.transform(applicationRegion, getCurrentLocalToVworld()); } else { transformedRegion = null; } } }
void updateImmediateMirrorObject(Object[] objs) { int component = ((Integer)objs[1]).intValue(); Transform3D trans; Transform3D currentLocalToVworld = getCurrentLocalToVworld();