V-Gears 0
Free Final Fantasy VII engine.
VGearsWalkmeshFile.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
19#include "core/Walkmesh.h"
20
21namespace VGears{
22
26 class WalkmeshFile : public Resource{
27
28 public:
29
49 Ogre::ResourceManager* creator, const String &name,
50 Ogre::ResourceHandle handle, const String& group,
51 bool is_manual = false,
52 Ogre::ManualResourceLoader* loader = NULL
53 );
54
58 virtual ~WalkmeshFile();
59
63 static const String RESOURCE_TYPE;
64
66
67 typedef std::vector<Triangle> TriangleList;
68
72 virtual TriangleList& GetTriangles();
73
74 protected:
75
79 virtual void loadImpl() override;
80
84 virtual void unloadImpl() override;
85
92 virtual size_t calculateSize() const;
93
94 private:
96 };
97
98 typedef Ogre::SharedPtr<WalkmeshFile> WalkmeshFilePtr;
99}
A resource.
Definition: VGearsResource.h:29
Handles walkmesh files.
Definition: VGearsWalkmeshFile.h:26
TriangleList triangles_
Definition: VGearsWalkmeshFile.h:95
virtual size_t calculateSize() const
Calculates the size of the palette.
Definition: VGearsWalkmeshFile.cpp:42
virtual TriangleList & GetTriangles()
Retrieves the list of triangles.
Definition: VGearsWalkmeshFile.cpp:46
WalkmeshFile(Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
Constructor.
Definition: VGearsWalkmeshFile.cpp:24
virtual void loadImpl() override
Loads the file.
Definition: VGearsWalkmeshFile.cpp:32
::WalkmeshTriangle Triangle
Definition: VGearsWalkmeshFile.h:65
std::vector< Triangle > TriangleList
Definition: VGearsWalkmeshFile.h:67
virtual ~WalkmeshFile()
Destructor.
Definition: VGearsWalkmeshFile.cpp:30
virtual void unloadImpl() override
Unloads the file.
Definition: VGearsWalkmeshFile.cpp:38
static const String RESOURCE_TYPE
The type of resource.
Definition: VGearsWalkmeshFile.h:63
Definition: FF7NameLookup.h:24
Ogre::String String
Definition: TypeDefine.h:37
Ogre::SharedPtr< class WalkmeshFile > WalkmeshFilePtr
Definition: Walkmesh.h:62
A triangle of a walkmesh.
Definition: Walkmesh.h:24