public class CompressedGeometry extends 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.
Modifier and Type | Field and Description |
---|---|
static int |
ALLOW_COUNT_READ
Deprecated.
Specifies that this CompressedGeometry object allows reading its
byte count information.
|
static int |
ALLOW_GEOMETRY_READ
Deprecated.
Specifies that this CompressedGeometry object allows reading its
geometry data component information.
|
static int |
ALLOW_HEADER_READ
Deprecated.
Specifies that this CompressedGeometry object allows reading its
header information.
|
static int |
ALLOW_REF_DATA_READ
Deprecated.
Specifies that this CompressedGeometry allows reading the geometry
data reference information for this object.
|
ALLOW_INTERSECT
Constructor and Description |
---|
CompressedGeometry(CompressedGeometryHeader hdr,
byte[] compressedGeometry)
Deprecated.
Creates a new CompressedGeometry NodeComponent by copying
the specified compressed geometry data into this object.
|
CompressedGeometry(CompressedGeometryHeader hdr,
byte[] compressedGeometry,
boolean byReference)
Deprecated.
Creates a new CompressedGeometry NodeComponent.
|
CompressedGeometry(CompressedGeometryHeader hdr,
J3DBuffer compressedGeometry)
Deprecated.
This constructor is not implemented.
|
Modifier and Type | Method and Description |
---|---|
NodeComponent |
cloneNodeComponent()
Deprecated.
replaced with cloneNodeComponent(boolean forceDuplicate)
|
Shape3D[] |
decompress()
Deprecated.
Decompresses the compressed geometry.
|
int |
getByteCount()
Deprecated.
Returns the size, in bytes, of the compressed geometry buffer.
|
void |
getCompressedGeometry(byte[] compressedGeometry)
Deprecated.
Retrieves the compressed geometry associated with the
CompressedGeometry NodeComponent object.
|
J3DBuffer |
getCompressedGeometryBuffer()
Deprecated.
Gets the compressed geometry data buffer reference, which is
always null since NIO buffers are not supported for
CompressedGeometry objects.
|
void |
getCompressedGeometryHeader(CompressedGeometryHeader hdr)
Deprecated.
Copies the compressed geometry header from the CompressedGeometry
NodeComponent into the passed in parameter.
|
byte[] |
getCompressedGeometryRef()
Deprecated.
Gets the compressed geometry data reference.
|
boolean |
isByReference()
Deprecated.
Retrieves the data access mode for this CompressedGeometry object.
|
cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
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
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.IllegalArgumentException
- if a problem is detected with the
headerCompressedGeometryHeader
,
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.IllegalArgumentException
- if a problem is detected with the
headerCompressedGeometryHeader
,
Canvas3D.queryProperties()
public CompressedGeometry(CompressedGeometryHeader hdr, J3DBuffer compressedGeometry)
UnsupportedOperationException
- this constructor is not
implementedpublic int getByteCount()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic 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.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphCompressedGeometryHeader
public void getCompressedGeometry(byte[] compressedGeometry)
compressedGeometry
- the array into which to copy the compressed
geometry.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphIllegalStateException
- if the data access mode for this
object is by-reference.ArrayIndexOutOfBoundsException
- if compressedGeometry byte
array is not large enough to receive the compressed geometrypublic Shape3D[] decompress()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic 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()
IllegalStateException
- if the data access mode for this
object is not by-reference.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic J3DBuffer getCompressedGeometryBuffer()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic NodeComponent cloneNodeComponent()
cloneNodeComponent
in class NodeComponent
Copyright © 2016–2022 SciJava. All rights reserved.