Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/3dview/linemeshgeometry.cpp
Show All 37 Lines | 31 | { | |||
---|---|---|---|---|---|
38 | _positionAttribute->setBuffer(_vertexBuffer); | 38 | _positionAttribute->setBuffer(_vertexBuffer); | ||
39 | _positionAttribute->setDataType(Qt3DRender::QAttribute::Float); | 39 | _positionAttribute->setDataType(Qt3DRender::QAttribute::Float); | ||
40 | _positionAttribute->setDataSize(3); | 40 | _positionAttribute->setDataSize(3); | ||
41 | _positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName()); | 41 | _positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName()); | ||
42 | 42 | | |||
43 | addAttribute(_positionAttribute); | 43 | addAttribute(_positionAttribute); | ||
44 | } | 44 | } | ||
45 | 45 | | |||
46 | LineMeshGeometry::~LineMeshGeometry() | | |||
47 | { | | |||
48 | } | | |||
49 | | ||||
50 | int LineMeshGeometry::vertexCount() | 46 | int LineMeshGeometry::vertexCount() | ||
51 | { | 47 | { | ||
52 | return _vertexBuffer->data().size() / static_cast<int>(sizeof(QVector3D)); | 48 | return _vertexBuffer->data().size() / static_cast<int>(sizeof(QVector3D)); | ||
53 | } | 49 | } |