Skip to content

Vector data structure #3

@allo-

Description

@allo-

While you're using a template argument for the vector format, you have quite concrete requirements on the vector (i.e. it needs to implement dot and cross product), without having an example implementation in the repository.
This makes it hard to actually use it in such a generic way (you would for example expect to be able to use std::vector, std::valarray, double[3] for a real generic structure).

But your expected structure works quite fine with libeigen Eigen::Vector3f, if you change a few things:

  • change squared_norm to squaredNorm
  • change Vec3fType(inf) to Vec3fType(inf, inf, inf) everywhere.

Another thing is, that you might consider to make float a template, so data structures using doubles can be used as well (i.e. Eigen::Vector3d).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions