How to understand the sceneproxy?

How to understand the sceneproxy?
I think sceneproxy is a module relatived to rendering and the RHI, however i cannot understand it, hope someone can detail it for me. And i confused about some software plugins use it by self.

Hello! As you know FPrimitiveSceneProxy base logic is defined in UPrimitiveComponent class. UPrimitiveComponent represent component with some geometry (one primitive or many of them). To get some information about this geometry in the Editor viewport you can use SceneProxy infrastructure. For example, If we view UCapsuleComponent in the viewport then if we 'll see capsule itself - that will be enough to define is it Ok for us. In more complex cases you can create proxies with many parts, depending on what geometry information you need while working with your custom component in Editor.

Woo, thanks, i see some point i have unknown.
And i wanna ask you: if RayTracing together with …MeshSceneProxy were written in a c++ file(.cpp), what’s the ralationship between?

InGame RayTracing is working with components themselves, not their proxies. Or are you asking about rendering ray tracing process?

I copy a code section, could you explain it for me indetail, and what’s the different between RayTracing working with components themselves and rendering ray tracing process?

void FSuperMapMeshSceneProxy::InitRayTracingGeometry()
{

if (IsRayTracingEnabled())
{
	FSuperMapVertexBuffer* pVertexBuffer = m_RenderMeshBuffers.Get();
	FRayTracingGeometry* pGeomety = &m_RayTracingGeometry;
	ENQUEUE_RENDER_COMMAND(InitRayTracingGeometry)(
		[this, pGeomety , pVertexBuffer](FRHICommandListImmediate& RHICmdList)
	{
		FRayTracingGeometryInitializer Initializer;
		Initializer.IndexBuffer         = nullptr;
		Initializer.TotalPrimitiveCount = 0;
		Initializer.GeometryType        = RTGT_Triangles;
		Initializer.bFastBuild          = true;
		Initializer.bAllowUpdate        = false;
		pGeomety->SetInitializer(Initializer);
		pGeomety->InitResource();
		pGeomety->Initializer.IndexBuffer         = pVertexBuffer->GetIndexBufferRHI();
		pGeomety->Initializer.TotalPrimitiveCount = pVertexBuffer->GetIndexBufferCount() / 3;
		FRayTracingGeometrySegment Segment;
		Segment.VertexBuffer  = pVertexBuffer->GetVertexBufferRHI();
		Segment.NumPrimitives = pGeomety->Initializer.TotalPrimitiveCount;
		pGeomety->Initializer.Segments.Add(Segment);
		pGeomety->UpdateRHI();
	});
}

}

void FSuperMapMeshSceneProxy::GetDynamicRayTracingInstances(FRayTracingMaterialGatheringContext& Context, TArray& OutRayTracingInstances)
{
}

This is a screenshoot: