AssetInfo — Aspose.3D FOSS for Java

Methods

AssetInfo gemmer metadata om scenen – forfatterapplikationen, enhedens navn og skaleringsfaktor, koordinatsystemet samt oprettelses-/ændringstidspunkter. Tilgå den via scene.getAssetInfo().

Methods: com.aspose.threed

import com.aspose.threed.AssetInfo;

Methods

MethodsMethodsMethodsMethodsMethods
applicationNameStringgetApplicationName()setApplicationName(String)Navn på den applikation, der oprettede scenen
applicationVendorStringgetApplicationVendor()setApplicationVendor(String)Leverandør af forfatterapplikationen
applicationVersionStringgetApplicationVersion()setApplicationVersion(String)Version af forfatterapplikationen
unitNameStringgetUnitName()setUnitName(String)Enhedsnavn (f.eks., "meter", "centimeter", "inch")
unitScaleFactordoublegetUnitScaleFactor()setUnitScaleFactor(double)Skaleringsfaktor i forhold til meter. F.eks., centimeter = 0.01
upVectorAxisgetUpVector()setUpVector(Axis)Den “op”-akse for scenen
coordinateSystemCoordinateSystemgetCoordinateSystem()setCoordinateSystem(CoordinateSystem)Håndethed: RIGHT_HANDED eller LEFT_HANDED
creationTimeStringgetCreationTime()setCreationTime(String)ISO-dato/tidspunkt for hvornår scenen blev oprettet
modificationTimeStringgetModificationTime()setModificationTime(String)ISO-dato/tidspunkt for hvornår scenen sidst blev ændret

Methods

import com.aspose.threed.Scene;
import com.aspose.threed.AssetInfo;

Scene scene = Scene.fromFile("model.glb");
AssetInfo info = scene.getAssetInfo();

if (info != null) {
    System.out.println("Application: " + info.getApplicationName());
    System.out.println("Unit: " + info.getUnitName()
        + " (scale=" + info.getUnitScaleFactor() + ")");
    System.out.println("Up vector: " + info.getUpVector());
    System.out.println("Coordinate system: " + info.getCoordinateSystem());
}

// Set custom asset info
AssetInfo custom = new AssetInfo();
custom.setApplicationName("MyApp");
custom.setUnitName("meter");
custom.setUnitScaleFactor(1.0);
scene.setAssetInfo(custom);
scene.save("output.glb");

Se også

 Dansk