本文整理汇总了C++中ABrush::GetWorld方法的典型用法代码示例。如果您正苦于以下问题:C++ ABrush::GetWorld方法的具体用法?C++ ABrush::GetWorld怎么用?C++ ABrush::GetWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ABrush
的用法示例。
在下文中一共展示了ABrush::GetWorld方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mapBrushPut
void UEditorEngine::mapBrushPut()
{
TArray<FEdMode*> ActiveModes;
GLevelEditorModeTools().GetActiveModes( ActiveModes );
for ( FSelectionIterator It( GEditor->GetSelectedActorIterator() ) ; It ; ++It )
{
AActor* Actor = static_cast<AActor*>( *It );
checkSlow( Actor->IsA(AActor::StaticClass()) );
ABrush* BrushActor = Cast< ABrush >( Actor );
if( BrushActor && !FActorEditorUtils::IsABuilderBrush(Actor) )
{
check( BrushActor->GetWorld() );
ABrush* WorldBrush = BrushActor->GetWorld()->GetDefaultBrush();
check( WorldBrush );
BrushActor->Modify();
BrushActor->Brush->Polys->Element = WorldBrush->Brush->Polys->Element;
BrushActor->CopyPosRotScaleFrom( WorldBrush );
BrushActor->SetNeedRebuild(BrushActor->GetLevel());
WorldBrush->ReregisterAllComponents();
for( int32 ModeIndex = 0; ModeIndex < ActiveModes.Num(); ++ModeIndex )
{
ActiveModes[ModeIndex]->UpdateInternalData();
}
}
}
}
示例2: MapBrushGet
void UEditorEngine::MapBrushGet(UWorld* InWorld)
{
for ( FSelectionIterator It( GEditor->GetSelectedActorIterator() ) ; It ; ++It )
{
AActor* Actor = static_cast<AActor*>( *It );
checkSlow( Actor->IsA(AActor::StaticClass()) );
ABrush* BrushActor = Cast< ABrush >( Actor );
if( BrushActor && !FActorEditorUtils::IsABuilderBrush(Actor) )
{
check( BrushActor->GetWorld() );
ABrush* WorldBrush = BrushActor->GetWorld()->GetDefaultBrush();
check( WorldBrush );
WorldBrush->Modify();
WorldBrush->Brush->Polys->Element = BrushActor->Brush->Polys->Element;
WorldBrush->CopyPosRotScaleFrom( BrushActor );
WorldBrush->ReregisterAllComponents();
break;
}
}
GEditor->SelectNone( false, true );
GEditor->SelectActor(InWorld->GetDefaultBrush(), true, true);
}