VertexElementMaterial
Inheritance: java.lang.Object, com.aspose.threed.VertexElement
public class VertexElementMaterial extends VertexElement
Définit l’index du matériau pour les composants spécifiés. Un nœud peut avoir plusieurs matériaux, le VertexElementMaterial est utilisé pour rendre différentes parties de la géométrie avec différents matériaux. Exemple: Le code suivant montre comment attribuer différents matériaux à chaque face d’une boîte.
// 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 });
Constructeurs
| Constructeur | Description |
|---|---|
| VertexElementMaterial() | Initialise une nouvelle instance de la classe VertexElementMaterial. |
Méthodes
| Méthode | Description |
|---|---|
| clear() | Supprime tous les éléments des tableaux direct et d’index. |
| clone(boolean withData) | Clone en profondeur l’élément de sommet. |
| clone(boolean withDirect, boolean withIndice) | |
| equals(Object arg0) | |
| getClass() | |
| getIndices() | Obtient les données des indices. |
| getMappingMode() | Obtient la façon dont l’élément est mappé. |
| getName() | Obtient le nom. |
| getReferenceMode() | Obtient la façon dont l’élément est référencé. |
| getVertexElementType() | Obtient le type du VertexElement. |
| hashCode() | |
| notify() | |
| notifyAll() | |
| setIndices(int[] data) | Charge les indices. |
| setMappingMode(MappingMode value) | Définit la façon dont l’élément est mappé. |
| setName(String value) | Définit le nom. |
| setReferenceMode(ReferenceMode value) | Définit la façon dont l’élément est référencé. |
| toString() | Représentation sous forme de chaîne de l’élément de sommet. |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
VertexElementMaterial()
public VertexElementMaterial()
Initialise une nouvelle instance de la classe VertexElementMaterial.
clear()
public void clear()
Supprime tous les éléments des tableaux direct et d’index.
clone(boolean withData)
public VertexElement clone(boolean withData)
Clone en profondeur l’élément de sommet.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| withData | boolean | Clone le sommet avec les tableaux direct et d’index. |
Returns: VertexElement
clone(boolean withDirect, boolean withIndice)
public VertexElement clone(boolean withDirect, boolean withIndice)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| withDirect | boolean | |
| withIndice | boolean |
Returns: VertexElement
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getIndices()
public List<Integer> getIndices()
Obtient les données des indices.
Returns: java.util.List<java.lang.Integer> - les données des indices
getMappingMode()
public MappingMode getMappingMode()
Obtient la façon dont l’élément est mappé.
Returns: MappingMode - how the element is mapped.
getName()
public String getName()
Obtient le nom.
Returns: java.lang.String - le nom.
getReferenceMode()
public ReferenceMode getReferenceMode()
Obtient la façon dont l’élément est référencé.
Returns: ReferenceMode - how the element is referenced.
getVertexElementType()
public VertexElementType getVertexElementType()
Obtient le type du 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)
Charge les indices.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| données | int[] |
setMappingMode(MappingMode value)
public void setMappingMode(MappingMode value)
Définit la façon dont l’élément est mappé.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| value | MappingMode | Nouvelle valeur |
setName(String value)
public void setName(String value)
Définit le nom.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | java.lang.String | Nouvelle valeur |
setReferenceMode(ReferenceMode value)
public void setReferenceMode(ReferenceMode value)
Définit la façon dont l’élément est référencé.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| value | ReferenceMode | Nouvelle valeur |
toString()
public String toString()
Représentation sous forme de chaîne de l’élément de sommet.
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |