Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to iterate points? #312

Open
alexeygritsenko opened this issue Nov 22, 2024 · 0 comments
Open

How to iterate points? #312

alexeygritsenko opened this issue Nov 22, 2024 · 0 comments
Labels

Comments

@alexeygritsenko
Copy link

Hi, thanks for developing such a useful library.
I need to loop through the points and extract them later into another custom format, the simplest is console output, something like this:

e57::Reader* reader = nullptr;
e57::E57Root fileHeader;
e57::Data3D data3DHeader;

reader = new e57::Reader("C:\\temp\\input.e57", {});
reader->GetE57Root(fileHeader);
reader->ReadData3D(0, data3DHeader);

std::cout << "pointCount = " << data3DHeader.pointCount << '\n';

e57::Data3DPointsFloat pointsData(data3DHeader);

for (size_t i = 0; i < data3DHeader.pointCount; i++)
{
    std::cout << "X = " << pointsData[i].X << "Y = " << pointsData[i].Y << "Z = " << pointsData[i].Z
        << "R = " << pointsData[i].R << "G = " << pointsData[i].G << "B = " << pointsData[i].B << '\n';
}

but it doesn't work. help, i'm not a c++ programmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants