Entities
entities/ light
#include "dxfio/entities/light.hpp"In DxfIO::Entities
struct Lamp
The AcDbLight subclass of a LIGHT: its kind, color and place, and how it falls off and casts shadows.
| Field | Type and default | Meaning |
|---|---|---|
Version | int{1} | The version of the light's layout. Group 90. |
Name | std::string | The name of the light. Group 1. |
Kind | int{2} | 1 distant, 2 point, 3 spot. Group 70. |
Lit | bool{true} | Whether the light is on. Group 290. |
Color | int{7} | The AutoCAD Color Index of the light. Group 63, from R2004. |
Rgb | int{Lamplight} | The true color of the light, as 0xRRGGBB. Group 421 from R2004; up to R2000, packed in a group 90. |
Glyph | bool | Whether the light's glyph is plotted. Group 291. |
Intensity | double{1} | How bright the light is. Group 40. |
Position | Vector | The position, in world coordinates. Groups 10, 20, 30. |
Target | Vector | The point a spot or distant light aims at, in world coordinates. Groups 11, 21, 31. |
Fading | int | How the light weakens with distance: 0 not at all, 1 inverse linear, 2 inverse square. Group 72. |
Limited | bool | Whether the light reaches only from its start distance to its end distance. Group 292. |
Start | double{1} | The distance the light starts to reach from, when it is limited. Group 41. |
End | double{10} | The distance the light stops reaching at, when it is limited. Group 42. |
Hotspot | double{45} | The angle of a spot light's bright inner cone, in degrees. Group 50. |
Falloff | double{50} | The angle of a spot light's whole cone, in degrees. Group 51. |
Casting | bool{true} | Whether the light casts shadows. Group 293. |
Shading | int | The kind of shadow: 0 ray traced, 1 shadow map. Group 73. |
Size | int{256} | The size of the shadow map. Group 91. |
Softness | int{1} | The softness of the shadow map's edges. Group 280. |
struct LightLIGHT
A LIGHT: a point, spot or distant light of the scene.
| Field | Type | Meaning |
|---|---|---|
Record | Entities::Record | The layer, linetype, color and the rest every entity carries. |
Picture | std::string | The proxy graphics, for programs that cannot draw the entity. Group 92, or 160 from R2010, then 310. |
Lamp | Boxed<Entities::Lamp> | The kind, color and place of the light, from the AcDbLight subclass. |
Constants
Lamplight | int = 0xFFFFFF | The true color a new light takes: white, as 0xRRGGBB. Not a color index: Colors::White is that. |