Stay organized with collections
Save and categorize content based on your preferences.
Varying
open class Varying
Data class to represent a single varying variable. A Varying variable can be altered by the vertex shader defined on the mesh but not by the fragment shader defined by AGSL. See https://developer.android.com/develop/ui/views/graphics/agsl for more information regarding Android Graphics Shader Language. This is consumed as part of MeshSpecification.make(Attribute[], int, Varying[], String, String, ColorSpace, int)
to create a MeshSpecification
instance.
Summary
Public constructors
Public methods
getName
open fun getName(): String
Return the name of this Varying
Return |
String |
This value cannot be null . |
getType
open fun getType(): Int
Return the corresponding data type for this Varying
.
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# MeshSpecification.Varying\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nVarying\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/MeshSpecification.Varying \"View this page in Java\") \n\n```\nopen class Varying\n```\n\n|---|-------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.graphics.MeshSpecification.Varying](#) |\n\nData class to represent a single varying variable. A Varying variable can be altered by the vertex shader defined on the mesh but not by the fragment shader defined by AGSL. See https://developer.android.com/develop/ui/views/graphics/agsl for more information regarding Android Graphics Shader Language. This is consumed as part of [MeshSpecification.make(Attribute[], int, Varying[], String, String, ColorSpace, int)](/reference/kotlin/android/graphics/MeshSpecification#make(kotlin.Array,%20kotlin.Int,%20kotlin.Array,%20kotlin.String,%20kotlin.String,%20android.graphics.ColorSpace,%20kotlin.Int)) to create a [MeshSpecification](/reference/kotlin/android/graphics/MeshSpecification) instance.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Varying](#Varying(kotlin.Int,%20kotlin.String))`(`type:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](#getName())`()` Return the name of this [Varying](#) |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getType](#getType())`()` Return the corresponding data type for this [Varying](#). |\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### Varying\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nVarying(\n type: Int, \n name: String)\n```\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `type` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is [android.graphics.MeshSpecification#TYPE_FLOAT](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT:kotlin.Int), [android.graphics.MeshSpecification#TYPE_FLOAT2](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT2:kotlin.Int), [android.graphics.MeshSpecification#TYPE_FLOAT3](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT3:kotlin.Int), [android.graphics.MeshSpecification#TYPE_FLOAT4](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT4:kotlin.Int), or [android.graphics.MeshSpecification#TYPE_UBYTE4](/reference/kotlin/android/graphics/MeshSpecification#TYPE_UBYTE4:kotlin.Int) |\n| `name` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### getName\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getName(): String\n```\n\nReturn the name of this [Varying](#)\n\n| Return ||\n|----------------------------------------------------------------------------------|------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be `null`. |\n\n### getType\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getType(): Int\n```\n\nReturn the corresponding data type for this [Varying](#).\n\n| Return ||\n|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is [android.graphics.MeshSpecification#TYPE_FLOAT](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT:kotlin.Int), [android.graphics.MeshSpecification#TYPE_FLOAT2](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT2:kotlin.Int), [android.graphics.MeshSpecification#TYPE_FLOAT3](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT3:kotlin.Int), [android.graphics.MeshSpecification#TYPE_FLOAT4](/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT4:kotlin.Int), or [android.graphics.MeshSpecification#TYPE_UBYTE4](/reference/kotlin/android/graphics/MeshSpecification#TYPE_UBYTE4:kotlin.Int) |\n\n### toString\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |"]]