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

Public Member Functions

override string ToString ()
 

Static Public Member Functions

static implicit operator Matrix (bMatrix bm)
 
static implicit operator bMatrix (Matrix m)
 

Properties

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

Member Function Documentation

◆ operator bMatrix()

static implicit BrawlLib.Internal.bMatrix.operator bMatrix ( Matrix  m)
inlinestatic
601 {
602 bMatrix bm = new bMatrix();
603 bfloat* dPtr = (bfloat*) &bm;
604 float* sPtr = (float*) &m;
605 for (int i = 0; i < 16; i++)
606 {
607 dPtr[i] = sPtr[i];
608 }
609
610 return bm;
611 }

◆ operator Matrix()

static implicit BrawlLib.Internal.bMatrix.operator Matrix ( bMatrix  bm)
inlinestatic
588 {
589 Matrix m = new Matrix();
590 float* dPtr = (float*) &m;
591 bfloat* sPtr = (bfloat*) &bm;
592 for (int i = 0; i < 16; i++)
593 {
594 dPtr[i] = sPtr[i];
595 }
596
597 return m;
598 }

◆ ToString()

override string BrawlLib.Internal.bMatrix.ToString ( )
inline
581 {
582 return CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.Contains(",")
583 ? $"({this[0]} {this[1]} {this[2]} {this[3]})({this[4]} {this[5]} {this[6]} {this[7]})({this[8]} {this[9]} {this[10]} {this[11]})({this[12]} {this[13]} {this[14]} {this[15]})"
584 : $"({this[0]},{this[1]},{this[2]},{this[3]})({this[4]},{this[5]},{this[6]},{this[7]})({this[8]},{this[9]},{this[10]},{this[11]})({this[12]},{this[13]},{this[14]},{this[15]})";
585 }

Property Documentation

◆ Data

bfloat* BrawlLib.Internal.bMatrix.Data
get
558 {
559 get
560 {
561 fixed (float* ptr = _data)
562 {
563 return (bfloat*) ptr;
564 }
565 }
566 }

◆ this[int index]

float BrawlLib.Internal.bMatrix.this[int index]
getset
575 {
576 get => Data[index];
577 set => Data[index] = value;
578 }
bfloat * Data
Definition: BigEndianTypes.cs:558

◆ this[int x, int y]

float BrawlLib.Internal.bMatrix.this[int x, int y]
getset
569 {
570 get => Data[(y << 2) + x];
571 set => Data[(y << 2) + x] = value;
572 }

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