RigsofRods
Soft-body Physics Simulation
Terrn2FileFormat.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2016-2017 Petr Ohlidal
4 
5  For more information, see http://www.rigsofrods.org/
6 
7  Rigs of Rods is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License version 3, as
9  published by the Free Software Foundation.
10 
11  Rigs of Rods is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
24 
25 #include "ForwardDeclarations.h"
26 
27 #include <string>
28 #include <list>
29 
30 #include <OgreColourValue.h>
31 #include <OgreDataStream.h>
32 #include <OgreVector3.h>
33 
34 namespace RoR {
35 
37 {
38  std::string type;
39  std::string name;
40 };
41 
43 {
44  Ogre::Vector3 position;
45  std::string name;
46 };
47 
48 struct Terrn2Def
49 {
50  Terrn2Def();
51 
52  std::string name;
54  Ogre::ColourValue ambient_color;
56  Ogre::Vector3 start_position;
57  std::string guid;
58  int version;
59  float gravity;
60  float water_height;
62  std::list<Terrn2Author> authors;
63  std::list<std::string> tobj_files;
64  std::list<std::string> as_files;
65  std::list<std::string> assetpack_files;
66  std::list<std::string> ai_presets_files;
67  std::list<Terrn2Telepoint> telepoints;
68  std::string caelum_config;
71  std::string cubemap_config;
72  bool has_water;
73  std::string hydrax_conf_file;
74  std::string skyx_config;
75  std::string traction_map_file;
76  std::string custom_material_name;
77  std::string teleport_map_image;
78 };
79 
81 {
82 public:
83  bool LoadTerrn2(Terrn2Def& def, Ogre::DataStreamPtr &ds);
84 
85 private:
87 };
88 
89 } // namespace RoR
RoR::Terrn2Def::authors
std::list< Terrn2Author > authors
Definition: Terrn2FileFormat.h:62
ForwardDeclarations.h
Global forward declarations.
RoR::Terrn2Def::water_height
float water_height
Definition: Terrn2FileFormat.h:60
RoR::Terrn2Def
Definition: Terrn2FileFormat.h:48
RoR::Terrn2Def::assetpack_files
std::list< std::string > assetpack_files
Definition: Terrn2FileFormat.h:65
RoR::Terrn2Parser
Definition: Terrn2FileFormat.h:80
file
This is a raw Ogre binding for Imgui No project cmake file
Definition: README-OgreImGui.txt:3
RoR::Terrn2Def::custom_material_name
std::string custom_material_name
Definition: Terrn2FileFormat.h:76
RoR::Terrn2Def::caelum_fog_end
int caelum_fog_end
Definition: Terrn2FileFormat.h:70
RoR::Terrn2Def::ogre_ter_conf_filename
std::string ogre_ter_conf_filename
Definition: Terrn2FileFormat.h:53
RoR::Terrn2Def::gravity
float gravity
Definition: Terrn2FileFormat.h:59
RoR::Terrn2Def::caelum_fog_start
int caelum_fog_start
Definition: Terrn2FileFormat.h:69
RoR::Terrn2Def::cubemap_config
std::string cubemap_config
Definition: Terrn2FileFormat.h:71
RoR::Terrn2Author
Definition: Terrn2FileFormat.h:36
RoR::Terrn2Telepoint
< Teleport drop location
Definition: Terrn2FileFormat.h:42
RoR::Terrn2Author::name
std::string name
Definition: Terrn2FileFormat.h:39
RoR::Terrn2Telepoint::position
Ogre::Vector3 position
Definition: Terrn2FileFormat.h:44
RoR::Terrn2Telepoint::name
std::string name
Definition: Terrn2FileFormat.h:45
RoR::Terrn2Parser::LoadTerrn2
bool LoadTerrn2(Terrn2Def &def, Ogre::DataStreamPtr &ds)
Definition: Terrn2FileFormat.cpp:38
RoR::Terrn2Def::Terrn2Def
Terrn2Def()
Definition: Terrn2FileFormat.cpp:176
RoR::Terrn2Def::hydrax_conf_file
std::string hydrax_conf_file
Definition: Terrn2FileFormat.h:73
RoR::Terrn2Def::version
int version
Definition: Terrn2FileFormat.h:58
RoR::Terrn2Def::telepoints
std::list< Terrn2Telepoint > telepoints
Definition: Terrn2FileFormat.h:67
RoR::Terrn2Parser::ProcessTeleport
void ProcessTeleport(Terrn2Def &def, RoR::ConfigFile *file)
Definition: Terrn2FileFormat.cpp:138
RoR::Terrn2Def::ambient_color
Ogre::ColourValue ambient_color
Definition: Terrn2FileFormat.h:54
RoR::Terrn2Def::water_bottom_height
float water_bottom_height
Definition: Terrn2FileFormat.h:61
RoR::Terrn2Def::tobj_files
std::list< std::string > tobj_files
Definition: Terrn2FileFormat.h:63
RoR::Terrn2Def::guid
std::string guid
Definition: Terrn2FileFormat.h:57
RoR::Terrn2Def::teleport_map_image
std::string teleport_map_image
Definition: Terrn2FileFormat.h:77
RoR::Terrn2Def::caelum_config
std::string caelum_config
Definition: Terrn2FileFormat.h:68
RoR::Terrn2Author::type
std::string type
Definition: Terrn2FileFormat.h:38
RoR::Terrn2Def::skyx_config
std::string skyx_config
Definition: Terrn2FileFormat.h:74
RoR::Terrn2Def::category_id
int category_id
Definition: Terrn2FileFormat.h:55
RoR::ConfigFile
Adds direct parsing of custom types.
Definition: ConfigFile.h:37
RoR::Terrn2Def::ai_presets_files
std::list< std::string > ai_presets_files
Definition: Terrn2FileFormat.h:66
RoR::Terrn2Def::name
std::string name
Definition: Terrn2FileFormat.h:52
RoR
Definition: AppContext.h:36
RoR::Terrn2Def::traction_map_file
std::string traction_map_file
Definition: Terrn2FileFormat.h:75
RoR::Terrn2Def::has_water
bool has_water
Definition: Terrn2FileFormat.h:72
RoR::Terrn2Def::start_position
Ogre::Vector3 start_position
Definition: Terrn2FileFormat.h:56
RoR::Terrn2Def::as_files
std::list< std::string > as_files
Definition: Terrn2FileFormat.h:64