|
resonance 1.0.1
|
One placed part of a FreQ avatar. More...
#include <freqpart.h>

Classes | |
| struct | Packed |
| Eight-byte transfer form of a part that Pack() writes and Unpack() reads. More... | |
Public Member Functions | |
| FreqPart () | |
| Construct a part with no template, run through Reset(). | |
| FreqPart (FreqPartTemplate *pTemplate) | |
| Construct a part of one template at the origin. | |
| FreqPart (const FreqPart &other) | |
| Copy another part through operator=(). | |
| ~FreqPart () | |
| Delete the mesh. | |
| void | operator= (const FreqPart &other) |
| Copy another part, cloning a fresh mesh from the other part's mesh. | |
| Rnd::Mesh * | GetMesh () const |
| Report the mesh. | |
| void | SetMesh (Rnd::Mesh *pMesh) |
| Replace the mesh, deleting the one this part had. | |
| Color * | GetColor () |
| Report the colour the mesh is drawn in. | |
| void | SetColor (const Color &color) |
| Record a colour and apply it to the mesh. | |
| void | Reset () |
| Clear every member without deleting the mesh. | |
| void | Pack (Packed *pOut) |
| Write the transfer form. | |
| void | Unpack (const Packed &packed) |
| Read the transfer form. | |
Public Attributes | |
| FreqPartTemplate * | mTemplate |
| The template this part is an instance of. | |
| Vector3 | mPosition |
| The placement. | |
| int | mMirrored |
| Non-zero when the part is mirrored. | |
| Vector2 | mPalettePosition |
| The palette position the colour is taken from, (-1, -1) while unset. | |
One placed part of a FreQ avatar.
The class is not polymorphic and emits no RTTI descriptor, and no literal in the image identifies it, so the name is inferred from its one owner. FreqAppearanceDetail stores a std::list of pointers to these, and each part pairs a FreQ maker part template with a placement, a palette position, a mesh cloned for it, and the colour that mesh is drawn in. The destructor takes an __in_chrg argument and the allocation that FreqAppearanceDetail makes is 0x40 bytes.
The translation unit spans 0x00174de8 to 0x001773c0. Besides the members below, it has template library emissions at 0x00174f28, 0x00175100, 0x001761f8, 0x00176790, 0x00176bb8, 0x00176cc0, 0x00176dc8, and 0x001772f8.
| FreqPart::FreqPart | ( | ) |
Construct a part with no template, run through Reset().
|
explicit |
Construct a part of one template at the origin.
| pTemplate | The template the part is an instance of. |
| FreqPart::FreqPart | ( | const FreqPart & | other | ) |
Copy another part through operator=().
| other | The part to copy. |
| FreqPart::~FreqPart | ( | ) |
Delete the mesh.
| void FreqPart::operator= | ( | const FreqPart & | other | ) |
Copy another part, cloning a fresh mesh from the other part's mesh.
The template, the placement, the mirrored flag, and the colour are copied first. The mesh this part has is deleted, a new one is cloned through the FreQ maker asset manager under a generated name, the other part's mesh is copied into it, the colour is applied to it, and the palette position is copied last. The routine returns nothing.
| other | The part to copy. |
|
inline |
Report the mesh.
Defined in the header. The out-of-line copy is called by FreqAppearanceDetail.
| void FreqPart::SetMesh | ( | Rnd::Mesh * | pMesh | ) |
Replace the mesh, deleting the one this part had.
| pMesh | The new mesh. |
|
inline |
Report the colour the mesh is drawn in.
Defined in the header. The out-of-line copy is called by FreqAppearance::RenderBurnTextures() and FreqAppearanceDetail.
| void FreqPart::SetColor | ( | const Color & | color | ) |
Record a colour and apply it to the mesh.
A part whose template does not take a colour records opaque black in its place.
| color | The colour. |
| void FreqPart::Reset | ( | ) |
Clear every member without deleting the mesh.
The palette position becomes (-1, -1) and the colour becomes g_freqMakerDefaultColor.
| void FreqPart::Pack | ( | Packed * | pOut | ) |
Write the transfer form.
The palette position is clamped to the unit range, stored back, and scaled to a byte.
| pOut | The record to write. |
| void FreqPart::Unpack | ( | const Packed & | packed | ) |
Read the transfer form.
The template is looked up through the FreQ maker asset manager by the absolute identifier, and a negative identifier marks the part mirrored. The placement y is cleared.
| packed | The record to read. |
| FreqPartTemplate* FreqPart::mTemplate |
The template this part is an instance of.
+0x00
Public because FreqAppearanceDetail::unpack() reads it directly, and the image has no accessor.
| Vector3 FreqPart::mPosition |
The placement.
+0x10
Public because FreqAppearanceDetail::unpack() raises it and copies it into the mesh directly, and the image has no accessor.
| int FreqPart::mMirrored |
Non-zero when the part is mirrored.
+0x20
Public because FreqAppearanceDetail::unpack() reads it directly, and the image has no accessor.
| Vector2 FreqPart::mPalettePosition |
The palette position the colour is taken from, (-1, -1) while unset.
+0x24
Public because FreqAppearanceDetail::unpack() reads it directly, and the image has no accessor.