Most visited

Recently visited

Submesh

public class Submesh
extends Object

java.lang.Object
   ↳ com.viro.core.Submesh


Submesh defines how the vertices of a Geometry are connected together to form a 3D object. Each individual Submesh is an interconnected set of triangles, with each triangle composed from three vertices of the parent Geometry. Submeshes are assigned to a Geometry via setSubmeshes(List).

Summary

Nested classes

class Submesh.SubmeshBuilder

Builder for creating Submesh objects. 

Public constructors

Submesh()

Create a new Submesh.

Public methods

static Submesh.SubmeshBuilder builder()

Retrieve a builder for creating Submesh objects.

List<Integer> getTriangleIndices()

Get the triangle indices that define the faces of this submesh.

void setTriangleIndices(List<Integer> triangles)

Set the triangles that define the faces of this submesh.

Public constructors

Submesh

Submesh ()

Create a new Submesh.

Public methods

builder

Submesh.SubmeshBuilder builder ()

Retrieve a builder for creating Submesh objects.

Returns
Submesh.SubmeshBuilder

getTriangleIndices

List<Integer> getTriangleIndices ()

Get the triangle indices that define the faces of this submesh. See setTriangleIndices(List) for more information.

Returns
List<Integer> The triangle indices.

setTriangleIndices

void setTriangleIndices (List<Integer> triangles)

Set the triangles that define the faces of this submesh. Each integer in this list refers to a vertex in the parent Geometry's vertices list (e.g. the vertices that were assigned to the Geometry via setVertices(List). Every three integers in this list defines a triangle. For example, six entries in the triangles list defines two triangles.

Parameters
triangles List: The triangles index list.

Hooray!