コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RenderPointLight" /> class. Position, color, type and channel are needed.
 /// </summary>
 /// <param name="position">The position of the light.</param>
 /// <param name="diffuse">The diffuse light color.</param>
 /// <param name="ambient">The ambient light color.</param>
 /// <param name="specular">The specular light color.</param>
 /// <param name="type">The light type.</param>
 /// <param name="channel">The memory space of the light(0 - 7).</param>
 public RenderPointLight(float3 position, float4 diffuse, float4 ambient, float4 specular, Light.LightType type, int channel)
 {
     _position = position;
     _type = Light.LightType.Point;
     _diffuseColor = diffuse;
     _ambientColor = ambient;
     _specularColor = specular;
     _channel = channel;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RenderSpotLight" /> class. Position, direction, color, type and channel.
 /// </summary>
 /// <param name="position">The position of the light.</param>
 /// <param name="direction">The direction of the light.</param>
 /// <param name="diffuse">The diffuse light color.</param>
 /// <param name="ambient">The ambient light color.</param>
 /// <param name="specular">The specular light color.</param>
 /// <param name="angle">The angle of the spot light.</param>
 /// <param name="type">The lighttype.</param>
 /// <param name="channel">The memory space of the light(0 - 7).</param>
 public RenderSpotLight(float3 position, float3 direction, float4 diffuse, float4 ambient, float4 specular, float angle, Light.LightType type, int channel)
 {
     _position = position;
     _direction = direction;
     _type = Light.LightType.Spot;
     _diffuseColor = diffuse;
     _ambientColor = ambient;
     _specularColor = specular;
     _channel = channel;
     _angle = angle;
 }
コード例 #3
0
ファイル: jsoncommon.cs プロジェクト: xenotux/mana
        public static string convertLightType(Light.LightType type)
        {
            switch (type)
            {
            case Light.LightType.DIRECTIONAL:
                return("directional");

            case Light.LightType.POINT:
                return("point");

            case Light.LightType.SPOT:
                return("spot");

            default:
                throw new System.Exception();
            }
        }
コード例 #4
0
ファイル: LightAnimation.cs プロジェクト: johnfn/Illumination
 public Reflection(Point location, Light.LightType lightColor, 
     Entity.DirectionType direction, double targetTime)
 {
     this.location = location;
     this.lightColor = lightColor;
     this.direction = direction;
     this.targetTime = targetTime;
 }