이 페이지에서

Qt3DExtras::QPhongMaterial Class

class Qt3DExtras::QPhongMaterial

QPhongMaterial 클래스는 퐁(Phong) 조명 효과의 기본 구현을 제공합니다. 더 보기...

헤더: #include <qphongmaterial.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
상속: Qt3DRender::QMaterial
상태: 사용 중단됨

이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.

속성

공개 함수

QPhongMaterial(Qt3DCore::QNode *parent = nullptr)
virtual ~QPhongMaterial()
QColor ambient() const
QColor diffuse() const
float shininess() const
QColor specular() const

공개 슬롯

void setAmbient(const QColor &ambient)
void setDiffuse(const QColor &diffuse)
void setShininess(float shininess)
void setSpecular(const QColor &specular)

신호

void ambientChanged(const QColor &ambient)
void diffuseChanged(const QColor &diffuse)
void shininessChanged(float shininess)
void specularChanged(const QColor &specular)

상세 설명

이 클래스는 더 이상 사용되지 않습니다. 대신 QDiffuseSpecularMaterial 를 사용하십시오.

퐁(Phong) 조명 효과는 앰비언트(ambient), 디퓨즈(diffuse), 스페큘러(specular)라는 세 가지 조명 구성 요소의 조합을 기반으로 합니다. 이러한 구성 요소들의 상대적 강도는 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 : 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)

멤버 함수 문서

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

parent 를 부모 객체로 하는 새로운 QPhongMaterial 인스턴스를 생성합니다.

[virtual noexcept] QPhongMaterial::~QPhongMaterial()

QPhongMaterial 를 삭제합니다.

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