RigsofRods
Soft-body Physics Simulation
TObjFileFormat.cpp
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 #include "TObjFileFormat.h"
21 
22 #include "Actor.h"
23 #include "ProceduralRoad.h"
24 
25 #define LOGSTREAM Ogre::LogManager::getSingleton().stream() << "[RoR|TObj fileformat] "
26 
27 using namespace RoR;
28 using namespace Ogre;
29 
30 // --------------------------------
31 // TObjEntry
32 
33 TObjEntry::TObjEntry(Ogre::Vector3 pos, Ogre::Vector3 rot, const char* odef, TObj::SpecialObject spc, const char* ty, const char* nam):
34  position(pos),
35  rotation(rot),
36  special(spc)
37 {
38  strcpy(type, ty);
39  strcpy(instance_name, nam);
40  strcpy(odef_name, odef);
41 }
42 
43 bool TObjEntry::IsRoad() const
44 {
46 }
47 
48 bool TObjEntry::IsActor() const
49 {
53 }
54 
55 // --------------------------------
56 // Parser
57 
59 {
60  m_cur_line = nullptr;
61  m_line_number = 0;
62  m_in_procedural_road = false;
67  m_rot_yxz = false;
68 
69  m_def = std::shared_ptr<TObjFile>(new TObjFile());
70 }
71 
72 bool TObjParser::ProcessLine(const char* line)
73 {
74  bool result = true;
75  if ((line != nullptr) && (line[0] != 0) && (line[0] != '/') && (line[0] != ';'))
76  {
77  m_cur_line = line; // No trimming by design.
78  m_cur_line_trimmed = line;
79  while (m_cur_line_trimmed[0] == ' ' || m_cur_line_trimmed[0] == '\t')
80  {
82  }
83  result = this->ProcessCurrentLine();
84  }
85  m_line_number++;
86  return result;
87 }
88 
89 // retval true = continue processing (false = stop)
91 {
92  // ** Process keywords
93 
94  if (!strcmp(m_cur_line, "end"))
95  {
96  return false;
97  }
98  if (strncmp(m_cur_line, "collision-tris", 14) == 0)
99  {
100  return true; // Obsolete - ignore it.
101  }
102  if (strncmp(m_cur_line, "grid", 4) == 0)
103  {
104  this->ProcessGridLine();
105  return true;
106  }
107  if (strncmp(m_cur_line, "trees", 5) == 0)
108  {
109  this->ProcessTreesLine();
110  return true;
111  }
112  if (strncmp(m_cur_line, "grass", 5) == 0)
113  {
114  this->ProcessGrassLine();
115  return true;
116  }
117  if (strncmp(m_cur_line, "set_default_rendering_distance", 30) == 0)
118  {
119  const int result = sscanf(m_cur_line, "set_default_rendering_distance %f", &m_default_rendering_distance);
120  if (result != 1)
121  {
122  LOG(fmt::format("too few parameters on line: '{}'", m_cur_line));
123  }
124  return true;
125  }
126  if (strncmp(m_cur_line, "rot_yxz", 7) == 0)
127  {
128  m_rot_yxz = true;
129  return true;
130  }
131  if (strncmp("begin_procedural_roads", m_cur_line, 22) == 0)
132  {
133  m_cur_procedural_obj = new ProceduralObject(); // Hard reset, discarding last "non-procedural" road strip. For backwards compatibility. ~ Petr Ohlidal, 08/2020
134  m_in_procedural_road = true;
136  return true;
137  }
138  if (strncmp("end_procedural_roads", m_cur_line, 20) == 0)
139  {
141  {
142  this->FlushProceduralObject();
143  }
144  m_in_procedural_road = false;
145  return true;
146  }
147  if (strncmp("smoothing_num_splits", m_cur_line_trimmed, 20) == 0)
148  {
150  {
151  sscanf(m_cur_line_trimmed, "smoothing_num_splits %d", &m_cur_procedural_obj->smoothing_num_splits);
152  }
153  return true;
154  }
155 
156 
157  // ** Process entries (ODEF or special objects)
158 
160  {
161  this->ProcessProceduralLine();
162  }
163  else
164  {
165  TObjEntry object;
166  if (this->ParseObjectLine(object))
167  {
168  if (object.IsActor())
169  {
170  this->ProcessActorObject(object);
171  }
172  else if (object.IsRoad())
173  {
174  this->ProcessRoadObject(object);
175  }
176  else
177  {
178  m_def->objects.push_back(object);
179  }
180  }
181  }
182  return true;
183 }
184 
185 std::shared_ptr<TObjFile> TObjParser::Finalize()
186 {
187  // finish the last road
188  if (m_road2_num_blocks > 0)
189  {
190  Vector3 pp_pos = m_road2_last_pos + m_road2_last_rot * Vector3(10.0f, 0.0f, 0.9f);
192 
193  this->FlushProceduralObject();
194  }
195 
196  m_filename = "";
197 
198  std::shared_ptr<TObjFile> tmp_def = m_def;
199  m_def.reset();
200  return tmp_def; // Pass ownership
201 }
202 
203 void TObjParser::ProcessOgreStream(Ogre::DataStream* stream)
204 {
205  m_filename = stream->getName();
206  char raw_line_buf[TObj::LINE_BUF_LEN];
207  bool keep_reading = true;
208  while (keep_reading && !stream->eof())
209  {
210  stream->readLine(raw_line_buf, TObj::LINE_BUF_LEN);
211  keep_reading = this->ProcessLine(raw_line_buf);
212  }
213 }
214 
215 // --------------------------------
216 // Processing
217 
219 {
220  ProceduralPoint point;
221  Str<300> obj_name;
222  Ogre::Vector3 rot = Ogre::Vector3::ZERO;
223  sscanf(m_cur_line, "%f, %f, %f, %f, %f, %f, %f, %f, %f, %s",
224  &point.position.x, &point.position.y, &point.position.z,
225  &rot.x, &rot.y, &rot.z,
226  &point.width, &point.bwidth, &point.bheight, obj_name.GetBuffer());
227 
228  point.rotation = this->CalcRotation(rot);
229 
230  if (obj_name == "flat" ) { point.type = RoadType::ROAD_FLAT; }
231  else if (obj_name == "left" ) { point.type = RoadType::ROAD_LEFT; }
232  else if (obj_name == "right" ) { point.type = RoadType::ROAD_RIGHT; }
233  else if (obj_name == "both" ) { point.type = RoadType::ROAD_BOTH; }
234  else if (obj_name == "bridge" ) { point.type = RoadType::ROAD_BRIDGE; point.pillartype = 1; }
235  else if (obj_name == "monorail" ) { point.type = RoadType::ROAD_MONORAIL; point.pillartype = 2; }
236  else if (obj_name == "monorail2" ) { point.type = RoadType::ROAD_MONORAIL; point.pillartype = 0; }
237  else if (obj_name == "bridge_no_pillars") { point.type = RoadType::ROAD_BRIDGE; point.pillartype = 0; }
238  else { point.type = RoadType::ROAD_AUTOMATIC; point.pillartype = 0; }
239 
240  m_cur_procedural_obj->points.push_back(new ProceduralPoint(point));
241 }
242 
244 {
245  Ogre::Vector3 & pos = m_def->grid_position;
246  sscanf(m_cur_line, "grid %f, %f, %f", &pos.x, &pos.y, &pos.z); // No error check by design
247  m_def->grid_enabled = true;
248 }
249 
251 {
252  TObjTree tree;
253  sscanf(m_cur_line, "trees %f, %f, %f, %f, %f, %f, %f, %s %s %s %f %s",
254  &tree.yaw_from, &tree.yaw_to,
255  &tree.scale_from, &tree.scale_to,
256  &tree.high_density,
257  &tree.min_distance, &tree.max_distance,
258  tree.tree_mesh, tree.color_map, tree.density_map,
259  &tree.grid_spacing, tree.collision_mesh);
260 
261  m_def->trees.push_back(tree);
262 }
263 
265 {
266  TObjGrass grass;
267  if (strncmp(m_cur_line, "grass2", 6) == 0)
268  {
269  sscanf(m_cur_line, "grass2 %d, %f, %f, %f, %f, %f, %f, %f, %f, %d, %f, %f, %d, %s %s %s",
270  &grass.range,
271  &grass.sway_speed, &grass.sway_length, &grass.sway_distrib, &grass.density,
272  &grass.min_x, &grass.min_y, &grass.max_x, &grass.max_y,
273  &grass.grow_techniq, &grass.min_h, &grass.max_h, &grass.technique,
274  grass.material_name,
275  grass.color_map_filename,
276  grass.density_map_filename);
277  }
278  else
279  {
280  // Same as 'grass2', except without 'technique' parameter
281  sscanf(m_cur_line, "grass %d, %f, %f, %f, %f, %f, %f, %f, %f, %d, %f, %f, %s %s %s",
282  &grass.range,
283  &grass.sway_speed, &grass.sway_length, &grass.sway_distrib, &grass.density,
284  &grass.min_x, &grass.min_y, &grass.max_x, &grass.max_y,
285  &grass.grow_techniq, &grass.min_h, &grass.max_h,
286  grass.material_name,
287  grass.color_map_filename,
288  grass.density_map_filename);
289  }
290 
291  // 0: GRASSTECH_QUAD; // Grass constructed of randomly placed and rotated quads
292  // 1: GRASSTECH_CROSSQUADS; // Grass constructed of two quads forming a "X" cross shape
293  // 2: GRASSTECH_SPRITE; // Grass constructed of camera-facing billboard quads
294  if ((grass.technique < 0) || (grass.technique > 2))
295  {
296  LOGSTREAM << "Invalid parameter 'technique': '" << grass.technique << "', falling back to default '1: GRASSTECH_CROSSQUADS'";
297  grass.technique = 1;
298  }
299 
300  m_def->grass.push_back(grass);
301 }
302 
304 {
305  TObjVehicle v;
306  v.position = object.position;
307  v.rotation = this->CalcRotation(object.rotation);
308  v.type = object.special;
309  strcpy(v.name, object.type);
310 
311  m_def->vehicles.push_back(v);
312 }
313 
315 {
316  // ** Import road objects as procedural road
317 
318  if (object.position.distance(m_road2_last_pos) > 20.0f)
319  {
320  // break the road
321  if (m_road2_num_blocks > 0)
322  {
323  Vector3 pp_pos = m_road2_last_pos + this->CalcRotation(m_road2_last_rot) * Vector3(10.0f, 0.0f, 0.9f);
324  this->ImportProceduralPoint(pp_pos, m_road2_last_rot, object.special);
325  this->FlushProceduralObject();
326  }
328 
329  // beginning of new
330  this->ImportProceduralPoint(object.position, object.rotation, object.special);
331  }
332  else
333  {
334  this->ImportProceduralPoint(object.position, object.rotation, object.special);
335  }
336  m_road2_last_pos=object.position;
337  m_road2_last_rot=object.rotation;
338 }
339 
340 // --------------------------------
341 // Helpers
342 
343 void TObjParser::ImportProceduralPoint(Ogre::Vector3 const& pos, Ogre::Vector3 const& rot, TObj::SpecialObject special)
344 {
345  ProceduralPoint pp;
346  pp.bheight = 0.2;
347  pp.bwidth = 1.4;
349  pp.position = pos;
350  pp.rotation = this->CalcRotation(rot);
352  pp.width = 8;
353 
354  m_cur_procedural_obj->points.push_back(new ProceduralPoint(pp));
356  {
358  }
359 }
360 
361 Ogre::Quaternion TObjParser::CalcRotation(Ogre::Vector3 const& rot) const
362 {
363  if (m_rot_yxz)
364  {
365  return Quaternion(Degree(rot.y), Vector3::UNIT_Y) * // y global
366  Quaternion(Degree(rot.x), Vector3::UNIT_X) * // x local
367  Quaternion(Degree(rot.z), Vector3::UNIT_Z); // z local
368  }
369  else
370  {
371  return Quaternion(Degree(rot.x), Vector3::UNIT_X) *
372  Quaternion(Degree(rot.y), Vector3::UNIT_Y) *
373  Quaternion(Degree(rot.z), Vector3::UNIT_Z);
374  }
375 }
376 
378 {
379  Str<300> odef("generic");
380  char type[100] = {};
381  char name[100] = {};
382  Ogre::Vector3 pos(Ogre::Vector3::ZERO);
383  Ogre::Vector3 rot(Ogre::Vector3::ZERO);
384  int r = sscanf(m_cur_line, "%f, %f, %f, %f, %f, %f, %s %s %s",
385  &pos.x, &pos.y, &pos.z, &rot.x, &rot.y, &rot.z, odef.GetBuffer(), type, name);
386  if (r < 6)
387  {
388  return false;
389  }
390 
392  if (odef == "truck" ) { special = TObj::SpecialObject::TRUCK ; }
393  else if (odef == "load" ) { special = TObj::SpecialObject::LOAD ; }
394  else if (odef == "machine" ) { special = TObj::SpecialObject::MACHINE ; }
395  else if (odef == "boat" ) { special = TObj::SpecialObject::BOAT ; }
396  else if (odef == "truck2" ) { special = TObj::SpecialObject::TRUCK2 ; }
397  else if (odef == "grid" ) { special = TObj::SpecialObject::GRID ; }
398  else if (odef == "road" ) { special = TObj::SpecialObject::ROAD ; }
399  else if (odef == "roadborderleft" ) { special = TObj::SpecialObject::ROAD_BORDER_LEFT ; }
400  else if (odef == "roadborderright" ) { special = TObj::SpecialObject::ROAD_BORDER_RIGHT ; }
401  else if (odef == "roadborderboth" ) { special = TObj::SpecialObject::ROAD_BORDER_BOTH ; }
402  else if (odef == "roadbridgenopillar") { special = TObj::SpecialObject::ROAD_BRIDGE_NO_PILLARS; }
403  else if (odef == "roadbridge" ) { special = TObj::SpecialObject::ROAD_BRIDGE ; }
404 
405  object = TObjEntry(pos, rot, odef.ToCStr(), special, type, name);
406  object.rendering_distance = m_default_rendering_distance;
407  return true;
408 }
409 
411 {
412  // finish it and start new object
414  m_def->proc_objects.push_back(m_cur_procedural_obj);
417  m_road2_num_blocks = 0;
418 }
RoR::TObj::SpecialObject::BOAT
@ BOAT
RoR::TObjParser::ProcessLine
bool ProcessLine(const char *line)
Definition: TObjFileFormat.cpp:72
RoR::TObj::SpecialObject::MACHINE
@ MACHINE
RoR::RoadType::ROAD_BOTH
@ ROAD_BOTH
RoR::ProceduralPoint::type
RoadType type
Definition: ProceduralManager.h:52
RoR::TObjParser::ProcessProceduralLine
void ProcessProceduralLine()
Definition: TObjFileFormat.cpp:218
RoR::TObjFile
Definition: TObjFileFormat.h:154
RoR::TObjGrass::density
float density
Definition: TObjFileFormat.h:114
RoR::TObjVehicle::type
TObj::SpecialObject type
Definition: TObjFileFormat.h:130
LOGSTREAM
#define LOGSTREAM
Definition: TObjFileFormat.cpp:25
RoR::TObjParser::ProcessActorObject
void ProcessActorObject(const TObjEntry &object)
Definition: TObjFileFormat.cpp:303
RoR::ProceduralObject::points
std::vector< ProceduralPointPtr > points
Definition: ProceduralManager.h:74
RoR::TObjGrass::min_y
float min_y
Definition: TObjFileFormat.h:116
RoR::TObjGrass::range
int range
Definition: TObjFileFormat.h:108
RoR::Str::GetBuffer
char * GetBuffer()
Definition: Str.h:48
RoR::ProceduralPoint::bwidth
float bwidth
Definition: ProceduralManager.h:54
RoR::TObjEntry::IsActor
bool IsActor() const
Definition: TObjFileFormat.cpp:48
RoR::RoadType::ROAD_AUTOMATIC
@ ROAD_AUTOMATIC
RoR::TObjGrass::max_y
float max_y
Definition: TObjFileFormat.h:117
RoR::ProceduralPoint::position
Ogre::Vector3 position
Definition: ProceduralManager.h:50
RoR::TObjParser::m_filename
std::string m_filename
Definition: TObjFileFormat.h:196
RoR::TObjVehicle::rotation
Ogre::Quaternion rotation
Definition: TObjFileFormat.h:128
RoR::TObjGrass::sway_distrib
float sway_distrib
Definition: TObjFileFormat.h:113
RoR::TObjParser::Prepare
void Prepare()
Definition: TObjFileFormat.cpp:58
RoR::TObjTree::yaw_to
float yaw_to
Definition: TObjFileFormat.h:76
format
Truck file format(technical spec)
RoR::TObj::SpecialObject::TRUCK2
@ TRUCK2
RoR::TObj::SpecialObject::LOAD
@ LOAD
RoR::TObjGrass::min_x
float min_x
Definition: TObjFileFormat.h:116
RoR::TObjEntry::special
TObj::SpecialObject special
Definition: TObjFileFormat.h:146
TObjFileFormat.h
Parser and data structures for TOBJ (Terrain Objects) file format.
RoR::ProceduralPoint::bheight
float bheight
Definition: ProceduralManager.h:55
RoR::TObjEntry::instance_name
char instance_name[TObj::STR_LEN]
Definition: TObjFileFormat.h:148
RoR::ProceduralPoint::rotation
Ogre::Quaternion rotation
Definition: ProceduralManager.h:51
RoR::TObjParser::m_in_procedural_road
bool m_in_procedural_road
Definition: TObjFileFormat.h:203
RoR::TObjTree::min_distance
float min_distance
Definition: TObjFileFormat.h:78
RoR::TObjEntry::odef_name
char odef_name[TObj::STR_LEN]
Definition: TObjFileFormat.h:149
RoR::TObjGrass::material_name
char material_name[TObj::STR_LEN]
Definition: TObjFileFormat.h:119
RoR::TObj::LINE_BUF_LEN
const int LINE_BUF_LEN
Definition: TObjFileFormat.h:38
Actor.h
RoR::TObjParser::ProcessCurrentLine
bool ProcessCurrentLine()
Definition: TObjFileFormat.cpp:90
RoR::TObjGrass::max_h
float max_h
Definition: TObjFileFormat.h:117
RoR::TObjParser::m_def
std::shared_ptr< TObjFile > m_def
Definition: TObjFileFormat.h:195
RoR::TObjParser::m_cur_procedural_obj_start_line
int m_cur_procedural_obj_start_line
Definition: TObjFileFormat.h:205
RoR::TObjTree::density_map
char density_map[TObj::STR_LEN]
Definition: TObjFileFormat.h:84
RoR::TObjParser::ProcessGridLine
void ProcessGridLine()
Definition: TObjFileFormat.cpp:243
RoR::TObjEntry
Definition: TObjFileFormat.h:134
ProceduralRoad.h
RoR::TObjGrass::sway_length
float sway_length
Definition: TObjFileFormat.h:112
RoR::ProceduralObject
Definition: ProceduralManager.h:59
RoR::TObjParser::ImportProceduralPoint
void ImportProceduralPoint(Ogre::Vector3 const &pos, Ogre::Vector3 const &rot, TObj::SpecialObject special)
Definition: TObjFileFormat.cpp:343
RoR::TObjParser::m_line_number
int m_line_number
Definition: TObjFileFormat.h:197
RoR::TObjParser::ParseObjectLine
bool ParseObjectLine(TObjEntry &object)
Definition: TObjFileFormat.cpp:377
RoR::Str
Wrapper for classic c-string (local buffer) Refresher: strlen() excludes '\0' terminator; strncat() A...
Definition: Str.h:35
RoR::TObj::SpecialObject::ROAD
@ ROAD
RoR::TObjGrass::technique
int technique
Definition: TObjFileFormat.h:109
RoR::TObjGrass::density_map_filename
char density_map_filename[TObj::STR_LEN]
Definition: TObjFileFormat.h:121
RoR::RoadType::ROAD_BRIDGE
@ ROAD_BRIDGE
RoR::TObj::SpecialObject::GRID
@ GRID
RoR::Str::ToCStr
const char * ToCStr() const
Definition: Str.h:46
RoR::ProceduralPoint::width
float width
Definition: ProceduralManager.h:53
RoR::TObjParser::m_road2_num_blocks
int m_road2_num_blocks
Definition: TObjFileFormat.h:210
RoR::TObjParser::m_road2_last_rot
Ogre::Vector3 m_road2_last_rot
Definition: TObjFileFormat.h:209
RoR::TObjVehicle::position
Ogre::Vector3 position
Definition: TObjFileFormat.h:127
RoR::TObj::SpecialObject::ROAD_BORDER_LEFT
@ ROAD_BORDER_LEFT
RoR::ProceduralObject::smoothing_num_splits
int smoothing_num_splits
Definition: ProceduralManager.h:76
RoR::TObjTree::tree_mesh
char tree_mesh[TObj::STR_LEN]
Definition: TObjFileFormat.h:82
RoR::TObjGrass::sway_speed
float sway_speed
Definition: TObjFileFormat.h:111
RoR::TObjEntry::type
char type[TObj::STR_LEN]
Definition: TObjFileFormat.h:147
RoR::TObjEntry::IsRoad
bool IsRoad() const
Definition: TObjFileFormat.cpp:43
RoR::RoadType::ROAD_FLAT
@ ROAD_FLAT
RoR::TObjTree::scale_from
float scale_from
Definition: TObjFileFormat.h:77
RoR::TObjParser::m_cur_procedural_obj
ProceduralObjectPtr m_cur_procedural_obj
Definition: TObjFileFormat.h:204
RoR::TObjTree::max_distance
float max_distance
Definition: TObjFileFormat.h:78
RoR::RoadType::ROAD_MONORAIL
@ ROAD_MONORAIL
RoR::RoadType::ROAD_RIGHT
@ ROAD_RIGHT
RoR::TObjParser::ProcessRoadObject
void ProcessRoadObject(const TObjEntry &object)
Definition: TObjFileFormat.cpp:314
RoR::TObjParser::m_rot_yxz
bool m_rot_yxz
Definition: TObjFileFormat.h:212
RoR::TObjEntry::TObjEntry
TObjEntry()
Definition: TObjFileFormat.h:136
RoR::TObjParser::ProcessOgreStream
void ProcessOgreStream(Ogre::DataStream *stream)
Definition: TObjFileFormat.cpp:203
RoR::TObjTree::grid_spacing
float grid_spacing
Definition: TObjFileFormat.h:80
RoR::TObj::SpecialObject::ROAD_BORDER_RIGHT
@ ROAD_BORDER_RIGHT
RoR::TObjParser::m_road2_last_pos
Ogre::Vector3 m_road2_last_pos
Definition: TObjFileFormat.h:208
RoR::TObjParser::m_cur_line
const char * m_cur_line
Definition: TObjFileFormat.h:198
RoR::TObjGrass::color_map_filename
char color_map_filename[TObj::STR_LEN]
Definition: TObjFileFormat.h:120
RoR::TObjTree::high_density
float high_density
Definition: TObjFileFormat.h:79
RoR::TObjVehicle::name
char name[TObj::STR_LEN]
Definition: TObjFileFormat.h:129
RoR::RoadType::ROAD_LEFT
@ ROAD_LEFT
RoR::TObjGrass::max_x
float max_x
Definition: TObjFileFormat.h:117
RoR::TObjGrass
Unified 'grass' and 'grass2'.
Definition: TObjFileFormat.h:90
RoR::ProceduralPoint
Definition: ProceduralManager.h:34
RoR::TObjParser::m_default_rendering_distance
float m_default_rendering_distance
Definition: TObjFileFormat.h:200
RoR::TObjGrass::grow_techniq
int grow_techniq
Definition: TObjFileFormat.h:110
RoR::TObjTree::color_map
char color_map[TObj::STR_LEN]
Definition: TObjFileFormat.h:83
RoR::TObjTree
Definition: TObjFileFormat.h:61
RoR::TObj::SpecialObject::NONE
@ NONE
RoR::ProceduralObject::name
std::string name
Definition: ProceduralManager.h:73
RoR::TObj::SpecialObject::ROAD_BORDER_BOTH
@ ROAD_BORDER_BOTH
Ogre
Definition: ExtinguishableFireAffector.cpp:35
RoR::TObjTree::scale_to
float scale_to
Definition: TObjFileFormat.h:77
RoR::TObj::SpecialObject::ROAD_BRIDGE
@ ROAD_BRIDGE
RoR::TObjParser::Finalize
std::shared_ptr< TObjFile > Finalize()
Passes ownership.
Definition: TObjFileFormat.cpp:185
RoR::TObjVehicle
Definition: TObjFileFormat.h:125
RoR::TObjParser::ProcessTreesLine
void ProcessTreesLine()
Definition: TObjFileFormat.cpp:250
RoR::TObjParser::CalcRotation
Ogre::Quaternion CalcRotation(Ogre::Vector3 const &rot) const
Definition: TObjFileFormat.cpp:361
RoR::ProceduralPoint::pillartype
int pillartype
Definition: ProceduralManager.h:56
RoR::TObjParser::FlushProceduralObject
void FlushProceduralObject()
Definition: TObjFileFormat.cpp:410
RoR::TObjGrass::min_h
float min_h
Definition: TObjFileFormat.h:116
RoR::TObj::SpecialObject::ROAD_BRIDGE_NO_PILLARS
@ ROAD_BRIDGE_NO_PILLARS
RoR
Definition: AppContext.h:36
RoR::TObj::SpecialObject
SpecialObject
Definition: TObjFileFormat.h:40
RoR::TObjParser::m_cur_line_trimmed
const char * m_cur_line_trimmed
Definition: TObjFileFormat.h:199
RoR::TObj::SpecialObject::TRUCK
@ TRUCK
RoR::TObjTree::collision_mesh
char collision_mesh[TObj::STR_LEN]
Definition: TObjFileFormat.h:85
RoR::TObjTree::yaw_from
float yaw_from
Definition: TObjFileFormat.h:76
RoR::TObjParser::ProcessGrassLine
void ProcessGrassLine()
Definition: TObjFileFormat.cpp:264