Pyrogenesis
13997
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
graphics
ColladaManager.h
Go to the documentation of this file.
1
/* Copyright (C) 2013 Wildfire Games.
2
* This file is part of 0 A.D.
3
*
4
* 0 A.D. is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* 0 A.D. is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef INCLUDED_COLLADAMANAGER
19
#define INCLUDED_COLLADAMANAGER
20
21
#include "
lib/file/vfs/vfs.h
"
22
23
class
CStr8;
24
class
CColladaManagerImpl
;
25
class
MD5
;
26
27
class
CColladaManager
28
{
29
NONCOPYABLE
(
CColladaManager
);
30
31
public
:
32
enum
FileType
{
PMD
,
PSA
};
33
34
CColladaManager
(
const
PIVFS
& vfs);
35
~CColladaManager
();
36
37
/**
38
* Returns the VFS path to a PMD/PSA file for the given source file.
39
* Performs a (cached) conversion from COLLADA if necessary.
40
*
41
* @param pathnameNoExtension path and name, minus extension, of file to load.
42
* One of either "sourceName.pmd" or "sourceName.dae" should exist.
43
* @param type FileType, .pmd or .psa
44
*
45
* @return full VFS path (including extension) of file to load; or empty
46
* string if there was a problem and it could not be loaded. Doesn't knowingly
47
* return an invalid path.
48
*/
49
VfsPath
GetLoadablePath
(
const
VfsPath
& pathnameNoExtension,
FileType
type);
50
51
/**
52
* Converts DAE to archive cached .pmd/psa and outputs the resulting path
53
* (used by archive builder)
54
*
55
* @param[in] sourcePath path of the .dae to load
56
* @param[in] type FileType, .pmd or .psa
57
* @param[out] archiveCachePath output path of the cached file
58
*
59
* @return true if COLLADA converter completed successfully; or false if it failed
60
*/
61
bool
GenerateCachedFile
(
const
VfsPath
& sourcePath,
FileType
type,
VfsPath
& archiveCachePath);
62
63
private
:
64
CColladaManagerImpl
*
m
;
65
PIVFS
m_VFS
;
66
};
67
68
#endif // INCLUDED_COLLADAMANAGER
CColladaManager::PMD
Definition:
ColladaManager.h:32
CColladaManager::GetLoadablePath
VfsPath GetLoadablePath(const VfsPath &pathnameNoExtension, FileType type)
Returns the VFS path to a PMD/PSA file for the given source file.
Definition:
ColladaManager.cpp:327
CColladaManager::NONCOPYABLE
NONCOPYABLE(CColladaManager)
vfs.h
PIVFS
shared_ptr< IVFS > PIVFS
Definition:
vfs.h:226
CColladaManager::m_VFS
PIVFS m_VFS
Definition:
ColladaManager.h:65
MD5
MD5 hashing algorithm.
Definition:
MD5.h:27
Path
Definition:
path.h:75
CColladaManager::GenerateCachedFile
bool GenerateCachedFile(const VfsPath &sourcePath, FileType type, VfsPath &archiveCachePath)
Converts DAE to archive cached .pmd/psa and outputs the resulting path (used by archive builder) ...
Definition:
ColladaManager.cpp:418
CColladaManagerImpl
Definition:
ColladaManager.cpp:59
CColladaManager::FileType
FileType
Definition:
ColladaManager.h:32
CColladaManager::CColladaManager
CColladaManager(const PIVFS &vfs)
Definition:
ColladaManager.cpp:317
CColladaManager::m
CColladaManagerImpl * m
Definition:
ColladaManager.h:64
CColladaManager::~CColladaManager
~CColladaManager()
Definition:
ColladaManager.cpp:322
CColladaManager::PSA
Definition:
ColladaManager.h:32
CColladaManager
Definition:
ColladaManager.h:27
Generated on Mon Oct 14 2013 00:58:06 for Pyrogenesis by
1.8.5