Material

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

All Implemented Interfaces: java.lang.Iterable

public abstract class Material extends A3DObject implements Iterable<TextureSlot>

Material은 기하학의 시각적 외관에 필요한 매개변수를 정의합니다. Aspose.3D는 LambertMaterial, PhongMaterialShaderMaterial 쉐이딩 모델을 제공합니다 예시:

var mat = new LambertMaterial();
     var tex = new Texture();
     tex.setFileName("diffuse.png");
     mat.setTexture(Material.MAP_DIFFUSE, tex);
     for(var slot : mat)
     {
         System.out.printf("Texture slot %s = %s", slot.getSlotName(), slot.getTexture());
     }

필드

필드설명
MAP_AMBIENTsetTexture에서 앰비언트 텍스처 매핑을 할당하는 데 사용됩니다.
MAP_DIFFUSEsetTexture에서 디퓨즈 텍스처 매핑을 할당하는 데 사용됩니다.
MAP_EMISSIVEsetTexture에서 에미시브 텍스처 매핑을 할당하는 데 사용됩니다.
MAP_NORMALsetTexture에서 노멀 텍스처 매핑을 할당하는 데 사용됩니다.
MAP_SPECULARsetTexture에서 스페큘러 텍스처 매핑을 할당하는 데 사용됩니다.

메서드

메서드설명
equals(Object arg0)
findProperty(String propertyName)속성을 찾습니다.
getClass()
getName()이름을 가져옵니다.
getProperties()모든 속성의 컬렉션을 가져옵니다.
getProperty(String property)지정된 속성의 값을 가져옵니다
getTexture(String slotName)지정된 슬롯에서 텍스처를 가져옵니다. 이는 재질의 속성 이름이거나 셰이더의 파라미터 이름일 수 있습니다.
hashCode()
iterator()내부 텍스처 슬롯을 열거하기 위한 열거자를 가져옵니다.
notify()
notifyAll()
removeProperty(Property property)동적 속성을 제거합니다.
removeProperty(String property)이름으로 식별되는 지정된 속성을 제거합니다.
setName(String value)이름을 설정합니다.
setProperty(String property, Object value)지정된 속성의 값을 설정합니다.
setTexture(String slotName, TextureBase texture)텍스처를 지정된 슬롯에 설정합니다.
toString()객체를 문자열로 포맷합니다
wait()
wait(long arg0)
wait(long arg0, int arg1)

MAP_AMBIENT

public static final String MAP_AMBIENT

setTexture에서 앰비언트 텍스처 매핑을 할당하는 데 사용됩니다.

MAP_DIFFUSE

public static final String MAP_DIFFUSE

setTexture에서 디퓨즈 텍스처 매핑을 할당하는 데 사용됩니다.

MAP_EMISSIVE

public static final String MAP_EMISSIVE

setTexture에서 에미시브 텍스처 매핑을 할당하는 데 사용됩니다.

MAP_NORMAL

public static final String MAP_NORMAL

setTexture에서 노멀 텍스처 매핑을 할당하는 데 사용됩니다.

MAP_SPECULAR

public static final String MAP_SPECULAR

setTexture에서 스페큘러 텍스처 매핑을 할당하는 데 사용됩니다.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

매개변수형식설명
arg0java.lang.Object

Returns: boolean

findProperty(String propertyName)

public Property findProperty(String propertyName)

속성을 찾습니다. 동적 속성 (Created by CreateDynamicProperty/SetProperty) 또는 네이티브 속성 (Identified by its name)일 수 있습니다.

Parameters:

매개변수형식설명
propertyNamejava.lang.String속성 이름.

Returns: Property - The property.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getName()

public String getName()

이름을 가져옵니다.

Returns: java.lang.String - 이름.

getProperties()

public PropertyCollection getProperties()

모든 속성의 컬렉션을 가져옵니다.

Returns: PropertyCollection - the collection of all properties.

getProperty(String property)

public Object getProperty(String property)

지정된 속성의 값을 가져옵니다

Parameters:

매개변수형식설명
속성java.lang.String속성 이름

Returns: java.lang.Object - 찾은 속성의 값

getTexture(String slotName)

public TextureBase getTexture(String slotName)

지정된 슬롯에서 텍스처를 가져옵니다. 이는 재질의 속성 이름이거나 셰이더의 파라미터 이름일 수 있습니다.

Parameters:

매개변수형식설명
slotNamejava.lang.String슬롯 이름.

Returns: TextureBase - The texture. Example:

var mat = new LambertMaterial();
     var tex = new Texture();
     tex.setFileName("diffuse.png");
     mat.setTexture(Material.MAP_DIFFUSE, tex);
     tex = (Texture)mat.getTexture(Material.MAP_DIFFUSE);

hashCode()

public native int hashCode()

Returns: int

iterator()

public Iterator<TextureSlot> iterator()

내부 텍스처 슬롯을 열거하기 위한 열거자를 가져옵니다.

Returns: java.util.Iterator<com.aspose.threed.TextureSlot>

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeProperty(Property property)

public boolean removeProperty(Property property)

동적 속성을 제거합니다.

Parameters:

매개변수형식설명
propertyProperty제거할 속성

Returns: boolean - 속성이 성공적으로 제거되면 true

removeProperty(String property)

public boolean removeProperty(String property)

이름으로 식별되는 지정된 속성을 제거합니다.

Parameters:

매개변수형식설명
속성java.lang.String제거할 속성

Returns: boolean - 속성이 성공적으로 제거되면 true

setName(String value)

public void setName(String value)

이름을 설정합니다.

Parameters:

매개변수형식설명
java.lang.String새 값

setProperty(String property, Object value)

public void setProperty(String property, Object value)

지정된 속성의 값을 설정합니다.

Parameters:

매개변수형식설명
속성java.lang.String속성 이름
java.lang.Object속성의 값

setTexture(String slotName, TextureBase texture)

public void setTexture(String slotName, TextureBase texture)

텍스처를 지정된 슬롯에 설정합니다.

Parameters:

매개변수형식설명
slotNamejava.lang.String슬롯 이름.
textureTextureBase
var mat = new LambertMaterial();
     var tex = new Texture();
     tex.setFileName("diffuse.png");
     mat.setTexture(Material.MAP_NORMAL, tex);
``` |

### toString() {#toString--}

public String toString()



객체를 문자열로 포맷합니다

**Returns:**
java.lang.String - 객체 문자열
### wait() {#wait--}

public final void wait()





### wait(long arg0) {#wait-long-}

public final void wait(long arg0)





**Parameters:**
| 매개변수 | 형식 | 설명 |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}

public final void wait(long arg0, int arg1)





**Parameters:**
| 매개변수 | 형식 | 설명 |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |