p.CollisionParticlesBVHDepth

p.CollisionParticlesBVHDepth

#Overview

name: p.CollisionParticlesBVHDepth

This variable is created as a Console Variable (cvar).

It is referenced in 6 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of p.CollisionParticlesBVHDepth is to control the maximum depth for the Bounding Volume Hierarchy (BVH) used in collision detection for particles in Unreal Engine’s Chaos physics system.

Regarding the associated variable CollisionParticlesBVHDepth:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDCollisionConstraints.cpp:37

Scope (from outer to inner):

file
namespace    Chaos

Source code excerpt:


	int32 CollisionParticlesBVHDepth = 4;
	FAutoConsoleVariableRef CVarCollisionParticlesBVHDepth(TEXT("p.CollisionParticlesBVHDepth"), CollisionParticlesBVHDepth, TEXT("The maximum depth for collision particles bvh"));

	int32 ConstraintBPBVHDepth = 2;
	FAutoConsoleVariableRef CVarConstraintBPBVHDepth(TEXT("p.ConstraintBPBVHDepth"), ConstraintBPBVHDepth, TEXT("The maximum depth for constraint bvh"));

	int32 BPTreeOfGrids = 1;
	FAutoConsoleVariableRef CVarBPTreeOfGrids(TEXT("p.BPTreeOfGrids"), BPTreeOfGrids, TEXT("Whether to use a seperate tree of grids for bp"));

#Associated Variable and Callsites

This variable is associated with another variable named CollisionParticlesBVHDepth. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/BVHParticles.cpp:7

Scope (from outer to inner):

file
namespace    Chaos
function     FBVHParticles::FBVHParticles

Source code excerpt:

	FBVHParticles::FBVHParticles()
		: FParticles()
		, MBVH(new TBoundingVolumeHierarchy<FParticles, TArray<int32>>(*this, CollisionParticlesBVHDepth))
	{}

	FBVHParticles::FBVHParticles(FBVHParticles&& Other)
		: FParticles(MoveTemp(Other))
		, MBVH(new TBoundingVolumeHierarchy<FParticles, TArray<int32>>(MoveTemp(*Other.MBVH)))
	{}

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/BVHParticles.cpp:17

Scope (from outer to inner):

file
namespace    Chaos
function     FBVHParticles::FBVHParticles

Source code excerpt:

	FBVHParticles::FBVHParticles(FParticles&& Other)
		: FParticles(MoveTemp(Other))
		, MBVH(new TBoundingVolumeHierarchy<FParticles, TArray<int32>>(*this, CollisionParticlesBVHDepth))
	{}

	FBVHParticles::~FBVHParticles()
	{
		delete MBVH;
	}

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/BVHParticles.cpp:46

Scope (from outer to inner):

file
namespace    Chaos
function     FBVHParticles::FBVHParticles

Source code excerpt:

			SetX(i, Other.GetX(i));
		}
		MBVH = new TBoundingVolumeHierarchy<FParticles, TArray<int32>>(*this, CollisionParticlesBVHDepth);
	}

	void FBVHParticles::UpdateAccelerationStructures()
	{
		MBVH->UpdateHierarchy();
	}

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDCollisionConstraints.cpp:36

Scope (from outer to inner):

file
namespace    Chaos

Source code excerpt:

	}

	int32 CollisionParticlesBVHDepth = 4;
	FAutoConsoleVariableRef CVarCollisionParticlesBVHDepth(TEXT("p.CollisionParticlesBVHDepth"), CollisionParticlesBVHDepth, TEXT("The maximum depth for collision particles bvh"));

	int32 ConstraintBPBVHDepth = 2;
	FAutoConsoleVariableRef CVarConstraintBPBVHDepth(TEXT("p.ConstraintBPBVHDepth"), ConstraintBPBVHDepth, TEXT("The maximum depth for constraint bvh"));

	int32 BPTreeOfGrids = 1;
	FAutoConsoleVariableRef CVarBPTreeOfGrids(TEXT("p.BPTreeOfGrids"), BPTreeOfGrids, TEXT("Whether to use a seperate tree of grids for bp"));

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/BVHParticles.h:8

Scope (from outer to inner):

file
namespace    Chaos

Source code excerpt:

namespace Chaos
{
	extern int32 CHAOS_API CollisionParticlesBVHDepth;

    template<class OBJECT_ARRAY, class LEAF_TYPE, class T, int d>
    class TBoundingVolumeHierarchy;


    template<class OBJECT_ARRAY, class LEAF_TYPE, class T, int d>