Commit 0e867cb5 authored by David Llewellyn-Jones's avatar David Llewellyn-Jones

Added option to export animation frames in STL format.

parent 0e7dce55
......@@ -216,6 +216,15 @@
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="MenuExportAnimSTL">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="label" translatable="yes">STL</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
</child>
</object>
......
......@@ -170,8 +170,8 @@ bool ExportModelAnimatedSTL (char const * szFilename, bool boBinary, bool boScre
fTimeIncrement = (fTimeEnd - fTimeStart) / ((double)nFrames);
// Create the format for the filename
szFileNameFormat = g_string_new ("");
// Format is a decimal integer with EXPORTANIM_FRAMES_EXP digits padded with zeros, followed by .ply
g_string_printf (szFileNameFormat, "%%0%dd.ply", EXPORTANIM_FRAMES_EXP);
// Format is a decimal integer with EXPORTANIM_FRAMES_EXP digits padded with zeros, followed by .stl
g_string_printf (szFileNameFormat, "%%0%dd.stl", EXPORTANIM_FRAMES_EXP);
szFileIncrement = g_string_new ("");
fTime = fTimeStart;
......
This diff is collapsed.
......@@ -2607,7 +2607,7 @@ bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScr
}
*/
bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData) {
bool ExportModelFileAnimatedPLY (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData) {
bool boSuccess;
boSuccess = ExportModelAnimatedPLY (szFilename, boBinary, boScreenCoords, boExportAlpha, fMultiplier, fScale, fTimeStart, fTimeEnd, nFrames, psVisData->psFuncList);
......@@ -2615,6 +2615,14 @@ bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScr
return boSuccess;
}
bool ExportModelFileAnimatedSTL (char const * szFilename, bool boBinary, bool boScreenCoords, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData) {
bool boSuccess;
boSuccess = ExportModelAnimatedSTL (szFilename, boBinary, boScreenCoords, fMultiplier, fScale, fTimeStart, fTimeEnd, nFrames, psVisData->psFuncList);
return boSuccess;
}
ControlvarPersist * SetControlVar (char const * const szVarName, char const * const szVarValue, VisPersist * psVisData) {
ControlvarPersist * psControlvarData;
GSList * psControlvarList;
......
......@@ -116,7 +116,8 @@ void GetView (float * pfViewRadius, float * pfRotation, float * pfElevation, Vis
void ScaleFunctionRange (double fScale, VisPersist * psVisData);
bool ExportModelFilePLY (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, VisPersist * psVisData);
bool ExportModelFileSTL (char const * szFilename, bool boBinary, bool boScreenCoords, double fMultiplier, double fScale, VisPersist * psVisData);
bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData);
bool ExportModelFileAnimatedPLY (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData);
bool ExportModelFileAnimatedSTL (char const * szFilename, bool boBinary, bool boScreenCoords, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData);
void SetPauseAnimation (bool boPause, VisPersist * psVisData);
bool GetPauseAnimation (VisPersist * psVisData);
ControlvarPersist * SetControlVar (char const * const szVarName, char const * const szVarValue, VisPersist * psVisData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment