class FakeImpressApi : ImpressApi


Fake implementation of the JNI API for communicating with the Impress Split Engine instance for testing purposes.

Summary

Nested types

Test bookkeeping data for a Gltf gltfToken

Test bookkeeping data for a Material

Enum representing the different built-in material types that can be created.

Test bookkeeping data for a StereoSurfaceEntity

Enum representing the different canvas shapes that can be created.

Test bookkeeping data for a Android Surface

Public constructors

Public functions

ListenableFuture<Void!>
animateGltfModel(impressNode: Int, animationName: String?, loop: Boolean)
Texture
Unit
Int
Int
ListenableFuture<WaterMaterial!>
createWaterMaterial(isAlphaMapVersion: Boolean)
Unit
destroyImpressNode(impressNode: Int)
Unit
destroyNativeObject(nativeHandle: Long)
Unit
Long

Returns the current environment light token.

(Mutable)Map<Long!, (Mutable)List<Int!>!>
(Mutable)List<Long!>
Int
getImpressNodeParent(impressNode: Int)

Returns the parent impress node for the given impress node.

(Mutable)Map<FakeImpressApi.GltfNodeData!, FakeImpressApi.GltfNodeData!>

Returns the map of impress nodes to their parent impress nodes.

(Mutable)List<Int!>

Gets the impress nodes for glTF models that match the given token.

(Mutable)Map<Long!, FakeImpressApi.MaterialData!>

Returns the map of material tokens to their associated MaterialData object.

Texture
(Mutable)Map<Int!, FakeImpressApi.StereoSurfaceEntityData!>
Surface
getSurfaceFromStereoSurface(panelImpressNode: Int)
(Mutable)Map<Long!, Texture!>

Returns the map of texture image tokens to their associated Texture object.

Int

Returns the number of impress nodes that are currently animating.

Boolean
impressNodeHasParent(impressNode: Int)

Returns true if the given impress node has a parent.

Int

Returns the number of impress nodes that looping animations.

Int
instanceGltfModel(gltfToken: Long)
Int
instanceGltfModel(gltfToken: Long, enableCollider: Boolean)
ListenableFuture<Long!>
ListenableFuture<Long!>
ListenableFuture<Long!>
ListenableFuture<Long!>
ListenableFuture<Texture!>
loadTexture(path: String, sampler: TextureSampler)
Unit
Unit
Unit
releaseGltfAsset(gltfToken: Long)
Unit
Unit
setAlphaMapOnWaterMaterial(nativeWaterMaterial: Long, alphaMap: Long)
Unit
setAlphaStepMultiplierOnWaterMaterial(
    nativeMaterial: Long,
    alphaStepMultiplier: Float
)
Unit
setAlphaStepUOnWaterMaterial(
    nativeWaterMaterial: Long,
    x: Float,
    y: Float,
    z: Float,
    w: Float
)
Unit
setAlphaStepVOnWaterMaterial(
    nativeWaterMaterial: Long,
    x: Float,
    y: Float,
    z: Float,
    w: Float
)
Unit
setAuxiliaryAlphaMaskForStereoSurface(impressNode: Int, alphaMask: Long)
Unit
setFeatherRadiusForStereoSurface(
    panelImpressNode: Int,
    radiusX: Float,
    radiusY: Float
)
Unit
setGltfModelColliderEnabled(impressNode: Int, enableCollider: Boolean)
Unit
setImpressNodeParent(impressNodeChild: Int, impressNodeParent: Int)
Unit
setMaterialOverride(
    impressNode: Int,
    nativeMaterial: Long,
    meshName: String
)
Unit
setNormalBoundaryOnWaterMaterial(
    nativeWaterMaterial: Long,
    normalBoundary: Float
)
Unit
setNormalMapOnWaterMaterial(nativeMaterial: Long, normalMap: Long)
Unit
setNormalSpeedOnWaterMaterial(nativeMaterial: Long, normalSpeed: Float)
Unit
setNormalTilingOnWaterMaterial(nativeMaterial: Long, normalTiling: Float)
Unit
setNormalZOnWaterMaterial(nativeWaterMaterial: Long, normalZ: Float)
Unit
Unit
setPrimaryAlphaMaskForStereoSurface(impressNode: Int, alphaMask: Long)
Unit
setReflectionCubeOnWaterMaterial(
    nativeMaterial: Long,
    reflectionCube: Long
)
Unit
setStereoModeForStereoSurface(
    panelImpressNode: Int,
    @ImpressApi.StereoMode mode: Int
)
Unit
setStereoSurfaceEntityCanvasShapeHemisphere(
    impressNode: Int,
    radius: Float
)

This method sets the canvas shape of a StereoSurfaceEntity using its Impress ID.

Unit
setStereoSurfaceEntityCanvasShapeQuad(
    impressNode: Int,
    width: Float,
    height: Float
)

This method sets the canvas shape of a StereoSurfaceEntity using its Impress ID.

Unit

This method sets the canvas shape of a StereoSurfaceEntity using its Impress ID.

Unit
setup(view: View)
Unit

Public constructors

FakeImpressApi

Added in 1.0.0-alpha04
FakeImpressApi()

Public functions

animateGltfModel

Added in 1.0.0-alpha04
fun animateGltfModel(impressNode: Int, animationName: String?, loop: Boolean): ListenableFuture<Void!>

borrowReflectionTexture

Added in 1.0.0-alpha04
fun borrowReflectionTexture(): Texture

clearPreferredEnvironmentIblAsset

Added in 1.0.0-alpha04
fun clearPreferredEnvironmentIblAsset(): Unit

createImpressNode

Added in 1.0.0-alpha04
fun createImpressNode(): Int

createStereoSurface

Added in 1.0.0-alpha04
fun createStereoSurface(@ImpressApi.StereoMode stereoMode: Int): Int

createWaterMaterial

Added in 1.0.0-alpha04
fun createWaterMaterial(isAlphaMapVersion: Boolean): ListenableFuture<WaterMaterial!>

destroyImpressNode

Added in 1.0.0-alpha04
fun destroyImpressNode(impressNode: Int): Unit

destroyNativeObject

Added in 1.0.0-alpha04
fun destroyNativeObject(nativeHandle: Long): Unit

disposeAllResources

Added in 1.0.0-alpha04
fun disposeAllResources(): Unit

getCurrentEnvironmentLight

Added in 1.0.0-alpha04
fun getCurrentEnvironmentLight(): Long

Returns the current environment light token.

getGltfModels

Added in 1.0.0-alpha04
fun getGltfModels(): (Mutable)Map<Long!, (Mutable)List<Int!>!>

getImageBasedLightingAssets

Added in 1.0.0-alpha04
fun getImageBasedLightingAssets(): (Mutable)List<Long!>

getImpressNodeParent

Added in 1.0.0-alpha04
fun getImpressNodeParent(impressNode: Int): Int

Returns the parent impress node for the given impress node.

getImpressNodes

Added in 1.0.0-alpha04
fun getImpressNodes(): (Mutable)Map<FakeImpressApi.GltfNodeData!, FakeImpressApi.GltfNodeData!>

Returns the map of impress nodes to their parent impress nodes.

getImpressNodesForToken

Added in 1.0.0-alpha04
fun getImpressNodesForToken(gltfToken: Long): (Mutable)List<Int!>

Gets the impress nodes for glTF models that match the given token.

getMaterials

Added in 1.0.0-alpha04
fun getMaterials(): (Mutable)Map<Long!, FakeImpressApi.MaterialData!>

Returns the map of material tokens to their associated MaterialData object.

getReflectionTextureFromIbl

Added in 1.0.0-alpha04
fun getReflectionTextureFromIbl(iblToken: Long): Texture

getSurfaceFromStereoSurface

Added in 1.0.0-alpha04
fun getSurfaceFromStereoSurface(panelImpressNode: Int): Surface

getTextureImages

Added in 1.0.0-alpha04
fun getTextureImages(): (Mutable)Map<Long!, Texture!>

Returns the map of texture image tokens to their associated Texture object.

impressNodeAnimatingSize

Added in 1.0.0-alpha04
fun impressNodeAnimatingSize(): Int

Returns the number of impress nodes that are currently animating.

impressNodeHasParent

Added in 1.0.0-alpha04
fun impressNodeHasParent(impressNode: Int): Boolean

Returns true if the given impress node has a parent.

impressNodeLoopAnimatingSize

Added in 1.0.0-alpha04
fun impressNodeLoopAnimatingSize(): Int

Returns the number of impress nodes that looping animations.

instanceGltfModel

Added in 1.0.0-alpha04
fun instanceGltfModel(gltfToken: Long): Int

instanceGltfModel

Added in 1.0.0-alpha04
fun instanceGltfModel(gltfToken: Long, enableCollider: Boolean): Int

loadGltfAsset

Added in 1.0.0-alpha04
fun loadGltfAsset(path: String): ListenableFuture<Long!>

loadGltfAsset

Added in 1.0.0-alpha04
fun loadGltfAsset(data: ByteArray, key: String): ListenableFuture<Long!>

loadImageBasedLightingAsset

Added in 1.0.0-alpha04
fun loadImageBasedLightingAsset(path: String): ListenableFuture<Long!>

loadImageBasedLightingAsset

Added in 1.0.0-alpha04
fun loadImageBasedLightingAsset(data: ByteArray, key: String): ListenableFuture<Long!>

loadTexture

Added in 1.0.0-alpha04
fun loadTexture(path: String, sampler: TextureSampler): ListenableFuture<Texture!>

onPause

Added in 1.0.0-alpha04
fun onPause(): Unit

onResume

Added in 1.0.0-alpha04
fun onResume(): Unit

releaseGltfAsset

Added in 1.0.0-alpha04
fun releaseGltfAsset(gltfToken: Long): Unit

releaseImageBasedLightingAsset

Added in 1.0.0-alpha04
fun releaseImageBasedLightingAsset(iblToken: Long): Unit

setAlphaMapOnWaterMaterial

Added in 1.0.0-alpha04
fun setAlphaMapOnWaterMaterial(nativeWaterMaterial: Long, alphaMap: Long): Unit

setAlphaStepMultiplierOnWaterMaterial

Added in 1.0.0-alpha04
fun setAlphaStepMultiplierOnWaterMaterial(
    nativeMaterial: Long,
    alphaStepMultiplier: Float
): Unit

setAlphaStepUOnWaterMaterial

Added in 1.0.0-alpha04
fun setAlphaStepUOnWaterMaterial(
    nativeWaterMaterial: Long,
    x: Float,
    y: Float,
    z: Float,
    w: Float
): Unit

setAlphaStepVOnWaterMaterial

Added in 1.0.0-alpha04
fun setAlphaStepVOnWaterMaterial(
    nativeWaterMaterial: Long,
    x: Float,
    y: Float,
    z: Float,
    w: Float
): Unit

setAuxiliaryAlphaMaskForStereoSurface

Added in 1.0.0-alpha04
fun setAuxiliaryAlphaMaskForStereoSurface(impressNode: Int, alphaMask: Long): Unit

setFeatherRadiusForStereoSurface

Added in 1.0.0-alpha04
fun setFeatherRadiusForStereoSurface(
    panelImpressNode: Int,
    radiusX: Float,
    radiusY: Float
): Unit

setGltfModelColliderEnabled

Added in 1.0.0-alpha04
fun setGltfModelColliderEnabled(impressNode: Int, enableCollider: Boolean): Unit

setImpressNodeParent

Added in 1.0.0-alpha04
fun setImpressNodeParent(impressNodeChild: Int, impressNodeParent: Int): Unit

setMaterialOverride

Added in 1.0.0-alpha04
fun setMaterialOverride(
    impressNode: Int,
    nativeMaterial: Long,
    meshName: String
): Unit

setNormalBoundaryOnWaterMaterial

Added in 1.0.0-alpha04
fun setNormalBoundaryOnWaterMaterial(
    nativeWaterMaterial: Long,
    normalBoundary: Float
): Unit

setNormalMapOnWaterMaterial

Added in 1.0.0-alpha04
fun setNormalMapOnWaterMaterial(nativeMaterial: Long, normalMap: Long): Unit

setNormalSpeedOnWaterMaterial

Added in 1.0.0-alpha04
fun setNormalSpeedOnWaterMaterial(nativeMaterial: Long, normalSpeed: Float): Unit

setNormalTilingOnWaterMaterial

Added in 1.0.0-alpha04
fun setNormalTilingOnWaterMaterial(nativeMaterial: Long, normalTiling: Float): Unit

setNormalZOnWaterMaterial

Added in 1.0.0-alpha04
fun setNormalZOnWaterMaterial(nativeWaterMaterial: Long, normalZ: Float): Unit

setPreferredEnvironmentLight

Added in 1.0.0-alpha04
fun setPreferredEnvironmentLight(iblToken: Long): Unit

setPrimaryAlphaMaskForStereoSurface

Added in 1.0.0-alpha04
fun setPrimaryAlphaMaskForStereoSurface(impressNode: Int, alphaMask: Long): Unit

setReflectionCubeOnWaterMaterial

Added in 1.0.0-alpha04
fun setReflectionCubeOnWaterMaterial(
    nativeMaterial: Long,
    reflectionCube: Long
): Unit

setStereoModeForStereoSurface

Added in 1.0.0-alpha04
fun setStereoModeForStereoSurface(
    panelImpressNode: Int,
    @ImpressApi.StereoMode mode: Int
): Unit

setStereoSurfaceEntityCanvasShapeHemisphere

Added in 1.0.0-alpha04
fun setStereoSurfaceEntityCanvasShapeHemisphere(
    impressNode: Int,
    radius: Float
): Unit

This method sets the canvas shape of a StereoSurfaceEntity using its Impress ID.

Parameters
impressNode: Int

The Impress node which hosts the StereoSurfaceEntity to be updated.

radius: Float

The radius in local spatial units of the hemisphere.

setStereoSurfaceEntityCanvasShapeQuad

Added in 1.0.0-alpha04
fun setStereoSurfaceEntityCanvasShapeQuad(
    impressNode: Int,
    width: Float,
    height: Float
): Unit

This method sets the canvas shape of a StereoSurfaceEntity using its Impress ID.

Parameters
impressNode: Int

The Impress node which hosts the StereoSurfaceEntity to be updated.

width: Float

The width in local spatial units to set the quad to.

height: Float

The height in local spatial units to set the quad to.

setStereoSurfaceEntityCanvasShapeSphere

Added in 1.0.0-alpha04
fun setStereoSurfaceEntityCanvasShapeSphere(impressNode: Int, radius: Float): Unit

This method sets the canvas shape of a StereoSurfaceEntity using its Impress ID.

Parameters
impressNode: Int

The Impress node which hosts the StereoSurfaceEntity to be updated.

radius: Float

The radius in local spatial units to set the sphere to.

setup

Added in 1.0.0-alpha04
fun setup(view: View): Unit

stopGltfModelAnimation

Added in 1.0.0-alpha04
fun stopGltfModelAnimation(impressNode: Int): Unit