Click or drag to resize
Ab4d.SharpEngine logo

ObjExporter Class

ObjExporter can be used to export the Scene or individual SceneNodes into .obj file. After creating the ObjExporter instance, the user can add Scene or SceneNodes to be exported by calling AddScene(Scene) or AddSceneNode(SceneNode). Then the Export(String, ObjExporterExportResourceFunction) or Export(Stream, String, ObjExporterExportResourceFunction) methods can be called to create the .obj file.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.UtilitiesObjExporter

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntax
C#
public class ObjExporter

The ObjExporter type exposes the following members.

Constructors
 NameDescription
Public methodObjExporterInitializes a new instance of the ObjExporter class
Top
Properties
 NameDescription
Public propertyExportMaterials When true (by default) than materials are exported into .mtl file with the same name as the .obj file.
Top
Methods
 NameDescription
Public methodAddScene Add scene and its contents to list of items to export. Multiple scenes can be added to exporter, but the first one (with index 0) is always marked as active in the model file.
Public methodAddSceneNode Add scene node to list of items to export. The node is added to the last scene currently defined in the exporter. If no scenes have been defined yet, a new scene is defined and the node is added to it.
Public methodClearAddedSceneNodes ClearAddedSceneNodes can be called to clear the SceneNodes that were added by calling AddScene(Scene) and AddSceneNode(SceneNode).
Public methodExport(String, ObjExporterExportResourceFunction) Export the Scene and SceneNodes that ware added by AddScene(Scene) and AddSceneNode(SceneNode) into the specified obj file. Optional exportResourceFunc can be provided to override the default function for exporting .mtl file (material file) and texture images. The default implementation writes the .mtl file and texture images into the same directory as the model file. If the file already exists, then it is deleted before creating a new one.
Public methodExport(Stream, String, ObjExporterExportResourceFunction) Export the Scene and SceneNodes that ware added by AddScene(Scene) and AddSceneNode(SceneNode) into the specified stream. Optional exportResourceFunc can be provided to override the default function for exporting .mtl file (material file) and texture images. The default implementation writes the .mtl file and texture images into the same directory as the model file. argument.
Top
Remarks

[Missing <remarks> documentation for "T:Ab4d.SharpEngine.Utilities.ObjExporter"]

See Also