17 #if !defined(OPENNURBS_LIGHT_INC_) 18 #define OPENNURBS_LIGHT_INC_ 67 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
84 bool Enable(
bool =
true );
85 bool IsEnabled()
const;
92 void SetStyle(ON::light_style);
93 ON::light_style Style()
const;
95 const bool IsPointLight()
const;
96 const bool IsDirectionalLight()
const;
97 const bool IsSpotLight()
const;
98 const bool IsLinearLight()
const;
99 const bool IsRectangularLight()
const;
101 ON::coordinate_system CoordinateSystem()
const;
120 ON::coordinate_system dest_cs,
131 double Intensity()
const;
132 void SetIntensity(
double);
134 double PowerWatts()
const;
135 double PowerLumens()
const;
136 double PowerCandela()
const;
138 void SetPowerWatts(
double );
139 void SetPowerLumens(
double );
140 void SetPowerCandela(
double );
158 void SetAttenuation(
double,
double,
double);
161 double Attenuation(
double)
const;
171 void SetSpotAngleDegrees(
double );
172 double SpotAngleDegrees()
const;
174 void SetSpotAngleRadians(
double );
175 double SpotAngleRadians()
const;
186 void SetSpotExponent(
double );
187 double SpotExponent()
const;
195 void SetHotSpot(
double );
196 double HotSpot()
const;
199 bool GetSpotLightRadii(
double* inner_radius,
double* outer_radius )
const;
220 void SetShadowIntensity(
double);
221 double ShadowIntensity()
const;
228 void SetLightIndex(
int );
229 int LightIndex()
const;
235 void SetLightName(
const char* );
236 void SetLightName(
const wchar_t* );
virtual bool Transform(const ON_Xform &xform)
double m_intensity
Definition: opennurbs_light.h:259
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
bool m_bOn
true if light is on
Definition: opennurbs_light.h:244
virtual int Dimension() const
virtual bool GetBBox(double *boxmin, double *boxmax, bool bGrowBox=false) const
double m_hotspot
0.0 to 1.0 (See SetHotSpot() for details)
Definition: opennurbs_light.h:274
ON::light_style m_style
style of light
Definition: opennurbs_light.h:245
ON_3dVector m_direction
ignored for "point" and "ambient" lights
Definition: opennurbs_light.h:251
ON_Color m_diffuse
Definition: opennurbs_light.h:248
int m_light_index
Definition: opennurbs_light.h:240
ON_Color m_specular
Definition: opennurbs_light.h:249
Definition: opennurbs_light.h:20
Definition: opennurbs_string.h:2089
virtual ON::object_type ObjectType() const
Definition: opennurbs_geometry.h:36
Definition: opennurbs_color.h:24
ON_3dVector m_length
Definition: opennurbs_light.h:253
double m_shadow_intensity
shawdow casting
Definition: opennurbs_light.h:282
double m_spot_angle
spot settings - ignored for non-spot lights
Definition: opennurbs_light.h:270
static const ON_Light Unset
Definition: opennurbs_light.h:30
ON_3dVector m_attenuation
attenuation settings - ignored for "directional" and "ambient" lights
Definition: opennurbs_light.h:277
virtual void Dump(ON_TextLog &) const
ON_3dPoint m_location
ignored for "directional" and "ambient" lights
Definition: opennurbs_light.h:252
double m_spot_exponent
Definition: opennurbs_light.h:271
ON_Color m_ambient
Definition: opennurbs_light.h:247
ON_UUID m_light_id
Definition: opennurbs_light.h:241
ON_Geometry & operator=(const ON_Geometry &)=default
Definition: opennurbs_textlog.h:20
< use for generic serialization of binary data
Definition: opennurbs_archive.h:1866
Definition: opennurbs_viewport.h:31
virtual bool Read(ON_BinaryArchive &binary_archive)
Definition: opennurbs_point.h:480
bool IsValid(class ON_TextLog *text_log=nullptr) const override
ON_wString m_light_name
Definition: opennurbs_light.h:242
virtual bool Write(ON_BinaryArchive &binary_archive) const
virtual ON_UUID ModelObjectId() const
double m_watts
Definition: opennurbs_light.h:265
Definition: opennurbs_point.h:1182
ON_3dVector m_width
Definition: opennurbs_light.h:255