本文整理汇总了C++中Geometry::Post方法的典型用法代码示例。如果您正苦于以下问题:C++ Geometry::Post方法的具体用法?C++ Geometry::Post怎么用?C++ Geometry::Post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geometry
的用法示例。
在下文中一共展示了Geometry::Post方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Planet
//.........这里部分代码省略.........
switch(n){
case 0: v->SetColor(ARGB(1,0,0)); break;
case 1: v->SetColor(ARGB(0,0,1)); break;
case 2: v->SetColor(ARGB(1,1,0)); break;
case 3: v->SetColor(ARGB(0,1,0)); break;
case 4: v->SetColor(ARGB(1,.5f,.5f)); break;
case 5: v->SetColor(ARGB(0,1,1)); break;
case 6: v->SetColor(ARGB(.5f,.5f,.5f)); break;
case 7: v->SetColor(ARGB(1,0,0)); break;
case 8: v->SetColor(ARGB(1,0,0)); break;
case 9: v->SetColor(ARGB(1,0,0)); break;
case 10: v->SetColor(ARGB(1,0,0)); break;
case 11: v->SetColor(ARGB(1,0,0)); break;
case 12: v->SetColor(ARGB(1,0,0)); break;
case 13: v->SetColor(ARGB(1,0,0)); break;
case 14: v->SetColor(ARGB(1,0,0)); break;
case 15: v->SetColor(ARGB(1,0,0)); break;
}
*/
v->SetColor(ARGB(1,1,1));
View1->Apply(v);
ScoreViews->Add(v);
}
// 191,189
// 101
// 85
Info1 = new Bitmap("Textures/Interface/Instructions/Inntasting",BITMAP_RGB);
Info2 = new Bitmap("Textures/Interface/Instructions/Kontroll",BITMAP_RGB);
Info3 = new Bitmap("Textures/Interface/Instructions/Pickups",BITMAP_RGB);
printf("%d,%d\n",Info1->GetWidth(),Info1->GetHeight());
printf("%d,%d\n",Info2->GetWidth(),Info2->GetHeight());
printf("%d,%d\n",Info3->GetWidth(),Info3->GetHeight());
View *InfoView = new View(Rect(.75f,.7f,.95f,.9f));
InfoView->SetClearState(false);
View *v1 = new View(Rect(0,0,1,1.3f));
View *v2 = new View(Rect(0,0,1,101.0f/189.0f*1.3f));
View *v3 = new View(Rect(0,0,1,85.0f/189.0f*1.3f));
v1->Apply(Info1);
v2->Apply(Info2);
v3->Apply(Info3);
v1->SetClearState(false);
v2->SetClearState(false);
v3->SetClearState(false);
InfoView->Apply(v1);
InfoView->Apply(v2);
InfoView->Apply(v3);
View1->Apply(InfoView);
Info3->SetTranslusency(.8f);
null = new Geometry();
null->SetPosition(Vector(0,0,1000000));
Back = new Geometry();
Back->Node::Apply(new Background(Back));
Back->SetPosition(Vector(0,0,800000));
Back->Post();
null->Node::Apply(Back);
new Planet(null);
cam = new Camera();
cam->SetName("Camera");
null->Node::Apply(cam);
camAI = new CameraAI(cam);
cam->Apply(camAI);
View1->Attatch(cam);
PlayerGeometries = new DynamicArray();
for(n=0; n<4; n++){
Geometry *Ship = new Geometry();
char name[1024];
sprintf(name,"Player%d",n);
Ship->SetName(name);
//Ship->SetPosition(Vector(0,0,-800000));
Ship->Post();
PlayerGeometries->Add(Ship);
//AI_Player1 = new PlayerAI(Ship);
null->Node::Apply(Ship);
Ship->Node::Apply(new PlayerAI(Ship,(View*)ScoreViews->GetItem(n)));
}
//
printf("Initializing levels.\n");
//#ifndef _DEBUG
InitLevels(2);
NextLevel(10);
//#endif
printf("Done.\n");
printf("------------------------------------------------------------------------\n");
printf(" TV-Meteorites initalized\n");
printf("------------------------------------------------------------------------\n");
Initialized = true;
}
示例2: Client
Meteorites::Meteorites() : Client(), Message(){
SetName("MeteoritesGame");
printf("------------------------------------------------------------------------\n");
printf("Initializing TV-Meteorites, Copyright (C) RealityMakers Entertainment as\n");
printf("------------------------------------------------------------------------\n");
// char *str = new char[strlen(GetCurrentProcess()->GetName())+];
// SetName();
extern Host *host;
AttatchHook = host->CreateHook("Attatch");
DetatchHook = host->CreateHook("Detatch");
ShutDownHook = host->CreateHook("ShutDown");
View1 = new View(Rect(0,0,1,1));
View1->SetClearState(false);
ScoreViews = new DynamicArray();
font = new Font("Fonts/Swiss");
for(int n=0; n<16; n++){
View *v = new View(Rect(.8f,float(n)*.6f/16.0f,1,float(n+1)*.6f/16.0f));
v->ConsoleStream::Apply(font);
v->SetClearState(false);
v->Print("0");
switch(n){
case 0: v->SetColor(ARGB(1,0,0)); break;
case 1: v->SetColor(ARGB(0,0,1)); break;
case 2: v->SetColor(ARGB(1,1,0)); break;
case 3: v->SetColor(ARGB(0,1,0)); break;
case 4: v->SetColor(ARGB(1,.5f,.5f)); break;
case 5: v->SetColor(ARGB(0,1,1)); break;
case 6: v->SetColor(ARGB(.5f,.5f,.5f)); break;
case 7: v->SetColor(ARGB(1,0,0)); break;
case 8: v->SetColor(ARGB(1,0,0)); break;
case 9: v->SetColor(ARGB(1,0,0)); break;
case 10: v->SetColor(ARGB(1,0,0)); break;
case 11: v->SetColor(ARGB(1,0,0)); break;
case 12: v->SetColor(ARGB(1,0,0)); break;
case 13: v->SetColor(ARGB(1,0,0)); break;
case 14: v->SetColor(ARGB(1,0,0)); break;
case 15: v->SetColor(ARGB(1,0,0)); break;
}
View1->Apply(v);
ScoreViews->Add(v);
}
/*
ScoreView = new View(Rect(.8f,0,1,.5f));
ScoreView->SetClearState(false);
ScoreView->ConsoleStream::Clear();
ScoreView->Print(" 1: 1261\n 2: 8726\n");
ScoreView->Print(" 3: 8145\n 4: 6923\n");
ScoreView->Print(" 5: 1261\n 6: 8726\n");
ScoreView->Print(" 7: 8145\n 8: 6923\n");
ScoreView->Print(" 9: 1261\n10: 8726\n");
ScoreView->Print("11: 8145\n12: 6923\n");
ScoreView->Print("13: 1261\n14: 8726\n");
ScoreView->Print("15: 8145\n16: 6923\n");
font = new Font("Fonts/Swiss");
ScoreView->ConsoleStream::Apply(font);
View1->Apply(ScoreView);
*/
// View2 = new View(Rect(.8f,0,1,.5f));
View4 = new View(Rect(.75f,0,1,.8f));
// View2->SetClearState(false);
// View4->SetClearState(false);
MeteoritesBitmap = new Bitmap("Textures/test"/*Textures/Title/title"*/,BITMAP_RGB); //Titletv4");
View *LoadView = new View(Rect(.2f,.2f,1-.2f,1-.2f));
View4->Apply(MeteoritesBitmap);
View1->Apply(View4);
// Initialize scene
null = new Geometry();
null->SetPosition(Vector(0,0,1000000));
Back = new Geometry();
Back->Node::Apply(new Background(Back));
Back->SetPosition(Vector(0,0,1000000));
Back->Post();
null->Node::Apply(Back);
cam = new Camera();
cam->SetName("Camera");
null->Node::Apply(cam);
camAI = new CameraAI(cam);
cam->Apply(camAI);
View1->Attatch(cam);
PlayerGeometries = new DynamicArray();
for(n=0; n<5; n++){
Geometry *Ship = new Geometry();
char name[1024];
sprintf(name,"Player%d",n);
Ship->SetName(name);
//Ship->SetPosition(Vector(0,0,-800000));
Ship->Post();
PlayerGeometries->Add(Ship);
//.........这里部分代码省略.........