|
Photon Engine 2.0.0-beta
A physically based renderer.
|
Saving utility for renderer scene. Writes .p2 (Photon-v2) file. More...
#include <SdlSceneFileWriter.h>
Public Member Functions | |
| SdlSceneFileWriter () | |
| SdlSceneFileWriter (const Path &sceneFile, const Path &sceneWorkingDirectory) | |
| Creates reader for all engine classes. | |
| SdlSceneFileWriter (TSpanView< const SdlClass * > targetClasses, const Path &sceneFile, const Path &sceneWorkingDirectory) | |
| Creates reader for a custom set of classes. | |
| void | write (const SceneDescription &scene) |
| Writes the scene to the writer-specified destination. | |
| void | setSceneFile (Path sceneFile) |
Public Member Functions inherited from ph::SdlCommandGenerator | |
| SdlCommandGenerator (TSpanView< const SdlClass * > targetClasses) | |
| SdlCommandGenerator (TSpanView< const SdlClass * > targetClasses, const Path &sceneWorkingDirectory) | |
| virtual | ~SdlCommandGenerator () |
| void | generateResourceCommand (const ISdlResource *resource, std::string_view resourceName) |
| void | generateCachedNamedDataPacketCommand (const SdlNamedOutputClauses &namedClauses) |
| void | generateVersionCommand (const SemanticVersion &version) |
| void | setPacketInterface (std::unique_ptr< SdlDataPacketInterface > interface) |
| void | setSceneWorkingDirectory (const Path &directory) |
| SdlDataPacketInterface & | getPacketInterface () |
| const Path & | getSceneWorkingDirectory () const |
| std::size_t | numGeneratedCommands () const |
| std::size_t | numGenerationErrors () const |
| void | clearStats () |
| bool | hasTarget (const SdlClass *clazz) const |
Protected Member Functions | |
| bool | beginCommand (const SdlClass *targetClass, SdlOutputContext *out_ctx) override |
| Called when the generator starts producing a command. | |
| void | endCommand () override |
Called when the generator finishes producing a command. This is called last in the sequence of handler calls for a command. Will not be called on error or if the command is canceled (see beginCommand()). | |
| void | saveResource (const ISdlResource *resource, const SdlOutputContext &ctx, SdlOutputClauses &clauses) override |
| Save target resource into output clauses. | |
| void | commandGenerated (std::string_view commandStr, const SdlOutputContext &ctx) override |
| Called when one or more commands are generated. | |
Saving utility for renderer scene. Writes .p2 (Photon-v2) file.
| ph::SdlSceneFileWriter::SdlSceneFileWriter | ( | ) |
| ph::SdlSceneFileWriter::SdlSceneFileWriter | ( | const Path & | sceneFile, |
| const Path & | sceneWorkingDirectory ) |
Creates reader for all engine classes.
| ph::SdlSceneFileWriter::SdlSceneFileWriter | ( | TSpanView< const SdlClass * > | targetClasses, |
| const Path & | sceneFile, | ||
| const Path & | sceneWorkingDirectory ) |
Creates reader for a custom set of classes.
|
overrideprotectedvirtual |
Called when the generator starts producing a command.
| [out] | out_ctx | Stores the context for the command. This context will be used for subsequent handlers (saveResource(), commandGenerated(), commandGenerated()) for the same command. |
false, this command will be skipped and endCommand() will not be called. Implements ph::SdlCommandGenerator.
|
overrideprotectedvirtual |
Called when one or more commands are generated.
| commandStr | The newly generated command(s). |
| ctx | Context for the command. |
Implements ph::SdlCommandGenerator.
|
overrideprotectedvirtual |
Called when the generator finishes producing a command. This is called last in the sequence of handler calls for a command. Will not be called on error or if the command is canceled (see beginCommand()).
Implements ph::SdlCommandGenerator.
|
overrideprotectedvirtual |
Save target resource into output clauses.
| resource | The resource to save. | |
| ctx | Context for the command. | |
| [out] | clauses | Buffer to append the generated clauses. |
Implements ph::SdlCommandGenerator.
| void ph::SdlSceneFileWriter::setSceneFile | ( | Path | sceneFile | ) |
| void ph::SdlSceneFileWriter::write | ( | const SceneDescription & | scene | ) |
Writes the scene to the writer-specified destination.