Table of Contents

Class Scene

Namespace
TaleWorlds.Engine
Assembly
TaleWorlds.Engine.dll
[EngineClass("rglScene")]
public sealed class Scene : NativeObject
Inheritance
Scene
Inherited Members

Fields

AutoClimbHeight

public const float AutoClimbHeight = 1.5

Field Value

float

NavMeshHeightLimit

public const float NavMeshHeightLimit = 1.5

Field Value

float

PhysicsAndRayCastLock

public static readonly TWSharedMutex PhysicsAndRayCastLock

Field Value

TWSharedMutex

Properties

ContainsTerrain

public bool ContainsTerrain { get; }

Property Value

bool

HasTerrainHeightmap

public bool HasTerrainHeightmap { get; }

Property Value

bool

IsAtmosphereIndoor

public bool IsAtmosphereIndoor { get; }

Property Value

bool

LastFinalRenderCameraFrame

public MatrixFrame LastFinalRenderCameraFrame { get; }

Property Value

MatrixFrame

LastFinalRenderCameraPosition

public Vec3 LastFinalRenderCameraPosition { get; }

Property Value

Vec3

RootEntityCount

public int RootEntityCount { get; }

Property Value

int

TimeOfDay

public float TimeOfDay { get; set; }

Property Value

float

TimeSpeed

public float TimeSpeed { get; set; }

Property Value

float

Methods

AddDecalInstance(Decal, string, bool)

public void AddDecalInstance(Decal decal, string decalSetID, bool deletable)

Parameters

decal Decal
decalSetID string
deletable bool

AddDirectionalLight(ref Vec3, ref Vec3, float)

public int AddDirectionalLight(ref Vec3 position, ref Vec3 direction, float radius)

Parameters

position Vec3
direction Vec3
radius float

Returns

int

AddEntityWithMesh(Mesh, ref MatrixFrame)

public void AddEntityWithMesh(Mesh mesh, ref MatrixFrame frame)

Parameters

mesh Mesh
frame MatrixFrame

AddEntityWithMultiMesh(MetaMesh, ref MatrixFrame)

public void AddEntityWithMultiMesh(MetaMesh mesh, ref MatrixFrame frame)

Parameters

mesh MetaMesh
frame MatrixFrame

AddItemEntity(ref MatrixFrame, MetaMesh)

public GameEntity AddItemEntity(ref MatrixFrame placementFrame, MetaMesh metaMesh)

Parameters

placementFrame MatrixFrame
metaMesh MetaMesh

Returns

GameEntity

AddPath(string)

public void AddPath(string name)

Parameters

name string

AddPathPoint(string, MatrixFrame)

public void AddPathPoint(string name, MatrixFrame frame)

Parameters

name string
frame MatrixFrame

AddPointLight(ref Vec3, float)

public int AddPointLight(ref Vec3 position, float radius)

Parameters

position Vec3
radius float

Returns

int

AttachEntity(GameEntity, bool)

public bool AttachEntity(GameEntity entity, bool showWarnings = false)

Parameters

entity GameEntity
showWarnings bool

Returns

bool

BoxCast(Vec3, Vec3, bool, Vec3, Vec3, float, out float, out Vec3, out GameEntity, BodyFlags)

public bool BoxCast(Vec3 boxMin, Vec3 boxMax, bool castSupportRay, Vec3 supportRaycastPoint, Vec3 dir, float distance, out float collisionDistance, out Vec3 closestPoint, out GameEntity collidedEntity, BodyFlags excludedBodyFlags = BodyFlags.CameraCollisionRayCastExludeFlags)

Parameters

boxMin Vec3
boxMax Vec3
castSupportRay bool
supportRaycastPoint Vec3
dir Vec3
distance float
collisionDistance float
closestPoint Vec3
collidedEntity GameEntity
excludedBodyFlags BodyFlags

Returns

bool

BoxCastOnlyForCamera(Vec3[], Vec3, bool, Vec3, Vec3, float, out float, out Vec3, out GameEntity, bool, bool, BodyFlags)

public bool BoxCastOnlyForCamera(Vec3[] boxPoints, Vec3 centerPoint, bool castSupportRay, Vec3 supportRaycastPoint, Vec3 dir, float distance, out float collisionDistance, out Vec3 closestPoint, out GameEntity collidedEntity, bool preFilter = true, bool postFilter = true, BodyFlags excludedBodyFlags = BodyFlags.DontCollideWithCamera | BodyFlags.CameraCollisionRayCastExludeFlags)

Parameters

boxPoints Vec3[]
centerPoint Vec3
castSupportRay bool
supportRaycastPoint Vec3
dir Vec3
distance float
collisionDistance float
closestPoint Vec3
collidedEntity GameEntity
preFilter bool
postFilter bool
excludedBodyFlags BodyFlags

Returns

bool

CalculateEffectiveLighting()

public bool CalculateEffectiveLighting()

Returns

bool

CheckPointCanSeePoint(Vec3, Vec3, float?)

public bool CheckPointCanSeePoint(Vec3 source, Vec3 target, float? distanceToCheck = null)

Parameters

source Vec3
target Vec3
distanceToCheck float?

Returns

bool

CheckResources()

public void CheckResources()

ClearAll()

public void ClearAll()

ClearDecals()

public void ClearDecals()

CreateBurstParticle(int, MatrixFrame)

public void CreateBurstParticle(int particleId, MatrixFrame frame)

Parameters

particleId int
frame MatrixFrame

CreateNewScene(bool, bool, DecalAtlasGroup, string)

public static Scene CreateNewScene(bool initialize_physics = true, bool enable_decals = true, DecalAtlasGroup atlasGroup = DecalAtlasGroup.All, string sceneName = "mono_renderscene")

Parameters

initialize_physics bool
enable_decals bool
atlasGroup DecalAtlasGroup
sceneName string

Returns

Scene

CreatePathMesh(IList<GameEntity>, bool)

public MetaMesh CreatePathMesh(IList<GameEntity> pathNodes, bool isWaterPath = false)

Parameters

pathNodes IList<GameEntity>
isWaterPath bool

Returns

MetaMesh

CreatePathMesh(string, bool)

public MetaMesh CreatePathMesh(string baseEntityName, bool isWaterPath)

Parameters

baseEntityName string
isWaterPath bool

Returns

MetaMesh

DeletePathWithName(string)

public void DeletePathWithName(string name)

Parameters

name string

DisableStaticShadows(bool)

public void DisableStaticShadows(bool value)

Parameters

value bool

DoesPathExistBetweenFaces(int, int, bool)

public bool DoesPathExistBetweenFaces(int firstNavMeshFace, int secondNavMeshFace, bool ignoreDisabled)

Parameters

firstNavMeshFace int
secondNavMeshFace int
ignoreDisabled bool

Returns

bool

DoesPathExistBetweenPositions(WorldPosition, WorldPosition)

public bool DoesPathExistBetweenPositions(WorldPosition position, WorldPosition destination)

Parameters

position WorldPosition
destination WorldPosition

Returns

bool

EnsurePostfxSystem()

public void EnsurePostfxSystem()

FillEntityWithHardBorderPhysicsBarrier(GameEntity)

public void FillEntityWithHardBorderPhysicsBarrier(GameEntity entity)

Parameters

entity GameEntity

FindEntitiesWithTag(string)

public IEnumerable<GameEntity> FindEntitiesWithTag(string tag)

Parameters

tag string

Returns

IEnumerable<GameEntity>

FindEntitiesWithTagExpression(string)

public IEnumerable<GameEntity> FindEntitiesWithTagExpression(string expression)

Parameters

expression string

Returns

IEnumerable<GameEntity>

FindEntityWithName(string)

public GameEntity FindEntityWithName(string name)

Parameters

name string

Returns

GameEntity

FindEntityWithTag(string)

public GameEntity FindEntityWithTag(string tag)

Parameters

tag string

Returns

GameEntity

FinishSceneSounds()

public void FinishSceneSounds()

ForceLoadResources()

public void ForceLoadResources()

GenerateContactsWithCapsule(ref CapsuleData, BodyFlags, Intersection[])

public int GenerateContactsWithCapsule(ref CapsuleData capsule, BodyFlags exclude_flags, Intersection[] intersectionsOutput)

Parameters

capsule CapsuleData
exclude_flags BodyFlags
intersectionsOutput Intersection[]

Returns

int

GetAllColorGradeNames()

public string GetAllColorGradeNames()

Returns

string

GetAllEntitiesWithScriptComponent<T>(ref List<GameEntity>)

public void GetAllEntitiesWithScriptComponent<T>(ref List<GameEntity> entities) where T : ScriptComponentBehavior

Parameters

entities List<GameEntity>

Type Parameters

T

GetAllFilterNames()

public string GetAllFilterNames()

Returns

string

GetBoundingBox(out Vec3, out Vec3)

public void GetBoundingBox(out Vec3 min, out Vec3 max)

Parameters

min Vec3
max Vec3

GetCampaignEntityWithName(string)

public GameEntity GetCampaignEntityWithName(string name)

Parameters

name string

Returns

GameEntity

GetEntities(ref List<GameEntity>)

public void GetEntities(ref List<GameEntity> entities)

Parameters

entities List<GameEntity>

GetEntityWithGuid(string)

public GameEntity GetEntityWithGuid(string guid)

Parameters

guid string

Returns

GameEntity

GetFirstEntityWithName(string)

public GameEntity GetFirstEntityWithName(string name)

Parameters

name string

Returns

GameEntity

GetFirstEntityWithScriptComponent<T>()

public GameEntity GetFirstEntityWithScriptComponent<T>() where T : ScriptComponentBehavior

Returns

GameEntity

Type Parameters

T

GetFloraInstanceCount()

public int GetFloraInstanceCount()

Returns

int

GetFloraRendererTextureUsage()

public int GetFloraRendererTextureUsage()

Returns

int

GetFog()

public float GetFog()

Returns

float

GetGroundHeightAtPosition(Vec3, BodyFlags)

public float GetGroundHeightAtPosition(Vec3 position, BodyFlags excludeFlags = BodyFlags.CommonCollisionExcludeFlags)

Parameters

position Vec3
excludeFlags BodyFlags

Returns

float

GetGroundHeightAtPosition(Vec3, out Vec3, BodyFlags)

public float GetGroundHeightAtPosition(Vec3 position, out Vec3 normal, BodyFlags excludeFlags = BodyFlags.CommonCollisionExcludeFlags)

Parameters

position Vec3
normal Vec3
excludeFlags BodyFlags

Returns

float

GetGroundHeightAtPositionMT(Vec3, BodyFlags)

public float GetGroundHeightAtPositionMT(Vec3 position, BodyFlags excludeFlags = BodyFlags.CommonCollisionExcludeFlags)

Parameters

position Vec3
excludeFlags BodyFlags

Returns

float

GetGroundHeightAtPositionMT(Vec3, out Vec3, BodyFlags)

public float GetGroundHeightAtPositionMT(Vec3 position, out Vec3 normal, BodyFlags excludeFlags = BodyFlags.CommonCollisionExcludeFlags)

Parameters

position Vec3
normal Vec3
excludeFlags BodyFlags

Returns

float

GetHardBoundaryVertex(int)

public Vec2 GetHardBoundaryVertex(int index)

Parameters

index int

Returns

Vec2

GetHardBoundaryVertexCount()

public int GetHardBoundaryVertexCount()

Returns

int

GetHeightAtPoint(Vec2, BodyFlags, ref float)

public bool GetHeightAtPoint(Vec2 point, BodyFlags excludeBodyFlags, ref float height)

Parameters

point Vec2
excludeBodyFlags BodyFlags
height float

Returns

bool

GetIdOfNavMeshFace(int)

public int GetIdOfNavMeshFace(int faceIndex)

Parameters

faceIndex int

Returns

int

GetLastPointOnNavigationMeshFromPositionToDestination(int, Vec2, Vec2)

public Vec2 GetLastPointOnNavigationMeshFromPositionToDestination(int startingFace, Vec2 position, Vec2 destination)

Parameters

startingFace int
position Vec2
destination Vec2

Returns

Vec2

GetLastPointOnNavigationMeshFromWorldPositionToDestination(ref WorldPosition, Vec2)

public Vec3 GetLastPointOnNavigationMeshFromWorldPositionToDestination(ref WorldPosition position, Vec2 destination)

Parameters

position WorldPosition
destination Vec2

Returns

Vec3

GetLoadingStateName()

public string GetLoadingStateName()

Returns

string

GetModulePath()

public string GetModulePath()

Returns

string

GetName()

public string GetName()

Returns

string

GetNavMeshCenterPosition(int, ref Vec3)

public void GetNavMeshCenterPosition(int faceIndex, ref Vec3 centerPosition)

Parameters

faceIndex int
centerPosition Vec3

GetNavMeshFaceCount()

public int GetNavMeshFaceCount()

Returns

int

GetNavMeshFaceFirstVertexZ(int)

public float GetNavMeshFaceFirstVertexZ(int faceIndex)

Parameters

faceIndex int

Returns

float

GetNavMeshFaceIndex(ref PathFaceRecord, Vec2, bool, bool)

public void GetNavMeshFaceIndex(ref PathFaceRecord record, Vec2 position, bool checkIfDisabled, bool ignoreHeight = false)

Parameters

record PathFaceRecord
position Vec2
checkIfDisabled bool
ignoreHeight bool

GetNavMeshFaceIndex(ref PathFaceRecord, Vec3, bool)

public void GetNavMeshFaceIndex(ref PathFaceRecord record, Vec3 position, bool checkIfDisabled)

Parameters

record PathFaceRecord
position Vec3
checkIfDisabled bool

GetNavigationMeshForPosition(ref Vec3)

public bool GetNavigationMeshForPosition(ref Vec3 position)

Parameters

position Vec3

Returns

bool

GetNavigationMeshForPosition(ref Vec3, out int, float)

public bool GetNavigationMeshForPosition(ref Vec3 position, out int faceGroupId, float heightDifferenceLimit = 1.5)

Parameters

position Vec3
faceGroupId int
heightDifferenceLimit float

Returns

bool

GetNormalAt(Vec2)

public Vec3 GetNormalAt(Vec2 position)

Parameters

position Vec2

Returns

Vec3

GetNorthAngle()

public float GetNorthAngle()

Returns

float

GetNorthRotation()

public float GetNorthRotation()

Returns

float

GetPathBetweenAIFaces(int, int, Vec2, Vec2, float, NavigationPath, int[], float)

public bool GetPathBetweenAIFaces(int startingFace, int endingFace, Vec2 startingPosition, Vec2 endingPosition, float agentRadius, NavigationPath path, int[] excludedFaceIds = null, float extraCostMultiplier = 1)

Parameters

startingFace int
endingFace int
startingPosition Vec2
endingPosition Vec2
agentRadius float
path NavigationPath
excludedFaceIds int[]
extraCostMultiplier float

Returns

bool

GetPathBetweenAIFaces(UIntPtr, UIntPtr, Vec2, Vec2, float, NavigationPath, int[])

public bool GetPathBetweenAIFaces(UIntPtr startingFace, UIntPtr endingFace, Vec2 startingPosition, Vec2 endingPosition, float agentRadius, NavigationPath path, int[] excludedFaceIds = null)

Parameters

startingFace UIntPtr
endingFace UIntPtr
startingPosition Vec2
endingPosition Vec2
agentRadius float
path NavigationPath
excludedFaceIds int[]

Returns

bool

GetPathDistanceBetweenAIFaces(int, int, Vec2, Vec2, float, float, out float)

public bool GetPathDistanceBetweenAIFaces(int startingAiFace, int endingAiFace, Vec2 startingPosition, Vec2 endingPosition, float agentRadius, float distanceLimit, out float distance)

Parameters

startingAiFace int
endingAiFace int
startingPosition Vec2
endingPosition Vec2
agentRadius float
distanceLimit float
distance float

Returns

bool

GetPathDistanceBetweenPositions(ref WorldPosition, ref WorldPosition, float, out float)

public bool GetPathDistanceBetweenPositions(ref WorldPosition point0, ref WorldPosition point1, float agentRadius, out float pathDistance)

Parameters

point0 WorldPosition
point1 WorldPosition
agentRadius float
pathDistance float

Returns

bool

GetPathWithName(string)

public Path GetPathWithName(string name)

Parameters

name string

Returns

Path

GetPathsWithNamePrefix(string)

public Path[] GetPathsWithNamePrefix(string prefix)

Parameters

prefix string

Returns

Path[]

GetPhotoModeFocus(ref float, ref float, ref float, ref float, ref bool)

public void GetPhotoModeFocus(ref float focus, ref float focusStart, ref float focusEnd, ref float exposure, ref bool vignetteOn)

Parameters

focus float
focusStart float
focusEnd float
exposure float
vignetteOn bool

GetPhotoModeFov()

public float GetPhotoModeFov()

Returns

float

GetPhotoModeOn()

public bool GetPhotoModeOn()

Returns

bool

GetPhotoModeOrbit()

public bool GetPhotoModeOrbit()

Returns

bool

GetPhotoModeRoll()

public float GetPhotoModeRoll()

Returns

float

GetPhysicsMinMax(ref Vec3)

public void GetPhysicsMinMax(ref Vec3 min_max)

Parameters

min_max Vec3

GetRainDensity()

public float GetRainDensity()

Returns

float

GetRootEntities(NativeObjectArray)

public void GetRootEntities(NativeObjectArray entities)

Parameters

entities NativeObjectArray

GetSceneColorGradeIndex()

public int GetSceneColorGradeIndex()

Returns

int

GetSceneFilterIndex()

public int GetSceneFilterIndex()

Returns

int

GetSkyboxMesh()

public Mesh GetSkyboxMesh()

Returns

Mesh

GetSnowAmountData(byte[])

public void GetSnowAmountData(byte[] snowData)

Parameters

snowData byte[]

GetSnowDensity()

public float GetSnowDensity()

Returns

float

GetSoftBoundaryVertex(int)

public Vec2 GetSoftBoundaryVertex(int index)

Parameters

index int

Returns

Vec2

GetSoftBoundaryVertexCount()

public int GetSoftBoundaryVertexCount()

Returns

int

GetSunDirection()

public Vec3 GetSunDirection()

Returns

Vec3

GetTerrainData(out Vec2i, out float, out int, out int)

public void GetTerrainData(out Vec2i nodeDimension, out float nodeSize, out int layerCount, out int layerVersion)

Parameters

nodeDimension Vec2i
nodeSize float
layerCount int
layerVersion int

GetTerrainHeight(Vec2, bool)

public float GetTerrainHeight(Vec2 position, bool checkHoles = true)

Parameters

position Vec2
checkHoles bool

Returns

float

GetTerrainHeightAndNormal(Vec2, out float, out Vec3)

public void GetTerrainHeightAndNormal(Vec2 position, out float height, out Vec3 normal)

Parameters

position Vec2
height float
normal Vec3

GetTerrainHeightData(int, int)

public float[] GetTerrainHeightData(int nodeXIndex, int nodeYIndex)

Parameters

nodeXIndex int
nodeYIndex int

Returns

float[]

GetTerrainMemoryUsage()

public int GetTerrainMemoryUsage()

Returns

int

GetTerrainMinMaxHeight(out float, out float)

public bool GetTerrainMinMaxHeight(out float minHeight, out float maxHeight)

Parameters

minHeight float
maxHeight float

Returns

bool

GetTerrainNodeData(int, int, out int, out float, out float, out float)

public void GetTerrainNodeData(int xIndex, int yIndex, out int vertexCountAlongAxis, out float quadLength, out float minHeight, out float maxHeight)

Parameters

xIndex int
yIndex int
vertexCountAlongAxis int
quadLength float
minHeight float
maxHeight float

GetTerrainPhysicsMaterialAtLayer(int)

public PhysicsMaterial GetTerrainPhysicsMaterialAtLayer(int layerIndex)

Parameters

layerIndex int

Returns

PhysicsMaterial

GetTerrainPhysicsMaterialIndexData(int, int)

public short[] GetTerrainPhysicsMaterialIndexData(int nodeXIndex, int nodeYIndex)

Parameters

nodeXIndex int
nodeYIndex int

Returns

short[]

GetUpgradeLevelCount()

public int GetUpgradeLevelCount()

Returns

int

GetUpgradeLevelMask()

public uint GetUpgradeLevelMask()

Returns

uint

GetUpgradeLevelMaskOfLevelName(string)

public uint GetUpgradeLevelMaskOfLevelName(string levelName)

Parameters

levelName string

Returns

uint

GetUpgradeLevelNameOfIndex(int)

public string GetUpgradeLevelNameOfIndex(int index)

Parameters

index int

Returns

string

GetWaterLevel()

public float GetWaterLevel()

Returns

float

GetWaterLevelAtPosition(Vec2, bool)

public float GetWaterLevelAtPosition(Vec2 position, bool checkWaterBodyEntities)

Parameters

position Vec2
checkWaterBodyEntities bool

Returns

float

GetWinterTimeFactor()

public float GetWinterTimeFactor()

Returns

float

ImportNavigationMeshPrefab(string, int)

public void ImportNavigationMeshPrefab(string navMeshPrefabName, int navMeshGroupShift)

Parameters

navMeshPrefabName string
navMeshGroupShift int

InvalidateTerrainPhysicsMaterials()

public void InvalidateTerrainPhysicsMaterials()

IsAnyFaceWithId(int)

public bool IsAnyFaceWithId(int faceGroupId)

Parameters

faceGroupId int

Returns

bool

IsDefaultEditorScene()

public bool IsDefaultEditorScene()

Returns

bool

IsEditorScene()

public bool IsEditorScene()

Returns

bool

IsEntityFrameChanged(string)

public bool IsEntityFrameChanged(string containsName)

Parameters

containsName string

Returns

bool

IsLineToPointClear(int, Vec2, Vec2, float)

public bool IsLineToPointClear(int startingFace, Vec2 position, Vec2 destination, float agentRadius)

Parameters

startingFace int
position Vec2
destination Vec2
agentRadius float

Returns

bool

IsLineToPointClear(ref WorldPosition, ref WorldPosition, float)

public bool IsLineToPointClear(ref WorldPosition position, ref WorldPosition destination, float agentRadius)

Parameters

position WorldPosition
destination WorldPosition
agentRadius float

Returns

bool

IsLoadingFinished()

public bool IsLoadingFinished()

Returns

bool

IsMultiplayerScene()

public bool IsMultiplayerScene()

Returns

bool

MarkFacesWithIdAsLadder(int, bool)

public void MarkFacesWithIdAsLadder(int faceGroupId, bool isLadder)

Parameters

faceGroupId int
isLadder bool

MergeFacesWithId(int, int, int)

public void MergeFacesWithId(int faceGroupId0, int faceGroupId1, int newFaceGroupId)

Parameters

