projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better water
[carveJwlIkooP6JGAAIwe30JlM.git]
/
rigidbody.h
diff --git
a/rigidbody.h
b/rigidbody.h
index e374f3fbd6e773cdbc5f33349a5202f576125903..845237f2e5e7b3f15ca7b15576da890d5e4557a8 100644
(file)
--- a/
rigidbody.h
+++ b/
rigidbody.h
@@
-4,15
+4,15
@@
*/
#include "common.h"
*/
#include "common.h"
+#include "bvh.h"
+
static void rb_tangent_basis( v3f n, v3f tx, v3f ty );
static void rb_tangent_basis( v3f n, v3f tx, v3f ty );
+static bh_system bh_system_rigidbodies;
#ifndef RIGIDBODY_H
#define RIGIDBODY_H
#ifndef RIGIDBODY_H
#define RIGIDBODY_H
-#include "bvh.h"
-
#define RB_DEPR
#define RB_DEPR
-
#define k_rb_delta (1.0f/60.0f)
typedef struct rigidbody rigidbody;
#define k_rb_delta (1.0f/60.0f)
typedef struct rigidbody rigidbody;
@@
-289,7
+289,6
@@
static void rb_constraint_angle_limit( struct rb_angle_limit *limit )
}
}
-
RB_DEPR
static void rb_constraint_angle( rigidbody *rba, v3f va,
rigidbody *rbb, v3f vb,
RB_DEPR
static void rb_constraint_angle( rigidbody *rba, v3f va,
rigidbody *rbb, v3f vb,
@@
-384,6
+383,10
@@
static void rb_constraint_position( rigidbody *ra, v3f lca,
v3_add( impulse, ra->I, ra->I );
#if 0
v3_add( impulse, ra->I, ra->I );
#if 0
+ /*
+ * this could be used for spring joints
+ * its not good for position constraint
+ */
v3f impulse;
v3_muls( delta, 0.5f*spring, impulse );
v3f impulse;
v3_muls( delta, 0.5f*spring, impulse );
@@
-583,9
+586,7
@@
static bh_system bh_system_rigidbodies =
.item_centroid = rb_bh_centroid,
.item_swap = rb_bh_swap,
.item_debug = rb_bh_debug,
.item_centroid = rb_bh_centroid,
.item_swap = rb_bh_swap,
.item_debug = rb_bh_debug,
- .cast_ray = NULL,
-
- .item_size = sizeof(rigidbody)
+ .cast_ray = NULL
};
#endif /* RIGIDBODY_H */
};
#endif /* RIGIDBODY_H */