AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb

[QUESTION] Nanovdb vector statistics using `lengthSqr()` instead of `length()`

Open
#2,145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

nanovdb
Dominant language
C++
Stars
3.4k
Forks
777
Avg merge
3d 9h
Merged PRs (30d)
34

Description

I don't know if it's a bug or not, but the behaviour is different than OpenVDB. In OpenVDB statistics() would return statistics of the magnitudes of the vectors, but in NanoVDB the behaviour on vectors is not documented, and when I check the code it seems to use the squared length, which doesn't quite make sense to me:
https://github.com/AcademySoftwareFoundation/openvdb/blob/19013e3358971501b176b3e0816b1c3cf10633f5/nanovdb/nanovdb/tools/GridStats.h#L157

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

Start by reading nanovdb/tools/GridStats.h around line 157 and compare it with the linked OpenVDB implementation. Confirm the intended semantics for vector statistics; done requires an agreed behavior and either documentation or a recorded resolution, since no specific code change or test is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.