public static class J3DVertexAccessor.J3DInterleavedBufferVertexAccessor extends J3DVertexAccessor
This impl handles NIO interleaved vertex storage, both for JOGLGeometry
and GeometryArray
.
J3DVertexAccessor.J3DBufferVertexAccessor, J3DVertexAccessor.J3DCopyVertexAccessor, J3DVertexAccessor.J3DInterleavedBufferVertexAccessor, J3DVertexAccessor.J3DInterleavedVertexAccessor, J3DVertexAccessor.J3DRefVertexAccessor
Modifier and Type | Field and Description |
---|---|
protected int[] |
offset
offset of start of each component in vertex
|
protected java.nio.FloatBuffer |
wordsBuf
interleaved vertex buffer
|
protected int |
wordsPerVertex
words per vertex
|
color, COLOR, color3, color4, component, componentIndex, coord, COORD, coord3, ga, indexAccessor, initialIndex, jg, normal, NORMAL, normal3, texCoord, TEXCOORD, texCoord2, texCoord3, texCoord4, validVertexCount, vertexCount, vertexIndex
Constructor and Description |
---|
J3DVertexAccessor.J3DInterleavedBufferVertexAccessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkFormat(javax.media.j3d.GeometryArray ga)
Check if the class, storage type, and vertex format of ga is
compatible with this accessor implementation.
|
boolean |
checkFormat(JOGLGeometry jg)
this impl returns true
|
J3DVertexAccessor |
newInstance()
make a new instance of this accessor implementation
|
J3DVertexAccessor |
read()
Access the vertex storage and read the enabled vertex components at
J3DVertexAccessor.componentIndex . |
J3DVertexAccessor |
reset(javax.media.j3d.GeometryArray ga,
boolean... enableComponent)
Reset this accessor so that the subsequent call to
J3DVertexAccessor.next() reads
the first valid vertex in ga. |
J3DVertexAccessor |
reset(JOGLGeometry jg,
boolean... enableComponent)
|
protected J3DVertexAccessor |
resetImpl()
Common impl of
reset(GeometryArray, boolean...) and reset(JOGLGeometry, boolean...) . |
J3DVertexAccessor |
write()
Access the vertex storage and write the enabled vertex components.
|
advance, computeBoundingSphere, cons, cons, consAll, consAll, getNumImplementations, hasNext, hasNext, isIndirect, next, read, read, reset, resetImpl, scaleAll, scaleVertex, seek, seek, seek, setIndexAccessor, setIndirect
protected java.nio.FloatBuffer wordsBuf
protected int wordsPerVertex
protected int[] offset
public J3DVertexAccessor.J3DInterleavedBufferVertexAccessor()
public J3DVertexAccessor reset(javax.media.j3d.GeometryArray ga, boolean... enableComponent)
Reset this accessor so that the subsequent call to J3DVertexAccessor.next()
reads
the first valid vertex in ga.
reset
in class J3DVertexAccessor
ga
- the geometry, or null to clear the previous internal referenceenableComponent
- list or array of booleans enabling access to vertex
components, iff present in ga, in order texCoord, color, normal,
coord. If less than four booleans are provided the latter ones are
assumed true.public J3DVertexAccessor reset(JOGLGeometry jg, boolean... enableComponent)
reset
in class J3DVertexAccessor
protected J3DVertexAccessor resetImpl()
Common impl of reset(GeometryArray, boolean...)
and reset(JOGLGeometry, boolean...)
.
public J3DVertexAccessor read()
Access the vertex storage and read the enabled vertex components at
J3DVertexAccessor.componentIndex
.
Note: if the internal indices for the access are outside the legal bounds for the vertex storage then the underlying access method will throw an exception according to the storage type.
read
in class J3DVertexAccessor
public J3DVertexAccessor write()
Access the vertex storage and write the enabled vertex components.
Note: if the internal indices for the access are outside the legal bounds for the vertex storage then the underlying access method will throw an exception according to the storage type.
write
in class J3DVertexAccessor
public boolean checkFormat(javax.media.j3d.GeometryArray ga)
Check if the class, storage type, and vertex format of ga is compatible with this accessor implementation.
checkFormat
in class J3DVertexAccessor
public boolean checkFormat(JOGLGeometry jg)
checkFormat
in class J3DVertexAccessor
public J3DVertexAccessor newInstance()
newInstance
in class J3DVertexAccessor