Hide Table of Contents
LightSourcePropertyValues Property (IModelDoc2)

Gets and sets the light source property values.

.NET Syntax

Visual Basic (Declaration) 
Property LightSourcePropertyValues( _
   ByVal ID As System.Integer _
) As System.Object
Visual Basic (Usage) 
Dim instance As IModelDoc2
Dim ID As System.Integer
Dim value As System.Object
 
instance.LightSourcePropertyValues(ID) = value
 
value = instance.LightSourcePropertyValues(ID)
C# 
System.object LightSourcePropertyValues( 
   System.int ID
) {get; set;}
C++/CLI 
property System.Object^ LightSourcePropertyValues {
   System.Object^ get(System.int ID);
   void set (System.int ID, System.Object^ value);
}

Parameters

ID

Light source ID

Property Value

Array of 19 doubles containing the light source properties (see Remarks)

Example

Remarks

The light source ID ranges from 0 to n, where n = (the total number of light sources - 1). To get the total number of light sources, use IModelDoc2::GetLightSourceCount.

The return values for this property is the following array of 19 doubles:

[ type, Intensity, Color[3], Position[3], Direction[3], coneAngle, falloff[3], Ambient, Specular, isDisabled, SpotExponent ]

 

where:

  • type =  an integer packed into a double that represents the light source type where valid types are taken from openGL definitions (LIGHT_EYE, LIGHT_AMBIENT, LIGHT_SPOT, LIGHT_POINT, LIGHT_DISTANT)

  • Intensity = Light-source intensity (diffuseness) where values range from 0 to 1.

  • Color[3] =  Light-source color in the form of an array of 3 doubles (R, G, B) where values range from 0 to 1.

  • Position[3] =  Light-source position for spot lights in the form of an array of 3 doubles (X, Y, Z) in model space.

  • Direction[3] = Light-source direction in the form of an array of 3 doubles (i, j, k)

  • coneAngle = Light-source cone half angle in degrees where valid values are from 0 to 90 and 180.

  • falloff[3] =  Light-source falloff in the form of an array of 3 doubles (Kc, Kl, Kq). These values result in changes in light intensity as the distance between the light position and the vertex change.

    NOTE: The falloff[3] values are not supported in SOLIDWORKS 2011 and later.

    The result is driven by the following equation:

 [ 1 / (Kc + D*Kl + D*D*Kq ) ]

  where:

D =  the distance.between the light's position and the vertex

Kc = constant attenuation

Kl = linear attenuation

Kq = quadratic attenuation

  • Ambient = light-source ambient Intensity

  • Specular = light-source specular Intensity

  • isDisabled = an integer packed into a double. True means that the light is disabled and false means the light is not disabled.

  • SpotExponent = spot exponent

    NOTE: The SpotExponent value is not supported in SOLIDWORKS 2011 and later.

See Also

Availability

SOLIDWORKS 2001Plus FCS, Revision Number 10.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   LightSourcePropertyValues Property (IModelDoc2)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2018 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.