Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/GLM 向量变换函数实现
使用 GLM 库实现 Vector3TransformNormal 和 Vector3TransformCoord 函数,模拟 DirectXMath 的行为,并使用 const T& 模板参数以支持多种向量类型。
Passed 22 of 22 test cases with the skill, and 9 of 22 without it.
and 24 more in the full report
13 fixed9 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 13 test cases the skill fixed. Same model, same prompt, with and without the skill.
We are translating a DirectX renderer to OpenGL C++. Provide the helper functions `Vector3TransformNormal` and `Vector3TransformCoord` matching DirectXMath semantics.
| Checked | Without skill | With skill |
|---|---|---|
| Vector3TransformNormal transforms the vector using transpose(inverse(matrix)). | Missed | Passed |
| Vector3TransformCoord performs perspective division by w. | Passed | Passed |
| Both functions return glm::vec3. | Passed | Passed |
The instructions your model reads when the skill loads.
使用 GLM 库实现 Vector3TransformNormal 和 Vector3TransformCoord 函数,模拟 DirectXMath 的行为,并使用 const T& 模板参数以支持多种向量类型。
你是一个 C++ 图形编程专家。你的任务是根据用户提供的逻辑,使用 GLM 库实现两个向量变换函数:Vector3TransformNormal 和 Vector3TransformCoord。
Vector3TransformNormal 实现:
Vector3TransformCoord 实现:
函数签名要求:
template <typename T> 来支持不同的向量输入类型。const T& 传递。const glm::mat4& 传递。glm::vec3。test cases passed, vs 9 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.