This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Optimal usage of tabs and spaces | |
================================ | |
Goal: | |
Minimize number of characters used while keeping everything aligned with any tab size. | |
Tabs should be used to align text from the same line position, so having different tab size won't misalign the text. | |
Spaces should be used when the line position isn't aligned, and when it becomes aligned after the spaces tabs should be used. | |
examples: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License (MIT) | |
Copyright (c) 2017 Yehonatan Ballas | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 Yehonatan Ballas | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unordered_map> | |
#include <cereal\types\unordered_map.hpp> | |
#include <cereal\archives\json.hpp> | |
#include <cereal\details\traits.hpp> | |
#include <fstream> | |
class Test | |
{ | |
public: | |
std::unordered_map<std::string, int> map_int; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node* planeNode = scene_->CreateChild("Plane"); | |
planeNode->SetScale(Vector3(100.0f, 1.0f, 100.0f)); | |
StaticModel* planeObject = planeNode->CreateComponent<StaticModel>(); | |
planeObject->SetModel(cache->GetResource<Model>("Models/Plane.mdl")); | |
auto mat = cache->GetResource<Material>("Materials/StoneTiled.xml")->Clone(); | |
mat->SetRenderOrder(100); // Lower render order to render first | |
auto tecs = mat->GetTechniques(); | |
for (size_t i = 0; i < tecs.Size(); ++i) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 Yehonatan Ballas | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iostream> | |
#include <vector> | |
#include <unordered_map> | |
#include <string> | |
#include <Urho3D/Urho3D.h> | |
#include <Urho3D/Container/Vector.h> | |
#include <Urho3D/Container/HashMap.h> |