faceGroupId0 int
faceGroupId1 int
newFaceGroupId int

OptimizeScene(bool, bool)

public void OptimizeScene(bool optimizeFlora = true, bool optimizeOro = false)

Parameters

optimizeFlora bool
optimizeOro bool

PauseSceneSounds()

public void PauseSceneSounds()

PreloadForRendering()

public void PreloadForRendering()

RayCastForClosestEntityOrTerrain(Vec3, Vec3, out float, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrain(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

RayCastForClosestEntityOrTerrain(Vec3, Vec3, out float, out GameEntity, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrain(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, out GameEntity collidedEntity, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
collidedEntity GameEntity
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

RayCastForClosestEntityOrTerrain(Vec3, Vec3, out float, out Vec3, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrain(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, out Vec3 closestPoint, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
closestPoint Vec3
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

RayCastForClosestEntityOrTerrain(Vec3, Vec3, out float, out Vec3, out GameEntity, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrain(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, out Vec3 closestPoint, out GameEntity collidedEntity, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
closestPoint Vec3
collidedEntity GameEntity
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

RayCastForClosestEntityOrTerrainMT(Vec3, Vec3, out float, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrainMT(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

RayCastForClosestEntityOrTerrainMT(Vec3, Vec3, out float, out GameEntity, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrainMT(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, out GameEntity collidedEntity, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
collidedEntity GameEntity
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

RayCastForClosestEntityOrTerrainMT(Vec3, Vec3, out float, out Vec3, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrainMT(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, out Vec3 closestPoint, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
closestPoint Vec3
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

RayCastForClosestEntityOrTerrainMT(Vec3, Vec3, out float, out Vec3, out GameEntity, float, BodyFlags)

public bool RayCastForClosestEntityOrTerrainMT(Vec3 sourcePoint, Vec3 targetPoint, out float collisionDistance, out Vec3 closestPoint, out GameEntity collidedEntity, float rayThickness = 0.01, BodyFlags excludeBodyFlags = BodyFlags.CommonFocusRayCastExcludeFlags)

Parameters

sourcePoint Vec3
targetPoint Vec3
collisionDistance float
closestPoint Vec3
collidedEntity GameEntity
rayThickness float
excludeBodyFlags BodyFlags

Returns

bool

Read(string)

public void Read(string sceneName)

Parameters

sceneName string

Read(string, ref SceneInitializationData, string)

public void Read(string sceneName, ref SceneInitializationData initData, string forcedAtmoName = "")

Parameters

sceneName string
initData SceneInitializationData
forcedAtmoName string

ReadAndCalculateInitialCamera()

public MatrixFrame ReadAndCalculateInitialCamera()

Returns

MatrixFrame

RemoveEntity(GameEntity, int)

public void RemoveEntity(GameEntity entity, int removeReason)

Parameters

entity GameEntity
removeReason int

ResetDepthOfFieldParams()

public void ResetDepthOfFieldParams()

ResumeLoadingRenderings()

public void ResumeLoadingRenderings()

ResumeSceneSounds()

public void ResumeSceneSounds()

SelectEntitiesCollidedWith(ref Ray, Intersection[], UIntPtr[])

public int SelectEntitiesCollidedWith(ref Ray ray, Intersection[] intersectionsOutput, UIntPtr[] entityIds)

Parameters

ray Ray
intersectionsOutput Intersection[]
entityIds UIntPtr[]

Returns

int

SelectEntitiesInBoxWithScriptComponent<T>(ref Vec3, ref Vec3, GameEntity[], UIntPtr[])

public int SelectEntitiesInBoxWithScriptComponent<T>(ref Vec3 boundingBoxMin, ref Vec3 boundingBoxMax, GameEntity[] entitiesOutput, UIntPtr[] entityIds) where T : ScriptComponentBehavior

Parameters

boundingBoxMin Vec3
boundingBoxMax Vec3
entitiesOutput GameEntity[]
entityIds UIntPtr[]

Returns

int

Type Parameters

T

SeparateFacesWithId(int, int)

public void SeparateFacesWithId(int faceGroupId0, int faceGroupId1)

Parameters

faceGroupId0 int
faceGroupId1 int

SetAbilityOfFacesWithId(int, bool)

public void SetAbilityOfFacesWithId(int faceGroupId, bool isEnabled)

Parameters

faceGroupId int
isEnabled bool

SetActiveVisibilityLevels(List<string>)

public void SetActiveVisibilityLevels(List<string> levelsToActivate)

Parameters

levelsToActivate List<string>

SetAntialiasingMode(bool)

public void SetAntialiasingMode(bool mode)

Parameters

mode bool

SetAtmosphereWithName(string)

public void SetAtmosphereWithName(string name)

Parameters

name string

SetBloom(bool)

public void SetBloom(bool mode)

Parameters

mode bool

SetBloomAmount(float)

public void SetBloomAmount(float bloomAmount)

Parameters

bloomAmount float

SetBloomStrength(float)

public void SetBloomStrength(float bloomStrength)

Parameters

bloomStrength float

SetBrightpassThreshold(float)

public void SetBrightpassThreshold(float threshold)

Parameters

threshold float

SetClothSimulationState(bool)

public void SetClothSimulationState(bool state)

Parameters

state bool

SetColorGradeBlend(string, string, float)

public void SetColorGradeBlend(string texture1, string texture2, float alpha)

Parameters

texture1 string
texture2 string
alpha float

SetDLSSMode(bool)

public void SetDLSSMode(bool mode)

Parameters

mode bool

SetDefaultLighting()

public void SetDefaultLighting()

SetDepthOfFieldFocus(float)

public void SetDepthOfFieldFocus(float depthOfFieldFocus)

Parameters

depthOfFieldFocus float

SetDepthOfFieldParameters(float, float, bool)

public void SetDepthOfFieldParameters(float depthOfFieldFocusStart, float depthOfFieldFocusEnd, bool isVignetteOn)

Parameters

depthOfFieldFocusStart float
depthOfFieldFocusEnd float
isVignetteOn bool

SetDoNotWaitForLoadingStatesToRender(bool)

public void SetDoNotWaitForLoadingStatesToRender(bool value)

Parameters

value bool

SetDofMode(bool)

public void SetDofMode(bool mode)

Parameters

mode bool

SetDrynessFactor(float)

public void SetDrynessFactor(float drynessFactor)

Parameters

drynessFactor float

SetDynamicShadowmapCascadesRadiusMultiplier(float)

public void SetDynamicShadowmapCascadesRadiusMultiplier(float multiplier)

Parameters

multiplier float

SetEnvironmentMultiplier(bool, float)

public void SetEnvironmentMultiplier(bool useMultiplier, float multiplier)

Parameters

useMultiplier bool
multiplier float

SetExternalInjectionTexture(Texture)

public void SetExternalInjectionTexture(Texture texture)

Parameters

texture Texture

SetFog(float, ref Vec3, float)

public void SetFog(float fogDensity, ref Vec3 fogColor, float fogFalloff)

Parameters

fogDensity float
fogColor Vec3
fogFalloff float

SetFogAdvanced(float, float, float)

public void SetFogAdvanced(float fogFalloffOffset, float fogFalloffMinFog, float fogFalloffStartDist)

Parameters

fogFalloffOffset float
fogFalloffMinFog float
fogFalloffStartDist float

SetFogAmbientColor(ref Vec3)

public void SetFogAmbientColor(ref Vec3 fogAmbientColor)

Parameters

fogAmbientColor Vec3

SetForcedSnow(bool)

public void SetForcedSnow(bool value)

Parameters

value bool

SetGrainAmount(float)

public void SetGrainAmount(float grainAmount)

Parameters

grainAmount float

SetHexagonVignetteAlpha(float)

public void SetHexagonVignetteAlpha(float amount)

Parameters

amount float

SetHumidity(float)

public void SetHumidity(float humidity)

Parameters

humidity float

SetLandscapeRainMaskData(byte[])

public void SetLandscapeRainMaskData(byte[] data)

Parameters

data byte[]

SetLensDistortion(float)

public void SetLensDistortion(float amount)

Parameters

amount float

SetLightDiffuseColor(int, ref Vec3)

public void SetLightDiffuseColor(int lightIndex, ref Vec3 diffuseColor)

Parameters

lightIndex int
diffuseColor Vec3

SetLightDirection(int, ref Vec3)

public void SetLightDirection(int lightIndex, ref Vec3 direction)

Parameters

lightIndex int
direction Vec3

SetLightPosition(int, ref Vec3)

public void SetLightPosition(int lightIndex, ref Vec3 position)

Parameters

lightIndex int
position Vec3

SetMaxExposure(float)

public void SetMaxExposure(float maxExposure)

Parameters

maxExposure float

SetMiddleGray(float)

public void SetMiddleGray(float middleGray)

Parameters

middleGray float

SetMieScatterFocus(float)

public void SetMieScatterFocus(float strength)

Parameters

strength float

SetMieScatterStrength(float)

public void SetMieScatterStrength(float strength)

Parameters

strength float

SetMinExposure(float)

public void SetMinExposure(float minExposure)

Parameters

minExposure float

SetMotionBlurMode(bool)

public void SetMotionBlurMode(bool mode)

Parameters

mode bool

SetName(string)

public void SetName(string name)

Parameters

name string

SetOcclusionMode(bool)

public void SetOcclusionMode(bool mode)

Parameters

mode bool

SetOwnerThread()

public void SetOwnerThread()

SetPhotoModeFocus(float, float, float, float)

public void SetPhotoModeFocus(float focusStart, float focusEnd, float focus, float exposure)

Parameters

focusStart float
focusEnd float
focus float
exposure float

SetPhotoModeFov(float)

public void SetPhotoModeFov(float verticalFov)

Parameters

verticalFov float

SetPhotoModeOn(bool)

public void SetPhotoModeOn(bool on)

Parameters

on bool

SetPhotoModeOrbit(bool)

public void SetPhotoModeOrbit(bool orbit)

Parameters

orbit bool

SetPhotoModeRoll(float)

public void SetPhotoModeRoll(float roll)

Parameters

roll float

SetPhotoModeVignette(bool)

public void SetPhotoModeVignette(bool vignetteOn)

Parameters

vignetteOn bool

SetPlaySoundEventsAfterReadyToRender(bool)

public void SetPlaySoundEventsAfterReadyToRender(bool value)

Parameters

value bool

SetRainDensity(float)

public void SetRainDensity(float density)

Parameters

density float

SetSceneColorGrade(string)

public void SetSceneColorGrade(string textureName)

Parameters

textureName string

SetSceneColorGrade(Scene, string)

public void SetSceneColorGrade(Scene scene, string textureName)

Parameters

scene Scene
textureName string

SetSceneColorGradeIndex(int)

public void SetSceneColorGradeIndex(int index)

Parameters

index int

SetSceneFilterIndex(int)

public int SetSceneFilterIndex(int index)

Parameters

index int

Returns

int

SetShadow(bool)

public void SetShadow(bool shadowEnabled)

Parameters

shadowEnabled bool

SetSkyBrightness(float)

public void SetSkyBrightness(float brightness)

Parameters

brightness float

SetSkyRotation(float)

public void SetSkyRotation(float rotation)

Parameters

rotation float

SetSnowDensity(float)

public void SetSnowDensity(float density)

Parameters

density float

SetSun(ref Vec3, float, float, float)

public void SetSun(ref Vec3 color, float altitude, float angle, float intensity)

Parameters

color Vec3
altitude float
angle float
intensity float

SetSunAngleAltitude(float, float)

public void SetSunAngleAltitude(float angle, float altitude)

Parameters

angle float
altitude float

SetSunDirection(ref Vec3)

public void SetSunDirection(ref Vec3 direction)

Parameters

direction Vec3

SetSunLight(ref Vec3, ref Vec3)

public void SetSunLight(ref Vec3 color, ref Vec3 direction)

Parameters

color Vec3
direction Vec3

SetSunShaftStrength(float)

public void SetSunShaftStrength(float strength)

Parameters

strength float

SetSunSize(float)

public void SetSunSize(float size)

Parameters

size float

SetSunshaftMode(bool)

public void SetSunshaftMode(bool mode)

Parameters

mode bool

SetTargetExposure(float)

public void SetTargetExposure(float targetExposure)

Parameters

targetExposure float

SetTemperature(float)

public void SetTemperature(float temperature)

Parameters

temperature float

SetUpgradeLevel(int)

public void SetUpgradeLevel(int level)

Parameters

level int

SetUpgradeLevelVisibility(List<string>)

public void SetUpgradeLevelVisibility(List<string> levels)

Parameters

levels List<string>

SetUpgradeLevelVisibility(uint)

public void SetUpgradeLevelVisibility(uint mask)

Parameters

mask uint

SetUseConstantTime(bool)

public void SetUseConstantTime(bool value)

Parameters

value bool

SetWinterTimeFactor(float)

public void SetWinterTimeFactor(float winterTimeFactor)

Parameters

winterTimeFactor float

StallLoadingRenderingsUntilFurtherNotice()

public void StallLoadingRenderingsUntilFurtherNotice()

SwapFaceConnectionsWithID(int, int, int)

public void SwapFaceConnectionsWithID(int hubFaceGroupID, int toBeSeparatedFaceGroupId, int toBeMergedFaceGroupId)

Parameters

hubFaceGroupID int
toBeSeparatedFaceGroupId int
toBeMergedFaceGroupId int

TakePhotoModePicture(bool, bool, bool)

public string TakePhotoModePicture(bool saveAmbientOcclusionPass, bool savingObjectIdPass, bool saveShadowPass)

Parameters

saveAmbientOcclusionPass bool
savingObjectIdPass bool
saveShadowPass bool

Returns

string

Tick(float)

public void Tick(float dt)

Parameters

dt float

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).