| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include <assert.h> |
| 12 |
#include <stddef.h> |
| 13 |
|
| 14 |
|
| 15 |
#define MESHOPTIMIZER_VERSION 1000 |
| 16 |
|
| 17 |
|
| 18 |
#ifndef MESHOPTIMIZER_API |
| 19 |
#define MESHOPTIMIZER_API |
| 20 |
#endif |
| 21 |
|
| 22 |
|
| 23 |
#ifndef MESHOPTIMIZER_ALLOC_CALLCONV |
| 24 |
#ifdef _MSC_VER |
| 25 |
#define MESHOPTIMIZER_ALLOC_CALLCONV __cdecl |
| 26 |
#else |
| 27 |
#define MESHOPTIMIZER_ALLOC_CALLCONV |
| 28 |
#endif |
| 29 |
#endif |
| 30 |
|
| 31 |
|
| 32 |
#ifndef MESHOPTIMIZER_EXPERIMENTAL |
| 33 |
#define MESHOPTIMIZER_EXPERIMENTAL MESHOPTIMIZER_API |
| 34 |
#endif |
| 35 |
|
| 36 |
|
| 37 |
#ifdef __cplusplus |
| 38 |
extern "C" |
| 39 |
{ |
| 40 |
#endif |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
struct meshopt_Stream |
| 47 |
{ |
| 48 |
const void* data; |
| 49 |
size_t size; |
| 50 |
size_t stride; |
| 51 |
}; |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
MESHOPTIMIZER_API size_t meshopt_generateVertexRemap(unsigned int* destination, const unsigned int* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size); |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
MESHOPTIMIZER_API size_t meshopt_generateVertexRemapMulti(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count, const struct meshopt_Stream* streams, size_t stream_count); |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
MESHOPTIMIZER_API size_t meshopt_generateVertexRemapCustom(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, int (*callback)(void*, unsigned int, unsigned int), void* context); |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
MESHOPTIMIZER_API void meshopt_remapVertexBuffer(void* destination, const void* vertices, size_t vertex_count, size_t vertex_size, const unsigned int* remap); |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
MESHOPTIMIZER_API void meshopt_remapIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const unsigned int* remap); |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
MESHOPTIMIZER_API void meshopt_generateShadowIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size, size_t vertex_stride); |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
MESHOPTIMIZER_API void meshopt_generateShadowIndexBufferMulti(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count, const struct meshopt_Stream* streams, size_t stream_count); |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
MESHOPTIMIZER_API void meshopt_generatePositionRemap(unsigned int* destination, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
MESHOPTIMIZER_API void meshopt_generateAdjacencyIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
MESHOPTIMIZER_API void meshopt_generateTessellationIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
MESHOPTIMIZER_API size_t meshopt_generateProvokingIndexBuffer(unsigned int* destination, unsigned int* reorder, const unsigned int* indices, size_t index_count, size_t vertex_count); |
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
MESHOPTIMIZER_API void meshopt_optimizeVertexCache(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count); |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
MESHOPTIMIZER_API void meshopt_optimizeVertexCacheStrip(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count); |
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
MESHOPTIMIZER_API void meshopt_optimizeVertexCacheFifo(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count, unsigned int cache_size); |
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
MESHOPTIMIZER_API void meshopt_optimizeOverdraw(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float threshold); |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
MESHOPTIMIZER_API size_t meshopt_optimizeVertexFetch(void* destination, unsigned int* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size); |
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
MESHOPTIMIZER_API size_t meshopt_optimizeVertexFetchRemap(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count); |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
MESHOPTIMIZER_API size_t meshopt_encodeIndexBuffer(unsigned char* buffer, size_t buffer_size, const unsigned int* indices, size_t index_count); |
| 251 |
MESHOPTIMIZER_API size_t meshopt_encodeIndexBufferBound(size_t index_count, size_t vertex_count); |
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
MESHOPTIMIZER_API void meshopt_encodeIndexVersion(int version); |
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
MESHOPTIMIZER_API int meshopt_decodeIndexBuffer(void* destination, size_t index_count, size_t index_size, const unsigned char* buffer, size_t buffer_size); |
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
MESHOPTIMIZER_API int meshopt_decodeIndexVersion(const unsigned char* buffer, size_t buffer_size); |
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
MESHOPTIMIZER_API size_t meshopt_encodeIndexSequence(unsigned char* buffer, size_t buffer_size, const unsigned int* indices, size_t index_count); |
| 286 |
MESHOPTIMIZER_API size_t meshopt_encodeIndexSequenceBound(size_t index_count, size_t vertex_count); |
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
MESHOPTIMIZER_API int meshopt_decodeIndexSequence(void* destination, size_t index_count, size_t index_size, const unsigned char* buffer, size_t buffer_size); |
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
MESHOPTIMIZER_API size_t meshopt_encodeVertexBuffer(unsigned char* buffer, size_t buffer_size, const void* vertices, size_t vertex_count, size_t vertex_size); |
| 310 |
MESHOPTIMIZER_API size_t meshopt_encodeVertexBufferBound(size_t vertex_count, size_t vertex_size); |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
MESHOPTIMIZER_API size_t meshopt_encodeVertexBufferLevel(unsigned char* buffer, size_t buffer_size, const void* vertices, size_t vertex_count, size_t vertex_size, int level, int version); |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
MESHOPTIMIZER_API void meshopt_encodeVertexVersion(int version); |
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
MESHOPTIMIZER_API int meshopt_decodeVertexBuffer(void* destination, size_t vertex_count, size_t vertex_size, const unsigned char* buffer, size_t buffer_size); |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
MESHOPTIMIZER_API int meshopt_decodeVertexVersion(const unsigned char* buffer, size_t buffer_size); |
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
MESHOPTIMIZER_API void meshopt_decodeFilterOct(void* buffer, size_t count, size_t stride); |
| 367 |
MESHOPTIMIZER_API void meshopt_decodeFilterQuat(void* buffer, size_t count, size_t stride); |
| 368 |
MESHOPTIMIZER_API void meshopt_decodeFilterExp(void* buffer, size_t count, size_t stride); |
| 369 |
MESHOPTIMIZER_API void meshopt_decodeFilterColor(void* buffer, size_t count, size_t stride); |
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
enum meshopt_EncodeExpMode |
| 392 |
{ |
| 393 |
|
| 394 |
meshopt_EncodeExpSeparate, |
| 395 |
|
| 396 |
meshopt_EncodeExpSharedVector, |
| 397 |
|
| 398 |
meshopt_EncodeExpSharedComponent, |
| 399 |
|
| 400 |
meshopt_EncodeExpClamped, |
| 401 |
}; |
| 402 |
|
| 403 |
MESHOPTIMIZER_API void meshopt_encodeFilterOct(void* destination, size_t count, size_t stride, int bits, const float* data); |
| 404 |
MESHOPTIMIZER_API void meshopt_encodeFilterQuat(void* destination, size_t count, size_t stride, int bits, const float* data); |
| 405 |
MESHOPTIMIZER_API void meshopt_encodeFilterExp(void* destination, size_t count, size_t stride, int bits, const float* data, enum meshopt_EncodeExpMode mode); |
| 406 |
MESHOPTIMIZER_API void meshopt_encodeFilterColor(void* destination, size_t count, size_t stride, int bits, const float* data); |
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
enum |
| 412 |
{ |
| 413 |
|
| 414 |
meshopt_SimplifyLockBorder = 1 << 0, |
| 415 |
|
| 416 |
meshopt_SimplifySparse = 1 << 1, |
| 417 |
|
| 418 |
meshopt_SimplifyErrorAbsolute = 1 << 2, |
| 419 |
|
| 420 |
meshopt_SimplifyPrune = 1 << 3, |
| 421 |
|
| 422 |
meshopt_SimplifyRegularize = 1 << 4, |
| 423 |
|
| 424 |
meshopt_SimplifyPermissive = 1 << 5, |
| 425 |
}; |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
enum |
| 431 |
{ |
| 432 |
|
| 433 |
meshopt_SimplifyVertex_Lock = 1 << 0, |
| 434 |
|
| 435 |
meshopt_SimplifyVertex_Protect = 1 << 1, |
| 436 |
}; |
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
MESHOPTIMIZER_API size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, unsigned int options, float* result_error); |
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
MESHOPTIMIZER_API size_t meshopt_simplifyWithAttributes(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, const float* vertex_attributes, size_t vertex_attributes_stride, const float* attribute_weights, size_t attribute_count, const unsigned char* vertex_lock, size_t target_index_count, float target_error, unsigned int options, float* result_error); |
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
MESHOPTIMIZER_API size_t meshopt_simplifyWithUpdate(unsigned int* indices, size_t index_count, float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float* vertex_attributes, size_t vertex_attributes_stride, const float* attribute_weights, size_t attribute_count, const unsigned char* vertex_lock, size_t target_index_count, float target_error, unsigned int options, float* result_error); |
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
MESHOPTIMIZER_API size_t meshopt_simplifySloppy(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, const unsigned char* vertex_lock, size_t target_index_count, float target_error, float* result_error); |
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
MESHOPTIMIZER_API size_t meshopt_simplifyPrune(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float target_error); |
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
MESHOPTIMIZER_API size_t meshopt_simplifyPoints(unsigned int* destination, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, const float* vertex_colors, size_t vertex_colors_stride, float color_weight, size_t target_vertex_count); |
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
MESHOPTIMIZER_API float meshopt_simplifyScale(const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
MESHOPTIMIZER_API size_t meshopt_stripify(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count, unsigned int restart_index); |
| 565 |
MESHOPTIMIZER_API size_t meshopt_stripifyBound(size_t index_count); |
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
MESHOPTIMIZER_API size_t meshopt_unstripify(unsigned int* destination, const unsigned int* indices, size_t index_count, unsigned int restart_index); |
| 575 |
MESHOPTIMIZER_API size_t meshopt_unstripifyBound(size_t index_count); |
| 576 |
|
| 577 |
struct meshopt_VertexCacheStatistics |
| 578 |
{ |
| 579 |
unsigned int vertices_transformed; |
| 580 |
unsigned int warps_executed; |
| 581 |
float acmr; |
| 582 |
float atvr; |
| 583 |
}; |
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
MESHOPTIMIZER_API struct meshopt_VertexCacheStatistics meshopt_analyzeVertexCache(const unsigned int* indices, size_t index_count, size_t vertex_count, unsigned int cache_size, unsigned int warp_size, unsigned int primgroup_size); |
| 591 |
|
| 592 |
struct meshopt_VertexFetchStatistics |
| 593 |
{ |
| 594 |
unsigned int bytes_fetched; |
| 595 |
float overfetch; |
| 596 |
}; |
| 597 |
|
| 598 |
|
| 599 |
|
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
MESHOPTIMIZER_API struct meshopt_VertexFetchStatistics meshopt_analyzeVertexFetch(const unsigned int* indices, size_t index_count, size_t vertex_count, size_t vertex_size); |
| 604 |
|
| 605 |
struct meshopt_OverdrawStatistics |
| 606 |
{ |
| 607 |
unsigned int pixels_covered; |
| 608 |
unsigned int pixels_shaded; |
| 609 |
float overdraw; |
| 610 |
}; |
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
MESHOPTIMIZER_API struct meshopt_OverdrawStatistics meshopt_analyzeOverdraw(const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 620 |
|
| 621 |
struct meshopt_CoverageStatistics |
| 622 |
{ |
| 623 |
float coverage[3]; |
| 624 |
float extent; |
| 625 |
}; |
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
MESHOPTIMIZER_API struct meshopt_CoverageStatistics meshopt_analyzeCoverage(const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
struct meshopt_Meshlet |
| 643 |
{ |
| 644 |
|
| 645 |
unsigned int vertex_offset; |
| 646 |
unsigned int triangle_offset; |
| 647 |
|
| 648 |
|
| 649 |
unsigned int vertex_count; |
| 650 |
unsigned int triangle_count; |
| 651 |
}; |
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
MESHOPTIMIZER_API size_t meshopt_buildMeshlets(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t max_triangles, float cone_weight); |
| 669 |
MESHOPTIMIZER_API size_t meshopt_buildMeshletsScan(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, size_t vertex_count, size_t max_vertices, size_t max_triangles); |
| 670 |
MESHOPTIMIZER_API size_t meshopt_buildMeshletsBound(size_t index_count, size_t max_vertices, size_t max_triangles); |
| 671 |
|
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
MESHOPTIMIZER_API size_t meshopt_buildMeshletsFlex(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float cone_weight, float split_factor); |
| 686 |
|
| 687 |
|
| 688 |
|
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
|
| 695 |
|
| 696 |
|
| 697 |
|
| 698 |
MESHOPTIMIZER_API size_t meshopt_buildMeshletsSpatial(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float fill_weight); |
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
|
| 705 |
|
| 706 |
|
| 707 |
MESHOPTIMIZER_API void meshopt_optimizeMeshlet(unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, size_t triangle_count, size_t vertex_count); |
| 708 |
|
| 709 |
struct meshopt_Bounds |
| 710 |
{ |
| 711 |
|
| 712 |
float center[3]; |
| 713 |
float radius; |
| 714 |
|
| 715 |
|
| 716 |
float cone_apex[3]; |
| 717 |
float cone_axis[3]; |
| 718 |
float cone_cutoff; |
| 719 |
|
| 720 |
|
| 721 |
signed char cone_axis_s8[3]; |
| 722 |
signed char cone_cutoff_s8; |
| 723 |
}; |
| 724 |
|
| 725 |
|
| 726 |
|
| 727 |
|
| 728 |
|
| 729 |
|
| 730 |
|
| 731 |
|
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
|
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
|
| 742 |
|
| 743 |
|
| 744 |
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
MESHOPTIMIZER_API struct meshopt_Bounds meshopt_computeClusterBounds(const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 749 |
MESHOPTIMIZER_API struct meshopt_Bounds meshopt_computeMeshletBounds(const unsigned int* meshlet_vertices, const unsigned char* meshlet_triangles, size_t triangle_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
|
| 754 |
|
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
MESHOPTIMIZER_API struct meshopt_Bounds meshopt_computeSphereBounds(const float* positions, size_t count, size_t positions_stride, const float* radii, size_t radii_stride); |
| 759 |
|
| 760 |
|
| 761 |
|
| 762 |
|
| 763 |
|
| 764 |
|
| 765 |
|
| 766 |
|
| 767 |
|
| 768 |
|
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
MESHOPTIMIZER_API size_t meshopt_partitionClusters(unsigned int* destination, const unsigned int* cluster_indices, size_t total_index_count, const unsigned int* cluster_index_counts, size_t cluster_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_partition_size); |
| 773 |
|
| 774 |
|
| 775 |
|
| 776 |
|
| 777 |
|
| 778 |
|
| 779 |
|
| 780 |
|
| 781 |
|
| 782 |
MESHOPTIMIZER_API void meshopt_spatialSortRemap(unsigned int* destination, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 783 |
|
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
|
| 791 |
MESHOPTIMIZER_API void meshopt_spatialSortTriangles(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
|
| 796 |
|
| 797 |
|
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
MESHOPTIMIZER_API void meshopt_spatialClusterPoints(unsigned int* destination, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t cluster_size); |
| 802 |
|
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
|
| 807 |
|
| 808 |
|
| 809 |
MESHOPTIMIZER_API unsigned short meshopt_quantizeHalf(float v); |
| 810 |
|
| 811 |
|
| 812 |
|
| 813 |
|
| 814 |
|
| 815 |
|
| 816 |
MESHOPTIMIZER_API float meshopt_quantizeFloat(float v, int N); |
| 817 |
|
| 818 |
|
| 819 |
|
| 820 |
|
| 821 |
|
| 822 |
MESHOPTIMIZER_API float meshopt_dequantizeHalf(unsigned short h); |
| 823 |
|
| 824 |
|
| 825 |
|
| 826 |
|
| 827 |
|
| 828 |
|
| 829 |
|
| 830 |
MESHOPTIMIZER_API void meshopt_setAllocator(void* (MESHOPTIMIZER_ALLOC_CALLCONV* allocate)(size_t), void (MESHOPTIMIZER_ALLOC_CALLCONV* deallocate)(void*)); |
| 831 |
|
| 832 |
#ifdef __cplusplus |
| 833 |
} |
| 834 |
#endif |
| 835 |
|
| 836 |
|
| 837 |
#ifdef __cplusplus |
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
inline int meshopt_quantizeUnorm(float v, int N); |
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
inline int meshopt_quantizeSnorm(float v, int N); |
| 851 |
#endif |
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
|
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
#if defined(__cplusplus) && !defined(MESHOPTIMIZER_NO_WRAPPERS) |
| 862 |
template <typename T> |
| 863 |
inline size_t meshopt_generateVertexRemap(unsigned int* destination, const T* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size); |
| 864 |
template <typename T> |
| 865 |
inline size_t meshopt_generateVertexRemapMulti(unsigned int* destination, const T* indices, size_t index_count, size_t vertex_count, const meshopt_Stream* streams, size_t stream_count); |
| 866 |
template <typename F> |
| 867 |
inline size_t meshopt_generateVertexRemapCustom(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, F callback); |
| 868 |
template <typename T, typename F> |
| 869 |
inline size_t meshopt_generateVertexRemapCustom(unsigned int* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, F callback); |
| 870 |
template <typename T> |
| 871 |
inline void meshopt_remapIndexBuffer(T* destination, const T* indices, size_t index_count, const unsigned int* remap); |
| 872 |
template <typename T> |
| 873 |
inline void meshopt_generateShadowIndexBuffer(T* destination, const T* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size, size_t vertex_stride); |
| 874 |
template <typename T> |
| 875 |
inline void meshopt_generateShadowIndexBufferMulti(T* destination, const T* indices, size_t index_count, size_t vertex_count, const meshopt_Stream* streams, size_t stream_count); |
| 876 |
template <typename T> |
| 877 |
inline void meshopt_generateAdjacencyIndexBuffer(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 878 |
template <typename T> |
| 879 |
inline void meshopt_generateTessellationIndexBuffer(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 880 |
template <typename T> |
| 881 |
inline size_t meshopt_generateProvokingIndexBuffer(T* destination, unsigned int* reorder, const T* indices, size_t index_count, size_t vertex_count); |
| 882 |
template <typename T> |
| 883 |
inline void meshopt_optimizeVertexCache(T* destination, const T* indices, size_t index_count, size_t vertex_count); |
| 884 |
template <typename T> |
| 885 |
inline void meshopt_optimizeVertexCacheStrip(T* destination, const T* indices, size_t index_count, size_t vertex_count); |
| 886 |
template <typename T> |
| 887 |
inline void meshopt_optimizeVertexCacheFifo(T* destination, const T* indices, size_t index_count, size_t vertex_count, unsigned int cache_size); |
| 888 |
template <typename T> |
| 889 |
inline void meshopt_optimizeOverdraw(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float threshold); |
| 890 |
template <typename T> |
| 891 |
inline size_t meshopt_optimizeVertexFetchRemap(unsigned int* destination, const T* indices, size_t index_count, size_t vertex_count); |
| 892 |
template <typename T> |
| 893 |
inline size_t meshopt_optimizeVertexFetch(void* destination, T* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size); |
| 894 |
template <typename T> |
| 895 |
inline size_t meshopt_encodeIndexBuffer(unsigned char* buffer, size_t buffer_size, const T* indices, size_t index_count); |
| 896 |
template <typename T> |
| 897 |
inline int meshopt_decodeIndexBuffer(T* destination, size_t index_count, const unsigned char* buffer, size_t buffer_size); |
| 898 |
template <typename T> |
| 899 |
inline size_t meshopt_encodeIndexSequence(unsigned char* buffer, size_t buffer_size, const T* indices, size_t index_count); |
| 900 |
template <typename T> |
| 901 |
inline int meshopt_decodeIndexSequence(T* destination, size_t index_count, const unsigned char* buffer, size_t buffer_size); |
| 902 |
inline size_t meshopt_encodeVertexBufferLevel(unsigned char* buffer, size_t buffer_size, const void* vertices, size_t vertex_count, size_t vertex_size, int level); |
| 903 |
template <typename T> |
| 904 |
inline size_t meshopt_simplify(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, unsigned int options = 0, float* result_error = NULL); |
| 905 |
template <typename T> |
| 906 |
inline size_t meshopt_simplifyWithAttributes(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, const float* vertex_attributes, size_t vertex_attributes_stride, const float* attribute_weights, size_t attribute_count, const unsigned char* vertex_lock, size_t target_index_count, float target_error, unsigned int options = 0, float* result_error = NULL); |
| 907 |
template <typename T> |
| 908 |
inline size_t meshopt_simplifyWithUpdate(T* indices, size_t index_count, float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float* vertex_attributes, size_t vertex_attributes_stride, const float* attribute_weights, size_t attribute_count, const unsigned char* vertex_lock, size_t target_index_count, float target_error, unsigned int options = 0, float* result_error = NULL); |
| 909 |
template <typename T> |
| 910 |
inline size_t meshopt_simplifySloppy(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, float* result_error = NULL); |
| 911 |
template <typename T> |
| 912 |
inline size_t meshopt_simplifySloppy(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, const unsigned char* vertex_lock, size_t target_index_count, float target_error, float* result_error = NULL); |
| 913 |
template <typename T> |
| 914 |
inline size_t meshopt_simplifyPrune(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float target_error); |
| 915 |
template <typename T> |
| 916 |
inline size_t meshopt_stripify(T* destination, const T* indices, size_t index_count, size_t vertex_count, T restart_index); |
| 917 |
template <typename T> |
| 918 |
inline size_t meshopt_unstripify(T* destination, const T* indices, size_t index_count, T restart_index); |
| 919 |
template <typename T> |
| 920 |
inline meshopt_VertexCacheStatistics meshopt_analyzeVertexCache(const T* indices, size_t index_count, size_t vertex_count, unsigned int cache_size, unsigned int warp_size, unsigned int primgroup_size); |
| 921 |
template <typename T> |
| 922 |
inline meshopt_VertexFetchStatistics meshopt_analyzeVertexFetch(const T* indices, size_t index_count, size_t vertex_count, size_t vertex_size); |
| 923 |
template <typename T> |
| 924 |
inline meshopt_OverdrawStatistics meshopt_analyzeOverdraw(const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 925 |
template <typename T> |
| 926 |
inline meshopt_CoverageStatistics meshopt_analyzeCoverage(const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 927 |
template <typename T> |
| 928 |
inline size_t meshopt_buildMeshlets(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t max_triangles, float cone_weight); |
| 929 |
template <typename T> |
| 930 |
inline size_t meshopt_buildMeshletsScan(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, size_t vertex_count, size_t max_vertices, size_t max_triangles); |
| 931 |
template <typename T> |
| 932 |
inline size_t meshopt_buildMeshletsFlex(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float cone_weight, float split_factor); |
| 933 |
template <typename T> |
| 934 |
inline size_t meshopt_buildMeshletsSpatial(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float fill_weight); |
| 935 |
template <typename T> |
| 936 |
inline meshopt_Bounds meshopt_computeClusterBounds(const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 937 |
template <typename T> |
| 938 |
inline size_t meshopt_partitionClusters(unsigned int* destination, const T* cluster_indices, size_t total_index_count, const unsigned int* cluster_index_counts, size_t cluster_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_partition_size); |
| 939 |
template <typename T> |
| 940 |
inline void meshopt_spatialSortTriangles(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); |
| 941 |
#endif |
| 942 |
|
| 943 |
|
| 944 |
#ifdef __cplusplus |
| 945 |
inline int meshopt_quantizeUnorm(float v, int N) |
| 946 |
{ |
| 947 |
const float scale = float((1 << N) - 1); |
| 948 |
|
| 949 |
v = (v >= 0) ? v : 0; |
| 950 |
v = (v <= 1) ? v : 1; |
| 951 |
|
| 952 |
return int(v * scale + 0.5f); |
| 953 |
} |
| 954 |
|
| 955 |
inline int meshopt_quantizeSnorm(float v, int N) |
| 956 |
{ |
| 957 |
const float scale = float((1 << (N - 1)) - 1); |
| 958 |
|
| 959 |
float round = (v >= 0 ? 0.5f : -0.5f); |
| 960 |
|
| 961 |
v = (v >= -1) ? v : -1; |
| 962 |
v = (v <= +1) ? v : +1; |
| 963 |
|
| 964 |
return int(v * scale + round); |
| 965 |
} |
| 966 |
#endif |
| 967 |
|
| 968 |
|
| 969 |
#ifdef __cplusplus |
| 970 |
class meshopt_Allocator |
| 971 |
{ |
| 972 |
public: |
| 973 |
struct Storage |
| 974 |
{ |
| 975 |
void* (MESHOPTIMIZER_ALLOC_CALLCONV* allocate)(size_t); |
| 976 |
void (MESHOPTIMIZER_ALLOC_CALLCONV* deallocate)(void*); |
| 977 |
}; |
| 978 |
|
| 979 |
#ifdef MESHOPTIMIZER_ALLOC_EXPORT |
| 980 |
MESHOPTIMIZER_API static Storage& storage(); |
| 981 |
#else |
| 982 |
static Storage& storage() |
| 983 |
{ |
| 984 |
static Storage s = {::operator new, ::operator delete }; |
| 985 |
return s; |
| 986 |
} |
| 987 |
#endif |
| 988 |
|
| 989 |
meshopt_Allocator() |
| 990 |
: blocks() |
| 991 |
, count(0) |
| 992 |
{ |
| 993 |
} |
| 994 |
|
| 995 |
~meshopt_Allocator() |
| 996 |
{ |
| 997 |
for (size_t i = count; i > 0; --i) |
| 998 |
storage().deallocate(blocks[i - 1]); |
| 999 |
} |
| 1000 |
|
| 1001 |
template <typename T> |
| 1002 |
T* allocate(size_t size) |
| 1003 |
{ |
| 1004 |
assert(count < sizeof(blocks) / sizeof(blocks[0])); |
| 1005 |
T* result = static_cast<T*>(storage().allocate(size > size_t(-1) / sizeof(T) ? size_t(-1) : size * sizeof(T))); |
| 1006 |
blocks[count++] = result; |
| 1007 |
return result; |
| 1008 |
} |
| 1009 |
|
| 1010 |
void deallocate(void* ptr) |
| 1011 |
{ |
| 1012 |
assert(count > 0 && blocks[count - 1] == ptr); |
| 1013 |
storage().deallocate(ptr); |
| 1014 |
count--; |
| 1015 |
} |
| 1016 |
|
| 1017 |
private: |
| 1018 |
void* blocks[24]; |
| 1019 |
size_t count; |
| 1020 |
}; |
| 1021 |
#endif |
| 1022 |
|
| 1023 |
|
| 1024 |
#if defined(__cplusplus) && !defined(MESHOPTIMIZER_NO_WRAPPERS) |
| 1025 |
template <typename T, bool ZeroCopy = sizeof(T) == sizeof(unsigned int)> |
| 1026 |
struct meshopt_IndexAdapter; |
| 1027 |
|
| 1028 |
template <typename T> |
| 1029 |
struct meshopt_IndexAdapter<T, false> |
| 1030 |
{ |
| 1031 |
T* result; |
| 1032 |
unsigned int* data; |
| 1033 |
size_t count; |
| 1034 |
|
| 1035 |
meshopt_IndexAdapter(T* result_, const T* input, size_t count_) |
| 1036 |
: result(result_) |
| 1037 |
, data(NULL) |
| 1038 |
, count(count_) |
| 1039 |
{ |
| 1040 |
size_t size = count > size_t(-1) / sizeof(unsigned int) ? size_t(-1) : count * sizeof(unsigned int); |
| 1041 |
|
| 1042 |
data = static_cast<unsigned int*>(meshopt_Allocator::storage().allocate(size)); |
| 1043 |
|
| 1044 |
if (input) |
| 1045 |
{ |
| 1046 |
for (size_t i = 0; i < count; ++i) |
| 1047 |
data[i] = input[i]; |
| 1048 |
} |
| 1049 |
} |
| 1050 |
|
| 1051 |
~meshopt_IndexAdapter() |
| 1052 |
{ |
| 1053 |
if (result) |
| 1054 |
{ |
| 1055 |
for (size_t i = 0; i < count; ++i) |
| 1056 |
result[i] = T(data[i]); |
| 1057 |
} |
| 1058 |
|
| 1059 |
meshopt_Allocator::storage().deallocate(data); |
| 1060 |
} |
| 1061 |
}; |
| 1062 |
|
| 1063 |
template <typename T> |
| 1064 |
struct meshopt_IndexAdapter<T, true> |
| 1065 |
{ |
| 1066 |
unsigned int* data; |
| 1067 |
|
| 1068 |
meshopt_IndexAdapter(T* result, const T* input, size_t) |
| 1069 |
: data(reinterpret_cast<unsigned int*>(result ? result : const_cast<T*>(input))) |
| 1070 |
{ |
| 1071 |
} |
| 1072 |
}; |
| 1073 |
|
| 1074 |
template <typename T> |
| 1075 |
inline size_t meshopt_generateVertexRemap(unsigned int* destination, const T* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size) |
| 1076 |
{ |
| 1077 |
meshopt_IndexAdapter<T> in(NULL, indices, indices ? index_count : 0); |
| 1078 |
|
| 1079 |
return meshopt_generateVertexRemap(destination, indices ? in.data : NULL, index_count, vertices, vertex_count, vertex_size); |
| 1080 |
} |
| 1081 |
|
| 1082 |
template <typename T> |
| 1083 |
inline size_t meshopt_generateVertexRemapMulti(unsigned int* destination, const T* indices, size_t index_count, size_t vertex_count, const meshopt_Stream* streams, size_t stream_count) |
| 1084 |
{ |
| 1085 |
meshopt_IndexAdapter<T> in(NULL, indices, indices ? index_count : 0); |
| 1086 |
|
| 1087 |
return meshopt_generateVertexRemapMulti(destination, indices ? in.data : NULL, index_count, vertex_count, streams, stream_count); |
| 1088 |
} |
| 1089 |
|
| 1090 |
template <typename F> |
| 1091 |
inline size_t meshopt_generateVertexRemapCustom(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, F callback) |
| 1092 |
{ |
| 1093 |
struct Call |
| 1094 |
{ |
| 1095 |
static int compare(void* context, unsigned int lhs, unsigned int rhs) { return (*static_cast<F*>(context))(lhs, rhs) ? 1 : 0; } |
| 1096 |
}; |
| 1097 |
|
| 1098 |
return meshopt_generateVertexRemapCustom(destination, indices, index_count, vertex_positions, vertex_count, vertex_positions_stride, &Call::compare, &callback); |
| 1099 |
} |
| 1100 |
|
| 1101 |
template <typename T, typename F> |
| 1102 |
inline size_t meshopt_generateVertexRemapCustom(unsigned int* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, F callback) |
| 1103 |
{ |
| 1104 |
struct Call |
| 1105 |
{ |
| 1106 |
static int compare(void* context, unsigned int lhs, unsigned int rhs) { return (*static_cast<F*>(context))(lhs, rhs) ? 1 : 0; } |
| 1107 |
}; |
| 1108 |
|
| 1109 |
meshopt_IndexAdapter<T> in(NULL, indices, indices ? index_count : 0); |
| 1110 |
|
| 1111 |
return meshopt_generateVertexRemapCustom(destination, indices ? in.data : NULL, index_count, vertex_positions, vertex_count, vertex_positions_stride, &Call::compare, &callback); |
| 1112 |
} |
| 1113 |
|
| 1114 |
template <typename T> |
| 1115 |
inline void meshopt_remapIndexBuffer(T* destination, const T* indices, size_t index_count, const unsigned int* remap) |
| 1116 |
{ |
| 1117 |
meshopt_IndexAdapter<T> in(NULL, indices, indices ? index_count : 0); |
| 1118 |
meshopt_IndexAdapter<T> out(destination, 0, index_count); |
| 1119 |
|
| 1120 |
meshopt_remapIndexBuffer(out.data, indices ? in.data : NULL, index_count, remap); |
| 1121 |
} |
| 1122 |
|
| 1123 |
template <typename T> |
| 1124 |
inline void meshopt_generateShadowIndexBuffer(T* destination, const T* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size, size_t vertex_stride) |
| 1125 |
{ |
| 1126 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1127 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1128 |
|
| 1129 |
meshopt_generateShadowIndexBuffer(out.data, in.data, index_count, vertices, vertex_count, vertex_size, vertex_stride); |
| 1130 |
} |
| 1131 |
|
| 1132 |
template <typename T> |
| 1133 |
inline void meshopt_generateShadowIndexBufferMulti(T* destination, const T* indices, size_t index_count, size_t vertex_count, const meshopt_Stream* streams, size_t stream_count) |
| 1134 |
{ |
| 1135 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1136 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1137 |
|
| 1138 |
meshopt_generateShadowIndexBufferMulti(out.data, in.data, index_count, vertex_count, streams, stream_count); |
| 1139 |
} |
| 1140 |
|
| 1141 |
template <typename T> |
| 1142 |
inline void meshopt_generateAdjacencyIndexBuffer(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride) |
| 1143 |
{ |
| 1144 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1145 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count * 2); |
| 1146 |
|
| 1147 |
meshopt_generateAdjacencyIndexBuffer(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride); |
| 1148 |
} |
| 1149 |
|
| 1150 |
template <typename T> |
| 1151 |
inline void meshopt_generateTessellationIndexBuffer(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride) |
| 1152 |
{ |
| 1153 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1154 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count * 4); |
| 1155 |
|
| 1156 |
meshopt_generateTessellationIndexBuffer(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride); |
| 1157 |
} |
| 1158 |
|
| 1159 |
template <typename T> |
| 1160 |
inline size_t meshopt_generateProvokingIndexBuffer(T* destination, unsigned int* reorder, const T* indices, size_t index_count, size_t vertex_count) |
| 1161 |
{ |
| 1162 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1163 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1164 |
|
| 1165 |
size_t bound = vertex_count + (index_count / 3); |
| 1166 |
assert(size_t(T(bound - 1)) == bound - 1); |
| 1167 |
(void)bound; |
| 1168 |
|
| 1169 |
return meshopt_generateProvokingIndexBuffer(out.data, reorder, in.data, index_count, vertex_count); |
| 1170 |
} |
| 1171 |
|
| 1172 |
template <typename T> |
| 1173 |
inline void meshopt_optimizeVertexCache(T* destination, const T* indices, size_t index_count, size_t vertex_count) |
| 1174 |
{ |
| 1175 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1176 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1177 |
|
| 1178 |
meshopt_optimizeVertexCache(out.data, in.data, index_count, vertex_count); |
| 1179 |
} |
| 1180 |
|
| 1181 |
template <typename T> |
| 1182 |
inline void meshopt_optimizeVertexCacheStrip(T* destination, const T* indices, size_t index_count, size_t vertex_count) |
| 1183 |
{ |
| 1184 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1185 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1186 |
|
| 1187 |
meshopt_optimizeVertexCacheStrip(out.data, in.data, index_count, vertex_count); |
| 1188 |
} |
| 1189 |
|
| 1190 |
template <typename T> |
| 1191 |
inline void meshopt_optimizeVertexCacheFifo(T* destination, const T* indices, size_t index_count, size_t vertex_count, unsigned int cache_size) |
| 1192 |
{ |
| 1193 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1194 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1195 |
|
| 1196 |
meshopt_optimizeVertexCacheFifo(out.data, in.data, index_count, vertex_count, cache_size); |
| 1197 |
} |
| 1198 |
|
| 1199 |
template <typename T> |
| 1200 |
inline void meshopt_optimizeOverdraw(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float threshold) |
| 1201 |
{ |
| 1202 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1203 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1204 |
|
| 1205 |
meshopt_optimizeOverdraw(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, threshold); |
| 1206 |
} |
| 1207 |
|
| 1208 |
template <typename T> |
| 1209 |
inline size_t meshopt_optimizeVertexFetchRemap(unsigned int* destination, const T* indices, size_t index_count, size_t vertex_count) |
| 1210 |
{ |
| 1211 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1212 |
|
| 1213 |
return meshopt_optimizeVertexFetchRemap(destination, in.data, index_count, vertex_count); |
| 1214 |
} |
| 1215 |
|
| 1216 |
template <typename T> |
| 1217 |
inline size_t meshopt_optimizeVertexFetch(void* destination, T* indices, size_t index_count, const void* vertices, size_t vertex_count, size_t vertex_size) |
| 1218 |
{ |
| 1219 |
meshopt_IndexAdapter<T> inout(indices, indices, index_count); |
| 1220 |
|
| 1221 |
return meshopt_optimizeVertexFetch(destination, inout.data, index_count, vertices, vertex_count, vertex_size); |
| 1222 |
} |
| 1223 |
|
| 1224 |
template <typename T> |
| 1225 |
inline size_t meshopt_encodeIndexBuffer(unsigned char* buffer, size_t buffer_size, const T* indices, size_t index_count) |
| 1226 |
{ |
| 1227 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1228 |
|
| 1229 |
return meshopt_encodeIndexBuffer(buffer, buffer_size, in.data, index_count); |
| 1230 |
} |
| 1231 |
|
| 1232 |
template <typename T> |
| 1233 |
inline int meshopt_decodeIndexBuffer(T* destination, size_t index_count, const unsigned char* buffer, size_t buffer_size) |
| 1234 |
{ |
| 1235 |
char index_size_valid[sizeof(T) == 2 || sizeof(T) == 4 ? 1 : -1]; |
| 1236 |
(void)index_size_valid; |
| 1237 |
|
| 1238 |
return meshopt_decodeIndexBuffer(destination, index_count, sizeof(T), buffer, buffer_size); |
| 1239 |
} |
| 1240 |
|
| 1241 |
template <typename T> |
| 1242 |
inline size_t meshopt_encodeIndexSequence(unsigned char* buffer, size_t buffer_size, const T* indices, size_t index_count) |
| 1243 |
{ |
| 1244 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1245 |
|
| 1246 |
return meshopt_encodeIndexSequence(buffer, buffer_size, in.data, index_count); |
| 1247 |
} |
| 1248 |
|
| 1249 |
template <typename T> |
| 1250 |
inline int meshopt_decodeIndexSequence(T* destination, size_t index_count, const unsigned char* buffer, size_t buffer_size) |
| 1251 |
{ |
| 1252 |
char index_size_valid[sizeof(T) == 2 || sizeof(T) == 4 ? 1 : -1]; |
| 1253 |
(void)index_size_valid; |
| 1254 |
|
| 1255 |
return meshopt_decodeIndexSequence(destination, index_count, sizeof(T), buffer, buffer_size); |
| 1256 |
} |
| 1257 |
|
| 1258 |
inline size_t meshopt_encodeVertexBufferLevel(unsigned char* buffer, size_t buffer_size, const void* vertices, size_t vertex_count, size_t vertex_size, int level) |
| 1259 |
{ |
| 1260 |
return meshopt_encodeVertexBufferLevel(buffer, buffer_size, vertices, vertex_count, vertex_size, level, -1); |
| 1261 |
} |
| 1262 |
|
| 1263 |
template <typename T> |
| 1264 |
inline size_t meshopt_simplify(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, unsigned int options, float* result_error) |
| 1265 |
{ |
| 1266 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1267 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1268 |
|
| 1269 |
return meshopt_simplify(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, target_index_count, target_error, options, result_error); |
| 1270 |
} |
| 1271 |
|
| 1272 |
template <typename T> |
| 1273 |
inline size_t meshopt_simplifyWithAttributes(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, const float* vertex_attributes, size_t vertex_attributes_stride, const float* attribute_weights, size_t attribute_count, const unsigned char* vertex_lock, size_t target_index_count, float target_error, unsigned int options, float* result_error) |
| 1274 |
{ |
| 1275 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1276 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1277 |
|
| 1278 |
return meshopt_simplifyWithAttributes(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, vertex_attributes, vertex_attributes_stride, attribute_weights, attribute_count, vertex_lock, target_index_count, target_error, options, result_error); |
| 1279 |
} |
| 1280 |
|
| 1281 |
template <typename T> |
| 1282 |
inline size_t meshopt_simplifyWithUpdate(T* indices, size_t index_count, float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float* vertex_attributes, size_t vertex_attributes_stride, const float* attribute_weights, size_t attribute_count, const unsigned char* vertex_lock, size_t target_index_count, float target_error, unsigned int options, float* result_error) |
| 1283 |
{ |
| 1284 |
meshopt_IndexAdapter<T> inout(indices, indices, index_count); |
| 1285 |
|
| 1286 |
return meshopt_simplifyWithUpdate(inout.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, vertex_attributes, vertex_attributes_stride, attribute_weights, attribute_count, vertex_lock, target_index_count, target_error, options, result_error); |
| 1287 |
} |
| 1288 |
|
| 1289 |
template <typename T> |
| 1290 |
inline size_t meshopt_simplifySloppy(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, float* result_error) |
| 1291 |
{ |
| 1292 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1293 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1294 |
|
| 1295 |
return meshopt_simplifySloppy(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, NULL, target_index_count, target_error, result_error); |
| 1296 |
} |
| 1297 |
|
| 1298 |
template <typename T> |
| 1299 |
inline size_t meshopt_simplifySloppy(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, const unsigned char* vertex_lock, size_t target_index_count, float target_error, float* result_error) |
| 1300 |
{ |
| 1301 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1302 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1303 |
|
| 1304 |
return meshopt_simplifySloppy(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, vertex_lock, target_index_count, target_error, result_error); |
| 1305 |
} |
| 1306 |
|
| 1307 |
template <typename T> |
| 1308 |
inline size_t meshopt_simplifyPrune(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, float target_error) |
| 1309 |
{ |
| 1310 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1311 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1312 |
|
| 1313 |
return meshopt_simplifyPrune(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, target_error); |
| 1314 |
} |
| 1315 |
|
| 1316 |
template <typename T> |
| 1317 |
inline size_t meshopt_stripify(T* destination, const T* indices, size_t index_count, size_t vertex_count, T restart_index) |
| 1318 |
{ |
| 1319 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1320 |
meshopt_IndexAdapter<T> out(destination, NULL, (index_count / 3) * 5); |
| 1321 |
|
| 1322 |
return meshopt_stripify(out.data, in.data, index_count, vertex_count, unsigned(restart_index)); |
| 1323 |
} |
| 1324 |
|
| 1325 |
template <typename T> |
| 1326 |
inline size_t meshopt_unstripify(T* destination, const T* indices, size_t index_count, T restart_index) |
| 1327 |
{ |
| 1328 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1329 |
meshopt_IndexAdapter<T> out(destination, NULL, (index_count - 2) * 3); |
| 1330 |
|
| 1331 |
return meshopt_unstripify(out.data, in.data, index_count, unsigned(restart_index)); |
| 1332 |
} |
| 1333 |
|
| 1334 |
template <typename T> |
| 1335 |
inline meshopt_VertexCacheStatistics meshopt_analyzeVertexCache(const T* indices, size_t index_count, size_t vertex_count, unsigned int cache_size, unsigned int warp_size, unsigned int primgroup_size) |
| 1336 |
{ |
| 1337 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1338 |
|
| 1339 |
return meshopt_analyzeVertexCache(in.data, index_count, vertex_count, cache_size, warp_size, primgroup_size); |
| 1340 |
} |
| 1341 |
|
| 1342 |
template <typename T> |
| 1343 |
inline meshopt_VertexFetchStatistics meshopt_analyzeVertexFetch(const T* indices, size_t index_count, size_t vertex_count, size_t vertex_size) |
| 1344 |
{ |
| 1345 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1346 |
|
| 1347 |
return meshopt_analyzeVertexFetch(in.data, index_count, vertex_count, vertex_size); |
| 1348 |
} |
| 1349 |
|
| 1350 |
template <typename T> |
| 1351 |
inline meshopt_OverdrawStatistics meshopt_analyzeOverdraw(const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride) |
| 1352 |
{ |
| 1353 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1354 |
|
| 1355 |
return meshopt_analyzeOverdraw(in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride); |
| 1356 |
} |
| 1357 |
|
| 1358 |
template <typename T> |
| 1359 |
inline meshopt_CoverageStatistics meshopt_analyzeCoverage(const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride) |
| 1360 |
{ |
| 1361 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1362 |
|
| 1363 |
return meshopt_analyzeCoverage(in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride); |
| 1364 |
} |
| 1365 |
|
| 1366 |
template <typename T> |
| 1367 |
inline size_t meshopt_buildMeshlets(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t max_triangles, float cone_weight) |
| 1368 |
{ |
| 1369 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1370 |
|
| 1371 |
return meshopt_buildMeshlets(meshlets, meshlet_vertices, meshlet_triangles, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, max_vertices, max_triangles, cone_weight); |
| 1372 |
} |
| 1373 |
|
| 1374 |
template <typename T> |
| 1375 |
inline size_t meshopt_buildMeshletsScan(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, size_t vertex_count, size_t max_vertices, size_t max_triangles) |
| 1376 |
{ |
| 1377 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1378 |
|
| 1379 |
return meshopt_buildMeshletsScan(meshlets, meshlet_vertices, meshlet_triangles, in.data, index_count, vertex_count, max_vertices, max_triangles); |
| 1380 |
} |
| 1381 |
|
| 1382 |
template <typename T> |
| 1383 |
inline size_t meshopt_buildMeshletsFlex(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float cone_weight, float split_factor) |
| 1384 |
{ |
| 1385 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1386 |
|
| 1387 |
return meshopt_buildMeshletsFlex(meshlets, meshlet_vertices, meshlet_triangles, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, max_vertices, min_triangles, max_triangles, cone_weight, split_factor); |
| 1388 |
} |
| 1389 |
|
| 1390 |
template <typename T> |
| 1391 |
inline size_t meshopt_buildMeshletsSpatial(meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float fill_weight) |
| 1392 |
{ |
| 1393 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1394 |
|
| 1395 |
return meshopt_buildMeshletsSpatial(meshlets, meshlet_vertices, meshlet_triangles, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride, max_vertices, min_triangles, max_triangles, fill_weight); |
| 1396 |
} |
| 1397 |
|
| 1398 |
template <typename T> |
| 1399 |
inline meshopt_Bounds meshopt_computeClusterBounds(const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride) |
| 1400 |
{ |
| 1401 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1402 |
|
| 1403 |
return meshopt_computeClusterBounds(in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride); |
| 1404 |
} |
| 1405 |
|
| 1406 |
template <typename T> |
| 1407 |
inline size_t meshopt_partitionClusters(unsigned int* destination, const T* cluster_indices, size_t total_index_count, const unsigned int* cluster_index_counts, size_t cluster_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_partition_size) |
| 1408 |
{ |
| 1409 |
meshopt_IndexAdapter<T> in(NULL, cluster_indices, total_index_count); |
| 1410 |
|
| 1411 |
return meshopt_partitionClusters(destination, in.data, total_index_count, cluster_index_counts, cluster_count, vertex_positions, vertex_count, vertex_positions_stride, target_partition_size); |
| 1412 |
} |
| 1413 |
|
| 1414 |
template <typename T> |
| 1415 |
inline void meshopt_spatialSortTriangles(T* destination, const T* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride) |
| 1416 |
{ |
| 1417 |
meshopt_IndexAdapter<T> in(NULL, indices, index_count); |
| 1418 |
meshopt_IndexAdapter<T> out(destination, NULL, index_count); |
| 1419 |
|
| 1420 |
meshopt_spatialSortTriangles(out.data, in.data, index_count, vertex_positions, vertex_count, vertex_positions_stride); |
| 1421 |
} |
| 1422 |
#endif |
| 1423 |
|
| 1424 |
|
| 1425 |
|
| 1426 |
|
| 1427 |
|
| 1428 |
|
| 1429 |
|
| 1430 |
|
| 1431 |
|
| 1432 |
|
| 1433 |
|
| 1434 |
|
| 1435 |
|
| 1436 |
|
| 1437 |
|
| 1438 |
|
| 1439 |
|
| 1440 |
|
| 1441 |
|
| 1442 |
|
| 1443 |
|
| 1444 |
|
| 1445 |
|
| 1446 |
|
| 1447 |
|