From 89d98be780f8029385ec0047e3c0b6a2489a1ca4 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 19 May 2011 22:30:58 -0400 Subject: [PATCH] remove FileLoader from PhyObj --- PhyObj/PhyObj.cc | 7 ++----- PhyObj/PhyObj.h | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/PhyObj/PhyObj.cc b/PhyObj/PhyObj.cc index 7f1b41b..9658a0b 100644 --- a/PhyObj/PhyObj.cc +++ b/PhyObj/PhyObj.cc @@ -41,12 +41,9 @@ PhyObj::Geom::Geom(PhyObj::GeomType type, refptr< vector > args) /********** PhyObj functions **********/ -void PhyObj::load(FileLoader * fileLoader, const FileLoader::Path & path) +void PhyObj::load(unsigned char *data, unsigned int size) { - FileLoader::Buffer buff = fileLoader->load(path); - if (buff.size <= 0) - return; - string str(buff.data, buff.size); + string str((char *) data, size); stringstream istr(str, ios_base::in); while (!istr.eof()) { diff --git a/PhyObj/PhyObj.h b/PhyObj/PhyObj.h index 2fe17ec..ee846c9 100644 --- a/PhyObj/PhyObj.h +++ b/PhyObj/PhyObj.h @@ -3,7 +3,6 @@ #define PHYOBJ_H #include "refptr/refptr.h" -#include "FileLoader/FileLoader.h" #include class PhyObj @@ -29,7 +28,7 @@ class PhyObj }; /* Methods */ - void load(FileLoader * fileLoader, const FileLoader::Path & path); + void load(unsigned char *data, unsigned int size); size_t getNumGeoms() { return m_geoms.size(); } refptr getGeom(int i) { return m_geoms[i]; }