Class AbstractFrameTransfer<T>

    • Field Detail

      • frameState

        protected final java.util.concurrent.atomic.AtomicInteger frameState
        The Frame state.
      • imageState

        protected final java.util.concurrent.atomic.AtomicInteger imageState
        The Image state.
      • frameBuffer

        protected final com.jme3.texture.FrameBuffer frameBuffer
        The Frame buffer.
      • pixelWriter

        protected final javafx.scene.image.PixelWriter pixelWriter
        The Pixel writer.
      • frameByteBuffer

        protected final java.nio.ByteBuffer frameByteBuffer
        The Frame byte buffer.
      • byteBuffer

        protected final byte[] byteBuffer
        The byte buffer.
      • imageByteBuffer

        protected final byte[] imageByteBuffer
        The image byte buffer.
      • prevImageByteBuffer

        protected final byte[] prevImageByteBuffer
        The prev image byte buffer.
      • frameCount

        protected int frameCount
        How many frames need to write else.
    • Method Detail

      • initFor

        public void initFor​(com.jme3.renderer.Renderer renderer,
                            boolean main)
        Description copied from interface: FrameTransfer
        Init this transfer for the render.
        Specified by:
        initFor in interface FrameTransfer
        Parameters:
        renderer - the render.
        main - true if this transfer is main.
      • getPixelWriter

        protected javafx.scene.image.PixelWriter getPixelWriter​(T destination,
                                                                com.jme3.texture.FrameBuffer frameBuffer,
                                                                int width,
                                                                int height)
        Get the pixel writer.
        Parameters:
        destination - the destination.
        frameBuffer - the frame buffer.
        width - the width.
        height - the height.
        Returns:
        the pixel writer.
      • getWidth

        public int getWidth()
        Description copied from interface: FrameTransfer
        Gets the width.
        Specified by:
        getWidth in interface FrameTransfer
        Returns:
        the width.
      • getHeight

        public int getHeight()
        Description copied from interface: FrameTransfer
        Gets the height.
        Specified by:
        getHeight in interface FrameTransfer
        Returns:
        the height.
      • copyFrameBufferToImage

        public void copyFrameBufferToImage​(com.jme3.renderer.RenderManager renderManager)
        Description copied from interface: FrameTransfer
        Copy the content from render to the frameByteBuffer and write this content to javaFX.
        Specified by:
        copyFrameBufferToImage in interface FrameTransfer
        Parameters:
        renderManager - the render manager.
      • writeFrame

        protected void writeFrame()
        Write content to image.
      • getImageByteBuffer

        protected byte[] getImageByteBuffer()
        Get the image byte buffer.
        Returns:
        the image byte buffer.
      • getPrevImageByteBuffer

        protected byte[] getPrevImageByteBuffer()
        Get the prev image byte buffer.
        Returns:
        the prev image byte buffer.
      • disposeImpl

        protected void disposeImpl()
        Dispose.