本文整理汇总了C++中Model3D::SetMesh方法的典型用法代码示例。如果您正苦于以下问题:C++ Model3D::SetMesh方法的具体用法?C++ Model3D::SetMesh怎么用?C++ Model3D::SetMesh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model3D
的用法示例。
在下文中一共展示了Model3D::SetMesh方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
void Init()
{
Super::Init();
mWorld = GD_NEW(World, this, "Launch::Gamedesk");
mWorld->Init(&mOctree);
Model3D* pModel = Cast<Model3D>(mWorld->SpawnEntity(Model3D::StaticClass()));
pModel->SetMesh("link's house.ase");
pModel->Select(true);
Keyboard& keyboard = InputSubsystem::GetKeyboard();
keyboard.AddKeyListener(this, Keyboard::Key_W, Keyboard::Key_Down);
keyboard.AddKeyListener(this, Keyboard::Key_S, Keyboard::Key_Down);
keyboard.AddKeyListener(this, Keyboard::Key_A, Keyboard::Key_Down);
keyboard.AddKeyListener(this, Keyboard::Key_D, Keyboard::Key_Down);
keyboard.AddKeyListener(this, Keyboard::Key_Escape, Keyboard::Key_Down);
Mouse& mouse = InputSubsystem::GetMouse();
mouse.AddMoveListener(this);
mMainWindow->AddListener(this);
mFont.GetFont( "Data/Fonts/tahoma.ttf", 14 );
}
示例2: InsertModelInWorld
void ModelBrowserUI::InsertModelInWorld( Q3ListBoxItem* pItem )
{
Camera* camera = mTool->GetEditor()->GetWorldManager().GetCurrentCamera();
Vector3f pos = camera->GetPosition() + (camera->GetView() * 2.0f);
Model3D* newModel = Cast<Model3D>( mTool->GetEditor()->GetWorldManager().SpawnEntity( Model3D::StaticClass(), pos ) );
newModel->SetMesh( String("Data/Meshes/") + String(pItem->text().ascii()) );
}