Qt3DExtras::QNormalDiffuseMapMaterial Class
class Qt3DExtras::QNormalDiffuseMapMaterialQNormalDiffuseMapMaterial은 퐁(Phong) 라이팅과 범프 효과의 기본 구현을 제공하며, 여기서는 확산광 성분은 텍스처 맵에서, 렌더링되는 메쉬의 노멀은 노멀 텍스처 맵에서 읽어옵니다. 더 보기...
| 헤더: | #include <qnormaldiffusemapmaterial.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| 상속: | Qt3DRender::QMaterial |
| 상속받는 항목: | |
| 상태: | 사용 중단 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
속성
|
공개 함수
| QNormalDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QNormalDiffuseMapMaterial() |
| QColor | ambient() const |
| Qt3DRender::QAbstractTexture * | diffuse() const |
| Qt3DRender::QAbstractTexture * | normal() const |
| float | shininess() const |
| QColor | specular() const |
| float | textureScale() const |
공개 슬롯
| void | setAmbient(const QColor &ambient) |
| void | setDiffuse(Qt3DRender::QAbstractTexture *diffuse) |
| void | setNormal(Qt3DRender::QAbstractTexture *normal) |
| void | setShininess(float shininess) |
| void | setSpecular(const QColor &specular) |
| void | setTextureScale(float textureScale) |
신호
| void | ambientChanged(const QColor &ambient) |
| void | diffuseChanged(Qt3DRender::QAbstractTexture *diffuse) |
| void | normalChanged(Qt3DRender::QAbstractTexture *normal) |
| void | shininessChanged(float shininess) |
| void | specularChanged(const QColor &specular) |
| void | textureScaleChanged(float textureScale) |
상세 설명
이 클래스는 더 이상 사용되지 않습니다. 대신 QDiffuseSpecularMaterial 을 사용하십시오.
스페큘러 조명 효과는 앰비언트, 디퓨즈, 스페큘러라는 3가지 조명 구성 요소의 조합을 기반으로 합니다. 이 구성 요소들의 상대적 강도는 RGB 3원색으로 모델링된 반사율 계수를 통해 제어됩니다:
- 앰비언트는 다른 광원이 전혀 없는 상태에서 물체가 방출하는 색상입니다.
- 확산(Diffuse)은 조명이 닿았을 때 거친 표면에서 반사되어 나오는 색상입니다.
- 스페큘러는 광원에 의해 반사되는 광택 있는 표면의 색상입니다.
- 표면의 광택도는 float 형식의 속성으로 제어됩니다.
이 머티리얼은 단일 렌더 패스 방식을 사용하는 이펙트를 적용하며, 프래그먼트별 조명을 수행합니다. OpenGL 2, OpenGL 3 이상 및 OpenGL ES 2용 기술이 제공됩니다.
속성 설명서
ambient : QColor
현재 주변 색상을 저장합니다.
액세스 함수:
| QColor | ambient() const |
| void | setAmbient(const QColor &ambient) |
알림 신호:
| void | ambientChanged(const QColor &ambient) |
diffuse : Qt3DRender::QAbstractTexture*
현재의 디퓨즈 맵 텍스처를 저장합니다.
기본적으로 디퓨즈 텍스처는 다음과 같은 속성을 가집니다:
- 선형 축소 및 확대 필터
- 밉매핑이 활성화된 선형 밉맵
- 반복 랩 모드 M
- 최대 이방성 값 16.0
액세스 함수:
| Qt3DRender::QAbstractTexture * | diffuse() const |
| void | setDiffuse(Qt3DRender::QAbstractTexture *diffuse) |
알림 신호:
| void | diffuseChanged(Qt3DRender::QAbstractTexture *diffuse) |
normal : Qt3DRender::QAbstractTexture*
현재 노멀 맵 텍스처를 저장합니다.
기본적으로 노멀 텍스처는 다음과 같은 특성을 가집니다:
- 선형 축소 및 확대 필터
- 반복 래핑 모드
- 최대 이방성 16.0
액세스 함수:
| Qt3DRender::QAbstractTexture * | normal() const |
| void | setNormal(Qt3DRender::QAbstractTexture *normal) |
알림 신호:
| void | normalChanged(Qt3DRender::QAbstractTexture *normal) |
shininess : float
현재 광택도를 부동소수점 값으로 저장합니다.
액세스 함수:
| float | shininess() const |
| void | setShininess(float shininess) |
알림 신호:
| void | shininessChanged(float shininess) |
specular : QColor
현재 스페큘러 색상을 저장합니다.
액세스 함수:
| QColor | specular() const |
| void | setSpecular(const QColor &specular) |
알림 신호:
| void | specularChanged(const QColor &specular) |
textureScale : float
현재 텍스처 배율을 저장합니다. 렌더링 시 텍스처 좌표에 곱셈 계수로 적용됩니다. 기본값은 1.0입니다.
textureScale을 QTextureWrapMode::Repeat와 함께 사용하면 표면 전체에 텍스처를 타일링하는 간단한 방법을 제공합니다. 예를 들어, 텍스처 스케일이 4.0 인 경우 16개(4x4)의 타일이 생성됩니다.
액세스 함수:
| float | textureScale() const |
| void | setTextureScale(float textureScale) |
알림 신호:
| void | textureScaleChanged(float textureScale) |
멤버 함수 문서
[explicit] QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr)
parent 를 부모 객체로 하는 새로운 QNormalDiffuseMapMaterial 인스턴스를 생성합니다.
[virtual noexcept] QNormalDiffuseMapMaterial::~QNormalDiffuseMapMaterial()
QNormalDiffuseMapMaterial 인스턴스를 삭제합니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.