Falco Engine 3.9.0.1 (beta)
Light.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Runtime.CompilerServices;
5using System.Text;
6
7namespace FalcoEngine
8{
9 public class Light : Component
10 {
11 internal Light()
12 {
13
14 }
15
16 /*----------- PUBLIC ------------*/
17
21 public enum LightType
22 {
23 Point,
24 Spot,
25 Directional
26 };
27
31 public LightType type { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
32
36 public Color color
37 {
38 get
39 {
40 INTERNAL_getColor(out Color value);
41 return value;
42 }
43
44 set
45 {
46 INTERNAL_setColor(ref value);
47 }
48 }
49
53 public float intensity { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
54
58 public float radius { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
59
63 public float innerRadius { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
64
68 public float outerRadius { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
69
73 public float bias { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
74
78 public bool castShadows { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
79
80 /*----------- INTERNAL CALLS ------------*/
81
82 [MethodImpl(MethodImplOptions.InternalCall)]
83 private extern void INTERNAL_getColor(out Color color);
84
85 [MethodImpl(MethodImplOptions.InternalCall)]
86 private extern void INTERNAL_setColor(ref Color color);
87 }
88}
float bias
Shadow mapping constant bias
Definition: Light.cs:73
float intensity
The Intensity of a light is multiplied with the Light color
Definition: Light.cs:53
Color color
The color of the light
Definition: Light.cs:37
LightType type
Get or set the light type. Point, spot or directional
Definition: Light.cs:31
LightType
LightType enum
Definition: Light.cs:22
bool castShadows
Enable or disable casting shadows for this light source
Definition: Light.cs:78
float innerRadius
The angle of the light's spotlight inner cone in degrees
Definition: Light.cs:63
float outerRadius
The angle of the light's spotlight cone in degrees.
Definition: Light.cs:68
float radius
The range of the light
Definition: Light.cs:58