wiki.sine.space | sinespace

Difference between revisions of "Scripting/SReflectionProbe"

From wiki.sine.space
Jump to: navigation, search
(Created page with "This ReflectionProbe class is a script interface for a reflection probe component. =Properties= {{ScriptFunction|SVector|Center|[get, set]|The center of the box area in whic...")
 
Line 3: Line 3:
 
=Properties=
 
=Properties=
  
{{ScriptFunction|SVector|Center|[get, set]|The center of the box area in which reflections will be applied to the objects. Measured in the probes's local space.|5=probe = Space.Scene.Find("Reflection").ReflectionProbe<br>
+
{{ScriptFunction|SVector|Center|[get, set]|The center of the box area in which reflections will be applied to the objects. Measured in the probe's local space.|5=probe = Space.Scene.Find("Reflection").ReflectionProbe<br>
 
probe.Center = Space.Scene.Find(“TargetTransform”).WorldPosition<br>
 
probe.Center = Space.Scene.Find(“TargetTransform”).WorldPosition<br>
 
''--set reflection probe center to target transform position.''
 
''--set reflection probe center to target transform position.''
 
}}
 
}}
  
{{ScriptFunction|SVector|Size|[get, set]|The size of the box area in which reflections will be applied to the objects. Measured in the probes's local space.|5=probe = Space.Scene.Find("Reflection").ReflectionProbe<br>
+
{{ScriptFunction|SVector|Size|[get, set]|The size of the box area in which reflections will be applied to the objects. Measured in the probe's local space.|5=probe = Space.Scene.Find("Reflection").ReflectionProbe<br>
 
probe.Size = Vector.New(50,50,50)<br>
 
probe.Size = Vector.New(50,50,50)<br>
 
''--set cube size of reflection probe to 50.''
 
''--set cube size of reflection probe to 50.''
Line 18: Line 18:
 
{{ScriptFunction|void|RenderProbe|();|Refreshes the probe's cubemap.|5=probe = Space.Scene.Find("Reflection").ReflectionProbe<br>
 
{{ScriptFunction|void|RenderProbe|();|Refreshes the probe's cubemap.|5=probe = Space.Scene.Find("Reflection").ReflectionProbe<br>
 
probe.RenderProbe()<br>
 
probe.RenderProbe()<br>
''--Render scene to this probe's cubemap.''
+
''--Render scene to this probe's cube map.''
 
}}
 
}}
  
 
{{Scripting Navbox}}
 
{{Scripting Navbox}}

Revision as of 08:11, 23 December 2020

This ReflectionProbe class is a script interface for a reflection probe component.

Properties

Center

SVector Center [get, set]

The center of the box area in which reflections will be applied to the objects. Measured in the probe's local space.

probe = Space.Scene.Find("Reflection").ReflectionProbe

probe.Center = Space.Scene.Find(“TargetTransform”).WorldPosition

--set reflection probe center to target transform position.


Size

SVector Size [get, set]

The size of the box area in which reflections will be applied to the objects. Measured in the probe's local space.

probe = Space.Scene.Find("Reflection").ReflectionProbe

probe.Size = Vector.New(50,50,50)

--set cube size of reflection probe to 50.



Members

RenderProbe

void RenderProbe ();

Refreshes the probe's cubemap.

probe = Space.Scene.Find("Reflection").ReflectionProbe

probe.RenderProbe()

--Render scene to this probe's cube map.