StlLoadOptions

Inheritance: java.lang.Object, com.aspose.threed.IOConfig, com.aspose.threed.LoadOptions

public class StlLoadOptions extends LoadOptions

STL のロードオプション

コンストラクタ

コンストラクタ説明
StlLoadOptions()新しい StlLoadOptions インスタンスを初期化します。
StlLoadOptions(FileContentType contentType)新しい StlLoadOptions インスタンスを初期化します。

メソッド

メソッド説明
equals(Object arg0)
getClass()
getEncoding()テキストベースのファイルのデフォルトエンコーディングを取得します。
getFileFormat()現在の保存/読み込みオプションで指定されたファイル形式を取得します。
getFileName()エクスポート/インポートシーンのファイル名。
getFileSystem()ロード/セーブ時に外部依存関係を管理する方法をユーザーが処理できるようにします。
getFileSystemFactory()FileSystem のファクトリークラスを取得します。
getFlipCoordinateSystem()インポート時に制御点/法線の座標系を反転するかどうかを取得します。
getLookupPaths()OBJ のような一部のファイルは外部ファイルに依存しており、検索パスにより Aspose.3D が外部ファイルを読み込むために探すことができます。
getRecalculateNormal()STL ファイルに保存されている法線データを無視し、頂点位置に基づいて法線データを再計算します。
hashCode()
notify()
notifyAll()
setEncoding(Charset value)テキストベースのファイルのデフォルトエンコーディングを設定します。
setFileName(String value)エクスポート/インポートシーンのファイル名。
setFileSystem(FileSystem value)ロード/セーブ時に外部依存関係を管理する方法をユーザーが処理できるようにします。
setFileSystemFactory(FileSystemFactory value)FileSystem のファクトリークラスを設定します。
setFlipCoordinateSystem(boolean value)インポート時に制御点/法線の座標系を反転するかどうかを設定します。
setLookupPaths(ArrayList value)OBJ のような一部のファイルは外部ファイルに依存しており、検索パスにより Aspose.3D が外部ファイルを読み込むために探すことができます。
setRecalculateNormal(boolean value)STL ファイルに保存されている法線データを無視し、頂点位置に基づいて法線データを再計算します。
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

StlLoadOptions()

public StlLoadOptions()

新しい StlLoadOptions インスタンスを初期化します。

StlLoadOptions(FileContentType contentType)

public StlLoadOptions(FileContentType contentType)

新しい StlLoadOptions インスタンスを初期化します。

Parameters:

パラメーター説明
contentTypeFileContentType

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

パラメーター説明
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getEncoding()

public Charset getEncoding()

テキストベースのファイルのデフォルトエンコーディングを取得します。デフォルト値は null で、インポーター/エクスポーターが使用するエンコーディングを決定します。

Returns: java.nio.charset.Charset - テキストベースのファイルのデフォルトエンコーディングです。デフォルト値は null で、インポーター/エクスポーターが使用するエンコーディングを決定します。

getFileFormat()

public FileFormat getFileFormat()

現在の保存/読み込みオプションで指定されたファイル形式を取得します。

Returns: FileFormat - the file format that specified in current Save/Load option.

getFileName()

public String getFileName()

エクスポート/インポートシーンのファイル名です。これはオプションですが、OBJ のマテリアルのような外部アセットをシリアライズする際に便利です。

Returns: java.lang.String - エクスポート/インポートシーンのファイル名です。これはオプションですが、OBJ のマテリアルのような外部アセットをシリアライズする際に便利です。

getFileSystem()

public FileSystem getFileSystem()

ロード/セーブ時に外部依存関係を管理する方法をユーザーが処理できるようにします。

Returns: FileSystem - Allow user to handle how to manage the external dependencies during load/save. Example: The default FileSystem is LocalFileSystem, it is not safe in environment like server side, But you can override the file system access by specifying a different implementation. Aspose.3D provides different FileSystem implementation like:

  • Memory-based file system
  • Directory-based file system
  • Dummy file system
  • Zip file system

また、独自の実装を使用することもできます。

Scene scene = new Scene();
             var material = new PhongMaterial();
             var boxNode = scene.getRootNode().createChildNode(new Box());
             boxNode.setMaterial(material);
 
             var opt = new ObjSaveOptions();
             var memFs = new HashMap<string, MemoryStream>();
             opt.setFileSystem(FileSystem.createMemoryFileSystem(memFs));
 			opt.setFileName("output.obj");
             try(var output = new ByteArrayOutputStream()) {
 				scene.save(output, opt);
 				//The material will be written to variable memFs named output.mtl
 				var materialInBytes = memFs["output.mtl"].toArray();
             }

getFileSystemFactory()

public static FileSystemFactory getFileSystemFactory()

FileSystem のファクトリークラスを取得します。デフォルトのファクトリーは com.aspose.threed.LocalFileSystem を作成しますが、サーバー環境には適していません。

Returns: FileSystemFactory - the factory class for FileSystem. The default factory will create com.aspose.threed.LocalFileSystem which is not suitable for server environment. Example: The default FileSystem in SaveOptions/LoadOptions is directory-based file system, You can override the default implementation by specify it through IOConfig.FileSystemFactory:

IOConfig.setFileSystemFactory(new FileSystemFactory() {
 				@Override
 				public FileSystem call() {
 					return FileSystem.createDummyFileSystem();
 				}
 			});
 
             Scene scene = new Scene();
             var material = new PhongMaterial();
             var boxNode = scene.getRootNode().createChildNode(new Box());
             boxNode.setMaterial(material);
 
             //opt.FileSystem would be dummy file system now
             var opt = new ObjSaveOptions();
             scene.Save("output.obj", opt);
             //the material file output.mtl will not be written to any places because we've configured a dummy file system as default implementation.

