@@ -96,6 +96,17 @@ namespace s3d
96
96
[[nodiscard]]
97
97
P2Body createLine (P2BodyType bodyType, const Vec2& worldPos, const Line& localPos, OneSided oneSided = OneSided::No, const P2Material& material = {}, const P2Filter& filter = {});
98
98
99
+ // / @brief 線分のセンサー部品を持つ物体を作成します。
100
+ // / @remark 物体は `P2Line` の部品を持ちます。
101
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
102
+ // / @param bodyType 物体の種類(P2BodyType::Dynamic は指定不可)
103
+ // / @param worldPos 物体のワールド座標 (cm)
104
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
105
+ // / @param filter センサーの干渉フィルタ
106
+ // / @return 作成した物体
107
+ [[nodiscard]]
108
+ P2Body createLineSensor (P2BodyType bodyType, const Vec2& worldPos, const Line& localPos, const P2Filter& filter = {});
109
+
99
110
// / @brief 連続する複数の線分を部品として持つ物体を作成します。
100
111
// / @remark 物体は `P2LineString` の部品を持ちます。
101
112
// / @param bodyType 物体の種類(P2BodyType::Dynamic は指定不可)
@@ -108,6 +119,17 @@ namespace s3d
108
119
[[nodiscard]]
109
120
P2Body createLineString (P2BodyType bodyType, const Vec2& worldPos, const LineString& localPos, OneSided oneSided = OneSided::No, const P2Material& material = {}, const P2Filter& filter = {});
110
121
122
+ // / @brief 連続する複数の線分のセンサー部品を持つ物体を作成します。
123
+ // / @remark 物体は `P2LineString` の部品を持ちます。
124
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
125
+ // / @param bodyType 物体の種類(P2BodyType::Dynamic は指定不可)
126
+ // / @param worldPos 物体のワールド座標 (cm)
127
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
128
+ // / @param filter センサーの干渉フィルタ
129
+ // / @return 作成した物体
130
+ [[nodiscard]]
131
+ P2Body createLineStringSensor (P2BodyType bodyType, const Vec2& worldPos, const LineString& localPos, const P2Filter& filter = {});
132
+
111
133
// / @brief 連続する複数の線分(終点と始点を結ぶ)を部品として持つ物体を作成します。
112
134
// / @remark 物体は `P2LineString` の部品を持ちます。
113
135
// / @param bodyType 物体の種類(P2BodyType::Dynamic は指定不可)
@@ -120,6 +142,17 @@ namespace s3d
120
142
[[nodiscard]]
121
143
P2Body createClosedLineString (P2BodyType bodyType, const Vec2& worldPos, const LineString& localPos, OneSided oneSided = OneSided::No, const P2Material& material = {}, const P2Filter& filter = {});
122
144
145
+ // / @brief 連続する複数の線分(終点と始点を結ぶ)のセンサー部品を持つ物体を作成します。
146
+ // / @remark 物体は `P2LineString` の部品を持ちます。
147
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
148
+ // / @param bodyType 物体の種類(P2BodyType::Dynamic は指定不可)
149
+ // / @param worldPos 物体のワールド座標 (cm)
150
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
151
+ // / @param filter センサーの干渉フィルタ
152
+ // / @return 作成した物体
153
+ [[nodiscard]]
154
+ P2Body createClosedLineStringSensor (P2BodyType bodyType, const Vec2& worldPos, const LineString& localPos, const P2Filter& filter = {});
155
+
123
156
// / @brief 円を部品として持つ物体を作成します。
124
157
// / @remark 物体は `P2Circle` の部品を持ちます。
125
158
// / @remark 円の中心座標は `worldPos` です。
@@ -154,6 +187,17 @@ namespace s3d
154
187
[[nodiscard]]
155
188
P2Body createCircleSensor (P2BodyType bodyType, const Vec2& worldPos, double r, const P2Filter& filter = {});
156
189
190
+ // / @brief 円形のセンサー部品を持つ物体を作成します。
191
+ // / @remark 物体は `P2Circle` の部品を持ちます。
192
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
193
+ // / @param bodyType 物体の種類
194
+ // / @param worldPos 物体のワールド座標 (cm)
195
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
196
+ // / @param filter センサーの干渉フィルタ
197
+ // / @return 作成した物体
198
+ [[nodiscard]]
199
+ P2Body createCircleSensor (P2BodyType bodyType, const Vec2& worldPos, const Circle& localPos, const P2Filter& filter = {});
200
+
157
201
// / @brief 正方形を部品として持つ物体を作成します。
158
202
// / @remark 物体は `P2Rect` の部品を持ちます。
159
203
// / @remark 正方形の中心座標は `worldPos` です。
@@ -189,6 +233,41 @@ namespace s3d
189
233
[[nodiscard]]
190
234
P2Body createRect (P2BodyType bodyType, const Vec2& worldPos, const RectF& localPos, const P2Material& material = {}, const P2Filter& filter = {});
191
235
236
+ // / @brief 正方形のセンサー部品を持つ物体を作成します。
237
+ // / @remark 物体は `P2Rect` の部品を持ちます。
238
+ // / @remark 正方形の中心座標は `worldPos` です。
239
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
240
+ // / @param bodyType 物体の種類
241
+ // / @param worldPos 物体のワールド座標 (cm)
242
+ // / @param size センサーの一辺の長さ (cm)
243
+ // / @param filter センサーの干渉フィルタ
244
+ // / @return 作成した物体
245
+ [[nodiscard]]
246
+ P2Body createRectSensor (P2BodyType bodyType, const Vec2& worldPos, double size, const P2Filter& filter = {});
247
+
248
+ // / @brief 長方形のセンサー部品を持つ物体を作成します。
249
+ // / @remark 物体は `P2Rect` の部品を持ちます。
250
+ // / @remark 長方形の中心座標は `worldPos` です。
251
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
252
+ // / @param bodyType 物体の種類
253
+ // / @param worldPos 物体のワールド座標 (cm)
254
+ // / @param size センサーの幅と高さ (cm)
255
+ // / @param filter センサーの干渉フィルタ
256
+ // / @return 作成した物体
257
+ [[nodiscard]]
258
+ P2Body createRectSensor (P2BodyType bodyType, const Vec2& worldPos, const SizeF& size, const P2Filter& filter = {});
259
+
260
+ // / @brief 長方形のセンサー部品を持つ物体を作成します。
261
+ // / @remark 物体は `P2Rect` の部品を持ちます。
262
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
263
+ // / @param bodyType 物体の種類
264
+ // / @param worldPos 物体のワールド座標 (cm)
265
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
266
+ // / @param filter センサーの干渉フィルタ
267
+ // / @return 作成した物体
268
+ [[nodiscard]]
269
+ P2Body createRectSensor (P2BodyType bodyType, const Vec2& worldPos, const RectF& localPos, const P2Filter& filter = {});
270
+
192
271
// / @brief 三角形を部品として持つ物体を作成します。
193
272
// / @remark 物体は `P2Triangle` の部品を持ちます。
194
273
// / @param bodyType 物体の種類
@@ -200,6 +279,17 @@ namespace s3d
200
279
[[nodiscard]]
201
280
P2Body createTriangle (P2BodyType bodyType, const Vec2& worldPos, const Triangle& localPos, const P2Material& material = {}, const P2Filter& filter = {});
202
281
282
+ // / @brief 三角形のセンサー部品を持つ物体を作成します。
283
+ // / @remark 物体は `P2Triangle` の部品を持ちます。
284
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
285
+ // / @param bodyType 物体の種類
286
+ // / @param worldPos 物体のワールド座標 (cm)
287
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
288
+ // / @param filter センサーの干渉フィルタ
289
+ // / @return 作成した物体
290
+ [[nodiscard]]
291
+ P2Body createTriangleSensor (P2BodyType bodyType, const Vec2& worldPos, const Triangle& localPos, const P2Filter& filter = {});
292
+
203
293
// / @brief 凸な四角形を部品として持つ物体を作成します。
204
294
// / @remark 物体は `P2Quad` の部品を持ちます。
205
295
// / @param bodyType 物体の種類
@@ -211,6 +301,16 @@ namespace s3d
211
301
[[nodiscard]]
212
302
P2Body createQuad (P2BodyType bodyType, const Vec2& worldPos, const Quad& localPos, const P2Material& material = {}, const P2Filter& filter = {});
213
303
304
+ // / @brief 凸な四角形のセンサー部品を持つ物体を作成します。
305
+ // / @remark 物体は `P2Quad` の部品を持ちます。
306
+ // / @param bodyType 物体の種類
307
+ // / @param worldPos 物体のワールド座標 (cm)
308
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
309
+ // / @param filter センサーの干渉フィルタ
310
+ // / @return 作成した物体
311
+ [[nodiscard]]
312
+ P2Body createQuadSensor (P2BodyType bodyType, const Vec2& worldPos, const Quad& localPos, const P2Filter& filter = {});
313
+
214
314
// / @brief 多角形を部品として持つ物体を作成します。
215
315
// / @remark 物体は `P2Polygon` の部品を持ちます。
216
316
// / @param bodyType 物体の種類
@@ -222,6 +322,17 @@ namespace s3d
222
322
[[nodiscard]]
223
323
P2Body createPolygon (P2BodyType bodyType, const Vec2& worldPos, const Polygon& localPos, const P2Material& material = {}, const P2Filter& filter = {});
224
324
325
+ // / @brief 多角形のセンサー部品を持つ物体を作成します。
326
+ // / @remark 物体は `P2Polygon` の部品を持ちます。
327
+ // / @remark センサーは他の物体と干渉しませんが接触情報は発生します。
328
+ // / @param bodyType 物体の種類
329
+ // / @param worldPos 物体のワールド座標 (cm)
330
+ // / @param localPos `worldPos` から見たローカルでの形状の座標 (cm)
331
+ // / @param filter センサーの干渉フィルタ
332
+ // / @return 作成した物体
333
+ [[nodiscard]]
334
+ P2Body createPolygonSensor (P2BodyType bodyType, const Vec2& worldPos, const Polygon& localPos, const P2Filter& filter = {});
335
+
225
336
// / @brief 複数の多角形を部品として持つ物体を作成します。
226
337
// / @remark 物体は複数の `P2Polygon` の部品を持ちます。
227
338
// / @param bodyType 物体の種類
0 commit comments