static class DAEUtils.FloatBlockAccessor
extends java.lang.Object
Access a FloatBuffer backing a COLLADA "float_array" according to the configuration of a COLLADA "accessor".
| Modifier and Type | Field and Description |
|---|---|
int |
blockCount
number of valid blocks in
src |
int |
destBlockSize
total words to read in a block due to
pattern |
int |
globalOffset
global offset in words in
src |
int |
localBlockSize
|
int |
localOffset
initial words to skip in a block due to
pattern |
protected boolean[] |
pattern
read pattern within a block, length <= stride
|
protected java.nio.FloatBuffer |
src
(private duplicate of) the source buffer
|
int |
stride
block stride in words in
src |
| Constructor and Description |
|---|
DAEUtils.FloatBlockAccessor(java.nio.FloatBuffer src,
int globalOffset,
int stride,
int blockCount,
boolean... pattern)
sets fields
|
| Modifier and Type | Method and Description |
|---|---|
int |
blocksRemaining()
Check how many valid blocks remain to be read.
|
DAEUtils.FloatBlockAccessor |
copyBlock(java.nio.FloatBuffer dest)
Relative read.
|
DAEUtils.FloatBlockAccessor |
copyBlock(int blockIndex,
java.nio.FloatBuffer dest)
|
boolean |
hasRemaining()
Check if any valid blocks remain to be read.
|
DAEUtils.FloatBlockAccessor |
rewind()
Reset this accessor so that the next
copyBlock(FloatBuffer)
will read the first block. |
java.lang.String |
toString()
dump settings
|
protected final java.nio.FloatBuffer src
public final int globalOffset
srcpublic final int stride
srcpublic final int blockCount
srcprotected final boolean[] pattern
public final int localOffset
patternpublic final int localBlockSize
stride-localOffset-(final words to skip in block
due to pattern).
public final int destBlockSize
patternpublic DAEUtils.FloatBlockAccessor(java.nio.FloatBuffer src,
int globalOffset,
int stride,
int blockCount,
boolean... pattern)
public java.lang.String toString()
toString in class java.lang.Objectpublic DAEUtils.FloatBlockAccessor rewind()
Reset this accessor so that the next copyBlock(FloatBuffer)
will read the first block.
public int blocksRemaining()
Check how many valid blocks remain to be read.
public boolean hasRemaining()
Check if any valid blocks remain to be read.
public DAEUtils.FloatBlockAccessor copyBlock(int blockIndex, java.nio.FloatBuffer dest)
Absolute read: position src at globalOffset+blockIndex*stride, then copyBlock(FloatBuffer).
public DAEUtils.FloatBlockAccessor copyBlock(java.nio.FloatBuffer dest)
Relative read.
Advances src by one block, but only writes destBlockSize words to dest.