X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fhair.h;h=9ef5130499cba99497baf0d104f4d4491ba8d56e;hb=a65a977df6fa8fee831c91cdc754d62e023b6630;hp=19fa82ec8bbda3664be008bd878b9690bd25baf5;hpb=da5cbacf755273da510c37c819a59c7fe9894c4e;p=hair diff --git a/src/hair.h b/src/hair.h index 19fa82e..9ef5130 100644 --- a/src/hair.h +++ b/src/hair.h @@ -4,11 +4,21 @@ #include #include "mesh.h" +#include "object.h" + +struct HairStrand { + Vec3 pos; + Vec3 velocity; + 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; + std::vector colliders; public: Hair(); @@ -16,6 +26,11 @@ public: bool init(const Mesh *m, int num_spawns, float thresh = 0.4); void draw() const; + + void set_transform(Mat4 &xform); + void update(float dt); + void add_collider(CollSphere *cobj); + Vec3 handle_collision(const Vec3 &v) const; }; #endif //PARTICLES_H_