Panda3D
Loading...
Searching...
No Matches
pandaIOSystem.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file pandaIOSystem.h
10 * @author rdb
11 * @date 2011-03-29
12 */
13
14#ifndef PANDAIOSYSTEM_H
15#define PANDAIOSYSTEM_H
16
17#include "config_assimp.h"
18#include "virtualFileSystem.h"
19
20#include <assimp/IOSystem.hpp>
21
22/**
23 * Custom implementation of Assimp::IOSystem.
24 */
25class PandaIOSystem : public Assimp::IOSystem {
26public:
28 virtual ~PandaIOSystem() {};
29
30 void Close(Assimp::IOStream *file);
31 bool ComparePaths(const char *p1, const char *p2) const;
32 bool Exists(const char *file) const;
33 char getOsSeparator() const;
34 Assimp::IOStream *Open(const char *file, const char *mode);
35
36private:
38};
39
40#endif
Custom implementation of Assimp::IOSystem.
bool Exists(const char *file) const
Returns true if the file exists, duh.
char getOsSeparator() const
Returns the path separator for this operating system.
bool ComparePaths(const char *p1, const char *p2) const
Returns true if the two paths point to the same file, false if not.
Assimp::IOStream * Open(const char *file, const char *mode)
Opens the indicated file.
void Close(Assimp::IOStream *file)
Closes the indicated file stream.
PandaIOSystem(VirtualFileSystem *vfs=VirtualFileSystem::get_global_ptr())
Initializes the object with the given VFS, or the global one if none was specified.
A hierarchy of directories and files that appears to be one continuous file system,...
static VirtualFileSystem * get_global_ptr()
Returns the default global VirtualFileSystem.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.