nicer geometry debug messages
parent
bd71ae8147
commit
a8b1d882ef
|
@ -27,11 +27,12 @@ MTS_NAMESPACE_BEGIN
|
||||||
class SerializedMesh : public TriMesh {
|
class SerializedMesh : public TriMesh {
|
||||||
public:
|
public:
|
||||||
SerializedMesh(const Properties &props) : TriMesh(props) {
|
SerializedMesh(const Properties &props) : TriMesh(props) {
|
||||||
m_name = FileResolver::getInstance()->resolve(props.getString("filename"));
|
m_name = props.getString("filename");
|
||||||
|
std::string filePath = FileResolver::getInstance()->resolve(m_name);
|
||||||
|
|
||||||
/* Load the geometry */
|
/* Load the geometry */
|
||||||
Log(EInfo, "Loading geometry from \"%s\" ..", m_name.c_str());
|
Log(EInfo, "Loading geometry from \"%s\" ..", m_name.c_str());
|
||||||
ref<FileStream> stream = new FileStream(m_name, FileStream::EReadOnly);
|
ref<FileStream> stream = new FileStream(filePath.c_str(), FileStream::EReadOnly);
|
||||||
stream->setByteOrder(Stream::ENetworkByteOrder);
|
stream->setByteOrder(Stream::ENetworkByteOrder);
|
||||||
ref<TriMesh> mesh = new TriMesh(stream);
|
ref<TriMesh> mesh = new TriMesh(stream);
|
||||||
m_triangleCount = mesh->getTriangleCount();
|
m_triangleCount = mesh->getTriangleCount();
|
||||||
|
|
Loading…
Reference in New Issue