VertexElementMaterial

Inheritance: java.lang.Object, com.aspose.threed.VertexElement

public class VertexElementMaterial extends VertexElement

Define el índice de material para los componentes especificados. Un nodo puede tener varios materiales, el VertexElementMaterial se utiliza para renderizar diferentes partes de la geometría con diferentes materiales. Ejemplo: El siguiente código muestra cómo asignar diferentes materiales a diferentes caras de una caja.

// Create a mesh of box(A box is composed by 6 planes)
             Mesh box = (new Box()).ToMesh();
             // Create a material element on this mesh
             VertexElementMaterial mat = (VertexElementMaterial)box.CreateElement(VertexElementType.Material, MappingMode.Polygon, ReferenceMode.Index);
             // And specify different material index for each plane
             mat.Indices.AddRange(new int[] { 0, 1, 2, 3, 4, 5 });

Constructores

ConstructorDescripción
VertexElementMaterial()Inicializa una nueva instancia de la clase VertexElementMaterial.

Métodos

MétodoDescripción
clear()Elimina todos los elementos de los arreglos directos y de índices.
clone(boolean withData)Clona en profundidad el elemento de vértice.
clone(boolean withDirect, boolean withIndice)
equals(Object arg0)
getClass()
getIndices()Obtiene los datos de los índices.
getMappingMode()Obtiene cómo se mapea el elemento.
getName()Obtiene el nombre.
getReferenceMode()Obtiene cómo se referencia el elemento.
getVertexElementType()Obtiene el tipo del VertexElement
hashCode()
notify()
notifyAll()
setIndices(int[] data)Cargar índices
setMappingMode(MappingMode value)Establece cómo se mapea el elemento.
setName(String value)Establece el nombre.
setReferenceMode(ReferenceMode value)Establece cómo se referencia el elemento.
toString()Representación en cadena del elemento de vértice.
wait()
wait(long arg0)
wait(long arg0, int arg1)

VertexElementMaterial()

public VertexElementMaterial()

Inicializa una nueva instancia de la clase VertexElementMaterial.

clear()

public void clear()

Elimina todos los elementos de los arreglos directos y de índices.

clone(boolean withData)

public VertexElement clone(boolean withData)

Clona en profundidad el elemento de vértice.

Parameters:

ParámetroTipoDescripción
withDatabooleanClona el vértice con los arreglos directos e índices

Returns: VertexElement

clone(boolean withDirect, boolean withIndice)

public VertexElement clone(boolean withDirect, boolean withIndice)

Parameters:

ParámetroTipoDescripción
withDirectboolean
withIndiceboolean

Returns: VertexElement

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParámetroTipoDescripción
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getIndices()

public List<Integer> getIndices()

Obtiene los datos de los índices.

Returns: java.util.List<java.lang.Integer> - los datos de los índices

getMappingMode()

public MappingMode getMappingMode()

Obtiene cómo se mapea el elemento.

Returns: MappingMode - how the element is mapped.

getName()

public String getName()

Obtiene el nombre.

Returns: java.lang.String - el nombre.

getReferenceMode()

public ReferenceMode getReferenceMode()

Obtiene cómo se referencia el elemento.

Returns: ReferenceMode - how the element is referenced.

getVertexElementType()

public VertexElementType getVertexElementType()

Obtiene el tipo del VertexElement

Returns: VertexElementType - the type of the VertexElement

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setIndices(int[] data)

public void setIndices(int[] data)

Cargar índices

Parameters:

ParámetroTipoDescripción
datosint[]

setMappingMode(MappingMode value)

public void setMappingMode(MappingMode value)

Establece cómo se mapea el elemento.

Parameters:

ParámetroTipoDescripción
valueMappingModeNuevo valor

setName(String value)

public void setName(String value)

Establece el nombre.

Parameters:

ParámetroTipoDescripción
valorjava.lang.StringNuevo valor

setReferenceMode(ReferenceMode value)

public void setReferenceMode(ReferenceMode value)

Establece cómo se referencia el elemento.

Parameters:

ParámetroTipoDescripción
valueReferenceModeNuevo valor

toString()

public String toString()

Representación en cadena del elemento de vértice.

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParámetroTipoDescripción
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParámetroTipoDescripción
arg0long
arg1int