getFlipCoordinateSystem()

public boolean getFlipCoordinateSystem()

インポート時に制御点/法線の座標系を反転するかどうかを取得します。

Returns: boolean - インポート時に制御点/法線の座標系を反転するかどうか。

getLookupPaths()

public ArrayList<String> getLookupPaths()

OBJ のような一部のファイルは外部ファイルに依存しており、検索パスにより Aspose.3D が外部ファイルを読み込むために探すことができます。

Returns: java.util.ArrayList<java.lang.String> - OBJ のような一部のファイルは外部ファイルに依存しており、検索パスにより Aspose.3D が外部ファイルを探してロードできるようになります。Example: 以下のコードは、テクスチャの検索パスを手動で指定する方法を示しており、インポーターが見つけられるようにします

var opt = new ObjLoadOptions();
             //Specify the lookup paths, so the textures can be located.
             opt.getLookupPaths().add("textures");
             var scene = Scene.fromFile("input.obj", opt);
             scene.save("output.glb");

getRecalculateNormal()

public boolean getRecalculateNormal()

STL ファイルに保存されている法線データを無視し、頂点位置に基づいて法線データを再計算します。デフォルト値は false です。

Returns: boolean - STL ファイルに保存されている法線データを無視し、頂点位置に基づいて法線データを再計算します。デフォルト値は false です。

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setEncoding(Charset value)

public void setEncoding(Charset value)

テキストベースのファイルのデフォルトエンコーディングを設定します。デフォルト値は null で、インポーター/エクスポーターが使用するエンコーディングを決定することを意味します。

Parameters:

パラメーター説明
java.nio.charset.Charset新しい値

setFileName(String value)

public void setFileName(String value)

エクスポート/インポートシーンのファイル名です。これはオプションですが、OBJ のマテリアルのような外部アセットをシリアライズする際に便利です。

Parameters:

パラメーター説明
java.lang.String新しい値

setFileSystem(FileSystem value)

public void setFileSystem(FileSystem value)

ロード/セーブ時に外部依存関係を管理する方法をユーザーが処理できるようにします。

Parameters:

パラメーター説明
valueFileSystem
  • Memory-based file system
  • Directory-based file system
  • Dummy file system
  • Zip file system

また、独自の実装を使用することもできます。

Scene scene = new Scene();
             var material = new PhongMaterial();
             var boxNode = scene.getRootNode().createChildNode(new Box());
             boxNode.setMaterial(material);
 
             var opt = new ObjSaveOptions();
             var memFs = new HashMap<string, MemoryStream>();
             opt.setFileSystem(FileSystem.createMemoryFileSystem(memFs));
 			opt.setFileName("output.obj");
             try(var output = new ByteArrayOutputStream()) {
 				scene.save(output, opt);
 				//The material will be written to variable memFs named output.mtl
 				var materialInBytes = memFs["output.mtl"].toArray();
             }
``` |

### setFileSystemFactory(FileSystemFactory value) {#setFileSystemFactory-com.aspose.threed.FileSystemFactory-}

public static void setFileSystemFactory(FileSystemFactory value)



FileSystem のファクトリークラスを設定します。デフォルトのファクトリーは com.aspose.threed.LocalFileSystem を作成しますが、サーバー環境には適していません。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
|  | value | [FileSystemFactory](../../com.aspose.threed/filesystemfactory) | 新しい値 **Example:** SaveOptions/LoadOptions のデフォルト FileSystem はディレクトリベースのファイルシステムです。IOConfig.FileSystemFactory を介して指定することでデフォルトの実装をオーバーライドできます: |

IOConfig.setFileSystemFactory(new FileSystemFactory() { @Override public FileSystem call() { return FileSystem.createDummyFileSystem(); } });

         Scene scene = new Scene();
         var material = new PhongMaterial();
         var boxNode = scene.getRootNode().createChildNode(new Box());
         boxNode.setMaterial(material);

         //opt.FileSystem would be dummy file system now
         var opt = new ObjSaveOptions();
         scene.Save("output.obj", opt);
         //the material file output.mtl will not be written to any places because we've configured a dummy file system as default implementation.

### setFlipCoordinateSystem(boolean value) {#setFlipCoordinateSystem-boolean-}

public void setFlipCoordinateSystem(boolean value)



インポート時に制御点/法線の座標系を反転するかどうかを設定します。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| 値 | boolean | 新しい値 |

### setLookupPaths(ArrayList<String> value) {#setLookupPaths-java.util.ArrayList-java.lang.String--}

public void setLookupPaths(ArrayList value)



OBJ のような一部のファイルは外部ファイルに依存しており、検索パスにより Aspose.3D が外部ファイルを読み込むために探すことができます。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
|  | 値 | java.util.ArrayList<java.lang.String> | 新しい値 **Example:** 以下のコードは、テクスチャの検索パスを手動で指定する方法を示しており、インポーターが見つけられるようにします |

var opt = new ObjLoadOptions(); //Specify the lookup paths, so the textures can be located. opt.getLookupPaths().add(“textures”); var scene = Scene.fromFile(“input.obj”, opt); scene.save(“output.glb”);


### setRecalculateNormal(boolean value) {#setRecalculateNormal-boolean-}

public void setRecalculateNormal(boolean value)



STL ファイルに保存されている法線データを無視し、頂点位置に基づいて法線データを再計算します。デフォルト値は false です。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| 値 | boolean | 新しい値 |

### toString() {#toString--}

public String toString()





**Returns:**
java.lang.String
### wait() {#wait--}

public final void wait()





### wait(long arg0) {#wait-long-}

public final void wait(long arg0)





**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}

public final void wait(long arg0, int arg1)





**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |