Load and Save Options

Load and Save Options — Aspose.3D FOSS for Java

FbxSaveOptions

すべてのインポートおよびエクスポート操作は、から派生したオプションオブジェクト(任意)を受け入れます LoadOptions または SaveOptions.。適切なサブクラスを に渡します Scene.open() または Scene.save() フォーマット固有の動作を制御します。.

FbxSaveOptions: com.aspose.threed

import com.aspose.threed.*;

LoadOptions

すべての load-option オブジェクトの基底クラス。Extends A3DObject.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()この設定が関連付けられているフォーマット(読み取り専用)

SaveOptions

すべての save-option オブジェクトの基底クラス。Extends A3DObject.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()この設定が関連付けられているフォーマット(読み取り専用)

ObjLoadOptions

Wavefront OBJ ファイルのロードオプション(.obj).

import com.aspose.threed.*;

ObjLoadOptions opts = new ObjLoadOptions();
opts.setFlipCoordinateSystem(true);
opts.setScale(0.01);
Scene scene = new Scene();
scene.open("model.obj", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseインポート時に座標系を反転する
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)true付随するものをロードする .mtl マテリアルファイル
scaledoublegetScale()setScale(double)1.0インポートされたすべてのジオメトリに均一スケールを適用
normalizeNormalbooleangetNormalizeNormal()setNormalizeNormal(boolean)trueインポートされた法線ベクトルを単位長さに正規化

ObjSaveOptions

Wavefront OBJ ファイルの保存オプションです。.

import com.aspose.threed.*;

ObjSaveOptions opts = new ObjSaveOptions();
opts.setEnableMaterials(false);
scene.save("output.obj", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
applyUnitScalebooleangetApplyUnitScale()setApplyUnitScale(boolean)falseシーンの単位スケール係数をエクスポート座標に適用
pointCloudbooleangetPointCloud()setPointCloud(boolean)false頂点のみエクスポート(ポリゴン面は含めない)
verbosebooleangetVerbose()setVerbose(boolean)false出力に追加のOBJコメントを含める
serializeWbooleangetSerializeW()setSerializeW(boolean)false制御点のW成分を書き込む
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)true書く .mtl material file を作成し、そこから参照する .obj
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseエクスポート時に座標系を反転する

GltfLoadOptions

glTF 2.0 および GLB ファイルのロードオプション (.gltf, .glb).

import com.aspose.threed.*;

GltfLoadOptions opts = new GltfLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("model.gltf", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseインポート時に座標系を反転する
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)false可読性のためにインデント付きで出力 JSON を整形する

GltfSaveOptions

glTF 2.0 と GLB 出力の保存オプション。.

import com.aspose.threed.*;
import com.aspose.threed.FileContentType;

// Save as glTF JSON
GltfSaveOptions opts = new GltfSaveOptions();
scene.save("output.gltf", opts);

// Save as GLB (binary glTF)
GltfSaveOptions glbOpts = new GltfSaveOptions();
glbOpts.setContentType(FileContentType.BINARY);
scene.save("output.glb", glbOpts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
contentTypeFileContentTypegetContentType()setContentType(FileContentType)FileContentType.ASCII設定 FileContentType.BINARY 自己完結型 GLB ファイルを生成するには; 設定 FileContentType.ASCII JSON 用 .gltf 外部バッファ付き
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseエクスポート時に座標系を反転する
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)false出力JSONをインデントで整形し、可読性を高める
bufferFilePrefixStringgetBufferFilePrefix()setBufferFilePrefix(String)null外部バッファファイル名のプレフィックス
saveExtrasStringgetSaveExtras()setSaveExtras(String)nullglTF出力に含めるカスタム extras データ

StlLoadOptions

STL ファイルのロードオプション (.stl).

import com.aspose.threed.*;

StlLoadOptions opts = new StlLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("part.stl", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseインポート時に座標系を反転
recalculateNormalbooleangetRecalculateNormal()setRecalculateNormal(boolean)falseインポート時にジオメトリから法線を再計算
contentTypeFileContentTypegetContentType()setContentType(FileContentType)バイナリと ASCII STL の検出に関するヒント

StlSaveOptions

STL 出力の保存オプション。.

import com.aspose.threed.*;

StlSaveOptions opts = new StlSaveOptions();
opts.setContentType(FileContentType.BINARY);
scene.save("output.stl", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseエクスポート時に座標系を反転
axisSystemAxisSystemgetAxisSystem()setAxisSystem(AxisSystem)エクスポート時に対象軸系を上書き
contentTypeFileContentTypegetContentType()setContentType(FileContentType)FileContentType.BINARY設定 BINARY または ASCII 出力形式を制御するために

FbxLoadOptions

FBX ファイルのロードオプション (.fbx).

import com.aspose.threed.*;

FbxLoadOptions opts = new FbxLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("animation.fbx", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseインポート時に座標系を反転する

FbxSaveOptions

注意:: FBX エクスポートは 利用できません Java FOSS エディションでは、FBX はインポートのみサポートされています。この FbxSaveOptions クラスは API に存在しますが、保存に使用するとエラーが発生します。代わりに OBJ、STL、glTF、または GLB をエクスポートに使用してください。.


参照

 日本語