projects
/
hair
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
removed the anchor points
[hair]
/
src
/
hair.h
1
#ifndef PARTICLES_H_
2
#define PARTICLES_H_
3
4
#include <gmath/gmath.h>
5
6
#include "mesh.h"
7
8
struct HairStrand {
9
Vec3 pos;
10
Vec3 velocity;
11
Vec3 spawn_pt;
12
Vec3 spawn_dir;
13
};
14
15
class Hair {
16
private:
17
float hair_length;
18
std::vector<HairStrand> hair;
19
Mat4 xform;
20
21
public:
22
Hair();
23
~Hair();
24
25
bool init(const Mesh *m, int num_spawns, float thresh = 0.4);
26
void draw() const;
27
28
void set_transform(Mat4 &xform);
29
void update(float dt);
30
};
31
32
#endif //PARTICLES_H_
33