|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.NodeComponent | +--javax.media.j3d.Geometry | +--javax.media.j3d.CompressedGeometry
The compressed geometry object is used to store geometry in a compressed format. Using compressed geometry reduces the amount of memory needed by a Java 3D application and increases the speed objects can be sent over the network. Once geometry decompression hardware support becomes available, increased rendering performance will also result from the use of compressed geometry.
Compressed geometry may be passed to this CompressedGeometry object in one of two ways: by copying the data into this object using the existing constructor, or by passing a reference to the data.
byReference
flag
set to true
. In this mode, a reference to the input
data is saved, but the data itself is not necessarily copied. Note
that the compressed geometry header is still copied into this
compressed geometry object. Data referenced by a
CompressedGeometry object must not be modified after the
CompressedGeometry object is constructed.
Applications
must exercise care not to violate this rule. If any referenced
compressed geometry data is modified after construction,
the results are undefined.
Field Summary | |
static int |
ALLOW_COUNT_READ
Specifies that this CompressedGeometry object allows reading its byte count information. |
static int |
ALLOW_GEOMETRY_READ
Specifies that this CompressedGeometry object allows reading its geometry data component information. |
static int |
ALLOW_HEADER_READ
Specifies that this CompressedGeometry object allows reading its header information. |
static int |
ALLOW_REF_DATA_READ
Specifies that this CompressedGeometry allows reading the geometry data reference information for this object. |
Fields inherited from class javax.media.j3d.Geometry |
ALLOW_INTERSECT |
Constructor Summary | |
CompressedGeometry(CompressedGeometryHeader hdr,
byte[] compressedGeometry)
Creates a new CompressedGeometry NodeComponent by copying the specified compressed geometry data into this object. |
|
CompressedGeometry(CompressedGeometryHeader hdr,
byte[] compressedGeometry,
boolean byReference)
Creates a new CompressedGeometry NodeComponent. |
Method Summary | |
NodeComponent |
cloneNodeComponent()
Deprecated. replaced with cloneNodeComponent(boolean forceDuplicate) |
Shape3D[] |
decompress()
Decompresses the compressed geometry. |
int |
getByteCount()
Returns the size, in bytes, of the compressed geometry buffer. |
void |
getCompressedGeometry(byte[] compressedGeometry)
Retrieves the compressed geometry associated with the CompressedGeometry NodeComponent object. |
void |
getCompressedGeometryHeader(CompressedGeometryHeader hdr)
Copies the compressed geometry header from the CompressedGeometry NodeComponent into the passed in parameter. |
byte[] |
getCompressedGeometryRef()
Gets the compressed geometry data reference. |
boolean |
isByReference()
Retrieves the data access mode for this CompressedGeometry object. |
Methods inherited from class javax.media.j3d.NodeComponent |
cloneNodeComponent,
duplicateNodeComponent,
duplicateNodeComponent,
getDuplicateOnCloneTree,
setDuplicateOnCloneTree |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability,
duplicateSceneGraphObject,
getCapability,
getUserData,
isCompiled,
isLive,
setCapability,
setUserData,
updateNodeReferences |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int ALLOW_COUNT_READ
public static final int ALLOW_HEADER_READ
public static final int ALLOW_GEOMETRY_READ
public static final int ALLOW_REF_DATA_READ
Constructor Detail |
public CompressedGeometry(CompressedGeometryHeader hdr, byte[] compressedGeometry)
hdr
- the compressed geometry header. This is copied
into the CompressedGeometry NodeComponent.compressedGeometry
- the compressed geometry data. The
geometry must conform to the format described in Appendix B of
the Java 3D API Specification.CompressedGeometryHeader
,
Canvas3D.queryProperties()
public CompressedGeometry(CompressedGeometryHeader hdr, byte[] compressedGeometry, boolean byReference)
hdr
- the compressed geometry header. This is copied
into the CompressedGeometry NodeComponent.compressedGeometry
- the compressed geometry data. The
geometry must conform to the format described in Appendix B of
the Java 3D API Specification.byReference
- a flag that indicates whether the data is copied
into this compressed geometry object or is accessed by reference.CompressedGeometryHeader
,
Canvas3D.queryProperties()
Method Detail |
public int getByteCount()
public void getCompressedGeometryHeader(CompressedGeometryHeader hdr)
hdr
- the CompressedGeometryHeader object into which to copy the
CompressedGeometry NodeComponent's header; the offset field may differ
from that which was originally specified if a copy of the original
compressed geometry byte array was created.CompressedGeometryHeader
public void getCompressedGeometry(byte[] compressedGeometry)
compressedGeometry
- the array into which to copy the compressed
geometry.public Shape3D[] decompress()
public boolean isByReference()
true
if the data access mode for this
CompressedGeometry object is by-reference;
false
if the data access mode is by-copying.public byte[] getCompressedGeometryRef()
public NodeComponent cloneNodeComponent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |