Create Scene with Primitive 3D Shapes

Build Scene from Primitive 3D Shapes

Modeling is the process of pure creation and Aspose.3D API supports creating a scene with primitive 3D shapes.

Programming Sample

This code example creates a scene with primitive 3D shapes and save in the FBX file.

// 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);