本文整理汇总了C++中MyEventReceiver::getYPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ MyEventReceiver::getYPosition方法的具体用法?C++ MyEventReceiver::getYPosition怎么用?C++ MyEventReceiver::getYPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyEventReceiver
的用法示例。
在下文中一共展示了MyEventReceiver::getYPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
CSGPWorldConfig::getInstance()->m_fGrassFarFadingStart = 32.0f;
CSGPWorldConfig::getInstance()->m_fGrassFarFadingEnd = 80.0f;
#endif
renderdevice->GetWorldSystemManager()->initializeQuadTree();
#if 1
ISGPObject* pObj0 = renderdevice->GetWorldSystemManager()->createObject(
String(L"StaticMesh\\jianzhu.mf1"),
String(L"SceneObject01"),
Vector3D(45.0f, 30.0f, 28.0f) );
pObj0->m_fScale = 1.5f;
pObj0->m_fRotationXYZ[1] = 45.0f * pi_over_180;
renderdevice->GetWorldSystemManager()->addSceneObject(pObj0);
#endif
ptestModel->setPosition(13.55f, renderdevice->GetWorldSystemManager()->getRealTerrainHeight(13.55f,3.55f), 3.55f);
//ptestModel->setScale(5.0f);
ptestModel->setVisible(true);
// Create other render to frame buffer
CSGPWorldConfig::getInstance()->m_bPostFog = true;
renderdevice->createRenderToFrameBuffer( viewarea.Width, viewarea.Height, false );
// In order to do framerate independent movement, we have to know
// how long it was since the last frame
device->setWindowCaption(L"SGP Engine - Test Sample Demo");
uint32 LastXPos = receiver.getXPosition();
uint32 LastYPos = receiver.getYPosition();
double averageMS = 0;
double averageFPS = 0;
while(device->run() && renderdevice)
{
if(receiver.IsKeyDown(KEY_F1))
{
static int mmmm = 0;
if( mmmm == 0)
{
String WorldMapName = String(L"worldmap\\") + renderdevice->GetWorldSystemManager()->getWorldName() + String(L".map");
renderdevice->GetWorldSystemManager()->saveWorldToFile(WorkingDir, WorldMapName);
mmmm++;
}
}
if(receiver.IsKeyDown(KEY_F3))
{
static int gg = 0;
if( gg == 0 )
{
renderdevice->GetWorldSystemManager()->setHeightMap(8, 119, 80);
renderdevice->GetWorldSystemManager()->setHeightMap(8, 120, 80);
uint32 chunks[4] = {224, 225, 240, 241};
renderdevice->GetWorldSystemManager()->flushTerrainHeight(chunks, 4);
renderdevice->GetWorldSystemManager()->setTerrainChunkLayerTexture(240, eChunk_Diffuse1Texture, String(L"Texture\\terrain\\dirt004.dds"));
renderdevice->GetWorldSystemManager()->setTerrainChunkLayerTexture(240, eChunk_Diffuse2Texture, String(L"Texture\\terrain\\dirt002.dds"));
renderdevice->GetWorldSystemManager()->setTerrainChunkLayerTexture(240, eChunk_Diffuse3Texture, String(L"Texture\\terrain\\stone001.dds"));
renderdevice->GetWorldSystemManager()->setTerrainChunkLayerTexture(240, eChunk_NormalMapTexture, String(L"Texture\\terrain\\normal001.dds"));
renderdevice->GetWorldSystemManager()->setTerrainChunkLayerTexture(240, eChunk_DetailMapTexture, String(L"Texture\\terrain\\detailmap001.dds"));