当前位置: 首页 > news >正文

江西网页制作关键词优化包年推广

江西网页制作,关键词优化包年推广,网站建设自学,内蒙古网站建设公司《Electric Dreams》项目中提供了一些自定义节点和子图(文件位置:“/Content/PCG/Assets/PCGCustomNodes”),这些节点和子图在《Electric Dreams》被广泛使用,对于理解《Electric Dreams》非常重要,而且它们可以直接移…

《Electric Dreams》项目中提供了一些自定义节点和子图(文件位置:“/Content/PCG/Assets/PCGCustomNodes”),这些节点和子图在《Electric Dreams》被广泛使用,对于理解《Electric Dreams》非常重要,而且它们可以直接移植到新的项目中使用。所以写个博客分析一下

文章目录

  • 前导文章
  • Passthrough节点
    • 作用
    • Execute with Context
  • PointNormalToColor节点
    • 作用
    • Point Loop Body
    • Execute with Context
  • PointFromPCGVolume节点
    • 作用
    • Execute with Context

在这里插入图片描述

前导文章

《虚幻引擎程序化资源生成框架PCG 之 UPCGBlueprintElement源码笔记(一)》
《虚幻引擎程序化资源生成框架PCG 之 UPCGBlueprintElement源码笔记(二)数据流》

Passthrough节点

作用

数据流的开关

Execute with Context

在这里插入图片描述

Enabled控制是否将从Input输入进来的从Output输出,当Enabledfalse的时候,输出的PCGDataCollection中的Tagged Data数组将会是一个空数组。

PointNormalToColor节点

作用

将Point法线存入Color属性

Point Loop Body

先看一下它的Point Loop Body
在这里插入图片描述
Point Loop Body的逻辑就是将每一个Point的Up Vector存储在Color属性中,然后把修改过的Point输出。

Execute with Context

在这里插入图片描述

注释见上图,在PointLoopBody后面有一个Initialize from Data节点,代码如下:

void UPCGSpatialData::InitializeFromData(const UPCGSpatialData* InSource, const UPCGMetadata* InMetadataParentOverride, bool bInheritMetadata, bool bInheritAttributes)
{if (InSource && TargetActor.IsExplicitlyNull()){TargetActor = InSource->TargetActor;}if (!Metadata){Metadata = NewObject<UPCGMetadata>(this);}if (!bInheritMetadata || InMetadataParentOverride || InSource){const UPCGMetadata* ParentMetadata = bInheritMetadata ? (InMetadataParentOverride ? InMetadataParentOverride : (InSource ? InSource->Metadata : nullptr)) : nullptr;Metadata->Initialize(ParentMetadata, bInheritAttributes);}else{UE_LOG(LogPCG, Warning, TEXT("InitializeFromData has both no source and no metadata override"));}
}

Initialize from Data做了两件事:

  • 将源Data中的TargetActor赋值给新PCGSpatialDataTargetActor
  • 用源Data的metadata初始化新PCGSpatialData的metadata

PointFromPCGVolume节点

作用

使用ContextSourceComponent或者Component的几何信息(TransformBound)构造1个PCGPoint

Execute with Context

在这里插入图片描述

我们先看一下GetComponentGetOriginalComponent

UPCGComponent* UPCGBlueprintHelpers::GetComponent(FPCGContext& Context)
{return Context.SourceComponent.Get();
}UPCGComponent* UPCGBlueprintHelpers::GetOriginalComponent(FPCGContext& Context)
{if (Context.SourceComponent.IsValid() &&Cast<APCGPartitionActor>(Context.SourceComponent->GetOwner()) &&Cast<APCGPartitionActor>(Context.SourceComponent->GetOwner())->GetOriginalComponent(Context.SourceComponent.Get())){return Cast<APCGPartitionActor>(Context.SourceComponent->GetOwner())->GetOriginalComponent(Context.SourceComponent.Get());}else{return Context.SourceComponent.Get();}
}

再看看它是如何获取GetActorLocalBoundsPCG

UPCGBlueprintHelpers::GetActorLocalBoundsPCG

FBox UPCGBlueprintHelpers::GetActorLocalBoundsPCG(AActor* InActor, bool bIgnorePCGCreatedComponents)
{return PCGHelpers::GetActorLocalBounds(InActor, bIgnorePCGCreatedComponents);
}

PCGHelpers::GetActorLocalBounds

FBox GetActorLocalBounds(const AActor* InActor, bool bIgnorePCGCreatedComponents){// Specialized version of CalculateComponentsBoundingBoxInLocalScape that skips over PCG generated components// This is to ensure stable bounds and no timing issues (cleared ISMs, etc.)FBox Box(EForceInit::ForceInit);const bool bNonColliding = true;const bool bIncludeFromChildActors = true;if (InActor){const FTransform& ActorToWorld = InActor->GetTransform();const FTransform WorldToActor = ActorToWorld.Inverse();InActor->ForEachComponent<UPrimitiveComponent>(bIncludeFromChildActors, [bNonColliding, bIgnorePCGCreatedComponents, &WorldToActor, &Box](const UPrimitiveComponent* InPrimComp){if ((bNonColliding || InPrimComp->IsCollisionEnabled()) &&(!bIgnorePCGCreatedComponents || !InPrimComp->ComponentTags.Contains(DefaultPCGTag))){const FTransform ComponentToActor = InPrimComp->GetComponentTransform() * WorldToActor;Box += InPrimComp->CalcBounds(ComponentToActor).GetBox();}});}else{UE_LOG(LogPCG, Error, TEXT("Actor is invalid in GetActorLocalBounds"));}return Box;}

所谓LocalBounds就是把所属Actor的所有PrimitiveComponent叠加起来获得最大的FBox

在这里插入图片描述

http://www.yidumall.com/news/22221.html

相关文章:

  • 网站空间文件删不掉亚洲卫星电视网参数表
  • 哪个网站上网好网页设计与网站开发
  • 36岁了初中毕业想提升学历爱站网seo综合查询
  • 鄂州市门户网站seo网站推广的主要目的不包括
  • 代理 网站前置审批百度关键词优化服务
  • 做采购应该关注的网站seo零基础培训
  • asp.net 多网站沈阳seo网站推广
  • 欧亚达网站是哪家公司做的优化网站快速排名软件
  • 响应式网站建设定制爱站长
  • 免费网站建站+凡科建站域名批量查询
  • 建站之星至尊版永久免费国外域名注册
  • 动易网站cms想学销售去哪培训
  • 用wordpress做的外贸网站网络营销的方式包括
  • 程序员 修电脑 做网站站长工具seo综合查询关键词
  • 龙岩做网站的谷歌网站网址
  • wordpress form manager 汉化防控措施持续优化
  • 顺义区做网站外包平台
  • 学做视频t的网站推广网站多少钱
  • 网站建设与规划总结网站服务器查询
  • 网站标题 没有排名qq引流推广软件免费
  • 固始网站制作网络广告图片
  • 织梦网站更改山东网站seo推广优化价格
  • 集团做网站需要多大的带宽网站优化推广是什么
  • 关于做网站的策划方案市场营销渠道
  • 常德seo招聘网站优化塔山双喜
  • 用java做网站可以品牌营销策划怎么写
  • js调用其他网站内容阿里巴巴友情链接怎么设置
  • 傻瓜网站开发软件河北seo
  • 沈阳市和平区网站建设淘宝运营培训多少钱
  • 企业网站 源码少儿编程