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

Public Member Functions

 TextureFrameState (SRTAnimationFrame frame, TexMatrixMode matrixMode, bool indirect)
 
 TextureFrameState (Vector2 scale, float rotation, Vector2 translation, TexMatrixMode matrixMode, bool indirect)
 
void CalcTransforms ()
 
override string ToString ()
 

Static Public Member Functions

static operator SRTAnimationFrame (TextureFrameState state)
 

Public Attributes

Matrix _transform
 

Static Public Attributes

static readonly TextureFrameState Neutral
 

Properties

unsafe float this[int index] [get, set]
 
Vector2 Translate [get, set]
 
float Rotate [get, set]
 
Vector2 Scale [get, set]
 
int Flags [get]
 Bit flags used for texture matrix calculation More...
 
TexMatrixMode MatrixMode [get, set]
 
bool Indirect [get, set]
 

Constructor & Destructor Documentation

◆ TextureFrameState() [1/2]

BrawlLib.Modeling.TextureFrameState.TextureFrameState ( SRTAnimationFrame  frame,
TexMatrixMode  matrixMode,
bool  indirect 
)
inline
190 {
191 _scale = frame.Scale;
192 _rotate = frame.Rotation;
193 _translate = frame.Translation;
194 _matrixMode = matrixMode;
195 _flags = 0;
196 _indirect = indirect;
197
199 }
void CalcTransforms()
Definition: FrameState.cs:233
Vector2 Translation
Definition: AnimationFrame.cs:191
float Rotation
Definition: AnimationFrame.cs:190
Vector2 Scale
Definition: AnimationFrame.cs:189

◆ TextureFrameState() [2/2]

BrawlLib.Modeling.TextureFrameState.TextureFrameState ( Vector2  scale,
float  rotation,
Vector2  translation,
TexMatrixMode  matrixMode,
bool  indirect 
)
inline
203 {
204 _scale = scale;
205 _rotate = rotation;
206 _translate = translation;
207 _matrixMode = matrixMode;
208 _flags = 0;
209 _indirect = indirect;
210
212 }

Member Function Documentation

◆ CalcTransforms()

void BrawlLib.Modeling.TextureFrameState.CalcTransforms ( )
inline
234 {
235 CalcFlags();
237 }
Definition: Matrix34.cs:15
static Matrix34 TextureMatrix(TextureFrameState state)
Definition: Matrix34.cs:385
Definition: Matrix.cs:14
Matrix _transform
Definition: FrameState.cs:111

◆ operator SRTAnimationFrame()

static BrawlLib.Modeling.TextureFrameState.operator SRTAnimationFrame ( TextureFrameState  state)
inlineexplicitstatic
248 {
249 return new SRTAnimationFrame(state._scale, state._rotate, state._translate);
250 }
Definition: AnimationFrame.cs:185

◆ ToString()

override string BrawlLib.Modeling.TextureFrameState.ToString ( )
inline
240 {
241 return $"{_scale.ToString()}, {_rotate.ToString()}, {_translate.ToString()}";
242 }

Member Data Documentation

◆ _transform

Matrix BrawlLib.Modeling.TextureFrameState._transform

◆ Neutral

readonly TextureFrameState BrawlLib.Modeling.TextureFrameState.Neutral
static
Initial value:
=
new TextureFrameState(new Vector2(1.0f), 0, new Vector2(), TexMatrixMode.MatrixMaya, false)
TextureFrameState(SRTAnimationFrame frame, TexMatrixMode matrixMode, bool indirect)
Definition: FrameState.cs:189

Property Documentation

◆ Flags

int BrawlLib.Modeling.TextureFrameState.Flags
get

Bit flags used for texture matrix calculation

◆ Indirect

bool BrawlLib.Modeling.TextureFrameState.Indirect
getset
180 {
181 get => _indirect;
182 set
183 {
184 _indirect = value;
186 }
187 }

◆ MatrixMode

TexMatrixMode BrawlLib.Modeling.TextureFrameState.MatrixMode
getset
170 {
171 get => _matrixMode;
172 set
173 {
174 _matrixMode = value;
176 }
177 }

◆ Rotate

float BrawlLib.Modeling.TextureFrameState.Rotate
getset
145 {
146 get => _rotate;
147 set
148 {
149 _rotate = value;
151 }
152 }

◆ Scale

Vector2 BrawlLib.Modeling.TextureFrameState.Scale
getset
155 {
156 get => _scale;
157 set
158 {
159 _scale = value;
161 }
162 }

◆ this[int index]

unsafe float BrawlLib.Modeling.TextureFrameState.this[int index]
getset
117 {
118 get
119 {
120 fixed (TextureFrameState* f = &this)
121 {
122 return ((float*) f)[index];
123 }
124 }
125 set
126 {
127 fixed (TextureFrameState* f = &this)
128 {
129 ((float*) f)[index] = value;
130 }
131 }
132 }

◆ Translate

Vector2 BrawlLib.Modeling.TextureFrameState.Translate
getset
135 {
136 get => _translate;
137 set
138 {
139 _translate = value;
141 }
142 }

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