29 Q_PROPERTY(
bool fill READ fill WRITE setFill NOTIFY fillChanged)
30 Q_PROPERTY(ShapeType type READ type WRITE setType NOTIFY typeChanged)
31 Q_PROPERTY(QVector3D extents READ extents WRITE setExtents NOTIFY extentsChanged)
33 QML_NAMED_ELEMENT(ParticleShape3D)
34 QML_ADDED_IN_VERSION(6, 2)
45 QQuick3DParticleShape(QObject *parent =
nullptr);
48 ShapeType type()
const;
49 QVector3D extents()
const;
52 QVector3D getPosition(
int particleIndex) override;
53 Q_REVISION(6, 10) QVector3D getSurfaceNormal(
int particleIndex) override;
56 void setFill(
bool fill);
57 void setType(QQuick3DParticleShape::ShapeType type);
58 void setExtents(QVector3D extends);
63 void extentsChanged();
66 QVector3D randomPositionCube(
int particleIndex)
const;
67 QVector3D randomPositionSphere(
int particleIndex)
const;
68 QVector3D randomPositionCylinder(
int particleIndex)
const;
71 ShapeType m_type = ShapeType::Cube;
72 QVector3D m_extents = QVector3D(50, 50, 50);
73 QVector3D m_cachedPosition;
74 int m_cachedIndex = -1;