projects
/
antikythera
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shadows, textures, resource managers... shaders...
[antikythera]
/
src
/
gear.h
diff --git
a/src/gear.h
b/src/gear.h
index
7f230e4
..
f6058a1
100644
(file)
--- a/
src/gear.h
+++ b/
src/gear.h
@@
-39,7
+39,7
@@
class Gear {
private:
Mesh *mesh;
private:
Mesh *mesh;
- mutable Mat4 xform, dir_xform;
+ mutable Mat4 xform, dir_xform, axel_xform;
mutable bool xform_valid;
void calc_matrix() const;
mutable bool xform_valid;
void calc_matrix() const;
@@
-65,12
+65,23
@@
public:
float bevel; // bevel size
float bevel; // bevel size
+ // visual surface properties
+ Vec3 color;
+ float roughness;
+ bool metallic;
+
+ Gear *supergear;
+ std::vector<Gear*> subgears;
std::vector<GearPin> pins;
std::vector<GearSlot> slots;
Gear();
~Gear();
std::vector<GearPin> pins;
std::vector<GearSlot> slots;
Gear();
~Gear();
+ void attach(Gear *g);
+ bool detach(Gear *g);
+ Gear *get_super() const;
+
void set_angular_offset(float offs);
float get_angular_offset() const;
void set_angular_offset(float offs);
float get_angular_offset() const;