Retrieves the triangle data for this mesh in a buffer of lengthgetIndexListSize().
Each face is a triplet of indices into the vertices array (getVertexList()). The
indices should always be used as a triangle list, with three indices per triangle. The result
can be passed as theindicesparameter toGLES20.glDrawElements(int, int, int, java.nio.Buffer).
The content of this buffer should not be modified by the caller.
public
int
getIndexListSize
()
getIndexListSize
publicintgetIndexListSize()
Retrieves the number of triangle indices (represented bygetIndexList()) in this mesh.
The indices should always be used as a triangle list, with three indices per triangle. The
result can be passed as thecountparameter toGLES20.glDrawElements(int, int, int, java.nio.Buffer).
Retrieves the vertex coordinate data for this mesh. Each vertex is three float values, stored
in XYZ order. The total number of float values in the resultingFloatBufferis 3 *getVertexListSize().
The content of this buffer should not be modified by the caller.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eMesh\u003c/code\u003e class represents a polygon mesh used to describe geometry in AR experiences.\u003c/p\u003e\n"],["\u003cp\u003eIt's obtained using the \u003ccode\u003eStreetscapeGeometry.getMesh()\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eYou can access the mesh's triangle data and vertex coordinates via \u003ccode\u003egetIndexList()\u003c/code\u003e and \u003ccode\u003egetVertexList()\u003c/code\u003e respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetIndexListSize()\u003c/code\u003e and \u003ccode\u003egetVertexListSize()\u003c/code\u003e provide the corresponding data sizes.\u003c/p\u003e\n"],["\u003cp\u003eThese methods allow rendering the mesh using OpenGL functions like \u003ccode\u003eGLES20.glDrawElements()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Mesh\n\n`\npublic class\n`**Mesh**`\n` \nRepresents a polygon mesh describing geometry.\n\nObtained by [StreetscapeGeometry.getMesh()](/ar/reference/java/com/google/ar/core/StreetscapeGeometry#getMesh()). \n\nPublic Methods\n--------------\n\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[IntBuffer](https://developer.android.com/reference/java/nio/IntBuffer)` ` | [getIndexList](/ar/reference/java/com/google/ar/core/Mesh#getIndexList())`()` Retrieves the triangle data for this mesh in a buffer of length [getIndexListSize()](/ar/reference/java/com/google/ar/core/Mesh#getIndexListSize()). |\n| ` int ` | [getIndexListSize](/ar/reference/java/com/google/ar/core/Mesh#getIndexListSize())`()` Retrieves the number of triangle indices (represented by [getIndexList()](/ar/reference/java/com/google/ar/core/Mesh#getIndexList())) in this mesh. |\n| ` `[FloatBuffer](https://developer.android.com/reference/java/nio/FloatBuffer)` ` | [getVertexList](/ar/reference/java/com/google/ar/core/Mesh#getVertexList())`()` Retrieves the vertex coordinate data for this mesh. |\n| ` int ` | [getVertexListSize](/ar/reference/java/com/google/ar/core/Mesh#getVertexListSize())`()` Retrieves the number of vertices in this mesh. |\n\nInherited Methods\n-----------------\n\nFrom `class\njava.lang.Object` \n\n|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| ` `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c?\u003e ` | getClass`()` |\n| ` int ` | hashCode`()` |\n| ` final void ` | notify`()` |\n| ` final void ` | notifyAll`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` final void ` | wait`(long arg0, int arg1)` |\n| ` final void ` | wait`(long arg0)` |\n| ` final void ` | wait`()` |\n\nPublic Methods\n--------------\n\n#### public\n[IntBuffer](https://developer.android.com/reference/java/nio/IntBuffer)\ngetIndexList\n()\n\n### getIndexList\n\n```java\npublic IntBuffer getIndexList()\n``` \nRetrieves the triangle data for this mesh in a buffer of length [getIndexListSize()](/ar/reference/java/com/google/ar/core/Mesh#getIndexListSize()).\nEach face is a triplet of indices into the vertices array ([getVertexList()](/ar/reference/java/com/google/ar/core/Mesh#getVertexList())). The\nindices should always be used as a triangle list, with three indices per triangle. The result\ncan be passed as the `indices` parameter to [GLES20.glDrawElements(int, int, int, java.nio.Buffer)](https://developer.android.com/reference/android/opengl/GLES20#glDrawElements(int,%20int,%20int,%20java.nio.Buffer)).\n\nThe content of this buffer should not be modified by the caller.\n\n#### public\nint\ngetIndexListSize\n()\n\n### getIndexListSize\n\n```java\npublic int getIndexListSize()\n``` \nRetrieves the number of triangle indices (represented by [getIndexList()](/ar/reference/java/com/google/ar/core/Mesh#getIndexList())) in this mesh.\nThe indices should always be used as a triangle list, with three indices per triangle. The\nresult can be passed as the `count` parameter to [GLES20.glDrawElements(int, int, int, java.nio.Buffer)](https://developer.android.com/reference/android/opengl/GLES20#glDrawElements(int,%20int,%20int,%20java.nio.Buffer)).\n\n#### public\n[FloatBuffer](https://developer.android.com/reference/java/nio/FloatBuffer)\ngetVertexList\n()\n\n### getVertexList\n\n```java\npublic FloatBuffer getVertexList()\n``` \nRetrieves the vertex coordinate data for this mesh. Each vertex is three float values, stored\nin XYZ order. The total number of float values in the resulting [FloatBuffer](https://developer.android.com/reference/java/nio/FloatBuffer) is 3 \\*\n[getVertexListSize()](/ar/reference/java/com/google/ar/core/Mesh#getVertexListSize()).\n\nThe content of this buffer should not be modified by the caller.\n\n#### public\nint\ngetVertexListSize\n()\n\n### getVertexListSize\n\n```java\npublic int getVertexListSize()\n``` \nRetrieves the number of vertices in this mesh."]]