Load and Save Options

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

FbxSaveOptions

Visi importo ir eksporto veiksmai priima pasirenkamą parametrų objektą, gautą iš LoadOptions arba SaveOptions. Perduokite atitinkamą po‑klasę į Scene.open() arba Scene.save() norint valdyti formatui būdingą elgseną.

FbxSaveOptions: com.aspose.threed

import com.aspose.threed.*;

LoadOptions

Bazinė klasė visiems įkėlimo parinkčių objektams. Išplečia A3DObject.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()Format, su kuriuo susijęs šis konfigūracijos objektas (tik skaitymui)

SaveOptions

Bazinė klasė visiems išsaugojimo parinkčių objektams. Išplečia A3DObject.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()Format, su kuriuo susijęs šis konfigūracijos objektas (tik skaitymui)

ObjLoadOptions

Įkėlimo parinktys Wavefront OBJ failams (.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)falseApversti koordinatų sistemą importuojant
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueĮkelti pridedamą .mtl medžiagos failas
scaledoublegetScale()setScale(double)1.0Vienodas mastelis taikomas visai importuotai geometrijai
normalizeNormalbooleangetNormalizeNormal()setNormalizeNormal(boolean)trueNormalizuoti importuotas normalių vektorius iki vieneto ilgio

ObjSaveOptions

Išsaugojimo parinktys Wavefront OBJ failams.

import com.aspose.threed.*;

ObjSaveOptions opts = new ObjSaveOptions();
opts.setEnableMaterials(false);
scene.save("output.obj", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
applyUnitScalebooleangetApplyUnitScale()setApplyUnitScale(boolean)falseTaikyti scenos vieneto mastelio koeficientą eksportuotoms koordinatėms
pointCloudbooleangetPointCloud()setPointCloud(boolean)falseEksportuoti tik viršūnes (be daugiakampių paviršių)
verbosebooleangetVerbose()setVerbose(boolean)falseĮtraukti papildomus OBJ komentarus į išvestį
serializeWbooleangetSerializeW()setSerializeW(boolean)falseĮrašykite W komponentą valdymo taškų
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueĮrašykite a .mtl medžiagos failą ir nurodyti jį iš .obj
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseApversti koordinatų sistemą eksportuojant

GltfLoadOptions

Įkelti parinktis glTF 2.0 ir GLB failams (.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)falseApversti koordinatų sistemą importuojant
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)falseFormatuoti išvesties JSON su įtraukų, kad būtų lengviau skaityti

GltfSaveOptions

Išsaugojimo parinktys glTF 2.0 ir GLB išvestims.

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.ASCIINustatyti į FileContentType.BINARY sukurti savarankišką GLB failą; nustatyti į FileContentType.ASCII JSON .gltf su išoriniu buferiu
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseApversti koordinatų sistemą eksportuojant
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)falseFormatuokite išvesties JSON su įtraukų, kad būtų patogiau skaityti
bufferFilePrefixStringgetBufferFilePrefix()setBufferFilePrefix(String)nullPrefiksas išorinių buferio failų pavadinimams
saveExtrasStringgetSaveExtras()setSaveExtras(String)nullPasirinktiniai papildomi duomenys, įtraukiami į glTF išvestį

StlLoadOptions

Įkėlimo parinktys STL failams (.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)falseApversti koordinačių sistemą importuojant
recalculateNormalbooleangetRecalculateNormal()setRecalculateNormal(boolean)falseImportuojant perskaičiuoti normalės iš geometrijos
contentTypeFileContentTypegetContentType()setContentType(FileContentType)Užuomina binarinio ir ASCII STL aptikimui

StlSaveOptions

Išsaugojimo parinktys STL išvestims.

import com.aspose.threed.*;

StlSaveOptions opts = new StlSaveOptions();
opts.setContentType(FileContentType.BINARY);
scene.save("output.stl", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseApversti koordinačių sistemą eksportuojant
axisSystemAxisSystemgetAxisSystem()setAxisSystem(AxisSystem)Perrašyti tikslo ašies sistemą eksporte
contentTypeFileContentTypegetContentType()setContentType(FileContentType)FileContentType.BINARYNustatyti į BINARY arba ASCII valdyti išvesties formatą

FbxLoadOptions

Įkelti FBX failų parinktis (.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)falseApversti koordinatų sistemą importuojant

FbxSaveOptions

Pastaba: FBX eksportas yra neprieinamas Java FOSS leidime. FBX palaikomas tik importui. Ši FbxSaveOptions klasė egzistuoja API, bet sukels klaidą, jei bus naudojama išsaugojimui. Vietoj to naudokite OBJ, STL, glTF arba GLB eksportui.


Žr. taip pat

 Lietuvių