openframeworks / openframeworks/openFrameworks

ofxAssimp::Bone inheritance issue

Open
#8,478 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search for the declarations of ofxAssimp::Bone, ofxAssimp::Node, ofNode, and of3dPrimitive, then trace which draw methods override or hide one another. Review the related declarations and inheritance before deciding the intended override and final annotations; done means the affected interfaces consistently express that intent without breaking the existing hierarchy.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.