D2D1_SPOTDIFFUSE_PROP enumeration

Identifiers for properties of the Spot-diffuse lighting effect.

Syntax


typedef enum D2D1_SPOTDIFFUSE_PROP { 
  D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION       = 0,
  D2D1_SPOTDIFFUSE_PROP_POINTS_AT            = 1,
  D2D1_SPOTDIFFUSE_PROP_FOCUS                = 2,
  D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE  = 3,
  D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT     = 4,
  D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE        = 5,
  D2D1_SPOTDIFFUSE_PROP_COLOR                = 6,
  D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH   = 7,
  D2D1_SPOTDIFFUSE_PROP_SCALE_MODE           = 8
} D2D1_SPOTDIFFUSE_PROP;

Constants

D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION

The light position of the point light source. The property is a D2D1_VECTOR_3F defined as (x, y, z). The units are in device-independent pixels (DIPs) and are unbounded.

The type is D2D1_VECTOR_3F.

The default value is {0.0f, 0.0f, 0.0f}.

D2D1_SPOTDIFFUSE_PROP_POINTS_AT

Where the spot light is focused. The property is exposed as a D2D1_VECTOR_3F with – (x, y, z). The units are in DIPs and the values are unbounded.

The type is D2D1_VECTOR_3F.

The default value is {0.0f, 0.0f, 0.0f}.

D2D1_SPOTDIFFUSE_PROP_FOCUS

The focus of the spot light. This property is unitless and is defined between 0 and 200.

The type is FLOAT.

The default value is 1.0f.

D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE

The cone angle that restricts the region where the light is projected. No light is projected outside the cone. The limiting cone angle is the angle between the spot light axis (the axis between the LightPosition and PointsAt properties) and the spot light cone. This property is defined in degrees and must be between 0 to 90 degrees.

The type is FLOAT.

The default value is 90.0f.

D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT

The ratio of diffuse reflection to amount of incoming light. This property must be between 0 and 10,000 and is unitless.

The type is FLOAT.

The default value is 1.0f.

D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE

The scale factor in the Z direction. The surface scale is unitless and must be between 0 and 10,000.

The type is FLOAT.

The default value is 1.0f.

D2D1_SPOTDIFFUSE_PROP_COLOR

The color of the incoming light. This property is exposed as a Vector 3 – (R, G, B) and used to compute LR, LG, LB.

The type is D2D1_VECTOR_3F.

The default value is {1.0f, 1.0f, 1.0f}

D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH

The size of an element in the Sobel kernel used to generate the surface normal in the X and Y direction. This property maps to the dx and dy values in the Sobel gradient. This property is a D2D1_VECTOR_2F(Kernel Unit Length X, Kernel Unit Length Y) and is defined in (DIPs/Kernel Unit). The effect uses bilinear interpolation to scale the bitmap to match size of kernel elements.

The type is D2D1_VECTOR_2F.

The default value is {1.0f, 1.0f}.

D2D1_SPOTDIFFUSE_PROP_SCALE_MODE

The interpolation mode the effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.

The type is D2D1_SPOTDIFFUSE_SCALE_MODE.

The default value is D2D1_SPOTDIFFUSE_SCALE_MODE_LINEAR.

Requirements

Header

D2d1effects.h

 

 

Show: