本文整理汇总了C++中ABrush::IsVolumeBrush方法的典型用法代码示例。如果您正苦于以下问题:C++ ABrush::IsVolumeBrush方法的具体用法?C++ ABrush::IsVolumeBrush怎么用?C++ ABrush::IsVolumeBrush使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ABrush
的用法示例。
在下文中一共展示了ABrush::IsVolumeBrush方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BuildSelectedActorInfo
FSelectedActorInfo BuildSelectedActorInfo( const TArray<AActor*>& SelectedActors)
{
FSelectedActorInfo ActorInfo;
if( SelectedActors.Num() > 0 )
{
// Get the class type of the first actor.
AActor* FirstActor = SelectedActors[0];
if( FirstActor && !FirstActor->HasAnyFlags( RF_ClassDefaultObject ) )
{
UClass* FirstClass = FirstActor->GetClass();
UObject* FirstArchetype = FirstActor->GetArchetype();
ActorInfo.bAllSelectedAreBrushes = Cast< ABrush >( FirstActor ) != NULL;
ActorInfo.SelectionClass = FirstClass;
// Compare all actor types with the baseline.
for ( int32 ActorIndex = 0; ActorIndex < SelectedActors.Num(); ++ActorIndex )
{
AActor* CurrentActor = SelectedActors[ ActorIndex ];
if( CurrentActor->HasAnyFlags( RF_ClassDefaultObject ) )
{
continue;
}
ABrush* Brush = Cast< ABrush >( CurrentActor );
if( !Brush)
{
ActorInfo.bAllSelectedAreBrushes = false;
}
else
{
if( !ActorInfo.bHaveBuilderBrush )
{
ActorInfo.bHaveBuilderBrush = FActorEditorUtils::IsABuilderBrush(Brush);
}
ActorInfo.bHaveBrush |= true;
ActorInfo.bHaveBSPBrush |= (!Brush->IsVolumeBrush());
ActorInfo.bHaveVolume |= Brush->IsVolumeBrush();
}
UClass* CurrentClass = CurrentActor->GetClass();
if( FirstClass != CurrentClass )
{
ActorInfo.bAllSelectedActorsOfSameType = false;
ActorInfo.SelectionClass = NULL;
FirstClass = NULL;
}
else
{
ActorInfo.SelectionClass = CurrentActor->GetClass();
}
++ActorInfo.NumSelected;
if( ActorInfo.bAllSelectedActorsBelongToCurrentLevel )
{
if( !CurrentActor->GetOuter()->IsA(ULevel::StaticClass()) || !CurrentActor->GetLevel()->IsCurrentLevel() )
{
ActorInfo.bAllSelectedActorsBelongToCurrentLevel = false;
}
}
if( ActorInfo.bAllSelectedActorsBelongToSameWorld )
{
if ( !ActorInfo.SharedWorld )
{
ActorInfo.SharedWorld = CurrentActor->GetWorld();
check(ActorInfo.SharedWorld);
}
else
{
if( ActorInfo.SharedWorld != CurrentActor->GetWorld() )
{
ActorInfo.bAllSelectedActorsBelongToCurrentLevel = false;
ActorInfo.SharedWorld = NULL;
}
}
}
// To prevent move to other level for Landscape if its components are distributed in streaming levels
if (CurrentActor->IsA(ALandscape::StaticClass()))
{
ALandscape* Landscape = CastChecked<ALandscape>(CurrentActor);
if (!Landscape || !Landscape->HasAllComponent())
{
if( !ActorInfo.bAllSelectedActorsBelongToCurrentLevel )
{
ActorInfo.bAllSelectedActorsBelongToCurrentLevel = true;
}
}
}
if ( ActorInfo.bSelectedActorsBelongToSameLevel )
{
ULevel* ActorLevel = CurrentActor->GetOuter()->IsA(ULevel::StaticClass()) ? CurrentActor->GetLevel() : NULL;
if ( !ActorInfo.SharedLevel )
{
// This is the first selected actor we've encountered.
//.........这里部分代码省略.........