15 int main(
int argc,
char *argv[]) {
17 "Show some of the basics of using a grid from C++.");
29 IMP_FOREACH(Grid::Index i, grid.get_all_indexes()) {
35 std::cout <<
"Smooth" << std::endl;
36 for (
double x = .5; x < 4; x += .1) {
39 std::cout << vo <<
" ";
41 std::cout << std::endl;
43 std::cout <<
"Chunky" << std::endl;
44 for (
double x = .5; x < 4; x += .1) {
46 std::cout << vo <<
" ";
48 std::cout << std::endl;
A voxel grid in d-dimensional space.
#define IMP_FOREACH(v, r)
Functions to generate vectors.
Value get_linearly_interpolated(const GridD< D, Storage, Value, Embedding > &g, const VectorD< D > &pt)
Get the value from the grid with linear interpolation.
Support for shared command line flags.
All grids that are in the Python API should be defined here.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.
double get_distance(const Line3D &s, const Vector3D &p)
Get closest distance between a line and a point.