val myGLXFInfo = glXFManager.inflateGLXF(Uri.parse("apk:///scenes/Composition.glxf"))
class GLXFInfo(val glxfManager: GLXFManager, val version: String, val experience: Boolean, assets: MutableList<GLXFAsset>, var nodes: MutableList<GLXFNode>, val rootEntity: Entity, val uri: <Error class: unknown class>, context: <Error class: unknown class>, nodeMap: NodeMap = mutableMapOf<Entity, GLXFNode>(), nodesByName: MutableMap<String, GLXFNode> = mutableMapOf<String, GLXFNode>(), val keyName: String? = null, entityIdToEntityMap: MutableMap<String, Entity>, overrideCreateEntity: (<Error class: unknown class>?) -> Entity)
GLXFInfo
(
glxfManager
, version
, experience
, assets
, nodes
, rootEntity
, uri
, context
, nodeMap
, nodesByName
, keyName
, entityIdToEntityMap
, overrideCreateEntity
)
|
Signature
constructor(glxfManager: GLXFManager, version: String, experience: Boolean, assets: MutableList<GLXFAsset>, nodes: MutableList<GLXFNode>, rootEntity: Entity, uri: Uri, context: Context, nodeMap: NodeMap = mutableMapOf<Entity, GLXFNode>(), nodesByName: MutableMap<String, GLXFNode> = mutableMapOf<String, GLXFNode>(), keyName: String? = null, entityIdToEntityMap: MutableMap<String, Entity>, overrideCreateEntity: (<Error class: unknown class>?) -> Entity) Parameters
glxfManager:
GLXFManager
version:
String
experience:
Boolean
assets:
MutableList
nodes:
MutableList
rootEntity:
Entity
uri:
Uri
context:
Context
nodeMap:
NodeMap
nodesByName:
MutableMap
keyName:
String?
entityIdToEntityMap:
MutableMap
overrideCreateEntity:
Function1
Returns |
experience
:
Boolean
[Get] |
: The experience property set to true indicates that this file is intended to be directly viewed as an experience and MUST NOT be imported into other scenes.
Signature
val experience: Boolean |
glxfManager
:
GLXFManager
[Get] |
Signature
val glxfManager: GLXFManager |
keyName
:
String?
[Get] |
: the key name of the GLXF file. This optional value is used to uniquely identify the GLXF file.
Signature
val keyName: String? = null |
nodes
:
MutableList
[Get][Set] |
: a list of nodes in the GLXF file
Signature
var nodes: MutableList<GLXFNode> |
rootEntity
:
Entity
[Get] |
: the root entity of the GLXF file
Signature
val rootEntity: Entity |
uri
:
Uri
[Get] |
: the URI of the GLXF file
Signature
val uri: Uri |
version
:
String
[Get] |
: the version of the GLXF file, e.g., "2.0"
Signature
val version: String |
destroy
()
|
Immediately destroys GLXFInfo and all its child resources including all entities inflated as part of the GLXFInfo.
Signature
fun destroy() |
getNestedGLXFInfo
(
childName
)
|
Gets the nested GLXFInfo for a given child name.
Example:
val myNestedGLXFInfo = myGLXFInfo.getNestedGLXFInfo("childWithNestedGLXFName")
Signature
fun getNestedGLXFInfo(childName: String): GLXFInfo? Parameters
childName:
String
|
getNestedGLXFInfo
(
childNamePathList
)
|
Gets the nested GLXFInfo for a given list of child names. The first name should be the highest level child name, with each subsequent name being a child of that nested GLXFInfo
Example:
val myNestedGLXFInfo = myGLXFInfo.getNestedGLXFInfo(listOf("childOfMyGLXFInfo", "childOf_childOfMyGLXFInfo"))
Signature
fun getNestedGLXFInfo(childNamePathList: List<String>): GLXFInfo? Parameters
childNamePathList:
List
|
getNodeByName
(
name
)
|
Returns the GLXFNode object for the given name. This gives you access to the node's properties, including the entity inf;ated to represent this node
Example:
val myPanelEntity = myGLXFInfo.getNodeByName("panel").entity
Signature
fun getNodeByName(name: String): GLXFNode Parameters
name:
String
|
getNodeByName
(
resId
)
|
Returns the GLXFNode object for the string value represented by the resource ID.
Example:
val myPanelEntity = myGLXFInfo.getNodeByName(R.string.panel).entity
Signature
fun getNodeByName(resId: Int): GLXFNode Parameters
resId:
Int
|
tryGetNodeByName
(
name
)
|
Returns the GLXFNode object for the given name, or null if it doesn't exist.
Example:
val myPanelEntity = myGLXFInfo.tryGetNodeByName("panel").entity ?: return
Signature
fun tryGetNodeByName(name: String): GLXFNode? Parameters
name:
String
|
tryGetNodeByName
(
resId
)
|
Returns the GLXFNode object for the given resource ID, or null if it doesn't exist.
Example:
val myPanelEntity = myGLXFInfo.tryGetNodeByName(R.string.panel).entity ?: return
Signature
fun tryGetNodeByName(resId: Int): GLXFNode? Parameters
resId:
Int
Returns
The GLXFNode object associated with the given resource ID, or null if it doesn't exist.
|