openframeworks / openframeworks/openFrameworks
feature : recode ofNode to use parameters
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Hey all!
I need a way of having the translate, rotate and scale of an ofNode (essentially all the acknowledged parameters) act as parameters.
My suggestion before was to make parameters able to use external values (e.g. you can make your own ofParameter-type class that doesn't internally store an ofVec3f, but instead gets and sets the position of an ofNode. with that class being able to sit within the inheritance tree of ofParameter, and therefore be tied to a slider, etc).
This suggestion didn't get positive response as it complicates ofParameter
The next suggestion is to recode ofNode to internally use 3 parameters:
ofParameter<ofVec3f> translation;
ofParameter<ofQuaternion> rotation;
ofParameter<ofVec3f> scale;
you could then bind external sliders to these parameters
we keep the existing API
the biggest difference would be that you couldn't apply a projective transform to an ofNode (if you applied a matrix, we'd perform some decomposition to make it back into a Tra,Rot,Sca
the alternative so far has been to cache values somewhere, and have an update loop that checks for changes inside the ofNode
i'd like to avoid this as it's very messy (e.g. who does this update, what is the epsilon value, etc)
this isn't an easy ask, but the type of control that it unlocks is really powerful
so your consideration is appreciated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing ofNode and ofParameter implementations and how their transform APIs currently interact. Clarify the design for translation, rotation, scale, external parameter binding, and projective transforms before identifying the affected code and validation needed. Done would preserve the existing API while enabling the requested parameter-driven control.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100