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 void
close()
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.void
doPostProcess(int viewportWidth, int viewportHeight)
Interlaces the views set viasetSourceViews(int, int, int, int)
.void
drawRoundedCorners(int fbWidth, int fbHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight, float radius, float borderColorRed, float borderColorGreen, float borderColorBlue, float borderColorAlpha)
float
getActCoef()
ConvergedPerspectiveViewInfo
getConvergedPerspectiveViewInfo(int viewIndex, Vector3 cameraPosition, Vector3 cameraDir, Vector3 cameraUp, float fieldOfView, float aspectRatio, float nearPlane, float farPlane)
int
getLayerCount()
float[]
getRectMatrix()
ZonePlateState
getZonePlateInitialState(int viewportWidth, int viewportHeight)
ZonePlateResults
getZonePlateResults()
void
initOpenGL(LeiaSDK leiaSDK, EGLContext eglContext, boolean isProtected)
void
processGuiEvent(MotionEvent motionEvent)
void
setCameraAngles(boolean isLeft, float thetaXFpc, float thetaYFpc, float thetaZFpc)
void
setCameraRectificationParameters(boolean isFront, float deltaThetaX, float deltaThetaY, float deltaThetaZ, float calibrationTargetDistanceMm)
void
setDebugGuiCloseListener(InterlacedSurfaceView.DebugGuiCloseListener listener)
void
setFlipInputUvVertical(boolean flip)
void
setInShaderSRGBConversion(boolean sRGBRead, boolean sRGBWrite)
void
setLayerCount(int layerCount)
void
setNumTiles(int x, int y)
void
setOutputRenderTarget(int framebuffer)
void
setReconvergence(float amount, ReconvergenceZoomType zoom)
void
setScaleType(ScaleType scaleType)
void
setSingleViewMode(boolean singleViewMode, int index)
void
setSingleViewModeListener(InterlacerSingleViewModeListener singleViewModeListener)
void
setSourceSize(int width, int height, boolean viewsHorizontal)
void
setSourceViews(int id, int target, int viewIndex, int layerIndex)
Set the views to interlace.void
setSourceViewsSRGB(boolean isSRGB)
void
setSupportCirclePhase(float phase)
void
setTextureMatrix(float[] textureTransform)
void
setViewport(int posX, int posY, int width, int height)
void
setViewportScreenPosition(int xPos, int yPos)
void
syncConfig(InterlacedSurfaceViewConfigAccessor accessor, int dirtyFlags, boolean sRGBGUI)
boolean
writeZonePlateResultsToInterlacer(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()
-
-