Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3D 2.0 subclassing Qt3D::QCylinderMesh
Forum Updated to NodeBB v4.3 + New Features

Qt3D 2.0 subclassing Qt3D::QCylinderMesh

Scheduled Pinned Locked Moved General and Desktop
qt3d 2.0subclassing
1 Posts 1 Posters 985 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Carlito
    wrote on 7 Oct 2015, 20:43 last edited by Carlito
    #1

    Hi everyone,

    In order to make an arrow in Qt3D, i tried creating a Qt3D::QConeMesh by subclassing Qt3D::QCylinderMesh, and then overwriting the functions so that they can take 2 radii (for a cone fustrum), and calculate the vertices in there accordingly:

    void createSides( ..., double radius1, double radius2 ... ) {...}
    QMeshDataPtr createConeMesh (..., double radius1, double radius2 ... ) {...} 
    

    I was assuming that the rest of the functionality is basically copied from QCylinderMesh in the inheritance. But I can't make it work.

    What is weird, if I subclass it without altering any functionality, essentially qconemesh.h like this:

    class QT3DRENDERERSHARED_EXPORT QConeMesh : public Qt3D::QCylinderMesh 
    {  Q_OBJECT };
    

    and an empty qconemesh.cpp, then it "works" in the way that I can then call QConeMesh (and obviously get a cylinder).

    Am I missing something?

    Thanks & Cheers, Carl

    1 Reply Last reply
    0

    1/1

    7 Oct 2015, 20:43

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved