创建具有原始 3D 形状的场景

从原始 3D 形状生成场景

建模是纯粹的创建过程,Aspose.3D API 支持创建具有原始 3D 形状的场景。

编程示例

此代码示例创建一个包含原始 3D 形状的场景,并将其保存在 FBX 文件中。

// The path to the documents directory.
String MyDir = RunExamples.getDataDir();
// Initialize a Scene object
Scene scene = new Scene();
// Create a Box model
scene.getRootNode().createChildNode("box", new Box());
// Create a Cylinder model
scene.getRootNode().createChildNode("cylinder", new Cylinder());
// Save drawing in the FBX format
MyDir = MyDir + RunExamples.getOutputFilePath("test.fbx");
scene.save(MyDir, FileFormat.FBX7500ASCII);