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]How to input const uint32_t* adjacency #62

Closed
orangeagain opened this issue Apr 8, 2021 · 3 comments
Closed

[how to]How to input const uint32_t* adjacency #62

orangeagain opened this issue Apr 8, 2021 · 3 comments
Labels

Comments

@orangeagain
Copy link

orangeagain commented Apr 8, 2021

I know mesh base on vertex and triangle index, but where is adjacency from?

    HRESULT __cdecl UVAtlasCreate(
        _In_reads_(nVerts)                  const XMFLOAT3* positions,
        _In_                                size_t nVerts,
        _When_(indexFormat == DXGI_FORMAT_R16_UINT, _In_reads_bytes_(nFaces * sizeof(uint16_t)))
        _When_(indexFormat != DXGI_FORMAT_R16_UINT, _In_reads_bytes_(nFaces * sizeof(uint32_t))) const void* indices,
        _In_                                DXGI_FORMAT indexFormat,
        _In_                                size_t nFaces,
        _In_                                size_t maxChartNumber,
        _In_                                float maxStretch,
        _In_                                size_t width,
        _In_                                size_t height,
        _In_                                float gutter,
        _In_reads_(nFaces * 3)                const uint32_t* adjacency,
        _In_reads_opt_(nFaces * 3)            const uint32_t* falseEdgeAdjacency,
        _In_reads_opt_(nFaces * 3)            const float* pIMTArray,
        _In_opt_                            std::function<HRESULT __cdecl(float percentComplete)> statusCallBack,
        _In_                                float callbackFrequency,
        _In_                                UVATLAS options,
        _Inout_ std::vector<UVAtlasVertex>& vMeshOutVertexBuffer,
        _Inout_ std::vector<uint8_t>& vMeshOutIndexBuffer,
        _Inout_opt_ std::vector<uint32_t>* pvFacePartitioning = nullptr,
        _Inout_opt_ std::vector<uint32_t>* pvVertexRemapArray = nullptr,
        _Out_opt_                           float* maxStretchOut = nullptr,
        _Out_opt_                           size_t* numChartsOut = nullptr);
@walbourn
Copy link
Member

walbourn commented Apr 8, 2021

Per the documentation wiki you can use DirectXMesh's GenerateAdjacencyAndPointReps to compute it.

@walbourn walbourn closed this as completed Apr 8, 2021
@orangeagain
Copy link
Author

Per the documentation wiki you can use DirectXMesh's GenerateAdjacencyAndPointReps to compute it.

Can I input empty to it?

@walbourn
Copy link
Member

walbourn commented Apr 9, 2021

Face-adjacency information is required for the algorithm.

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