Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

didn't need those fields

  • Loading branch information...
commit 31ad22fe5aabc9750c389032423fa3fbe70b1a0d 1 parent 577adcf
@dwrensha dwrensha authored
View
20 sml-lib/bdd/cells-sig.sml
@@ -210,12 +210,6 @@ sig
val get_body_a : ('b, 'f, 'j) joint -> (('b, 'f, 'j) body)
val get_body_b : ('b, 'f, 'j) joint -> (('b, 'f, 'j) body)
val get_data : ('b, 'f, 'j) joint -> ('j)
- val get_local_center_a : ('b, 'f, 'j) joint -> (BDDMath.vec2)
- val get_local_center_b : ('b, 'f, 'j) joint -> (BDDMath.vec2)
- val get_inv_mass_a : ('b, 'f, 'j) joint -> (real)
- val get_inv_i_a : ('b, 'f, 'j) joint -> (real)
- val get_inv_mass_b : ('b, 'f, 'j) joint -> (real)
- val get_inv_i_b : ('b, 'f, 'j) joint -> (real)
val set_flags : ('b, 'f, 'j) joint * (Word8.word) -> unit
val set_typ : ('b, 'f, 'j) joint * (BDDDynamicsTypes.joint_type option) -> unit
@@ -227,12 +221,6 @@ sig
val set_body_a : ('b, 'f, 'j) joint * (('b, 'f, 'j) body) -> unit
val set_body_b : ('b, 'f, 'j) joint * (('b, 'f, 'j) body) -> unit
val set_data : ('b, 'f, 'j) joint * ('j) -> unit
- val set_local_center_a : ('b, 'f, 'j) joint * (BDDMath.vec2) -> unit
- val set_local_center_b : ('b, 'f, 'j) joint * (BDDMath.vec2) -> unit
- val set_inv_mass_a : ('b, 'f, 'j) joint * (real) -> unit
- val set_inv_i_a : ('b, 'f, 'j) joint * (real) -> unit
- val set_inv_mass_b : ('b, 'f, 'j) joint * (real) -> unit
- val set_inv_i_b : ('b, 'f, 'j) joint * (real) -> unit
val new : {
flags : Word8.word,
@@ -244,13 +232,7 @@ sig
edge_b : ('b, 'f, 'j) jointedge,
body_a : ('b, 'f, 'j) body,
body_b : ('b, 'f, 'j) body,
- data : 'j,
- local_center_a : BDDMath.vec2,
- local_center_b : BDDMath.vec2,
- inv_mass_a : real,
- inv_i_a : real,
- inv_mass_b : real,
- inv_i_b : real } -> ('b, 'f, 'j) joint
+ data : 'j } -> ('b, 'f, 'j) joint
val eq : ('b, 'f, 'j) joint * ('b, 'f, 'j) joint -> bool
end
View
28 sml-lib/bdd/cells.sml
@@ -71,13 +71,7 @@ struct
edge_b : (('b, 'f, 'j) jointedgecell) ref,
body_a : (('b, 'f, 'j) bodycell) ref,
body_b : (('b, 'f, 'j) bodycell) ref,
- data : ('j) ref,
- local_center_a : (BDDMath.vec2) ref,
- local_center_b : (BDDMath.vec2) ref,
- inv_mass_a : (real) ref,
- inv_i_a : (real) ref,
- inv_mass_b : (real) ref,
- inv_i_b : (real) ref }
+ data : ('j) ref }
and ('b, 'f, 'j) jointedgecell = G of {
other : (('b, 'f, 'j) bodycell) ref,
@@ -275,12 +269,6 @@ struct
fun get_body_a (J { body_a, ... }) = !body_a
fun get_body_b (J { body_b, ... }) = !body_b
fun get_data (J { data, ... }) = !data
- fun get_local_center_a (J { local_center_a, ... }) = !local_center_a
- fun get_local_center_b (J { local_center_b, ... }) = !local_center_b
- fun get_inv_mass_a (J { inv_mass_a, ... }) = !inv_mass_a
- fun get_inv_i_a (J { inv_i_a, ... }) = !inv_i_a
- fun get_inv_mass_b (J { inv_mass_b, ... }) = !inv_mass_b
- fun get_inv_i_b (J { inv_i_b, ... }) = !inv_i_b
fun set_flags (J { flags, ... }, v) = flags := v
fun set_typ (J { typ, ... }, v) = typ := v
fun set_dispatch (J { dispatch, ... }, v) = dispatch := v
@@ -291,21 +279,11 @@ struct
fun set_body_a (J { body_a, ... }, v) = body_a := v
fun set_body_b (J { body_b, ... }, v) = body_b := v
fun set_data (J { data, ... }, v) = data := v
- fun set_local_center_a (J { local_center_a, ... }, v) = local_center_a := v
- fun set_local_center_b (J { local_center_b, ... }, v) = local_center_b := v
- fun set_inv_mass_a (J { inv_mass_a, ... }, v) = inv_mass_a := v
- fun set_inv_i_a (J { inv_i_a, ... }, v) = inv_i_a := v
- fun set_inv_mass_b (J { inv_mass_b, ... }, v) = inv_mass_b := v
- fun set_inv_i_b (J { inv_i_b, ... }, v) = inv_i_b := v
fun new ({ flags, typ, dispatch, prev, next, edge_a, edge_b, body_a,
- body_b, data, local_center_a, local_center_b, inv_mass_a, inv_i_a,
- inv_mass_b, inv_i_b }) =
+ body_b, data }) =
J { flags = ref flags, typ = ref typ, dispatch = ref dispatch, prev = ref
prev, next = ref next, edge_a = ref edge_a, edge_b = ref edge_b, body_a =
- ref body_a, body_b = ref body_b, data = ref data, local_center_a = ref
- local_center_a, local_center_b = ref local_center_b, inv_mass_a = ref
- inv_mass_a, inv_i_a = ref inv_i_a, inv_mass_b = ref inv_mass_b, inv_i_b =
- ref inv_i_b }
+ ref body_a, body_b = ref body_b, data = ref data }
fun eq (J { flags, ... }, J { flags = r___, ... }) =
flags = r___
end
View
8 sml-lib/bdd/dynamics.sml
@@ -173,13 +173,7 @@ struct
edge_b = G.new (body_a),
body_a = body_a,
body_b = body_b,
- data = user_data,
- local_center_a = vec2 (0.0, 0.0),
- local_center_b = vec2 (0.0, 0.0),
- inv_mass_a = 0.0,
- inv_i_a = 0.0,
- inv_mass_b = 0.0,
- inv_i_b = 0.0
+ data = user_data
}
val (dispatch, methods) = constructor joint
val () = set_dispatch (joint, SOME dispatch)
View
10 sml-lib/bdd/metautil.sml
@@ -116,15 +116,7 @@ fun joint cc = ("J", "Joint", "joint", "JOINT",
("edge_b", cc "jointedge" ^ ""),
("body_a", cc "body" ^ ""),
("body_b", cc "body" ^ ""),
- ("data", "'j"),
- (* Cache here per time step to reduce cache misses.
- PERF: This is probably not a good idea in the SML port. *)
- ("local_center_a", "BDDMath.vec2"),
- ("local_center_b", "BDDMath.vec2"),
- ("inv_mass_a", "real"),
- ("inv_i_a", "real"),
- ("inv_mass_b", "real"),
- ("inv_i_b", "real")])
+ ("data", "'j")])
(* A joint edge is used to connect bodies and joints together
in a joint graph where each body is a node and each joint

0 comments on commit 31ad22f

Please sign in to comment.
Something went wrong with that request. Please try again.