Browse Source

Add plFormat handler for hsMatrix44.

Darryl Pogue 10 years ago committed by Michael Hansen
parent
commit
75dc93db2a
  1. 10
      Sources/Plasma/CoreLib/hsMatrix44.cpp
  2. 3
      Sources/Plasma/CoreLib/plFormat.h

10
Sources/Plasma/CoreLib/hsMatrix44.cpp

@ -926,3 +926,13 @@ void hsMatrix44::Write(hsStream *stream)
stream->WriteLEFloat(fMap[i][j]); stream->WriteLEFloat(fMap[i][j]);
} }
} }
PL_FORMAT_IMPL(const hsMatrix44&)
{
PL_FORMAT_FORWARD(plFormat("hsMatrix44[[{.4f}, {.4f}, {.4f}, {.4f}]; [{.4f}, {.4f}, {.4f}, {.4f}]; [{.4f}, {.4f}, {.4f}, {.4f}]; [{.4f}, {.4f}, {.4f}, {.4f}]]",
value.fMap[0][0], value.fMap[0][1], value.fMap[0][2], value.fMap[0][3],
value.fMap[1][0], value.fMap[1][1], value.fMap[1][2], value.fMap[1][3],
value.fMap[2][0], value.fMap[2][1], value.fMap[2][2], value.fMap[2][3],
value.fMap[3][0], value.fMap[3][1], value.fMap[3][2], value.fMap[3][3]));
}

3
Sources/Plasma/CoreLib/plFormat.h

@ -216,6 +216,9 @@ namespace plFormat_Private
// Format for plUUID // Format for plUUID
PL_FORMAT_TYPE(const class plUUID &) PL_FORMAT_TYPE(const class plUUID &)
// Format for hsMatrix44
PL_FORMAT_TYPE(const struct hsMatrix44 &)
// ================================== // ==================================
// END: Formattable type declarations // END: Formattable type declarations
// ================================== // ==================================

Loading…
Cancel
Save