public Model(string name, ModelGroupName modelGroupName, bool noSampleImages)
 {
     fileName = name;
     if (noSampleImages == false)
     {
         sampleImageName = "Figures/SampleImages" + '/' + name.Replace(".gltf", ".png");
     }
     camera = CustomCameraList.GetCamera(modelGroupName);
 }
            internal static Camera GetCamera(ModelGroupName modelGroup)
            {
                // Checks if the list has been initialized, so it isn't recreated multiple times.
                if (customCameraList == null)
                {
                    BuildCameraParings();
                }

                // Searches the list for a matching custom camera
                var    custom = customCameraList.Find(e => e.modelGroup == modelGroup);
                Camera camera;

                // Use the custom camera if it is found, otherwise use the default camera
                if (custom == null)
                {
                    camera = customCameraList[0].camera;
                }
                else
                {
                    camera = custom.camera;
                }

                return(camera);
            }
Esempio n. 3
0
 public Manifest(ModelGroupName name)
 {
     folder = name.ToString();
 }
 internal ModelCameraPairing(Camera cameraSettings, ModelGroupName name)
 {
     camera     = cameraSettings;
     modelGroup = name;
 }