Archicad 28 C++ API
Loading...
Searching...
No Matches
API_LghtType Struct Reference

Representation of a 3D light source. More...

#include <APIdefs_3D.h>

Public Attributes

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

Detailed Description

Representation of a 3D light source.

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 light source can be one of the @ref API_LghtSouID members. The status must be APILight_CastShadow if you want Archicad to calculate shadow casting from this light source, or else set it zero.
Light source