Class AbstractExporter#

Inheritance Relationships#

Derived Type#

Class Documentation#

class AbstractExporter#

Interface for exporting kdFlex scene part specifications to files.

AbstractExporter is the write-side counterpart of AbstractImporter. Implementations convert a collection of ScenePartSpec values into an external scene asset. Each ScenePartSpec stores a geometry, material, transform, scale, and layer mask. Exporters should preserve the transform and scale at scene-node level and convert geometry through the static-geometry interface.

The exported geometry represents the local part mesh transformed by

\[ {}^W\mathbf{x} = {}^W\mathbf{T}_P \operatorname{diag}(s_x, s_y, s_z, 1) {}^P\mathbf{x}, \]
where \({}^W\mathbf{T}_P\) is ScenePartSpec::transform and \(\mathbf{s}\) is ScenePartSpec::scale.

Subclassed by Karana::Scene::AssimpExporter

Public Functions

virtual ~AbstractExporter()#

Destroy the exporter.

virtual void exportTo(const std::filesystem::path &filename, const std::vector<ScenePartSpec> &parts) = 0#

Export scene part specifications to a file.

Parameters:
  • filename – Destination file path. The concrete exporter may infer the output format from this extension.

  • partsScenePartSpec collection to write.