Q3DObject Class

Q3DObject 클래스는 3D 씬의 모든 오브젝트에 대한 간단한 기본 클래스입니다. 더 보기...

Header: #include <Q3DObject>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
이후: QtDataVisualization 1.0
QML에서: Object3D
상속: QObject
상속합니다:

Q3DCameraQ3DLight

속성

공공 기능

Q3DObject(QObject *parent = nullptr)
virtual ~Q3DObject()
virtual void copyValuesFrom(const Q3DObject &source)
Q3DScene *parentScene()
QVector3D position() const
void setPosition(const QVector3D &position)

신호

void positionChanged(const QVector3D &position)

보호된 기능

bool isDirty() const
void setDirty(bool dirty)

상세 설명

3D 장면에서 오브젝트의 위치 정보를 포함합니다. 객체는 좌표 공간에서 치수가 없는 단일 점으로 간주됩니다.

속성 문서

[read-only] parentScene : Q3DScene* const

이 속성은 부모 장면을 읽기 전용 값으로 보유합니다.

객체에 부모 장면이 없는 경우 값은 0입니다.

함수에 액세스합니다:

Q3DScene *parentScene()

position : QVector3D

이 속성은 객체의 3D 위치를 저장합니다.

참고: 위치는 내부적으로 처리되므로 현재 이 속성을 설정해도 Q3DCamera 에는 영향을 미치지 않습니다.

함수 액세스:

QVector3D position() const
void setPosition(const QVector3D &position)

알림 신호:

void positionChanged(const QVector3D &position)

멤버 함수 문서

[explicit] Q3DObject::Q3DObject(QObject *parent = nullptr)

기본적으로 위치가 원점으로 설정된 새 3D 객체를 생성합니다. 선택적 parent 매개변수를 지정한 다음 QObject 생성자에 전달할 수 있습니다.

[virtual noexcept] Q3DObject::~Q3DObject()

3D 개체를 파괴합니다.

[virtual] void Q3DObject::copyValuesFrom(const Q3DObject &source)

지정된 source 3D 객체에서 이 3D 객체 인스턴스로 3D 객체 위치를 복사합니다.

[protected] bool Q3DObject::isDirty() const

3D 오브젝트의 변경 여부를 반환합니다.

[protected] void Q3DObject::setDirty(bool dirty)

마지막 업데이트 이후 3D 객체가 변경된 경우 dirtytrue 으로 설정합니다.

isDirty()도 참조하세요 .

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