openframeworks / openframeworks/openFrameworks
Feature : glm operator* for mat4 and vec3
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Heya!
One thing we had before with ofMatrix4x4 was an operator like
template <typename T, precision P>
inline tvec3<T, P> operator*(const tmat4x4<T, P>& mat, const tvec3<T, P>& vec3) {
return (tvec3<T, P>) (mat * tvec4<T, P>(vec3, 1.0));
}
This means that for vec3's we can just do mat * vec3 and get a vec3 result
Currently with glm we've lost this, and need to explicitly inflate to a vec4 and back down to a vec3 every time we want to transform a vec3 by a matrix.
Any takers?
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
The issue names no files, tests, or entry points. Start by locating the GLM matrix and vector operator definitions used by openFrameworks, then verify the requested mat4 * vec3 behavior against the existing C++ test coverage; done means that expression returns a vec3 without explicit conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100