31 Q_PROPERTY(
bool fill READ fill WRITE setFill NOTIFY fillChanged)
32 Q_PROPERTY(ShapeType type READ type WRITE setType NOTIFY typeChanged)
33 Q_PROPERTY(QVector3D extents READ extents WRITE setExtents NOTIFY extentsChanged)
35 QML_NAMED_ELEMENT(ParticleShape3D)
36 QML_ADDED_IN_VERSION(6, 2)
47 QQuick3DParticleShape(QObject *parent =
nullptr);
50 ShapeType type()
const;
51 QVector3D extents()
const;
54 QVector3D getPosition(
int particleIndex) override;
55 Q_REVISION(6, 10) QVector3D getSurfaceNormal(
int particleIndex) override;
58 void setFill(
bool fill);
59 void setType(QQuick3DParticleShape::ShapeType type);
60 void setExtents(QVector3D extends);
65 void extentsChanged();
68 QVector3D randomPositionCube(
int particleIndex)
const;
69 QVector3D randomPositionSphere(
int particleIndex)
const;
70 QVector3D randomPositionCylinder(
int particleIndex)
const;
73 ShapeType m_type = ShapeType::Cube;
74 QVector3D m_extents = QVector3D(50, 50, 50);
75 QVector3D m_cachedPosition;
76 int m_cachedIndex = -1;