Skip to content

ofxAssimp::Bone inheritance issue #8478

@dimitre

Description

@dimitre

Bone is derived from class ofxAssimp::Node that derives from ofNode.
ofNode has a virtual void draw() const; function with no parameters

and in Bone we have

	virtual void draw(float aAxisSize=30.0f);

so it hides draw from ofNode, but in doxygen we can see a message not to override.
which is strange. if it is not meant to override why virtual ?

	/// \brief Draw the node as a white cube with xyz axes.
	/// \note do NOT override this.
	/// It transforms the node to its position+orientation+scale
	/// and calls the virtual 'customDraw' method above which you CAN override.
	virtual void draw() const;

so I tried to mark as final and it shows it is overriden in of3dPrimitive class.

we should not use virtual when not meant to be virtual
override always when overriding virtual
and final IF there is a case that is really not meant to be overriden

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions