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 <boost/spirit/include/qi.hpp> | |
#include <boost/spirit/include/qi_grammar.hpp> | |
#include <boost/spirit/include/phoenix_core.hpp> | |
#include <boost/spirit/include/phoenix_operator.hpp> | |
#include <boost/fusion/include/adapt_struct.hpp> | |
#include <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <vector> |
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
# Skyoralis Static Model file | |
# Version 3.2 | |
# Exported by the Blender script written by Dimitri 'Skypers' Sabadie | |
# Exportation date and time : 16/04/11 18:19:43 | |
# Header | |
hm 3 | |
hv 8 | |
hi 0 12 | |
hi 1 12 |
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
char c; | |
for (int r = 0; r < row; ++r) { | |
for (int c = 0; c < col; ++c) { | |
char c = (c+(r%2))%2); | |
case[r][c].Color = Color(c, c, c); | |
} | |
} |
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
bool col; | |
for (int r = 0; r < 10; ++r) { | |
for (int c = 0; c < 10; ++c) { | |
col = (r+c)%2; | |
std::cout << col << ' '; | |
} | |
std::cout << std::endl; | |
} |
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
template <class Format, class Dispatch> | |
mesh<Format, Dispatch>::mesh(std::string const &name) : | |
resource< mesh<Format, Dispatch> >(name), | |
_nbIndices(0) { | |
} | |
// after a base_type idiom ... | |
template <class Format, class Dispatch> | |
mesh<Format, Dispatch>::mesh(std::string const &name) : |
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
aiString str; | |
std::for_each(_pScene->mMaterials, _pScene->mMaterials+_pScene->mNumMaterials, [&](aiMaterial *pMat) { | |
pMat->Get(AI_MATKEY_NAME, str); | |
cout << str.data << endl; | |
}); |
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 <algorithm> | |
#include <iostream> // std::cout / std::endl; | |
using namespace std; | |
int main() { | |
int const values[] = {1, 2, 3, 4, 5}; | |
std::for_each(values, values+5, [](int v) { | |
cout << v << endl; |
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
(II) Sun Jun 12 14:59:42 2011 | 1 present materials | |
zsh: segmentation fault ./skyimp cube.blend | |
if (_pScene->HasMaterials()) { | |
logger::inst() << log::information << _pScene->mNumMaterials << " present materials\n"; | |
aiString str; | |
aiMaterial *pMat = _pScene->mMaterials[0]; | |
assert(pMat); |
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
/* is that sane ? */ | |
float a = /* ... */ | |
float b = /* ... */ | |
if (a == b) | |
/* do something */ | |
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
AI_FORCE_INLINE bool aiVector3D::operator== (const aiVector3D& other) const { | |
return x == other.x && y == other.y && z == other.z; | |
} |
OlderNewer