mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 06:04:37 +00:00
update assimp to 6.0.5
This commit is contained in:
parent
2d2eb57e2e
commit
f5cf21cfeb
941 changed files with 22718 additions and 12240 deletions
|
|
@ -55,18 +55,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
namespace Assimp {
|
||||
|
||||
// Forward declarations
|
||||
class ObjFileImporter;
|
||||
class IOSystem;
|
||||
class ProgressHandler;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
/// \class ObjFileParser
|
||||
/// \brief Parser for a obj waveform file
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
class ASSIMP_API ObjFileParser {
|
||||
public:
|
||||
static const size_t Buffersize = 4096;
|
||||
typedef std::vector<char> DataArray;
|
||||
typedef std::vector<char>::iterator DataArrayIt;
|
||||
typedef std::vector<char>::const_iterator ConstDataArrayIt;
|
||||
static constexpr size_t Buffersize = 4096;
|
||||
using DataArray = std::vector<char>;
|
||||
using DataArrayIt = std::vector<char>::iterator;
|
||||
using ConstDataArrayIt = std::vector<char>::const_iterator;
|
||||
|
||||
/// @brief The default constructor.
|
||||
ObjFileParser();
|
||||
|
|
@ -87,8 +90,6 @@ protected:
|
|||
void parseFile(IOStreamBuffer<char> &streamBuffer);
|
||||
/// Method to copy the new delimited word in the current line.
|
||||
void copyNextWord(char *pBuffer, size_t length);
|
||||
/// Method to copy the new line.
|
||||
// void copyNextLine(char *pBuffer, size_t length);
|
||||
/// Get the number of components in a line.
|
||||
size_t getNumComponentsInDataDefinition();
|
||||
/// Stores the vector
|
||||
|
|
@ -105,8 +106,8 @@ protected:
|
|||
void getFace(aiPrimitiveType type);
|
||||
/// Reads the material description.
|
||||
void getMaterialDesc();
|
||||
/// Gets a comment.
|
||||
void getComment();
|
||||
/// Skip a comment.
|
||||
void skipComment();
|
||||
/// Gets a a material library.
|
||||
void getMaterialLib();
|
||||
/// Creates a new material.
|
||||
|
|
@ -114,9 +115,9 @@ protected:
|
|||
/// Gets the group name from file.
|
||||
void getGroupName();
|
||||
/// Gets the group number from file.
|
||||
void getGroupNumber();
|
||||
void skipGroupNumber();
|
||||
/// Gets the group number and resolution from file.
|
||||
void getGroupNumberAndResolution();
|
||||
void skipGroupNumberAndResolution();
|
||||
/// Returns the index of the material. Is -1 if not material was found.
|
||||
int getMaterialIndex(const std::string &strMaterialName);
|
||||
/// Parse object name
|
||||
|
|
@ -134,22 +135,23 @@ private:
|
|||
/// Default material name
|
||||
static constexpr const char DEFAULT_MATERIAL[] = AI_DEFAULT_MATERIAL_NAME;
|
||||
//! Iterator to current position in buffer
|
||||
DataArrayIt m_DataIt;
|
||||
DataArrayIt mDataIt{};
|
||||
//! Iterator to end position of buffer
|
||||
DataArrayIt m_DataItEnd;
|
||||
DataArrayIt mDataItEnd{};
|
||||
//! Pointer to model instance
|
||||
std::unique_ptr<ObjFile::Model> m_pModel;
|
||||
std::unique_ptr<ObjFile::Model> mModel{};
|
||||
//! Current line (for debugging)
|
||||
unsigned int m_uiLine;
|
||||
unsigned int mLine{ 0 };
|
||||
//! Helper buffer
|
||||
char m_buffer[Buffersize];
|
||||
const char *mEnd;
|
||||
char mBuffer[Buffersize];
|
||||
/// End of buffer
|
||||
const char *mEnd{ nullptr };
|
||||
/// Pointer to IO system instance.
|
||||
IOSystem *m_pIO;
|
||||
IOSystem *mIO{ nullptr };
|
||||
//! Pointer to progress handler
|
||||
ProgressHandler *m_progress;
|
||||
ProgressHandler *mProgress{ nullptr };
|
||||
/// Path to the current model, name of the obj file where the buffer comes from
|
||||
const std::string m_originalObjFileName;
|
||||
const std::string mOriginalObjFileName{};
|
||||
};
|
||||
|
||||
} // Namespace Assimp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue