BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Properties | List of all members
BrawlLib.Internal.bMatrix43 Struct Reference

Public Member Functions

override string ToString ()
 

Static Public Member Functions

static implicit operator Matrix (bMatrix43 bm)
 
static implicit operator bMatrix43 (Matrix m)
 
static implicit operator Matrix34 (bMatrix43 bm)
 
static implicit operator bMatrix43 (Matrix34 m)
 

Properties

bfloatData [get]
 
float this[int x, int y] [get, set]
 
float this[int index] [get, set]
 

Member Function Documentation

◆ operator bMatrix43() [1/2]

static implicit BrawlLib.Internal.bMatrix43.operator bMatrix43 ( Matrix  m)
inlinestatic
503 {
504 bMatrix43 bm;
505
506 bfloat* dPtr = (bfloat*) &bm;
507 float* sPtr = (float*) &m;
508
509 dPtr[0] = sPtr[0];
510 dPtr[1] = sPtr[4];
511 dPtr[2] = sPtr[8];
512 dPtr[3] = sPtr[12];
513 dPtr[4] = sPtr[1];
514 dPtr[5] = sPtr[5];
515 dPtr[6] = sPtr[9];
516 dPtr[7] = sPtr[13];
517 dPtr[8] = sPtr[2];
518 dPtr[9] = sPtr[6];
519 dPtr[10] = sPtr[10];
520 dPtr[11] = sPtr[14];
521
522 return bm;
523 }

◆ operator bMatrix43() [2/2]

static implicit BrawlLib.Internal.bMatrix43.operator bMatrix43 ( Matrix34  m)
inlinestatic
539 {
540 bMatrix43 bm = new bMatrix43();
541 bfloat* dPtr = (bfloat*) &bm;
542 float* sPtr = (float*) &m;
543 for (int i = 0; i < 12; i++)
544 {
545 dPtr[i] = sPtr[i];
546 }
547
548 return bm;
549 }

◆ operator Matrix()

static implicit BrawlLib.Internal.bMatrix43.operator Matrix ( bMatrix43  bm)
inlinestatic
476 {
477 Matrix m;
478
479 bfloat* sPtr = (bfloat*) &bm;
480 float* dPtr = (float*) &m;
481
482 dPtr[0] = sPtr[0];
483 dPtr[1] = sPtr[4];
484 dPtr[2] = sPtr[8];
485 dPtr[3] = 0.0f;
486 dPtr[4] = sPtr[1];
487 dPtr[5] = sPtr[5];
488 dPtr[6] = sPtr[9];
489 dPtr[7] = 0.0f;
490 dPtr[8] = sPtr[2];
491 dPtr[9] = sPtr[6];
492 dPtr[10] = sPtr[10];
493 dPtr[11] = 0.0f;
494 dPtr[12] = sPtr[3];
495 dPtr[13] = sPtr[7];
496 dPtr[14] = sPtr[11];
497 dPtr[15] = 1.0f;
498
499 return m;
500 }

◆ operator Matrix34()

static implicit BrawlLib.Internal.bMatrix43.operator Matrix34 ( bMatrix43  bm)
inlinestatic
526 {
527 Matrix34 m = new Matrix34();
528 float* dPtr = (float*) &m;
529 bfloat* sPtr = (bfloat*) &bm;
530 for (int i = 0; i < 12; i++)
531 {
532 dPtr[i] = sPtr[i];
533 }
534
535 return m;
536 }

◆ ToString()

override string BrawlLib.Internal.bMatrix43.ToString ( )
inline
469 {
470 return CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.Contains(",")
471 ? $"({this[0]} {this[1]} {this[2]} {this[3]})({this[4]} {this[5]} {this[6]} {this[7]})({this[8]} {this[9]} {this[10]} {this[11]})"
472 : $"({this[0]},{this[1]},{this[2]},{this[3]})({this[4]},{this[5]},{this[6]},{this[7]})({this[8]},{this[9]},{this[10]},{this[11]})";
473 }

Property Documentation

◆ Data

bfloat* BrawlLib.Internal.bMatrix43.Data
get
446 {
447 get
448 {
449 fixed (float* ptr = _data)
450 {
451 return (bfloat*) ptr;
452 }
453 }
454 }

◆ this[int index]

float BrawlLib.Internal.bMatrix43.this[int index]
getset
463 {
464 get => Data[index];
465 set => Data[index] = value;
466 }
bfloat * Data
Definition: BigEndianTypes.cs:446

◆ this[int x, int y]

float BrawlLib.Internal.bMatrix43.this[int x, int y]
getset
457 {
458 get => Data[(y << 2) + x];
459 set => Data[(y << 2) + x] = value;
460 }

The documentation for this struct was generated from the following file: