Aspose.3D FOSS for Java

API reference for aspose-3d-foss 26.1.0 (Java 21+, MIT license).

All classes reside in the com.aspose.threed root package. The root import is:

import com.aspose.threed.*;

Package layout: Nearly all public classes are in com.aspose.threed. The only sub-package typically used is com.aspose.threed.shading (for PbrMaterial). The com.aspose.threed.formats sub-package contains internal importers/exporters and is not usually imported directly.

Java naming convention: All properties use getter/setter methods. For example, use node.getTransform() instead of node.transform, and transform.setTranslation(...) instead of transform.translation = .... Note that Vector3, Vector4, Quaternion, Matrix4, and FVector types use public fields (v.x, v.y, v.z) rather than getters for component access.


Core Scene Graph

ClassDescription
SceneTop-level container for all 3D scene data. Holds the root node, asset metadata, and animation clips. Exposes fromFile(), open(), and save() as the primary I/O entry points.
NodeA named node in the scene hierarchy. Owns a list of child nodes and a list of attached Entity objects such as meshes, cameras, and lights. Carries a local Transform.
EntityAbstract base class for all objects that can be attached to a Node. Provides name and identity but no geometry of its own.
SceneObjectBase class shared by Node and Entity. Provides the property collection interface used for user-defined metadata.
A3DObjectRoot base class for all Aspose.3D managed objects. Exposes the name property and the Properties collection.
INamedObjectInterface that guarantees a getName() method. Implemented by Node, Entity, and several format-specific descriptor types.

Geometry and Mesh

ClassDescription
MeshPolygon mesh entity. Stores control points (vertex positions as Vector4), polygon face lists (lists of control-point indices), and vertex element layers (normals, UVs, vertex colours).
GeometryAbstract base for mesh-like geometry types. Defines the control-point array and the collection of VertexElement layers. Mesh inherits from Geometry.
VertexElementAbstract base for a data layer attached to geometry (normals, UVs, colours, etc.). Carries getMappingMode(), getReferenceMode(), and a data list.
VertexElementNormalStores one normal vector per vertex or per polygon corner, depending on mapping mode. Data values are Vector4 instances with w unused.
VertexElementUVStores texture-coordinate pairs (Vector2) per vertex or per polygon corner. A mesh may carry multiple UV layers for different texture channels.
VertexElementVertexColorStores per-vertex or per-corner RGBA colour data as Vector4 (r, g, b, a in the range 0–1).
VertexElementTypeEnumeration identifying the semantic role of a vertex element layer: NORMAL, UV, VERTEX_COLOR, and others. Pass values to Mesh.getElement().
MappingModeEnumeration controlling which primitive a vertex element value maps to: CONTROL_POINT, POLYGON_VERTEX, or POLYGON.
ReferenceModeEnumeration controlling how values are indexed: DIRECT (one value per mapping primitive) or INDEX_TO_DIRECT (values array plus a separate indices array).

Transform and Spatial

ClassDescription
TransformLocal transformation attached to a Node. Provides translation, rotation (as Quaternion), and scale components, plus convenience methods for Euler angles.
GlobalTransformRead-only view of a node’s world-space transformation after composing all ancestor transforms. Accessed via node.getGlobalTransform().
AssetInfoMetadata block attached to a Scene. Stores authoring application name, unit name, unit scale factor, coordinate system axis definitions, and creation/modification timestamps.

Materials and Shading

ClassDescription
MaterialAbstract base class for all material types. Provides a name and a property collection for numeric and colour parameters.
PbrMaterialPhysically Based Rendering material. Stores albedo, metallic factor, roughness factor, emissive color, transparency, and associated textures. Used by glTF 2.0 and other PBR-capable formats. Import: com.aspose.threed.shading.PbrMaterial.

Camera

ClassDescription
CameraCamera entity. Inherits from Entity. No format-specific properties are exposed in the Java FOSS edition beyond the inherited name and property collection. Attached to a Node to define viewpoint transforms.

Note: The Light class is not available in the Java edition of Aspose.3D FOSS. Scene lighting data from imported files is stored as generic Entity objects.


Math Utilities

ClassDescription
Vector2Double-precision 2-component vector (x, y). Used for UV texture coordinates.
Vector3Double-precision 3-component vector (x, y, z). Used for positions, directions, and scale.
Vector4Double-precision 4-component vector (x, y, z, w). Used for control points (homogeneous positions) and normal data.
FVector3Single-precision 3-component float vector. Appears in vertex element data arrays for normals and tangents.
FVector4Single-precision 4-component float vector. The storage type of VertexElementFVector data.
QuaternionUnit quaternion for representing rotations (w, x, y, z). Used by Transform.getRotation().
Matrix44x4 double-precision transformation matrix. Used for world/local transform computations and can be constructed from TRS decompositions.
BoundingBoxAxis-aligned bounding box defined by getMinimum() and getMaximum() Vector3 corners. Used for spatial queries and frustum culling helpers.

Animation

ClassDescription
AnimationClipNamed container for an animation range. A Scene may hold multiple clips (e.g., “Walk”, “Run”). Declaration stub — keyframe data and playback are not yet implemented.

Format I/O

SymbolDescription
Scene.fromFile(path)Static method. Opens the file at path, detects the format from the extension, and returns a populated Scene. Throws on file-not-found or unsupported format.
Scene.open(path, options)Instance method. Opens a file into an existing Scene instance, optionally using a format-specific LoadOptions subclass.
Scene.save(path, options)Instance method. Serialises the scene to path using the format inferred from the extension, optionally using a format-specific SaveOptions subclass.
FileFormatRegistry of supported file formats. Contains entries such as FileFormat.WAVEFRONT_OBJ(), FileFormat.GLTF2(), FileFormat.FBX7400ASCII().
IOServiceInternal I/O abstraction used by format importers and exporters. Not typically used directly by application code.
LoadOptionsBase class for all format-specific load-option objects. Subclassed by ObjLoadOptions, StlLoadOptions, GltfLoadOptions, FbxLoadOptions.
SaveOptionsBase class for all format-specific save-option objects. Subclassed by ObjSaveOptions, StlSaveOptions, GltfSaveOptions.

OBJ Format

ClassDescription
ObjImporterInternal importer class that parses Wavefront OBJ and MTL files. Invoked automatically by Scene.fromFile() for .obj extensions.
ObjLoadOptionsLoad options for Wavefront OBJ files. Key properties: setFlipCoordinateSystem(), setScale(), setEnableMaterials(), setNormalizeNormal().
ObjSaveOptionsSave options for Wavefront OBJ output. Controls normals, UVs, material references, and point-cloud mode.
ObjFormatFormat descriptor for Wavefront OBJ. Accessible as FileFormat.WAVEFRONT_OBJ().

STL Format

ClassDescription
StlImporterInternal importer that reads both binary and ASCII STL files. Selected automatically by extension.
StlExporterInternal exporter that writes STL.
StlLoadOptionsLoad options for STL files. Supports setFlipCoordinateSystem(), setRecalculateNormal(), and setContentType().
StlSaveOptionsSave options for STL output. Controls setFlipCoordinateSystem(), setAxisSystem(), and setContentType().
StlFormatFormat descriptor for STL.

glTF Format

ClassDescription
GltfLoadOptionsLoad options for glTF 2.0 and GLB files. Key properties: setFlipCoordinateSystem(), setPrettyPrint().
GltfSaveOptionsSave options for glTF 2.0 and GLB output. Use setContentType(FileContentType.BINARY) to produce a self-contained .glb package.
GltfFormatFormat descriptor for glTF 2.0 / GLB. Accessible as FileFormat.GLTF2().

FBX Format

FBX is supported for import only. Export to FBX is not available in the Java FOSS edition.

ClassDescription
FbxLoadOptionsLoad options for FBX files. Key property: setFlipCoordinateSystem().
FbxFormatFormat descriptor for FBX. Accessible as FileFormat.FBX7400ASCII().

Enumerations

EnumerationDescription
AxisIdentifies a coordinate axis: X_AXIS, Y_AXIS, Z_AXIS. Used in coordinate-system remapping options.
CoordinateSystemSpecifies handedness convention: RIGHT_HANDED or LEFT_HANDED.
TextureMappingIdentifies how a texture is mapped to geometry: DIFFUSE, SPECULAR, EMISSIVE, NORMAL, AMBIENT, etc.
BooleanOperationCSG Boolean operation type: UNION, DIFFERENCE, INTERSECTION.

Properties System

ClassDescription
PropertyA single named typed property on an A3DObject. Stores the property name, type descriptor, and current value.
PropertyCollectionIterable collection of Property objects attached to an A3DObject. Supports lookup by name and iteration over all defined properties.
CustomObjectA lightweight A3DObject subclass that carries only a name and an arbitrary PropertyCollection. Used for storing user-defined metadata on scene objects.

Image and Render

ClassDescription
ImageRenderOptionsOptions for software rasterisation when rendering a scene to an image buffer. Stores background colour, image dimensions, and camera reference. This feature is available in supported configurations.

See Also