QGoochMaterial Class

class Qt3DExtras::QGoochMaterial

QGoochMaterial은 CAD 및 CAM 애플리케이션에서 널리 사용되는 구치 셰이딩 모델을 구현하는 머티리얼을 제공합니다. 더 보기...

Header: #include <QGoochMaterial>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
상속합니다: Qt3DRender::QMaterial
상태: Deprecated

속성

공용 기능

QGoochMaterial(Qt3DCore::QNode *parent = nullptr)
float alpha() const
float beta() const
QColor cool() const
QColor diffuse() const
float shininess() const
QColor specular() const
QColor warm() const

공용 슬롯

void setAlpha(float alpha)
void setBeta(float beta)
void setCool(const QColor &cool)
void setDiffuse(const QColor &diffuse)
void setShininess(float shininess)
void setSpecular(const QColor &specular)
void setWarm(const QColor &warm)

신호

void alphaChanged(float alpha)
void betaChanged(float beta)
void coolChanged(const QColor &cool)
void diffuseChanged(const QColor &diffuse)
void shininessChanged(float shininess)
void specularChanged(const QColor &specular)
void warmChanged(const QColor &warm)

상세 설명

Gooch 조명 모델은 색상과 밝기를 모두 사용하여 3D 표면의 곡률을 표시하는 데 도움이 됩니다. 이는 순전히 밝기 변화에만 의존하는 Phong과 같은 모델보다 더 나은 경우가 많습니다. 사실적인 표현이 목표가 아닌 CAD 및 CAM 애플리케이션과 같은 상황에서는 실루엣 가장자리 잉킹과 함께 Gooch 셰이딩 모델이 널리 사용되는 솔루션입니다.

Gooch 조명 모델에 대한 자세한 설명은 Gooch 백서에서 확인할 수 있습니다. Gooch 모델은 디퓨즈 오브젝트 컬러와 사용자가 제공한 차가운 컬러 및 따뜻한 컬러를 혼합하여 조각에서 광원까지의 벡터와 조각의 노멀 벡터 사이의 각도의 코사인을 기반으로 오브젝트를 음영 처리하는 데 사용되는 컬러 램프의 끝점을 생성합니다. 선택적으로 스페큘러 하이라이트를 위에 추가할 수 있습니다. 디퓨즈 컬러에 의한 차가운 색과 따뜻한 색의 상대적인 기여도는 각각 알파 및 베타 프로퍼티로 제어됩니다.

이 머티리얼은 단일 렌더 패스 접근 방식의 효과를 사용하며 조각별 조명을 수행합니다. OpenGL 2, OpenGL 3 이상 및 OpenGL ES 2에 대한 기술이 제공됩니다.

프로퍼티 문서

alpha : float

현재 알파 값을 보유합니다. Gooch 셰이더에서 사용하는 색상 램프의 시작점은 {c = cool + 알파 * 확산}으로 계산됩니다.

함수에 액세스합니다:

float alpha() const
void setAlpha(float alpha)

알림 신호:

void alphaChanged(float alpha)

beta : float

현재 베타 값을 보유합니다. Gooch 셰이더에서 사용하는 색상 램프의 시작점은 {c = warm + 베타 * 확산}으로 계산됩니다.

함수에 액세스합니다:

float beta() const
void setBeta(float beta)

알림 신호:

void betaChanged(float beta)

cool : QColor

현재 시원한 색상을 유지합니다.

기능에 액세스합니다:

QColor cool() const
void setCool(const QColor &cool)

알림 신호:

void coolChanged(const QColor &cool)

diffuse : QColor

현재 디퓨즈 색상을 유지합니다.

기능에 액세스합니다:

QColor diffuse() const
void setDiffuse(const QColor &diffuse)

알림 신호:

void diffuseChanged(const QColor &diffuse)

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)

warm : QColor

현재 따뜻한 색을 유지합니다.

기능에 액세스합니다:

QColor warm() const
void setWarm(const QColor &warm)

알림 신호:

void warmChanged(const QColor &warm)

멤버 함수 문서

[explicit] QGoochMaterial::QGoochMaterial(Qt3DCore::QNode *parent = nullptr)

부모 오브젝트가 있는 새 QGoochMaterial 인스턴스 parent 를 생성합니다.

© 2025 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.