Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/DistortionRendering.h
Ben Marsh 149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00

62 lines
1.6 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
DistortionRendering.h: Distortion rendering implementation.
=============================================================================*/
#pragma once
/**
* Set of distortion scene prims
*/
class FDistortionPrimSet
{
public:
/**
* Iterate over the distortion prims and draw their accumulated offsets
* @param ViewInfo - current view used to draw items
* @param DPGIndex - current DPG used to draw items
* @return true if anything was drawn
*/
bool DrawAccumulatedOffsets(FRHICommandListImmediate& RHICmdList, const class FViewInfo& View, bool bInitializeOffsets);
/**
* Add a new primitive to the list of distortion prims
* @param PrimitiveSceneProxy - primitive info to add.
*/
void AddScenePrimitive(FPrimitiveSceneProxy* PrimitiveSceneProxy)
{
Prims.Add(PrimitiveSceneProxy);
}
/**
* Adds a new primitives to the list of distortion prims
* @param PrimitiveSceneProxies - primitive info to add.
*/
void Append(FPrimitiveSceneProxy** PrimitiveSceneProxies, int32 NumProxies)
{
Prims.Append(PrimitiveSceneProxies, NumProxies);
}
/**
* @return number of prims to render
*/
int32 NumPrims() const
{
return Prims.Num();
}
/**
* @return a prim currently set to render
*/
const FPrimitiveSceneProxy* GetPrim(int32 i)const
{
check(i>=0 && i<NumPrims());
return Prims[i];
}
private:
/** list of distortion prims added from the scene */
TArray<FPrimitiveSceneProxy*, SceneRenderingAllocator> Prims;
};