projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework scene format
[carveJwlIkooP6JGAAIwe30JlM.git]
/
rigidbody.h
diff --git
a/rigidbody.h
b/rigidbody.h
index aa74a8477436296d4932a02ae91691cb2096cdfc..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 );