From 9aea871fe08afd80a99b26879951581a702b151a Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Wed, 21 Jun 2017 06:46:52 +0100 Subject: [PATCH] Add --viewpoint and --orthographic. Use to set up the view using the built-in defaults. Note that they are mutually exclusive with --camera. --- common/lc_application.cpp | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/common/lc_application.cpp b/common/lc_application.cpp index e7df838b..4faf5316 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -182,6 +182,7 @@ bool lcApplication::Initialize(int argc, char* argv[], const char* LibraryInstal bool SaveImage = false; bool SaveWavefront = false; bool Save3DS = false; + bool Orthographic = false; bool ImageHighlight = false; int ImageWidth = lcGetProfileInt(LC_PROFILE_IMAGE_WIDTH); int ImageHeight = lcGetProfileInt(LC_PROFILE_IMAGE_HEIGHT); @@ -190,6 +191,7 @@ bool lcApplication::Initialize(int argc, char* argv[], const char* LibraryInstal char* ImageName = nullptr; char* ModelName = nullptr; char* CameraName = nullptr; + char* Viewpoint = nullptr; char* ProjectName = nullptr; char* SaveWavefrontName = nullptr; char* Save3DSName = nullptr; @@ -251,6 +253,16 @@ bool lcApplication::Initialize(int argc, char* argv[], const char* LibraryInstal CameraName = argv[i]; } } + else if (strcmp(Param, "--viewpoint") == 0) + { + if ((argc > (i+1)) && (argv[i+1][0] != '-')) + { + i++; + Viewpoint = argv[i]; + } + } + else if (strcmp(Param, "--orthographic") == 0) + Orthographic = true; else if (strcmp(Param, "--highlight") == 0) ImageHighlight = true; else if ((strcmp(Param, "-wf") == 0) || (strcmp(Param, "--export-wavefront") == 0)) @@ -293,6 +305,8 @@ bool lcApplication::Initialize(int argc, char* argv[], const char* LibraryInstal printf(" -t, --to