Skip to content
Discussion options

You must be logged in to vote

Hi @yangocean-sudo

If I understood correctly, this is how you could instantiate a vectorized Transform4f from a std::vector which we'll assume you filled from your binary file.

if constexpr (dr::is_jit_v<Float>) {
    size_t N = 3;
    dr::Matrix<Float, 4> matrix = dr::zeros<dr::Matrix<Float, 4>>(N);

    std::vector<float> values{0, 1, 2};
    matrix.entry(0, 0) = dr::load<Float>(values.data(), N);
    matrix.entry(0, 1) = dr::load<Float>(values.data(), N);
    (...)

    Transform4f tf(matrix);
    std::cout << tf << std::endl;
}

(this snippet only works for JIT variants, making it work for scalar variants would require some more code)

Another important bit is that now local_dir should …

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@njroussel
Comment options

@yangocean-sudo
Comment options

@njroussel
Comment options

@njroussel
Comment options

@yangocean-sudo
Comment options

Answer selected by njroussel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants