Checkpoint improvements to pbrt exporter

pull/3580/head
Matt Pharr 2021-01-08 16:57:22 -08:00
parent a0aa067b5f
commit 938537c884
4 changed files with 8389 additions and 466 deletions

View File

@ -189,7 +189,7 @@ static void setupExporterArray(std::vector<Exporter::ExportFormatEntry> &exporte
#endif
#ifndef ASSIMP_BUILD_NO_PBRT_EXPORTER
exporters.push_back(Exporter::ExportFormatEntry("pbrt", "Pbrt scene description file", "pbrt", &ExportScenePbrt, aiProcess_Triangulate | aiProcess_SortByPType));
exporters.push_back(Exporter::ExportFormatEntry("pbrt", "pbrt-v4 scene description file", "pbrt", &ExportScenePbrt, aiProcess_Triangulate | aiProcess_SortByPType));
#endif
#ifndef ASSIMP_BUILD_NO_ASSJSON_EXPORTER

File diff suppressed because it is too large Load Diff

View File

@ -49,19 +49,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
//#include <assimp/material.h>
#include <assimp/StreamWriter.h> // StreamWriterLE
#include <assimp/Exceptional.h> // DeadlyExportError
#include <assimp/StreamWriter.h>
#include <assimp/Exceptional.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <memory> // shared_ptr
#include <sstream> // stringstream
#include <string>
#include <sstream>
struct aiScene;
struct aiNode;
struct aiMaterial;
struct aiMesh;
namespace Assimp
{
@ -103,49 +102,31 @@ private:
// A private set to keep track of which textures have been declared
std::set<std::string> mTextureSet;
private:
// Writing the comment header
void WriteHeader();
aiMatrix4x4 GetNodeTransform(const aiString& name) const;
static std::string TransformString(const aiMatrix4x4& m);
static std::string CleanTextureFilename(const aiString &f, bool rewriteExtension = true);
// Writing the metadata into a comment
void WriteMetaData();
// Writing the pbrt scene-wide rendering options
void WriteSceneWide();
// Writing the shapes to distinct files
void WriteShapes();
// Writing the pbrt world defintion
void WriteWorldDefinition();
// Writing the Camera data
void WriteCameras();
void WriteCamera(int i);
// Check for Embedded Texture data
void CheckEmbeddedTextures();
// Writing the Texture data
void WriteTextures();
std::string GetTextureName(std::string path, unsigned int textureType);
// Writing the Material data
void WriteMaterials();
void WriteMaterial(int i);
void WriteDisneyMaterial(aiMaterial* material);
void WriteUberMaterial(aiMaterial* material);
// Writing the Light data
void WriteLights();
// Writing the Object data
void WriteObjects();
void WriteObject(int i);
void WriteTextures();
static bool TextureHasAlphaMask(const std::string &filename);
// Writing the Object Instances
void WriteObjectInstances();
void WriteObjectInstance(aiNode* node, aiMatrix4x4 parentTransform);
void WriteMaterials();
void WriteMaterial(int i);
void WriteMesh(aiMesh* mesh);
void WriteInstanceDefinition(int i);
void WriteGeometricObjects(aiNode* node, aiMatrix4x4 parentTransform,
std::map<int, int> &meshUses);
};
} // namespace Assimp

7762
code/Pbrt/stb_image.h 100644

File diff suppressed because it is too large Load Diff