Skip to content
Newer
Older
100644 87 lines (73 sloc) 2 KB
d5f1ddc @dharmatech Apache License 2.0
authored Jan 26, 2016
1 ;; Copyright 2016 Eduardo Cavazos
2 ;;
3 ;; Licensed under the Apache License, Version 2.0 (the "License");
4 ;; you may not use this file except in compliance with the License.
5 ;; You may obtain a copy of the License at
6 ;;
7 ;; http://www.apache.org/licenses/LICENSE-2.0
8 ;;
9 ;; Unless required by applicable law or agreed to in writing, software
10 ;; distributed under the License is distributed on an "AS IS" BASIS,
11 ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 ;; See the License for the specific language governing permissions and
13 ;; limitations under the License.
e01e975 @dharmatech first commit
authored Dec 24, 2009
14
15 (library (box2d-lite contact)
16
17 (export make-contact
18
19 is-contact
20 import-contact
21
22 contact-position
23 contact-normal
24 contact-r1
25 contact-r2
26 contact-separation
27 contact-pn
28 contact-pt
29 contact-pnb
30 contact-mass-normal
31 contact-mass-tangent
32 contact-bias
33 contact-feature
34
35 contact-position-set!
36 contact-normal-set!
37 contact-r1-set!
38 contact-r2-set!
39 contact-separation-set!
40 contact-pn-set!
41 contact-pt-set!
42 contact-pnb-set!
43 contact-mass-normal-set!
44 contact-mass-tangent-set!
45 contact-bias-set!
46 contact-feature-set!
47
d5d452c @dharmatech Simplify feature-pair related code. Now simply uses 'edges' directly.
authored Jan 11, 2010
48 create-contact)
e01e975 @dharmatech first commit
authored Dec 24, 2009
49
50 (import (rnrs)
51 (box2d-lite util define-record-type)
52 (box2d-lite vec)
9e93958 @dharmatech More changes for rename to (box2d-lite edges)
authored Jan 17, 2010
53 (box2d-lite edges))
e01e975 @dharmatech first commit
authored Dec 24, 2009
54
55 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56
57 (define-record-type++ contact
58 is-contact
59 import-contact
60 (fields (mutable position)
61 (mutable normal)
62 (mutable r1)
63 (mutable r2)
64 (mutable separation)
65 (mutable pn)
66 (mutable pt)
67 (mutable pnb)
68 (mutable mass-normal)
69 (mutable mass-tangent)
70 (mutable bias)
71 (mutable feature))
72 (methods))
73
74 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
75
76 (define (create-contact)
77 (make-contact (make-vec 0 0)
78 (make-vec 0 0)
79 (make-vec 0 0)
80 (make-vec 0 0)
81 0 0.0 0.0 0.0 0 0 0
d5d452c @dharmatech Simplify feature-pair related code. Now simply uses 'edges' directly.
authored Jan 12, 2010
82 (create-edges)))
e01e975 @dharmatech first commit
authored Dec 24, 2009
83
84 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
85
86 )
87
Something went wrong with that request. Please try again.