Package gov.nasa.worldwind.util
Class BufferWrapper.DoubleBufferWrapper
- java.lang.Object
-
- gov.nasa.worldwind.util.BufferWrapper
-
- gov.nasa.worldwind.util.BufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
- gov.nasa.worldwind.util.BufferWrapper.DoubleBufferWrapper
-
- Enclosing class:
- BufferWrapper
public static class BufferWrapper.DoubleBufferWrapper extends BufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.util.BufferWrapper
BufferWrapper.AbstractBufferWrapper<T extends java.nio.Buffer>, BufferWrapper.ByteBufferWrapper, BufferWrapper.DoubleBufferWrapper, BufferWrapper.EmptyBufferWrapper, BufferWrapper.FloatBufferWrapper, BufferWrapper.IntBufferWrapper, BufferWrapper.ShortBufferWrapper
-
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.util.BufferWrapper.AbstractBufferWrapper
buffer
-
Fields inherited from class gov.nasa.worldwind.util.BufferWrapper
EMPTY_BUFFER_WRAPPER
-
-
Constructor Summary
Constructors Constructor Description DoubleBufferWrapper(java.nio.DoubleBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferWrappercopyOf(int newSize)Returns a copy of this buffer with the specified new size.protected voiddoGetByte(byte[] array, int offset, int length)protected voiddoGetDouble(double[] array, int offset, int length)protected voiddoGetFloat(float[] array, int offset, int length)protected voiddoGetInt(int[] array, int offset, int length)protected voiddoGetShort(short[] array, int offset, int length)protected BufferWrapperdoGetSubBuffer()protected voiddoPutByte(byte[] array, int offset, int length)protected voiddoPutDouble(double[] array, int offset, int length)protected voiddoPutFloat(float[] array, int offset, int length)protected voiddoPutInt(int[] array, int offset, int length)protected voiddoPutShort(short[] array, int offset, int length)protected booleandoPutSubBuffer(int index, BufferWrapper buffer, int offset, int length)java.nio.DoubleBuffergetBackingDoubleBuffer()bytegetByte(int index)Returns the value at the specified index, cast to a byte.doublegetDouble(int index)Returns the value at the specified index, cast to a double.floatgetFloat(int index)Returns the value at the specified index, cast to a float.intgetGLDataType()Returns the OpenGL data type corresponding to the buffer's underlying data type (e.g.intgetInt(int index)Returns the value at the specified index, cast to an int.shortgetShort(int index)Returns the value at the specified index, cast to a short.longgetSizeInBytes()Returns the size of this buffer, in bytes.voidputByte(int index, byte value)Sets the value at the specified index as a byte.voidputDouble(int index, double value)Sets the value at the specified index as a double.voidputFloat(int index, float value)Sets the value at the specified index as a float.voidputInt(int index, int value)Sets the value at the specified index as an int.voidputShort(int index, short value)Sets the value at the specified index as a short.-
Methods inherited from class gov.nasa.worldwind.util.BufferWrapper.AbstractBufferWrapper
getBackingBuffer, getByte, getDouble, getFloat, getInt, getShort, getSubBuffer, length, putByte, putDouble, putFloat, putInt, putShort, putSubBuffer, putSubBuffer
-
Methods inherited from class gov.nasa.worldwind.util.BufferWrapper
emptyBufferWrapper, wrap, wrap, wrap
-
-
-
-
Method Detail
-
getBackingDoubleBuffer
public java.nio.DoubleBuffer getBackingDoubleBuffer()
-
getGLDataType
public int getGLDataType()
Description copied from class:BufferWrapperReturns the OpenGL data type corresponding to the buffer's underlying data type (e.g. GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, GL_DOUBLE).- Specified by:
getGLDataTypein classBufferWrapper- Returns:
- the buffer's OpenGL data type.
-
getSizeInBytes
public long getSizeInBytes()
Description copied from class:BufferWrapperReturns the size of this buffer, in bytes.- Specified by:
getSizeInBytesin classBufferWrapper- Returns:
- the buffer's size in bytes.
-
getByte
public byte getByte(int index)
Description copied from class:BufferWrapperReturns the value at the specified index, cast to a byte.- Specified by:
getBytein classBufferWrapper- Parameters:
index- the index of the value to be returned.- Returns:
- the byte at the specified index.
-
putByte
public void putByte(int index, byte value)Description copied from class:BufferWrapperSets the value at the specified index as a byte. The byte is cast to the underlying data type.- Specified by:
putBytein classBufferWrapper- Parameters:
index- the index of the value to be returned.value- the byte value to be set.
-
getShort
public short getShort(int index)
Description copied from class:BufferWrapperReturns the value at the specified index, cast to a short.- Specified by:
getShortin classBufferWrapper- Parameters:
index- the index of the value to be returned.- Returns:
- the short at the specified index.
-
putShort
public void putShort(int index, short value)Description copied from class:BufferWrapperSets the value at the specified index as a short. The short is cast to the underlying data type.- Specified by:
putShortin classBufferWrapper- Parameters:
index- the index of the value to be returned.value- the short value to be set.
-
getInt
public int getInt(int index)
Description copied from class:BufferWrapperReturns the value at the specified index, cast to an int.- Specified by:
getIntin classBufferWrapper- Parameters:
index- the index of the value to be returned.- Returns:
- the int at the specified index.
-
putInt
public void putInt(int index, int value)Description copied from class:BufferWrapperSets the value at the specified index as an int. The int is cast to the underlying data type.- Specified by:
putIntin classBufferWrapper- Parameters:
index- the index of the value to be returned.value- the int value to be set.
-
getFloat
public float getFloat(int index)
Description copied from class:BufferWrapperReturns the value at the specified index, cast to a float.- Specified by:
getFloatin classBufferWrapper- Parameters:
index- the index of the value to be returned.- Returns:
- the float at the specified index.
-
putFloat
public void putFloat(int index, float value)Description copied from class:BufferWrapperSets the value at the specified index as a float. The float is cast to the underlying data type.- Specified by:
putFloatin classBufferWrapper- Parameters:
index- the index of the value to be returned.value- the float value to be set.
-
getDouble
public double getDouble(int index)
Description copied from class:BufferWrapperReturns the value at the specified index, cast to a double.- Specified by:
getDoublein classBufferWrapper- Parameters:
index- the index of the value to be returned.- Returns:
- the double at the specified index.
-
putDouble
public void putDouble(int index, double value)Description copied from class:BufferWrapperSets the value at the specified index as a double. The double is cast to the underlying data type.- Specified by:
putDoublein classBufferWrapper- Parameters:
index- the index of the value to be returned.value- the double value to be set.
-
copyOf
public BufferWrapper copyOf(int newSize)
Description copied from class:BufferWrapperReturns a copy of this buffer with the specified new size. The new size must be greater than or equal to this buffer's size. If the new size is greater than this buffer's size, this returns a new buffer which is partially filled with the contents of this buffer. The returned buffer has the same backing buffer type, but its contents are independent from this VecBuffer.- Specified by:
copyOfin classBufferWrapper- Parameters:
newSize- the new buffer's size.- Returns:
- the new buffer, with the specified size.
-
doGetByte
protected void doGetByte(byte[] array, int offset, int length)- Specified by:
doGetBytein classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doPutByte
protected void doPutByte(byte[] array, int offset, int length)- Specified by:
doPutBytein classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doGetShort
protected void doGetShort(short[] array, int offset, int length)- Specified by:
doGetShortin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doPutShort
protected void doPutShort(short[] array, int offset, int length)- Specified by:
doPutShortin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doGetInt
protected void doGetInt(int[] array, int offset, int length)- Specified by:
doGetIntin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doPutInt
protected void doPutInt(int[] array, int offset, int length)- Specified by:
doPutIntin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doGetFloat
protected void doGetFloat(float[] array, int offset, int length)- Specified by:
doGetFloatin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doPutFloat
protected void doPutFloat(float[] array, int offset, int length)- Specified by:
doPutFloatin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doGetDouble
protected void doGetDouble(double[] array, int offset, int length)- Specified by:
doGetDoublein classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doPutDouble
protected void doPutDouble(double[] array, int offset, int length)- Specified by:
doPutDoublein classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doGetSubBuffer
protected BufferWrapper doGetSubBuffer()
- Specified by:
doGetSubBufferin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
doPutSubBuffer
protected boolean doPutSubBuffer(int index, BufferWrapper buffer, int offset, int length)- Specified by:
doPutSubBufferin classBufferWrapper.AbstractBufferWrapper<java.nio.DoubleBuffer>
-
-