Libraries.Game.Graphics.Models.Vulkan.EnvironmentVulkan Documentation
Inherits from: Libraries.Language.Object, Libraries.Game.Graphics.Environment
Variables Table
| Variables | Description |
|---|---|
| integer DEFAULT_MAX_LIGHTS |
Actions Documentation
Add(Libraries.Game.Graphics.PointLight light)
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)
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
- Libraries.Language.Object: The object to compare to.
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
- Libraries.Language.Object: The to be compared.
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
GetCamera()
GetDescriptorSet(integer resourceIndex)
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
GetDirectionalLight(integer index)
This action will remove all ambient lighting from this Environment.
Parameters
- integer index
Return
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
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
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
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
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
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)
Parameters
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)
Parameters
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
On this page
Variables TableAction Documentation- Add(Libraries.Game.Graphics.PointLight light)
- Add(Libraries.Containers.Array
array) - Add(Libraries.Game.Graphics.DirectionalLight light)
- Add(Libraries.Game.Graphics.Light light)
- Compare(Libraries.Language.Object object)
- ContainsLighting()
- Create(Libraries.Game.Graphics.Vulkan.VulkanDevice device, Libraries.Game.Graphics.Vulkan.VulkanGraphics graphics)
- Equals(Libraries.Language.Object object)
- GetAmbientLight()
- GetCamera()
- GetDescriptorSet(integer resourceIndex)
- GetDevice()
- GetDirectionalLight(integer index)
- GetDirectionalLightCount()
- GetDirectionalLightIterator()
- GetHashCode()
- GetLightsBuffer(integer resourceIndex)
- GetMaxLights()
- GetPointLight(integer index)
- GetPointLightCount()
- GetPointLightIterator()
- GetSceneDataBuffer(integer resourceIndex)
- IsDirty(integer resourceIndex)
- LightChanged(Libraries.Game.Graphics.Light light)
- Remove(Libraries.Game.Graphics.DirectionalLight light)
- Remove(Libraries.Game.Graphics.Light light)
- Remove(Libraries.Containers.Array
array) - Remove(Libraries.Game.Graphics.PointLight light)
- RemoveAmbientLight()
- SetAmbientLight(Libraries.Game.Graphics.AmbientLight light)
- SetCamera(Libraries.Game.Graphics.Camera camera)
- SetDirty()
- SetMaxLights(integer maxLights)
- UpdateBuffers(integer resourceIndex)
