Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/ModelDef.h
/* Copyright (C) 2011 Wildfire Games. | /* Copyright (C) 2018 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | public: | ||||
// model I/O functions | // model I/O functions | ||||
static void Save(const VfsPath& filename,const CModelDef* mdef); | static void Save(const VfsPath& filename,const CModelDef* mdef); | ||||
/** | /** | ||||
* Loads a PMD file. | * Loads a PMD file. | ||||
* @param filename VFS path of .pmd file to load | * @param filename VFS path of .pmd file to load | ||||
* @param name arbitrary name to give the model for debugging purposes (usually pathname) | * @param name arbitrary name to give the model for debugging purposes (usually pathname) | ||||
* @return the model - always non-NULL | * @return the model - always non-nullptr | ||||
* @throw PSERROR_File if it can't load the model | * @throw PSERROR_File if it can't load the model | ||||
*/ | */ | ||||
static CModelDef* Load(const VfsPath& filename, const VfsPath& name); | static CModelDef* Load(const VfsPath& filename, const VfsPath& name); | ||||
public: | public: | ||||
// accessor: get vertex data | // accessor: get vertex data | ||||
size_t GetNumVertices() const { return m_NumVertices; } | size_t GetNumVertices() const { return m_NumVertices; } | ||||
SModelVertex* GetVertices() const { return m_pVertices; } | SModelVertex* GetVertices() const { return m_pVertices; } | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator