2013年11月27日水曜日

std::mapってなに

久しぶりの投稿。
cocos2dの勉強を始めたので、それを機に備忘録的に勉強内容を書いていこうと思う。

stdとは、C++の標準ライブラリのnamespace。

std::map<>が出てきたのでその使い方を覚えたい。
mapはキーと値との組み合わせでによって管理するコンテナらしい。
使いこなせばJSの連想配列的な使い方出来て便利そう。

使い方

#include <map>
#include <string>
#include <iostream>

int main()
{
 using namespace std;

 // 宣言
 map<int string=""> names;  // キーがint、値がchar*のmap

 // 要素を追加する
 names.insert( map<int string="">::value_type( 10, "aaa" ) );
 names.insert( map<int string="">::value_type( 30, "ccc" ) );
 names.insert( map<int string="">::value_type( 50, "eee" ) );
 names.insert( map<int string="">::value_type( 40, "ddd" ) );
 names.insert( map<int string="">::value_type( 20, "bbb" ) );

 // 値を変更
 names[50] = "fff";
 
 // 要素を出力する
 cout << names[10] << endl;
 cout << names[20] << endl;
 cout << names[30] << endl;
 cout << names[40] << endl;
 cout << names[50] << endl;

 return 0;
}


2012年12月3日月曜日

Xcode4 with openFrameworks build


Xcode4 with openFrameworks

用意した Mac0SX10.6.sdk ディレクトリを/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs の中に置く

出典

2012年10月31日水曜日

バカアフター

http://baaaf.com/sample.html

AfterEffectsの機能のみで作成されたCG集がすごいことになっている。
でも基本的にopenGLだからこのくらいのことはできて当たり前なんだけども。すごい使いこみようや。

2012年10月30日火曜日

ずるいデザイン

ずるいデザイン
https://speakerdeck.com/ken_c_lo/zurui-design

ずるい線とか角丸四角形とかの使い方をレクチャー。
CSSも使えるようにならねばなー。

こういうデザインを定量化してる例を大量に仕入れておくだけで結構な引き出しになりそうな気がする。それをライブラリ化できないものかな。ただ、小手先だけのものになるけどね。

2012年10月27日土曜日

aftereffectsチュートリアルサイト集

水玉動画
http://www.mizutama.com/aetips_ex_library.html

AfterEffects style
http://ae-style.net/tutorials/e17.html


ayato
http://www.ayatoweb.com/ae_tips.html

2012年10月23日火曜日

titanium導入

appceleratorに登録
https://my.appcelerator.com/

自分のページが作成されるのでそこからtitanium studioをダウンロード
https://my.appcelerator.com/resources



まずここみました
http://www.infiniteloop.co.jp/blog/2011/04/titanium_mobile/
んでこっち
http://gihyo.jp/dev/serial/01/titanium/0001
PDFもおとしました

んでこれに従って設定してる
http://gihyo.jp/dev/serial/01/titanium/0016?page=2
androidSDKのパスを失敗してUserフォルダに色々入ってしまったけど、後からOF_AndroidのフォルダのSDKにパスを通し


参考になりそうなNAVERまとめ
http://matome.naver.jp/odai/2132938948175442001

titaniumの動画チュートリアル
http://dotinstall.com/lessons/basic_titanium