final void initMaximumLOD(float lod) { if (lod < minimumLod) { throw new IllegalArgumentException( J3dI18N.getString("Texture42")); } maximumLod = lod; }
/** * This constructor is not implemented. * * @exception UnsupportedOperationException this constructor is not * implemented * * @since Java 3D 1.3 */ public CompressedGeometry(CompressedGeometryHeader hdr, J3DBuffer compressedGeometry) { throw new UnsupportedOperationException(J3dI18N.getString("CompressedGeometry9")) ; }
/** * Serialization of Canvas3D objects is not supported. * * @exception UnsupportedOperationException this method is not supported * * @since Java 3D 1.3 */ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { throw new UnsupportedOperationException(J3dI18N.getString("Canvas3D20")); }
/** * Serialization of Canvas3D objects is not supported. * * @exception UnsupportedOperationException this method is not supported * * @since Java 3D 1.3 */ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { throw new UnsupportedOperationException(J3dI18N.getString("Canvas3D20")); }
void initImages(int face, ImageComponent[] images) { if (images.length != maxLevels) throw new IllegalArgumentException(J3dI18N.getString("Texture20")); for (int i = 0; i < images.length; i++) { initImage(i, face, images[i]); } }
/** * Returns the time associated with the kth-most recent sensor reading; * where 0 is the most recent sensor reading, 1 is the next most recent * sensor reading, etc. * @return the time associated with the kth-most recent sensor reading. */ public long lastTime(int k){ if(k >= sensorReadCount) { throw new IllegalArgumentException(J3dI18N.getString("Sensor4")); } return readings[previousIndex(k)].time; }
@Override void setLive(boolean inBackgroundGroup, int refCount) { // Do illegalSharing check. if(getUsedByOffScreen()) { throw new IllegalSharingException(J3dI18N.getString("ImageComponent3")); } super.setLive(inBackgroundGroup, refCount); }
private void checkForAllowIntersect() { MorphRetained morphR = ((MorphRetained)this.retained); int numGeometryArrays = morphR.getNumGeometryArrays(); for (int i = 0; i < numGeometryArrays; i++) { if (!morphR.geometryArrays[i].source. getCapability(Geometry.ALLOW_INTERSECT)) { throw new CapabilityNotSetException(J3dI18N.getString("Morph6")); } } }
/** * Retrieves the boundary mode for the S coordinate. * @return the current boundary mode for the S coordinate. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public int getBoundaryModeS() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_BOUNDARY_MODE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Texture4")); return ((TextureRetained)this.retained).getBoundaryModeS(); }
/** * Retrieves the vertexFormat of this GeometryArray * @return format of vertices in this GeometryArray * @exception CapabilityNotSetException if the appropriate capability is * not set and this object is part of a live or compiled scene graph */ public int getVertexFormat() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_FORMAT_READ)) throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray2")); return ((GeometryArrayRetained)this.retained).getVertexFormat(); }
/** * Retrieves the alpha test value. * @return the alpha test value. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public float getAlphaTestValue(){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_ALPHA_TEST_VALUE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes5")); return ((RenderingAttributesRetained)this.retained).getAlphaTestValue(); }
/** * Retrieves the current position in object coordinates of this raster. * @param pos the vector that will receive the current position * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void getPosition(Point3f pos) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_POSITION_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Raster1")); ((RasterRetained)this.retained).getPosition(pos); }
/** * Sets the node's SharedGroup reference. * @param sharedGroup the SharedGroup node to reference * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setSharedGroup(SharedGroup sharedGroup) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_SHARED_GROUP_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Link0")); ((LinkRetained)this.retained).setSharedGroup(sharedGroup); }
/** * 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(); }
/** * Retrieve Reverberation Order * @return reverb order * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public int getReverbOrder() { if (!this.getCapability(ALLOW_REVERB_ORDER_READ)) if (isLiveOrCompiled()) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes9")); return ((AuralAttributesRetained)this.retained).getReverbOrder(); }
/** * Retrieve Velocity Scale Factor used to calculate Doppler Effect. * @return scale factor applied to Doppler velocity of sound * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public float getVelocityScaleFactor() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_VELOCITY_SCALE_FACTOR_READ)) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes20")); return ((AuralAttributesRetained)this.retained).getVelocityScaleFactor(); }
/** * Sets the collision bounds of a node. * @param bounds the collision 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 setCollisionBounds(Bounds bounds) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_COLLISION_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Shape3D0")); ((Shape3DRetained)this.retained).setCollisionBounds(bounds); }
/** * Retrieves the width of this image component object. * @return the width of this image component object * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public int getWidth() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_SIZE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent0")); return ((ImageComponentRetained)this.retained).getWidth(); }
/** * Retrieves description/data associated with this sound source. * @return soundData description of JMF source data used by this sound source * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public MediaContainer getSoundData() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_SOUND_DATA_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Sound1")); return ((SoundRetained)this.retained).getSoundData(); }
/** * Retrieves the release flag for sound associated with sound. * @return sound's release flag * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public boolean getReleaseEnable() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_RELEASE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Sound7")); return ((SoundRetained)this.retained).getReleaseEnable(); }