-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a single base type for 3D assets that will appear in the view…
…er when selected.
- Loading branch information
1 parent
91a0191
commit 932e648
Showing
43 changed files
with
174 additions
and
168 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
FinModelUtility/Fin/Fin.Ui/src/rendering/gl/scene/SceneRenderer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
FinModelUtility/Fin/Fin/src/importers/ImportersInterfaces.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using fin.io.bundles; | ||
|
||
namespace fin.importers { | ||
public interface IImporter<out T, in TFileBundle> | ||
where TFileBundle : IFileBundle { | ||
T Import(TFileBundle fileBundle); | ||
} | ||
|
||
|
||
public interface I3dFileBundle : IFileBundle { | ||
/// <summary> | ||
/// Whether to use a low-level exporter when exporting. This supports | ||
/// less features at the moment, but is required for exporting huge | ||
/// models without running into out of memory exceptions. | ||
/// </summary> | ||
bool UseLowLevelExporter => false; | ||
|
||
bool ForceGarbageCollection => false; | ||
} | ||
|
||
public interface I3dImporter<out T, in TFileBundle> | ||
: IImporter<T, TFileBundle> | ||
where TFileBundle : I3dFileBundle; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
FinModelUtility/Fin/Fin/src/model/io/importers/IModelImporter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace fin.model.io.importers { | ||
using fin.importers; | ||
|
||
namespace fin.model.io.importers { | ||
public interface IModelImporter<in TModelFileBundle> | ||
where TModelFileBundle : IModelFileBundle { | ||
IModel ImportModel(TModelFileBundle modelFileBundle); | ||
} | ||
: I3dImporter<IModel, TModelFileBundle> | ||
where TModelFileBundle : IModelFileBundle; | ||
|
||
public interface IAsyncModelImporter<in TModelFileBundle> | ||
: IModelImporter<TModelFileBundle> | ||
where TModelFileBundle : IModelFileBundle { | ||
IModel IModelImporter<TModelFileBundle>.ImportModel( | ||
IModel IImporter<IModel, TModelFileBundle>.Import( | ||
TModelFileBundle modelFileBundle) | ||
=> this.ImportModelAsync(modelFileBundle).Result; | ||
=> this.ImportAsync(modelFileBundle).Result; | ||
|
||
Task<IModel> ImportModelAsync(TModelFileBundle modelFileBundle); | ||
Task<IModel> ImportAsync(TModelFileBundle modelFileBundle); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.