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 */
25 class PandaIOSystem : public Assimp::IOSystem {
26 public:
27 PandaIOSystem(VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr());
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
36 private:
37 VirtualFileSystem *_vfs;
38};
39
40#endif
PandaIOSystem::Exists
bool Exists(const char *file) const
Returns true if the file exists, duh.
Definition pandaIOSystem.cxx:29
PandaIOSystem::getOsSeparator
char getOsSeparator() const
Returns the path separator for this operating system.
Definition pandaIOSystem.cxx:59
PandaIOSystem::ComparePaths
bool ComparePaths(const char *p1, const char *p2) const
Returns true if the two paths point to the same file, false if not.
Definition pandaIOSystem.cxx:47
PandaIOSystem::Open
Assimp::IOStream * Open(const char *file, const char *mode)
Opens the indicated file.
Definition pandaIOSystem.cxx:71
PandaIOSystem::Close
void Close(Assimp::IOStream *file)
Closes the indicated file stream.
Definition pandaIOSystem.cxx:38
PandaIOSystem::PandaIOSystem
PandaIOSystem(VirtualFileSystem *vfs=VirtualFileSystem::get_global_ptr())
Initializes the object with the given VFS, or the global one if none was specified.
Definition pandaIOSystem.cxx:22
VirtualFileSystem
A hierarchy of directories and files that appears to be one continuous file system,...
Definition virtualFileSystem.h:40
VirtualFileSystem::get_global_ptr
static VirtualFileSystem * get_global_ptr()
Returns the default global VirtualFileSystem.
Definition virtualFileSystem.cxx:741
config_assimp.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtualFileSystem.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.