|
1 | 1 | /* |
2 | | -Copyright (c) 2024-2025 Stephen Gold |
| 2 | +Copyright (c) 2024-2026 Stephen Gold |
3 | 3 |
|
4 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy |
5 | 5 | of this software and associated documentation files (the "Software"), to deal |
@@ -50,59 +50,27 @@ void onAdjustBodyVelocity( |
50 | 50 | * |
51 | 51 | * @param characterVa the virtual address of the {@code CharacterVirtual} |
52 | 52 | * being solved (not zero) |
53 | | - * @param otherCharacterVa the virtual address of the other |
54 | | - * {@code CharacterVirtual} (not zero) |
55 | | - * @param subShapeId2 the {@code SubShapeID} of the shape that is in contact |
56 | | - * @param contactLocationX the X component of the contact location (in |
57 | | - * system coordinates) |
58 | | - * @param contactLocationY the Y component of the contact location (in |
59 | | - * system coordinates) |
60 | | - * @param contactLocationZ the Z component of the contact location (in |
61 | | - * system coordinates) |
62 | | - * @param contactNormalX the X component of the contact normal (in system |
63 | | - * coordinates) |
64 | | - * @param contactNormalY the Y component of the contact normal (in system |
65 | | - * coordinates) |
66 | | - * @param contactNormalZ the Z component of the contact normal (in system |
67 | | - * coordinates) |
| 53 | + * @param contactVa the virtual address of the {@code Contact} (not zero) |
68 | 54 | * @param settingsVa the virtual address of the |
69 | | - * {@code CharacterContactSettings} for storing the desired behavior |
| 55 | + * {@code CharacterContactSettings} for storing the desired behavior (not |
| 56 | + * zero) |
70 | 57 | */ |
71 | | - void onCharacterContactAdded(long characterVa, long otherCharacterVa, |
72 | | - int subShapeId2, double contactLocationX, |
73 | | - double contactLocationY, double contactLocationZ, |
74 | | - float contactNormalX, float contactNormalY, float contactNormalZ, |
75 | | - long settingsVa); |
| 58 | + void onCharacterContactAdded( |
| 59 | + long characterVa, long contactVa, long settingsVa); |
76 | 60 |
|
77 | 61 | /** |
78 | 62 | * Callback invoked (by native code) whenever a contact between 2 characters |
79 | 63 | * becomes persistent. |
80 | 64 | * |
81 | 65 | * @param characterVa the virtual address of the {@code CharacterVirtual} |
82 | 66 | * being solved (not zero) |
83 | | - * @param otherCharacterVa the virtual address of the other |
84 | | - * {@code CharacterVirtual} (not zero) |
85 | | - * @param subShapeId2 the {@code SubShapeID} of the shape that is in contact |
86 | | - * @param contactLocationX the X component of the contact location (in |
87 | | - * system coordinates) |
88 | | - * @param contactLocationY the Y component of the contact location (in |
89 | | - * system coordinates) |
90 | | - * @param contactLocationZ the Z component of the contact location (in |
91 | | - * system coordinates) |
92 | | - * @param contactNormalX the X component of the contact normal (in system |
93 | | - * coordinates) |
94 | | - * @param contactNormalY the Y component of the contact normal (in system |
95 | | - * coordinates) |
96 | | - * @param contactNormalZ the Z component of the contact normal (in system |
97 | | - * coordinates) |
| 67 | + * @param contactVa the virtual address of the {@code Contact} (not zero) |
98 | 68 | * @param settingsVa the virtual address of the |
99 | | - * {@code CharacterContactSettings} for storing the desired behavior |
| 69 | + * {@code CharacterContactSettings} for storing the desired behavior (not |
| 70 | + * zero) |
100 | 71 | */ |
101 | | - void onCharacterContactPersisted(long characterVa, long otherCharacterVa, |
102 | | - int subShapeId2, double contactLocationX, |
103 | | - double contactLocationY, double contactLocationZ, |
104 | | - float contactNormalX, float contactNormalY, float contactNormalZ, |
105 | | - long settingsVa); |
| 72 | + void onCharacterContactPersisted( |
| 73 | + long characterVa, long contactVa, long settingsVa); |
106 | 74 |
|
107 | 75 | /** |
108 | 76 | * Callback invoked (by native code) whenever a contact between 2 characters |
@@ -169,70 +137,36 @@ void onCharacterContactSolve(long characterVa, long otherCharacterVa, |
169 | 137 | * |
170 | 138 | * @param characterVa the virtual address of the {@code CharacterVirtual} |
171 | 139 | * being solved (not zero) |
172 | | - * @param otherCharacterVa the virtual address of the other |
173 | | - * {@code CharacterVirtual} (not zero) |
174 | | - * @param subShapeId2 the {@code SubShapeID} of the shape that is in contact |
| 140 | + * @param contactVa the virtual address of the {@code Contact} (not zero) |
175 | 141 | * @return {@code true} if the contact is valid, otherwise {@code false} |
176 | 142 | */ |
177 | | - boolean onCharacterContactValidate( |
178 | | - long characterVa, long otherCharacterVa, int subShapeId2); |
| 143 | + boolean onCharacterContactValidate(long characterVa, long contactVa); |
179 | 144 |
|
180 | 145 | /** |
181 | 146 | * Callback invoked (by native code) whenever a character collides with a |
182 | 147 | * body. |
183 | 148 | * |
184 | 149 | * @param characterVa the virtual address of the {@code CharacterVirtual} |
185 | 150 | * being solved (not zero) |
186 | | - * @param bodyId2 the ID of the body being solved |
187 | | - * @param subShapeId2 the {@code SubShapeID} of the shape that is in contact |
188 | | - * @param contactLocationX the X component of the contact location (in |
189 | | - * system coordinates) |
190 | | - * @param contactLocationY the Y component of the contact location (in |
191 | | - * system coordinates) |
192 | | - * @param contactLocationZ the Z component of the contact location (in |
193 | | - * system coordinates) |
194 | | - * @param contactNormalX the X component of the contact normal (in system |
195 | | - * coordinates) |
196 | | - * @param contactNormalY the Y component of the contact normal (in system |
197 | | - * coordinates) |
198 | | - * @param contactNormalZ the Z component of the contact normal (in system |
199 | | - * coordinates) |
| 151 | + * @param contactVa the virtual address of the {@code Contact} (not zero) |
200 | 152 | * @param settingsVa the virtual address of the |
201 | | - * {@code CharacterContactSettings} for storing the desired behavior |
| 153 | + * {@code CharacterContactSettings} for storing the desired behavior (not |
| 154 | + * zero) |
202 | 155 | */ |
203 | | - void onContactAdded(long characterVa, int bodyId2, int subShapeId2, |
204 | | - double contactLocationX, double contactLocationY, |
205 | | - double contactLocationZ, float contactNormalX, float contactNormalY, |
206 | | - float contactNormalZ, long settingsVa); |
| 156 | + void onContactAdded(long characterVa, long contactVa, long settingsVa); |
207 | 157 |
|
208 | 158 | /** |
209 | 159 | * Callback invoked (by native code) whenever a contact between a character |
210 | 160 | * and a body becomes persistent. |
211 | 161 | * |
212 | 162 | * @param characterVa the virtual address of the {@code CharacterVirtual} |
213 | 163 | * being solved (not zero) |
214 | | - * @param bodyId2 the ID of the body being solved |
215 | | - * @param subShapeId2 the {@code SubShapeID} of the shape that is in contact |
216 | | - * @param contactLocationX the X component of the contact location (in |
217 | | - * system coordinates) |
218 | | - * @param contactLocationY the Y component of the contact location (in |
219 | | - * system coordinates) |
220 | | - * @param contactLocationZ the Z component of the contact location (in |
221 | | - * system coordinates) |
222 | | - * @param contactNormalX the X component of the contact normal (in system |
223 | | - * coordinates) |
224 | | - * @param contactNormalY the Y component of the contact normal (in system |
225 | | - * coordinates) |
226 | | - * @param contactNormalZ the Z component of the contact normal (in system |
227 | | - * coordinates) |
| 164 | + * @param contactVa the virtual address of the {@code Contact} (not zero) |
228 | 165 | * @param settingsVa the virtual address of the |
229 | | - * {@code CharacterContactSettings} for storing the desired behavior |
| 166 | + * {@code CharacterContactSettings} for storing the desired behavior (not |
| 167 | + * zero) |
230 | 168 | */ |
231 | | - void onContactPersisted(long characterVa, int bodyId2, |
232 | | - int subShapeId2, double contactLocationX, |
233 | | - double contactLocationY, double contactLocationZ, |
234 | | - float contactNormalX, float contactNormalY, float contactNormalZ, |
235 | | - long settingsVa); |
| 169 | + void onContactPersisted(long characterVa, long contactVa, long settingsVa); |
236 | 170 |
|
237 | 171 | /** |
238 | 172 | * Callback invoked (by native code) whenever a contact between a character |
@@ -296,10 +230,8 @@ void onContactSolve(long characterVa, int bodyId2, int subShapeId2, |
296 | 230 | * |
297 | 231 | * @param characterVa the virtual address of the {@code CharacterVirtual} |
298 | 232 | * being solved (not zero) |
299 | | - * @param bodyId2 the ID of the body being solved |
300 | | - * @param subShapeId2 the {@code SubShapeID} of the shape that is in contact |
301 | | - * (not zero) |
| 233 | + * @param contactVa the virtual address of the {@code Contact} (not zero) |
302 | 234 | * @return {@code true} if the contact is valid, otherwise {@code false} |
303 | 235 | */ |
304 | | - boolean onContactValidate(long characterVa, int bodyId2, int subShapeId2); |
| 236 | + boolean onContactValidate(long characterVa, long contactVa); |
305 | 237 | } |
0 commit comments