projects
/
hair
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Failed hack for collision detection with a sphere.
[hair]
/
src
/
hair.h
diff --git
a/src/hair.h
b/src/hair.h
index
5ef54d0
..
9ef5130
100644
(file)
--- a/
src/hair.h
+++ b/
src/hair.h
@@
-4,6
+4,7
@@
#include <gmath/gmath.h>
#include "mesh.h"
#include <gmath/gmath.h>
#include "mesh.h"
+#include "object.h"
struct HairStrand {
Vec3 pos;
struct HairStrand {
Vec3 pos;
@@
-17,6
+18,7
@@
private:
float hair_length;
std::vector<HairStrand> hair;
Mat4 xform;
float hair_length;
std::vector<HairStrand> hair;
Mat4 xform;
+ std::vector<CollSphere *> colliders;
public:
Hair();
public:
Hair();
@@
-27,6
+29,8
@@
public:
void set_transform(Mat4 &xform);
void update(float dt);
void set_transform(Mat4 &xform);
void update(float dt);
+ void add_collider(CollSphere *cobj);
+ Vec3 handle_collision(const Vec3 &v) const;
};
#endif //PARTICLES_H_
};
#endif //PARTICLES_H_