X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fhair.h;h=23aff83e92a68dc5e3d982f473a30680267374c1;hb=6a620a849ee5fc50aacdde2fc1f94749d77d95bc;hp=19fa82ec8bbda3664be008bd878b9690bd25baf5;hpb=da5cbacf755273da510c37c819a59c7fe9894c4e;p=hair diff --git a/src/hair.h b/src/hair.h index 19fa82e..23aff83 100644 --- a/src/hair.h +++ b/src/hair.h @@ -5,10 +5,20 @@ #include "mesh.h" +struct HairStrand { + Vec3 pos; + Vec3 velocity; + /* directions relative to the spawn point */ + Vec3 anchor_dirs[3]; + Vec3 spawn_pt; + Vec3 spawn_dir; +}; + class Hair { private: - std::vector spawn_points; - std::vector spawn_directions; + float hair_length; + std::vector hair; + Mat4 xform; public: Hair(); @@ -16,6 +26,8 @@ public: bool init(const Mesh *m, int num_spawns, float thresh = 0.4); void draw() const; + + void set_transform(Mat4 &xform); }; #endif //PARTICLES_H_