Package com.leia.sdk.graphics
Class Interlacer
- java.lang.Object
-
- com.leia.sdk.graphics.Interlacer
-
- Direct Known Subclasses:
InterlacerAGSL
public class Interlacer extends Object
JNI wrapper over C++ IThreadedInterlacer.
-
-
Constructor Summary
Constructors Constructor Description Interlacer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddoPassthrough(int viewportWidth, int viewportHeight, int viewsTextureid, int viewsTextureTarget, int viewsWidth, int viewsHeight, boolean viewsHorizontal)Blits the provided views onto the current framebuffer as is.voiddoPostProcess(int viewportWidth, int viewportHeight)Interlaces the views set viasetSourceViews(int, int, int, int).voiddrawRoundedCorners(int fbWidth, int fbHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight, float radius, float borderColorRed, float borderColorGreen, float borderColorBlue, float borderColorAlpha)floatgetActCoef()ConvergedPerspectiveViewInfogetConvergedPerspectiveViewInfo(int viewIndex, Vector3 cameraPosition, Vector3 cameraDir, Vector3 cameraUp, float fieldOfView, float aspectRatio, float nearPlane, float farPlane)intgetLayerCount()float[]getRectMatrix()ZonePlateStategetZonePlateInitialState(int viewportWidth, int viewportHeight)ZonePlateResultsgetZonePlateResults()voidinitOpenGL(LeiaSDK leiaSDK, EGLContext eglContext, boolean isProtected)voidprocessGuiEvent(MotionEvent motionEvent)voidsetCameraAngles(boolean isLeft, float thetaXFpc, float thetaYFpc, float thetaZFpc)voidsetCameraRectificationParameters(boolean isFront, float deltaThetaX, float deltaThetaY, float deltaThetaZ, float calibrationTargetDistanceMm)voidsetDebugGuiCloseListener(InterlacedSurfaceView.DebugGuiCloseListener listener)voidsetFlipInputUvVertical(boolean flip)voidsetInShaderSRGBConversion(boolean sRGBRead, boolean sRGBWrite)voidsetLayerCount(int layerCount)voidsetNumTiles(int x, int y)voidsetOutputRenderTarget(int framebuffer)voidsetReconvergence(float amount, ReconvergenceZoomType zoom)voidsetScaleType(ScaleType scaleType)voidsetSingleViewMode(boolean singleViewMode, int index)voidsetSingleViewModeListener(InterlacerSingleViewModeListener singleViewModeListener)voidsetSourceSize(int width, int height, boolean viewsHorizontal)voidsetSourceViews(int id, int target, int viewIndex, int layerIndex)Set the views to interlace.voidsetSourceViewsSRGB(boolean isSRGB)voidsetSupportCirclePhase(float phase)voidsetTextureMatrix(float[] textureTransform)voidsetViewport(int posX, int posY, int width, int height)voidsetViewportScreenPosition(int xPos, int yPos)voidsyncConfig(InterlacedSurfaceViewConfigAccessor accessor, int dirtyFlags, boolean sRGBGUI)booleanwriteZonePlateResultsToInterlacer(float slant, float pitch, float phc, float dOverN, float n)
-
-
-
Method Detail
-
initOpenGL
public void initOpenGL(LeiaSDK leiaSDK, EGLContext eglContext, boolean isProtected)
-
setOutputRenderTarget
public void setOutputRenderTarget(int framebuffer)
-
doPostProcess
public void doPostProcess(int viewportWidth, int viewportHeight)Interlaces the views set viasetSourceViews(int, int, int, int).
-
doPassthrough
public void doPassthrough(int viewportWidth, int viewportHeight, int viewsTextureid, int viewsTextureTarget, int viewsWidth, int viewsHeight, boolean viewsHorizontal)Blits the provided views onto the current framebuffer as is.
-
setTextureMatrix
public void setTextureMatrix(float[] textureTransform)
-
setViewportScreenPosition
public void setViewportScreenPosition(int xPos, int yPos)
-
setViewport
public void setViewport(int posX, int posY, int width, int height)
-
setFlipInputUvVertical
public void setFlipInputUvVertical(boolean flip)
-
setSourceSize
public void setSourceSize(int width, int height, boolean viewsHorizontal)
-
setReconvergence
public void setReconvergence(float amount, ReconvergenceZoomType zoom)
-
setScaleType
public void setScaleType(ScaleType scaleType)
-
syncConfig
public void syncConfig(InterlacedSurfaceViewConfigAccessor accessor, int dirtyFlags, boolean sRGBGUI)
-
drawRoundedCorners
public void drawRoundedCorners(int fbWidth, int fbHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight, float radius, float borderColorRed, float borderColorGreen, float borderColorBlue, float borderColorAlpha)
-
getConvergedPerspectiveViewInfo
public ConvergedPerspectiveViewInfo getConvergedPerspectiveViewInfo(int viewIndex, Vector3 cameraPosition, Vector3 cameraDir, Vector3 cameraUp, float fieldOfView, float aspectRatio, float nearPlane, float farPlane)
-
getRectMatrix
public float[] getRectMatrix()
-
setSingleViewModeListener
public void setSingleViewModeListener(InterlacerSingleViewModeListener singleViewModeListener)
-
setDebugGuiCloseListener
public void setDebugGuiCloseListener(InterlacedSurfaceView.DebugGuiCloseListener listener)
-
processGuiEvent
public void processGuiEvent(MotionEvent motionEvent) throws Exception
- Throws:
Exception
-
close
public void close()
-
setSourceViews
public void setSourceViews(int id, int target, int viewIndex, int layerIndex)Set the views to interlace.- Parameters:
id- views texture GL id to interlace.target- views texture GL target. Must be one of GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES.
-
setNumTiles
public void setNumTiles(int x, int y)
-
setSingleViewMode
public void setSingleViewMode(boolean singleViewMode, int index)
-
setLayerCount
public void setLayerCount(int layerCount)
-
getLayerCount
public int getLayerCount()
-
setSourceViewsSRGB
public void setSourceViewsSRGB(boolean isSRGB)
-
setInShaderSRGBConversion
public void setInShaderSRGBConversion(boolean sRGBRead, boolean sRGBWrite)
-
getZonePlateInitialState
public ZonePlateState getZonePlateInitialState(int viewportWidth, int viewportHeight)
-
getZonePlateResults
public ZonePlateResults getZonePlateResults()
-
setSupportCirclePhase
public void setSupportCirclePhase(float phase)
-
writeZonePlateResultsToInterlacer
public boolean writeZonePlateResultsToInterlacer(float slant, float pitch, float phc, float dOverN, float n)
-
setCameraRectificationParameters
public void setCameraRectificationParameters(boolean isFront, float deltaThetaX, float deltaThetaY, float deltaThetaZ, float calibrationTargetDistanceMm)
-
setCameraAngles
public void setCameraAngles(boolean isLeft, float thetaXFpc, float thetaYFpc, float thetaZFpc)
-
getActCoef
public float getActCoef()
-
-