API_​LghtType

Representation of a 3D light source.

    typedef struct {
        API_3D_Head       head;
        API_LghtSouID     type;
        Int32             status;
        Int32             filler_1[2];
        API_RGBColor      lightRGB;
        double            posx;
        double            posy;
        double            posz;
        double            dirx;
        double            diry;
        double            dirz;
        double            radius;
        double            cosa;
        double            cosb;
        double            afall;
        double            dist1;
        double            dist2;
        double            dfall;
    } API_LghtType;

 

Members

head
Header information of this component. This specifies the type (API_LghtID) and database index.
type
The type of the light
status
The light casts shadow or not.
lightRGB
The color of the light source.
posx, posy, posz
The local origin of the light.
dirx, diry, dirz
The direction of the light.
radius
The radius of the light source.
cosa
The cosine of the angle of the cone within the light has its maximum intensity.
cosb
The cosine of the angle of the cone within the intensity falls to zero.
afall
The falloff control of the light (decrease of intensity depending on the cone angle).
dist1, dist2
The clipping values along the x axis.
dfall
Controls the fall-of of intensity depending on the distance.

 

Remarks

A light source radiates lightRGB colored light from the local origin (posx, posy, posz) along the direction vector (dirx, diry, dirz). The light is projected parallel to the direction vector from a point or circle source. (See figure below!) It has its maximum intensity within the alpha-angle frustum of a cone and falls to zero at the beta-angle frustum of a cone. This falloff is controlled by the afall parameter. (Zero gives the light a sharp edge, higher values mean that the transition is smoother.) The effect of the light is limited along the axis by the dist1 and dist2 clipping values. The dfall parameter controls the decrease in intensity depending on the distance. (Zero value means a constant intensity, bigger values are used for stronger falloff.)

The type of the light source can be one of the API_LghtSouID member.

The status must be APILight_CastShadow if you want Archicad to calculate shadow casting from this light source, or else remain it zero.

 Light source

 

Requirements

Version: API 1.3 or later
Header: APIdefs_3D.h

 

See Also

API_3D_Head, API_LghtSouID, API_RGBColor, API_Component3D,
3D Manager, API Types