Libraries.Game.Graphics.Models.Vulkan.EnvironmentVulkan Documentation

Inherits from: Libraries.Language.Object, Libraries.Game.Graphics.Environment

Variables Table

VariablesDescription
integer DEFAULT_MAX_LIGHTS

Actions Documentation

Add(Libraries.Game.Graphics.PointLight light)

Adds a PointLight to this environment.

Parameters

Add(Libraries.Containers.Array<Libraries.Game.Graphics.Light> array)

This action will add an array of lights to the environment. Each light must be usable by the Environment. The Environment can use DirectionalLight and PointLight.

Parameters

Add(Libraries.Game.Graphics.DirectionalLight light)

Adds a DirectionalLight to this environment.

Parameters

Add(Libraries.Game.Graphics.Light light)

This action will add a light to the environment. It can accept any light that inherits from Light as a parameter, but the Environment can only use lights that are either DirectionalLight or PointLight. If the given light can't be used by the Environment, an error will be alerted.

Parameters

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

ContainsLighting()

This action will return whether the Environment currently contains any lighting elements. An Environment that contains no lighting elements will be ignored during rendering.

Return

boolean:

Create(Libraries.Game.Graphics.Vulkan.VulkanDevice device, Libraries.Game.Graphics.Vulkan.VulkanGraphics graphics)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetAmbientLight()

Gets the AmbientLight set for this environment. If none is set, will return undefined.

Return

Libraries.Game.Graphics.AmbientLight:

GetDescriptorSet(integer resourceIndex)

Parameters

  • integer resourceIndex

Return

Libraries.Game.Graphics.Vulkan.VulkanDescriptorSet

GetDevice()

This action will remove the given PointLight from the Environment. If the light was not present in the Environment before using this action, it will have no effect.

Return

Libraries.Game.Graphics.Vulkan.VulkanDevice:

GetDirectionalLight(integer index)

This action will remove all ambient lighting from this Environment.

Parameters

  • integer index

Return

Libraries.Game.Graphics.DirectionalLight:

GetDirectionalLightCount()

This action will return whether the Environment currently contains any lighting elements. An Environment that contains no lighting elements will be ignored during rendering.

Return

integer:

GetDirectionalLightIterator()

This action returns an iterator containing all of the DirectionLights in the environment.

Return

Libraries.Containers.Iterator:

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetLightsBuffer(integer resourceIndex)

This action will add an array of lights to the environment. Each light must be usable by the Environment. The Environment can use DirectionalLight and PointLight.

Parameters

  • integer resourceIndex

Return

Libraries.Game.Graphics.Vulkan.VulkanBuffer:

GetMaxLights()

This action will remove a light from the environment. The given light must be usable by the Environment, i.e. it is a DirectionalLight or PointLight. If the given light was not a part of the Environment before using Remove, nothing will happen.

Return

integer:

GetPointLight(integer index)

This action will add ambient lighting to the Environment.

Parameters

  • integer index

Return

Libraries.Game.Graphics.PointLight:

GetPointLightCount()

Gets the AmbientLight set for this environment. If none is set, will return undefined.

Return

integer:

GetPointLightIterator()

This action returns an iterator containing all of the DirectionLights in the environment.

Return

Libraries.Containers.Iterator:

GetSceneDataBuffer(integer resourceIndex)

This action will add a light to the environment. It can accept any light that inherits from Light as a parameter, but the Environment can only use lights that are either DirectionalLight or PointLight. If the given light can't be used by the Environment, an error will be alerted.

Parameters

  • integer resourceIndex

Return

Libraries.Game.Graphics.Vulkan.VulkanBuffer:

IsDirty(integer resourceIndex)

This action will remove the given DirectionalLight from the Environment. If the light was not present in the Environment before using this action, it will have no effect.

Parameters

  • integer resourceIndex

Return

boolean:

LightChanged(Libraries.Game.Graphics.Light light)

Remove(Libraries.Game.Graphics.DirectionalLight light)

This action will remove the given DirectionalLight from the Environment. If the light was not present in the Environment before using this action, it will have no effect.

Parameters

Remove(Libraries.Game.Graphics.Light light)

This action will remove a light from the environment. The given light must be usable by the Environment, i.e. it is a DirectionalLight or PointLight. If the given light was not a part of the Environment before using Remove, nothing will happen.

Parameters

Remove(Libraries.Containers.Array<Libraries.Game.Graphics.Light> array)

This action will remove each light that is present in the given array from the Environment. Each light must be usable by the Environment, i.e., it is a DirectionalLight or PointLight. Otherwise, an error will be alerted. Lights that are present in the array but not in the Environment will have no effect.

Parameters

Remove(Libraries.Game.Graphics.PointLight light)

This action will remove the given PointLight from the Environment. If the light was not present in the Environment before using this action, it will have no effect.

Parameters

RemoveAmbientLight()

This action will remove all ambient lighting from this Environment.

SetAmbientLight(Libraries.Game.Graphics.AmbientLight light)

This action will add ambient lighting to the Environment.

Parameters

SetCamera(Libraries.Game.Graphics.Camera camera)

SetDirty()

SetMaxLights(integer maxLights)

Adds a PointLight to this environment.

Parameters

  • integer maxLights

UpdateBuffers(integer resourceIndex)

This action will remove each light that is present in the given array from the Environment. Each light must be usable by the Environment, i.e., it is a DirectionalLight or PointLight. Otherwise, an error will be alerted. Lights that are present in the array but not in the Environment will have no effect.

Parameters

  • integer resourceIndex