I love the smell of UnrealEd crashing in the morning. – tarquin

UE3:DecalManager (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
(Redirected from UE3:ActiveDecalInfo (UDK))
Jump to: navigation, search
UDK Object >> Actor >> DecalManager
Package: 
Engine
Direct subclasses:
GameDecalManager, UTDecalManager
This class in other games:
UT3


Properties[edit]

ActiveDecals[edit]

Type: array<ActiveDecalInfo>


DecalBlendRange[edit]

Type: Object.Vector2D

default decal blend range

Default value:

Member Value
X 89.5
Y 180.0

DecalDepthBias[edit]

Type: float

default depth bias offset

Default value: -6.0E-5

DecalLifeSpan[edit]

Type: float

Modifiers: globalconfig

default lifetime for decals

Default value: 30.0

DecalTemplate[edit]

Type: DecalComponent

Modifiers: protected

template to base pool components off of - should not be used for decals or attached to anything

Default value: DecalComponent'BaseDecal'

MaxActiveDecals[edit]

Type: int

maximum allowed active components - if this is greater than 0 and is exceeded, the oldest active decal is taken

PoolDecals[edit]

Type: array<DecalComponent>

components currently in the pool

Default values[edit]

Property Value
CollisionType COLLIDE_CustomDefault
TickGroup TG_DuringAsyncWork

Subobjects[edit]

BaseDecal[edit]

Class: Engine.DecalComponent

Property Value
bIgnoreOwnerHidden True
ReplacementPrimitive None

Structs[edit]

ActiveDecalInfo[edit]

Modifiers: native

components currently active in the world and how much longer they will be

DecalComponent Decal 
float LifetimeRemaining 

Functions[edit]

Static native functions[edit]

AreDynamicDecalsEnabled[edit]

native static final function bool AreDynamicDecalsEnabled ()

Returns:

whether dynamic decals are enabled

Other static functions[edit]

SetDecalParameters[edit]

static final function SetDecalParameters (DecalComponent TheDecal, MaterialInterface DecalMaterial, Object.Vector DecalLocation, Object.Rotator DecalOrientation, float Width, float Height, float Thickness, bool bNoClip, float DecalRotation, PrimitiveComponent HitComponent, bool bProjectOnTerrain, bool bProjectOnSkeletalMeshes, name HitBone, int HitNodeIndex, int HitLevelIndex, int InFracturedStaticMeshComponentIndex, float DepthBias, Object.Vector2D BlendRange)

This will set all of the various decal parameters. This is the function that should be updated when there are new Decal Paramaters that exist that should be updated by game code

Parameters:

  • InExistingDecal - If you have an existing decal that you want to set all the params on.
  • DecalMaterial - the material to use for the decal
  • Width - decal width
  • Height - decal height
  • Thickness - decal thickness (used to calculate the nearplane/farplane values)
  • bNoClip - if true, use the bNoClip code path for decal generation (requires DecalMaterial to have clamped texture coordinates)
  • DecalRotation - rotation of the decal in degrees
  • HitComponent - if specified, will only project on this component (optimization)
  • bProjectOnTerrain - whether decal can project on skeletal meshes (default false)
  • HitBone - if HitComponent is a skeletal mesh, the bone that was hit
  • HitNodeIndex - if HitComponent is BSP, the node that was hit
  • HitLevelIndex - if HitComponent is BSP, the index of the level whose BSP was hit
  • InFracturedStaticMeshComponentIndex - The index of the FracturedMesh component. -1/INDEX_NONE if the decal should project onto both the shell and core of the FracturedMeshActor
  • DepthBias - depth bias offset to control z-fighting
  • BlendRange - Start/End blend range specified as an angle in degrees. Controls where to start blending out the decal on a surface

Events[edit]

DecalFinished[edit]

event DecalFinished (DecalComponent Decal)

Called when the given decal's lifetime has run out

Note: caller responsible for removing from ActiveDecals array (this is to prevent code iterating the array from having dependencies on this function)

Other instance functions[edit]

CanSpawnDecals[edit]

function bool CanSpawnDecals ()

Returns:

whether spawning decals is allowed right now

GetPooledComponent[edit]

protected function DecalComponent GetPooledComponent ()

Returns:

a decal from the pool, or a new one if the pool was empty

SpawnDecal[edit]

function DecalComponent SpawnDecal (MaterialInterface DecalMaterial, Object.Vector DecalLocation, Object.Rotator DecalOrientation, float Width, float Height, float Thickness, bool bNoClip, optional float DecalRotation, optional PrimitiveComponent HitComponent, optional bool bProjectOnTerrain, optional bool bProjectOnSkeletalMeshes, optional name HitBone, optional int HitNodeIndex, optional int HitLevelIndex, optional float InDecalLifeSpan, optional int InFracturedStaticMeshComponentIndex, optional float InDepthBias, optional Object.Vector2D InBlendRange)

Spawns a decal with the given parameters, taking a component from the pool or creating as necessary.

Parameters:

  • DecalMaterial - the material to use for the decal
  • Width - decal width
  • Height - decal height
  • Thickness - decal thickness (used to calculate the nearplane/farplane values)
  • bNoClip - if true, use the bNoClip code path for decal generation (requires DecalMaterial to have clamped texture coordinates)
  • DecalRotation - opt) rotation of the decal in degrees
  • HitComponent - opt) if specified, will only project on this component (optimization)
  • bProjectOnTerrain - opt) whether decal can project on skeletal meshes (default false)
  • HitBone - opt) if HitComponent is a skeletal mesh, the bone that was hit
  • HitNodeIndex - opt) if HitComponent is BSP, the node that was hit
  • HitLevelIndex - opt) if HitComponent is BSP, the index of the level whose BSP was hit
  • InDecalLifeSpan - lifetime for the decal
  • InFracturedStaticMeshComponentIndex - The index of the FracturedMesh component. -1/INDEX_NONE if the decal should project onto both the shell and core of the FracturedMeshActor
  • DepthBias - depth bias offset to control z-fighting
  • BlendRange - Start/End blend range specified as an angle in degrees. Controls where to start blending out the decal on a surface

Returns:

the DecalComponent that will be used (may be None if dynamic decals are disabled)

Note: the component is returned so the caller can perform any additional modifications (parameters, etc), but it shouldn't keep the reference around as the component will be returned to the pool as soon as the lifetime runs out