Commit ac7880207a6bac4ddf179ab7f256f6afb447309a

Authored by David Mayerich
1 parent d6b53731

fixed 1D vertex specification in OBJ

Showing 1 changed file with 5 additions and 2 deletions   Show diff stats
stim/visualization/obj.h
... ... @@ -8,8 +8,6 @@
8 8 #include <stim/parser/parser.h>
9 9 #include <stim/math/mathvec.h>
10 10  
11   -#include <ANN/ANN.h>
12   -
13 11 namespace stim{
14 12  
15 13 /** This class provides an interface for loading, saving, and working with Wavefront OBJ files.
... ... @@ -42,9 +40,14 @@ protected:
42 40 using vec<T>::push_back;
43 41 using vec<T>::size;
44 42 using vec<T>::at;
  43 + using vec<T>::resize;
45 44  
46 45 //basic constructors (call the stim::vector constructors)
47 46 vertex(){}
  47 + vertex(T x){
  48 + resize(1);
  49 + at(0) = x;
  50 + }
48 51 vertex(T x, T y) : stim::vec<T>(x, y){}
49 52 vertex(T x, T y, T z) : stim::vec<T>(x, y, z){}
50 53 vertex(T x, T y, T z, T w) : stim::vec<T>(x, y, z, w){}
... ...