本文整理汇总了C++中Frame::GetTranslation方法的典型用法代码示例。如果您正苦于以下问题:C++ Frame::GetTranslation方法的具体用法?C++ Frame::GetTranslation怎么用?C++ Frame::GetTranslation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame::GetTranslation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadScene
//.........这里部分代码省略.........
// Ensure the new material is valid.
if( m_mesh->GetStaticMesh()->materials[m] == NULL )
continue;
// Iterate through the already existing render caches.
m_renderCaches->Iterate( true );
while( m_renderCaches->Iterate() )
{
// Check if the new material already exists.
if( m_renderCaches->GetCurrent()->GetMaterial() == m_mesh->GetStaticMesh()->materials[m] )
{
found = true;
break;
}
}
// Add the material if it wasn't found and not set to ignore faces.
if( found == false && m_mesh->GetStaticMesh()->materials[m]->GetIgnoreFace() == false )
m_renderCaches->Add( new RenderCache( g_engine->GetDevice(), m_mesh->GetStaticMesh()->materials[m] ) );
}
// Get a pointer to the mesh's frame list.
LinkedList< Frame > *frames = m_mesh->GetFrameList();
// Iterate through the frame list.
frames->Iterate( true );
while( frames->Iterate() != NULL )
{
// Check if this frame contains an occluder.
if( strncmp( "oc_", frames->GetCurrent()->Name, 3 ) == 0 )
{
// If so, load the occluder, and continue to the next frame.
m_occludingObjects->Add( new SceneOccluder( frames->GetCurrent()->GetTranslation(), ( (MeshContainer*)frames->GetCurrent()->pMeshContainer )->originalMesh, &frames->GetCurrent()->finalTransformationMatrix ) );
continue;
}
// Check if this frame is a spawn point.
if( strncmp( "sp_", frames->GetCurrent()->Name, 3 ) == 0 )
{
// Get the actual name of the spawner object at this spawn point.
char *firstDash = strpbrk( frames->GetCurrent()->Name, "_" );
firstDash++;
char *lastDash = strrchr( firstDash, '_' );
unsigned long length = lastDash - firstDash;
char *name = new char[length + 5];
ZeroMemory( name, sizeof( char ) * ( length + 5 ) );
strncpy( name, firstDash, length );
strcat( name, ".txt" );
// Check if it is a player spawn point.
if( stricmp( name, "player.txt" ) == 0 )
{
// Get the name of the player spawn point's radius frame.
char *radiusName = new char[strlen( firstDash ) + 8];
ZeroMemory( radiusName, sizeof( char ) * ( strlen( firstDash ) + 8 ) );
strncpy( radiusName, firstDash, strlen( firstDash ) );
strcat( radiusName, "_radius" );
// Find the player spawn point's radius frame.
Frame *radiusFrame = frames->GetFirst();
while( radiusFrame != NULL )
{
if( stricmp( radiusFrame->Name, radiusName ) == 0 )
break;