1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714 |
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- // Copyright 2015 Autodesk, Inc. All rights reserved.
- //
- // Use of this software is subject to the terms of the Autodesk license
- // agreement provided at the time of installation or download, or which
- // otherwise accompanies this software in either electronic or hard copy form.
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- // acgiLightTraits.h
- //
- // AcRxObject
- // AcGiSubEntityTraits
- // AcGiDrawableTraits
- // AcGiNonEntityTraits
- //
- // AcGiLightTraits
- // AcGiStandardLightTraits
- // AcGiPointLightTraits
- // AcGiSpotLightTraits
- // AcGiDistantLightTraits
- // AcGiPhotometricLightTraits
- // AcGiShadowParameters
- // AcGiLightAttenuation
- // AcGiSkyParameters
- //
- //
- // DESCRIPTION:
- //
- // This API extends AcGi to support light and illumination definition.
- // Light entities pass their illumination information along to the graphics
- // system and renderer through the AcGiLightTraits interfaces.
- //
- #pragma once
- #include "acgi.h"
- #pragma pack (push, 8)
- ////////////////////////////////////////////////////////////////////////
- // class AcGiLightTraits
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// Parent class for interfaces passed to AcDbLight objects in the
- /// implementation of setAttributes(). The light first down-casts the
- /// traits class to the specific type, specified earlier in the addLight()
- /// call. It then sets specific light properties.
- ///
- /// This class derives (indirectly) from AcGiDrawableTraits, as that is what
- /// is passed into AcGiDrawable::setAttributes().
- ///
- /// Lights on frozen layers will not be processed; their light will not
- /// illuminate the model.
- /// </summary>
- ///
- /// <remarks>
- /// A light passing it's properties to this class should not rely on any
- /// default values.
- /// </remarks>
- ///
- class AcGiLightTraits : public AcGiNonEntityTraits
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiLightTraits);
- /// <summary>
- /// Turns the light on or off in the viewport or render. If the light
- /// is off, the other properties here may simply be ignored. However,
- /// lights that are turned off may still "draw" graphics for display
- /// in the viewport.
- ///
- /// Lights on frozen layers are not processed at all, so your light
- /// object does not have to check that condition.
- /// </summary>
- ///
- /// <param name="on">
- /// If true, the light is "turned on".
- /// </param>
- virtual void setOn(bool on) = 0;
- /// <summary>
- /// Light on/off state.
- /// </summary>
- ///
- /// <returns>
- /// True if the light is on.
- /// </returns>
- virtual bool isOn() const = 0;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiShadowParameters
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// Container class for all shadow-related light properties.
- /// </summary>
- ///
- class AcGiShadowParameters : public AcRxObject
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiShadowParameters);
- AcGiShadowParameters();
- virtual ~AcGiShadowParameters();
- bool operator==(const AcGiShadowParameters& params) const;
- /// <summary>
- /// Turns shadow casting from this light on and off.
- /// </summary>
- ///
- /// <param name="on">
- /// If true, this light casts shadows.
- /// </param>
- virtual void setShadowsOn(bool on);
- /// <summary>
- /// Does the light cast shadows?
- /// </summary>
- ///
- /// <returns>
- /// True if the light casts shadows.
- /// </returns>
- virtual bool shadowsOn() const;
- /// <summary>
- /// The method used to calculate shadows.
- /// </summary>
- enum ShadowType {
- /// <summary>
- /// Shadows are calculated using a ray-trace algorithm.
- /// </summary>
- kShadowsRayTraced = 0,
- /// <summary>
- /// Shadow maps are created for each light.
- /// </summary>
- kShadowMaps,
- /// <summary>
- /// The area-sampled shadow algorithm models the effect of
- /// extended light sources which typically exhibit penumbra.
- /// </summary>
- kAreaSampled
- };
- /// <summary>
- /// Sets the method used to calculate shadows cast by this light.
- /// </summary>
- ///
- /// <param name="typ">
- /// One of: kShadowsRayTraced, kShadowMaps
- /// </param>
- ///
- /// <remarks>
- /// When shadows are ray-traced, shadow map size and softness parameters
- /// are ignored.
- /// </remarks>
- virtual void setShadowType(ShadowType typ);
- /// <summary>
- /// The method used to calculate shadows cast by this light.
- /// </summary>
- ///
- /// <returns>
- /// One of: kShadowsRayTraced, kShadowMaps
- /// </returns>
- virtual ShadowType shadowType() const;
- /// <summary>
- /// Sets the shadow map size, in pixels. Larger numbers produce more
- /// accurate shadows, but require more memory and take longer to render.
- /// </summary>
- ///
- /// <param name="sz">
- /// Valid values are 64, 128, 256, 512, 1024, 2048, and 4096.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid size is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kShadowMaps.
- /// </remarks>
- virtual bool setShadowMapSize(Adesk::UInt16 sz);
- /// <summary>
- /// The size of the shadow map, in pixels.
- /// </summary>
- ///
- /// <returns>
- /// The size of the shadow map, in pixels.
- /// Should be one of: 64, 128, 256, 512, 1024, 2048, or 4096.
- /// </returns>
- ///
- /// <remarks>
- /// Only applies if shadow type is kShadowMaps.
- /// </remarks>
- virtual Adesk::UInt16 shadowMapSize() const;
- /// <summary>
- /// Sets the softness (or fuzziness) of shadow-mapped shadows. The value
- /// represents the number of pixels at the edge of the shadow that are
- /// blended into the underlying image.
- /// </summary>
- ///
- /// <param name="soft">
- /// The value can range from 1 to 10.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid softness value is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kShadowMaps.
- /// </remarks>
- virtual bool setShadowMapSoftness(Adesk::UInt8 soft);
- /// <summary>
- /// The softness (or fuzziness) of the edge of the shadow. The value
- /// represents the number of pixels at the edge of the shadow that are
- /// blended into the underlying image.
- /// </summary>
- ///
- /// <returns>
- /// The number of pixels at the edge of the shadow to blend.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kShadowMaps.
- /// </remarks>
- virtual Adesk::UInt8 shadowMapSoftness() const;
- /// <summary>
- /// Sets the number of shadow rays to shoot for the light. This
- /// controls the softness of sampled shadows.
- /// </summary>
- ///
- /// <param name="samples">
- /// The number of shadow rays to shoot for the light.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid sample size is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kAreaSampled.
- /// </remarks>
- virtual bool setShadowSamples(Adesk::UInt16 samples);
- /// <summary>
- /// The number of shadow rays to shoot for the light.
- /// </summary>
- ///
- /// <returns>
- /// The number of shadow rays to shoot for the light.
- /// </returns>
- ///
- /// <remarks>
- /// Only applies if shadow type is kAreaSampled.
- /// </remarks>
- virtual Adesk::UInt16 shadowSamples() const;
- /// <summary>
- /// Determines if the light shape is visible in the rendering.
- /// </summary>
- ///
- /// <param name="on">
- /// If true, the light shape will be visible in the rendering.
- /// </param>
- virtual void setShapeVisibility(bool visible);
- /// <summary>
- /// Is the light visible in the rendering?
- /// </summary>
- ///
- /// <returns>
- /// True if the light shape is visible in the rendering.
- /// </returns>
- virtual bool shapeVisibility() const;
- /// <summary>
- /// The shape of the extended light source.
- /// </summary>
- enum ExtendedLightShape {
- /// <summary>
- /// Linear lamps (communicated to mental ray as degenerate rectangles).
- /// </summary>
- kLinear = 0,
- /// <summary>
- /// Rectangular extended light source.
- /// </summary>
- kRectangle,
- /// <summary>
- /// Disk-shaped extended light source.
- /// </summary>
- kDisk,
- /// <summary>
- /// Cylindrical extended light source.
- /// </summary>
- kCylinder,
- /// <summary>
- /// Spherical extended light source.
- /// </summary>
- kSphere
- };
- /// <summary>
- /// Sets the shape of the extended light source.
- /// </summary>
- ///
- /// <param name="shape">
- /// One of: kRectangle, kDisk, kCylinder, kSphere, kLinear, kWeb
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid shape is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kAreaSampled.
- /// </remarks>
- virtual bool setExtendedLightShape(ExtendedLightShape shape);
- /// <summary>
- /// The shape of the extended light source.
- /// </summary>
- ///
- /// <returns>
- /// One of: kRectangle, kDisk, kCylinder, kSphere, kLinear, kWeb
- /// </returns>
- ///
- /// <remarks>
- /// Only applies if shadow type is kAreaSampled.
- /// </remarks>
- virtual ExtendedLightShape extendedLightShape() const;
- /// <summary>
- /// Sets the length of the extended light source.
- /// </summary>
- ///
- /// <param name="length">
- /// The length of the extended light source.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid length is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kAreaSampled and
- /// extended light source shape is kLinear, kRectangle or kCylinder.
- /// </remarks>
- virtual bool setExtendedLightLength(double length);
- /// <summary>
- /// The length of the extended light source.
- /// </summary>
- ///
- /// <returns>
- /// The length of the extended light source.
- /// </returns>
- ///
- /// <remarks>
- /// Only applies if shadow type is kAreaSampled and extended
- /// light source shape is kLinear, kRectangle or kCylinder.
- /// </remarks>
- virtual double extendedLightLength() const;
- /// <summary>
- /// Sets the width of the extended light source.
- /// </summary>
- ///
- /// <param name="width">
- /// The width of the extended light source.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid width is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kAreaSampled and
- /// extended light source shape is kRectangle.
- /// </remarks>
- virtual bool setExtendedLightWidth(double width);
- /// <summary>
- /// The width of the extended light source.
- /// </summary>
- ///
- /// <returns>
- /// The width of the extended light source.
- /// </returns>
- ///
- /// <remarks>
- /// Only applies if shadow type is kAreaSampled and
- /// extended light source shape is kRectangle.
- /// </remarks>
- virtual double extendedLightWidth() const;
- /// <summary>
- /// Sets the radius of the extended light source.
- /// </summary>
- ///
- /// <param name="radius">
- /// The radius of the extended light source.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid radius is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kAreaSampled and
- /// extended light source shape is kDisk, kCylinder or kSphere.
- /// </remarks>
- virtual bool setExtendedLightRadius(double radius);
- /// <summary>
- /// The radius of the extended light source.
- /// </summary>
- ///
- /// <returns>
- /// The radius of the extended light source.
- /// </returns>
- ///
- /// <remarks>
- /// Only applies if shadow type is kAreaSampled and
- /// extended light source shape is kDisk, kCylinder or kSphere.
- /// </remarks>
- virtual double extendedLightRadius() const;
- protected:
- bool mShadowsOn;
- ShadowType mShadowType;
- Adesk::UInt16 mShadowMapSize;
- Adesk::UInt8 mShadowMapSoftness;
- Adesk::UInt16 mShadowSamples;
- bool mbShapeVisibility;
- ExtendedLightShape mExtLightShape;
- double mExtLightLength;
- double mExtLightWidth;
- double mExtLightRadius;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiLightAttenuation
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// Container class for light attenuation parameters.
- /// </summary>
- ///
- class AcGiLightAttenuation : public AcRxObject
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiLightAttenuation);
- AcGiLightAttenuation();
- virtual ~AcGiLightAttenuation();
- bool operator==(const AcGiLightAttenuation& atten) const;
- /// <summary>
- /// The type of attenuation, or decay, for this light. This only applies
- /// to point and spot lights. Distant lights always have no attenuation.
- /// </summary>
- enum AttenuationType {
- /// <summary>
- /// No attenuation; emitted light has the same brightness (intensity)
- /// regardless of the distance to the source.
- /// </summary>
- kNone = 0,
- /// <summary>
- /// Sets attenuation to be the inverse of the linear distance from the
- /// light.
- /// </summary>
- kInverseLinear,
- /// <summary>
- /// Sets attenuation to be the inverse of the square of the distance
- /// from the light.
- /// </summary>
- kInverseSquare
- };
- /// <summary>
- /// Sets the attenuation type for the light.
- /// </summary>
- ///
- /// <param name="typ">
- /// One of: kNone, kInverseLinear, kInverseSquare
- /// </param>
- virtual void setAttenuationType(AttenuationType typ);
- /// <summary>
- /// The attenuation type for the light.
- /// </summary>
- ///
- /// <returns>
- /// One of: kNone, kInverseLinear, kInverseSquare
- /// </returns>
- virtual AttenuationType attenuationType() const;
- /// <summary>
- /// Turns on and off application of any attenuation limits.
- /// </summary>
- ///
- /// <param name="on">
- /// If true, both start and end limits will be used.
- /// </param>
- virtual void setUseLimits(bool on);
- /// <summary>
- /// Are the start and end limits used by this light?
- /// </summary>
- ///
- /// <returns>
- /// True if start and end attenuation limits are used.
- /// </returns>
- virtual bool useLimits() const;
- /// <summary>
- /// Sets the distances (a range) from the light source where emitted light
- /// affects the model.
- /// </summary>
- ///
- /// <param name="startlim">
- /// The distance from the light source where light begins to affect the
- /// model; objects closer than this are not affected by the light.
- /// </param>
- /// <param name="endlim">
- /// The distance from the light source beyond which the light has no affect.
- /// </param>
- ///
- /// <remarks>
- /// Start limit must be less than end limit, and both numbers must
- /// greater than or equal to zero.
- /// </remarks>
- virtual void setLimits(double startlim, double endlim);
- /// <summary>
- /// The distance from the light source where light begins to affect the
- /// model; objects closer than this are not affected by the light.
- /// </summary>
- ///
- /// <returns>
- /// A distance.
- /// </returns>
- virtual double startLimit() const;
- /// <summary>
- /// The distance from the light source beyond which the light has no affect.
- /// </summary>
- ///
- /// <returns>
- /// A distance.
- /// </returns>
- virtual double endLimit() const;
- private:
- AttenuationType mAttenType;
- bool mUseAttenLimits;
- double mAttenStartLimit;
- double mAttenEndLimit;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiSkyParameters
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// Container class for all sky-related sun properties.
- /// </summary>
- ///
- class AcGiSkyParameters : public AcRxObject
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiSkyParameters);
- AcGiSkyParameters();
- virtual ~AcGiSkyParameters();
- bool operator==(const AcGiSkyParameters& params) const;
- /// <summary>
- /// Enables computation of skylight illumination.
- /// </summary>
- ///
- /// <param name="enable">
- /// If true, skylight illumination will be computed.
- /// </param>
- void setIllumination(bool enable) { return setIlluminationImp(enable); }
- /// <summary>
- /// Should skylight illumination be calculated?
- /// </summary>
- ///
- /// <returns>
- /// True if skylight illumination will be computed.
- /// </returns>
- bool illumination() const { return illuminationImp(); }
- /// <summary>
- /// Sets the intensity factor which determines the level of
- /// non-physical modulation of skylight.
- /// </summary>
- ///
- /// <param name="intensity">
- /// The intensity factor for skylight.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid intensity factor is passed in.
- /// </returns>
- bool setIntensityFactor(double intensity) { return setIntensityFactorImp(intensity); }
- /// <summary>
- /// The intensity factor which determines the level of
- /// non-physical modulation of skylight.
- /// </summary>
- ///
- /// <returns>
- /// The instensity factor for skylight.
- /// </returns>
- double intensityFactor() const { return intensityFactorImp(); }
- /// <summary>
- /// Specifies turbidity or atmosphere.
- /// </summary>
- ///
- /// <param name="haze">
- /// The turbidity or atmosphere value.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid atmosphere value is passed in.
- /// </returns>
- bool setHaze(double haze) { return setHazeImp(haze); }
- /// <summary>
- /// The turbidity or atmosphere value.
- /// </summary>
- ///
- /// <returns>
- /// The turbidity or atmosphere value.
- /// </returns>
- double haze() const { return hazeImp(); }
- /// <summary>
- /// Sets the world-space height of the horizon plane.
- /// </summary>
- ///
- /// <param name="height">
- /// The world-space height of the horizon plane.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid height is passed in.
- /// </returns>
- bool setHorizonHeight(double height) { return setHorizonHeightImp(height); }
- /// <summary>
- /// The world-space height of the horizon plane.
- /// </summary>
- ///
- /// <returns>
- /// The world-space height of the horizon plane.
- /// </returns>
- double horizonHeight() const { return horizonHeightImp(); }
- /// <summary>
- /// Sets the amount of blurring between ground plane and sky.
- /// </summary>
- ///
- /// <param name="blur">
- /// The amount of blurring between ground plane and sky.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid blur amount is passed in.
- /// </returns>
- bool setHorizonBlur(double blur) { return setHorizonBlurImp(blur); }
- /// <summary>
- /// The amount of blurring between ground plane and sky.
- /// </summary>
- ///
- /// <returns>
- /// The amount of blurring between ground plane and sky.
- /// </returns>
- double horizonBlur() const { return horizonBlurImp(); }
- /// <summary>
- /// Sets the color of the ground plane.
- /// </summary>
- ///
- /// <param name="color">
- /// The color of the ground plane. AcCmColor supports all color models
- /// within AutoCAD, including color book colors.
- /// </param>
- void setGroundColor(const AcCmColor& color) { return setGroundColorImp(color); }
- /// <summary>
- /// The color of the ground plane.
- /// </summary>
- ///
- /// <returns>
- /// The color of the ground plane.
- /// </returns>
- AcCmColor groundColor() const { return groundColorImp(); }
- /// <summary>
- /// Sets the color of the night sky.
- /// </summary>
- ///
- /// <param name="color">
- /// The color of the night sky. AcCmColor supports all color models
- /// within AutoCAD, including color book colors.
- /// </param>
- void setNightColor(const AcCmColor& color) { setNightColorImp(color); }
- /// <summary>
- /// The color of the night sky.
- /// </summary>
- ///
- /// <returns>
- /// The color of the night sky.
- /// </returns>
- AcCmColor nightColor() const { return nightColorImp(); }
- /// <summary>
- /// Specifies whether aerial perspective is applied.
- /// </summary>
- ///
- /// <param name="apply">
- /// If true, aerial perspective is applied.
- /// </param>
- void setAerialPerspective(bool apply) { setAerialPerspectiveImp(apply); }
- /// <summary>
- /// Should aerial perspective be applied?
- /// </summary>
- ///
- /// <returns>
- /// True if aerial perspective is applied.
- /// </returns>
- bool aerialPerspective() const { return aerialPerspectiveImp(); }
- /// <summary>
- /// Sets the distance at which 10% haze occlusion results.
- /// </summary>
- ///
- /// <param name="distance">
- /// The distance at which 10% haze occlusion results.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid distance is passed in.
- /// </returns>
- bool setVisibilityDistance(double distance) { return setVisibilityDistanceImp(distance); }
- /// <summary>
- /// The distance at which 10% haze occlusion results.
- /// </summary>
- ///
- /// <returns>
- /// The distance at which 10% haze occlusion results.
- /// </returns>
- double visibilityDistance() const { return visibilityDistanceImp(); }
- /// <summary>
- /// Sets the scale of the sun disk (1.0 = correct size).
- /// </summary>
- ///
- /// <param name="scale">
- /// The scale of the sun disk (1.0 = correct size).
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid scale is passed in.
- /// </returns>
- bool setDiskScale(double scale) { return setDiskScaleImp(scale); }
- /// <summary>
- /// The scale of the sun disk (1.0 = correct size).
- /// </summary>
- ///
- /// <returns>
- /// The scale of the sun disk (1.0 = correct size).
- /// </returns>
- double diskScale() const { return diskScaleImp(); }
- /// <summary>
- /// Sets the intensity of the sun glow.
- /// </summary>
- ///
- /// <param name="intensity">
- /// The intensity of the sun glow.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid intensity value is passed in.
- /// </returns>
- bool setGlowIntensity (double intensity) { return setGlowIntensityImp(intensity); }
- /// <summary>
- /// The intensity of the sun glow.
- /// </summary>
- ///
- /// <returns>
- /// The intensity of the sun glow.
- /// </returns>
- double glowIntensity() const { return glowIntensityImp(); }
- /// <summary>
- /// Sets the intensity of the sun disk.
- /// </summary>
- ///
- /// <param name="intensity">
- /// The intensity of the sun disk.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid intensity value is passed in.
- /// </returns>
- bool setDiskIntensity(double intensity) { return setDiskIntensityImp(intensity); }
- /// <summary>
- /// The intensity of the sun disk.
- /// </summary>
- ///
- /// <returns>
- /// The intensity of the sun disk.
- /// </returns>
- double diskIntensity() const { return diskIntensityImp(); }
- /// <summary>
- /// Sets the number of samples to take on the solar disk.
- /// </summary>
- ///
- /// <param name="samples">
- /// The number of samples to take on the solar disk.
- /// </param>
- ///
- /// <returns>
- /// Returns true if a valid sample size is passed in.
- /// </returns>
- ///
- /// <remarks>
- /// This value only applies if shadow type is kAreaSampled.
- /// </remarks>
- bool setSolarDiskSamples(Adesk::UInt16 samples) { return setSolarDiskSamplesImp(samples); }
- /// <summary>
- /// The number of samples to take on the solar disk.
- /// </summary>
- ///
- /// <returns>
- /// The number of samples to take on the solar disk.
- /// </returns>
- ///
- /// <remarks>
- /// Only applies if shadow type is kAreaSampled.
- /// </remarks>
- Adesk::UInt16 solarDiskSamples() const { return solarDiskSamplesImp(); }
- /// <summary>
- /// For internal use only.
- /// </summary>
- bool setSunDirection(const AcGeVector3d& sundir) { return setSunDirectionImp(sundir); }
- /// <summary>
- /// Gets the direction (vector) of the sun's light rays.
- /// </summary>
- ///
- /// <returns>
- /// The direction vector of sunlight, from the Sun to the model.
- /// </returns>
- const AcGeVector3d& sunDirection() const { return sunDirectionImp(); }
-
- /// <summary>
- /// Sets the red-blue shift on the sky. This provides control on the "redness" of the
- /// sky. The default of 0.0 is physically accurate. A minimum value of -1.0 will produce
- /// a extremely blue sky, whereas the maximum value of 1.0 will produce an extremely
- /// red sky.
- /// </summary>
- /// <returns>
- /// Returns true if the input value is in the valid range of -1.0 to 1.0. Returns
- /// false otherwise.
- /// </returns>
- bool setRedBlueShift (double redBlueShift) { return setRedBlueShiftImp(redBlueShift); }
- /// <summary>
- /// Returns the red-blue shift on the sky. This provides control on the "redness" of the
- /// sky. The default of 0.0 is physically accurate. A minimum value of -1.0 will produce
- /// a extremely blue sky, whereas the maximum value of 1.0 will produce an extremely
- /// red sky.
- /// </summary>
- /// <returns>
- /// Returns the currently set value.
- /// </returns>
- double redBlueShift (void) const { return redBlueShiftImp(); }
- /// <summary>
- /// Artificially modifies the sky's saturation level. The minimum value of 0.0 will produce
- /// a extreme of black and white whereas the maximum value of 2.0 will produce highly boosted
- /// saturation.
- /// </summary>
- /// <returns>
- /// Returns true if the input value is in the valid range of 0.0 to 2.0. Returns
- /// false otherwise.
- /// </returns>
- bool setSaturation (double saturation) { return setSaturationImp(saturation); }
- /// <summary>
- /// Returns the the sky's saturation level. The minimum value of 0.0 will produce
- /// a extreme of black and white whereas the maximum value of 2.0 will produce highly boosted
- /// saturation.
- /// </summary>
- /// <returns>
- /// Returns the currently set value.
- /// </returns>
- double saturation (void) const { return saturationImp(); }
- protected:
- virtual void setIlluminationImp (bool enable);
- virtual bool illuminationImp (void) const;
- virtual bool setIntensityFactorImp (double intensity);
- virtual double intensityFactorImp () const;
- virtual bool setHazeImp (double haze);
- virtual double hazeImp (void) const;
- virtual bool setHorizonHeightImp (double height);
- virtual double horizonHeightImp (void) const;
- virtual bool setHorizonBlurImp (double blur);
- virtual double horizonBlurImp () const;
- virtual void setGroundColorImp (const AcCmColor& color);
- virtual AcCmColor groundColorImp () const;
- virtual void setNightColorImp (const AcCmColor& color);
- virtual AcCmColor nightColorImp () const;
- virtual void setAerialPerspectiveImp (bool apply);
- virtual bool aerialPerspectiveImp () const;
- virtual bool setVisibilityDistanceImp (double distance);
- virtual double visibilityDistanceImp () const;
- virtual bool setDiskScaleImp (double scale);
- virtual double diskScaleImp () const;
- virtual bool setGlowIntensityImp (double intensity);
- virtual double glowIntensityImp () const;
- virtual bool setDiskIntensityImp (double intensity);
- virtual double diskIntensityImp () const;
- virtual bool setSolarDiskSamplesImp (Adesk::UInt16 samples);
- virtual Adesk::UInt16 solarDiskSamplesImp (void) const;
- virtual bool setSunDirectionImp (const AcGeVector3d& sundir);
- virtual const AcGeVector3d& sunDirectionImp (void) const;
- virtual bool setRedBlueShiftImp (double redBlueShift);
- virtual double redBlueShiftImp (void) const;
- virtual bool setSaturationImp (double saturation);
- virtual double saturationImp (void) const;
- private:
- bool mStatus;
- double mIntensityFactor;
- double mHaze;
- double mHorizonHeight;
- double mHorizonBlur;
- AcCmColor mGroundColor;
- AcCmColor mNightColor;
- bool mAerialPerspective;
- double mVisibilityDistance;
- double mDiskScale;
- double mGlowIntensity;
- double mDiskIntensity;
- Adesk::UInt16 mSolarDiskSamples;
- AcGeVector3d mSunDirection;
- double mRedBlueShift;
- double mSaturation;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiStandardLightTraits
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// This intermediate class represents a standard, or non-photometric light.
- /// It defines properties common to all non-photometric lights.
- /// </summary>
- ///
- /// <remarks>
- /// A light passing it's properties to this class shouldn't rely on any
- /// default values.
- /// </remarks>
- ///
- class AcGiStandardLightTraits : public AcGiLightTraits
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiStandardLightTraits);
- /// <summary>
- /// Sets the intensity of the light. Intensity must be greater than or equal
- /// to zero. A value of 0.0 turns the light off.
- /// </summary>
- ///
- /// <param name="inten">
- /// The intensity, or brightness, of the light. A value of 0.0 effectively
- /// turns the light off.
- /// </param>
- virtual void setIntensity(double inten) = 0;
- /// <summary>
- /// The intensity of the light.
- /// </summary>
- ///
- /// <returns>
- /// Light intensity. The value will always be greater than or equal to zero.
- /// </returns>
- virtual double intensity() const = 0;
- /// <summary>
- /// Sets the color of the light.
- /// </summary>
- ///
- /// <param name="color">
- /// The color of the emitted light. AcCmColor supports all color models
- /// within AutoCAD, including color book colors.
- /// </param>
- virtual void setLightColor(const AcCmColor& color) = 0;
- /// <summary>
- /// The color of the light.
- /// </summary>
- ///
- /// <returns>
- /// Returns the color of emitted light.
- /// </returns>
- virtual AcCmColor lightColor() const = 0;
- /// <summary>
- /// Sets the shadow parameters for this light.
- /// </summary>
- ///
- /// <param name="params">
- /// The AcGiShadowParameters object that defines the way shadows are cast from this light.
- /// </param>
- virtual void setShadowParameters(const AcGiShadowParameters& params) = 0;
- /// <summary>
- /// Provides access to shadow parameters for this light.
- /// </summary>
- ///
- /// <param name="params">
- /// An AcGiShadowParameters object that will contain the current shadow
- /// properties of this light.
- /// </param>
- virtual void shadowParameters(AcGiShadowParameters& params) const = 0;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiPointLightTraits
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// This class represents a point light source, whose light is emitted in all
- /// directions.
- /// </summary>
- ///
- /// <remarks>
- /// A light passing it's properties to this class shouldn't rely on any
- /// default values.
- /// </remarks>
- class AcGiPointLightTraits : public AcGiStandardLightTraits
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiPointLightTraits);
- /// <summary>
- /// Sets the position of the light source. The coordinate space is defined
- /// by the current context.
- /// </summary>
- ///
- /// <param name="pos">
- /// The position of the light source.
- /// </param>
- virtual void setPosition(const AcGePoint3d& pos) = 0;
- /// <summary>
- /// The position of the light source, in the coordinate space of the
- /// current context.
- /// </summary>
- ///
- /// <returns>
- /// The position as an AcGePoint3d.
- /// </returns>
- virtual AcGePoint3d position() const = 0;
- /// <summary>
- /// Provides access to attenuation parameters for this light.
- /// </summary>
- ///
- /// <param name="atten">
- /// An AcGiLightAttenuation object that will contain the current attenuation
- /// parameters of this light.
- /// </param>
- virtual void lightAttenuation(AcGiLightAttenuation& atten) const = 0;
- /// <summary>
- /// Sets the attenuation parameters of this point light.
- /// </summary>
- ///
- /// <param name="atten">
- /// The AcGiLightAttenuation object that defines the way light attenuates from this light.
- /// </param>
- virtual void setAttenuation(const AcGiLightAttenuation& atten) = 0;
- /// <summary>
- /// Sets the physical intensity of the light in candela.
- /// </summary>
- ///
- /// <param name="physicalIntensity">
- /// The physical intensity of the light in candela.
- /// </param>
- virtual void setPhysicalIntensity(double physicalIntensity) = 0;
- /// <summary>
- /// The physical intensity of the light in candela.
- /// </summary>
- ///
- /// <returns>
- /// The physical intensity of the light in candela.
- /// </returns>
- virtual double physicalIntensity() const = 0;
-
- /// <summary>
- /// Sets the corresponding RGB color for the light's lamp color.
- /// </summary>
- ///
- /// <param name="rgbColor">
- /// Input RGB value for the light's lamp color.
- /// </param>
- ///
- /// <remarks>
- /// This value can only be modified if lamp color type is kCustom. If
- /// lamp color type is set to kKelvin or kPreset, the RGB color is
- /// predetermined; therefore, the RGB color cannot be modifed in
- /// either case.
- /// </remarks>
- virtual void setLampColor (const AcGiColorRGB& rgbColor) = 0;
- /// <summary>
- /// The RGB value for the light's lamp color.
- /// </summary>
- ///
- /// <param name="rgbColor">
- /// Output RGB value for the light's lamp color.
- /// </param>
- virtual void lampColor (AcGiColorRGB& rgbColor) const = 0;
- /// <summary>
- /// Indicates whether or not the light has a target. If this is set to
- /// false, the targetLocation() is effectively ignored.
- /// </summary>
- ///
- /// <param name="bHasTarget">
- /// Indicates whether or not the light has a target.
- /// </param>
- virtual void setHasTarget (bool bHasTarget) = 0;
- /// <summary>
- /// Indicates whether or not the light has a target. If this is set to
- /// false, the targetLocation() is effectively ignored.
- /// </summary>
- ///
- /// <returns>
- /// Whether or not the light has a target.
- /// </returns>
- virtual bool hasTarget (void) const = 0;
- /// <summary>
- /// Sets the location of the target point for the light. This, in
- /// combination with the position, determine the direction that the
- /// light is "pointing". The coordinate space for this point is defined by
- /// the current context.
- /// </summary>
- ///
- /// <param name="loc">
- /// Location (point) of the light's target. It should not be exactly
- /// the same as the position.
- /// </param>
- virtual void setTargetLocation(const AcGePoint3d& loc) = 0;
- /// <summary>
- /// The location (position) towards which the light is pointing, in
- /// the coordinate space of the current context.
- /// </summary>
- ///
- /// <returns>
- /// The location as an AcGePoint3d.
- /// </returns>
- virtual AcGePoint3d targetLocation() const = 0;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiSpotLightTraits
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// This class represents a spot light source, whose light is emitted in a
- /// specific direction, and has an associated "light cone".
- /// </summary>
- ///
- /// <remarks>
- /// A light passing it's properties to this class shouldn't rely on any
- /// default values.
- /// </remarks>
- class AcGiSpotLightTraits : public AcGiStandardLightTraits
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiSpotLightTraits);
- /// <summary>
- /// Sets the position of the light source. The coordinate space is defined
- /// by the current context.
- /// </summary>
- ///
- /// <param name="pos">
- /// The position of the light source.
- /// </param>
- virtual void setPosition(const AcGePoint3d& pos) = 0;
- /// <summary>
- /// The position of the light source, in the coordinate space of the
- /// current context.
- /// </summary>
- ///
- /// <returns>
- /// The position as an AcGePoint3d.
- /// </returns>
- virtual AcGePoint3d position() const = 0;
- /// <summary>
- /// Sets the location of the target point for a spot light. This, in
- /// combination with the position, determine the direction that the spot
- /// light is "pointing". The coordinate space for this point is defined by
- /// the current context.
- /// </summary>
- ///
- /// <param name="loc">
- /// Location (point) of the spot light's target. It should not be exactly
- /// the same as the position.
- /// </param>
- virtual void setTargetLocation(const AcGePoint3d& loc) = 0;
- /// <summary>
- /// The location (position) towards which the spot light is pointing, in
- /// the coordinate space of the current context.
- /// </summary>
- ///
- /// <returns>
- /// The location as an AcGePoint3d.
- /// </returns>
- virtual AcGePoint3d targetLocation() const = 0;
- /// <summary>
- /// Sets the hotspot and falloff angles.
- ///
- /// The region between the hotspot and falloff angles is sometimes
- /// referred to as the rapid decay area.
- ///
- /// The greater the difference between the hotspot and falloff angles,
- /// the softer the edge of the light beam. If the hotspot and falloff
- /// angles are equal, the edge of the light beam is sharp. Both values
- /// can range from 0 to 160 degrees. You cannot set the hotspot angle
- /// to be greater than the falloff angle.
- /// </summary>
- ///
- /// <param name="hotspot">
- /// The hotspot cone angle, in radians. Defines the brightest part of the
- /// spot light beam. Must be smaller than or equal to the falloff.
- /// </param>
- /// <param name="falloff">
- /// The falloff cone angle, in radians. Defines the full cone of light. This
- /// is also known as the field angle. Must be larger than or equal to the
- /// hotspot.
- /// </param>
- ///
- /// <returns>
- /// Returns true if valid angles are passed in.
- /// </returns>
- virtual bool setHotspotAndFalloff(double hotspot, double falloff) = 0;
- /// <summary>
- /// The hotspot angle of this spot light.
- /// </summary>
- ///
- /// <returns>
- /// The hotspot angle, in radians.
- /// </returns>
- virtual double hotspot() const = 0;
- /// <summary>
- /// The falloff angle of this spot light.
- /// </summary>
- ///
- /// <returns>
- /// The falloff angle, in radians.
- /// </returns>
- virtual double falloff() const = 0;
- /// <summary>
- /// Provides access to attenuation parameters for this light.
- /// </summary>
- ///
- /// <param name="atten">
- /// An AcGiLightAttenuation object that will contain the current attenuation
- /// parameters of this light.
- /// </param>
- virtual void lightAttenuation(AcGiLightAttenuation& atten) const = 0;
- /// <summary>
- /// Sets the attenuation parameters of this spot light.
- /// </summary>
- ///
- /// <param name="atten">
- /// The AcGiLightAttenuation object that defines the way light attenuates from this light.
- /// </param>
- virtual void setAttenuation(const AcGiLightAttenuation& atten) = 0;
- /// <summary>
- /// Sets the physical intensity of the light in candela.
- /// </summary>
- ///
- /// <param name="physicalIntensity">
- /// The physical intensity of the light in candela.
- /// </param>
- virtual void setPhysicalIntensity(double physicalIntensity) = 0;
- /// <summary>
- /// The physical intensity of the light in candela.
- /// </summary>
- ///
- /// <returns>
- /// The physical intensity of the light in candela.
- /// </returns>
- virtual double physicalIntensity() const = 0;
-
- /// <summary>
- /// Sets the corresponding RGB color for the light's lamp color.
- /// </summary>
- ///
- /// <param name="rgbColor">
- /// Input RGB value for the light's lamp color.
- /// </param>
- ///
- /// <remarks>
- /// This value can only be modified if lamp color type is kCustom. If
- /// lamp color type is set to kKelvin or kPreset, the RGB color is
- /// predetermined; therefore, the RGB color cannot be modifed in
- /// either case.
- /// </remarks>
- virtual void setLampColor (const AcGiColorRGB& rgbColor) = 0;
- /// <summary>
- /// The RGB value for the light's lamp color.
- /// </summary>
- ///
- /// <param name="rgbColor">
- /// Output RGB value for the light's lamp color.
- /// </param>
- virtual void lampColor (AcGiColorRGB& rgbColor) const = 0;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiDistantLightTraits
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// This class represents a distant light source, whose light is emitted in
- /// parallel rays, with an infinite distance between the light source and
- /// the model.
- /// </summary>
- ///
- /// <remarks>
- /// A light passing it's properties to this class shouldn't rely on any
- /// default values.
- /// </remarks>
- class AcGiDistantLightTraits : public AcGiStandardLightTraits
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiDistantLightTraits);
- /// <summary>
- /// Sets the direction the light rays travel in. This vector is in the
- /// direction of the light rays (from light to model).
- /// </summary>
- ///
- /// <param name="vec">
- /// The vector for the light rays.
- /// </param>
- ///
- /// <remarks>
- /// This same interface is used for the sun; all of the other parameters
- /// used to set the location of the sun, such as latitude, longitude, date,
- /// and time, boil down to a vector, which is sent to the graphics system
- /// through this method.
- /// </remarks>
- virtual void setLightDirection(const AcGeVector3d& vec) = 0;
- /// <summary>
- /// The direction (vector) that the light rays travel in.
- /// </summary>
- ///
- /// <returns>
- /// The direction, as a vector; the positive direction of this vector is
- /// from light to model.
- /// </returns>
- virtual AcGeVector3d lightDirection() const = 0;
- /// <summary>
- /// Tells the system to render this distant light as sunlight. Some
- /// rendering systems use special algorithms to render sunlight, as its
- /// intensity is so high.
- /// </summary>
- ///
- /// <param name="isSunlight">
- /// If true, this distant light may be rendered as sunlight.
- /// </param>
- virtual void setIsSunlight(bool isSunlight) = 0;
- /// <summary>
- /// Does this distant light represent sunlight?
- /// </summary>
- ///
- /// <returns>
- /// True if the light will be rendered as sunlight.
- /// </returns>
- virtual bool isSunlight() const = 0;
- /// <summary>
- /// Sets the physical intensity of the light in candela.
- /// </summary>
- ///
- /// <param name="physicalIntensity">
- /// The physical intensity of the light in candela.
- /// </param>
- virtual void setPhysicalIntensity(double physicalIntensity) = 0;
- /// <summary>
- /// The physical intensity of the light in candela.
- /// </summary>
- ///
- /// <returns>
- /// The physical intensity of the light in candela.
- /// </returns>
- virtual double physicalIntensity() const = 0;
-
- /// <summary>
- /// Sets the corresponding RGB color for the light's lamp color.
- /// </summary>
- ///
- /// <param name="rgbColor">
- /// Input RGB value for the light's lamp color.
- /// </param>
- ///
- /// <remarks>
- /// This value can only be modified if lamp color type is kCustom. If
- /// lamp color type is set to kKelvin or kPreset, the RGB color is
- /// predetermined; therefore, the RGB color cannot be modifed in
- /// either case.
- /// </remarks>
- virtual void setLampColor (const AcGiColorRGB& rgbColor) = 0;
- /// <summary>
- /// The RGB value for the light's lamp color.
- /// </summary>
- ///
- /// <param name="rgbColor">
- /// Output RGB value for the light's lamp color.
- /// </param>
- virtual void lampColor (AcGiColorRGB& rgbColor) const = 0;
- /// <summary>
- /// Sets the sky parameters for this light.
- /// </summary>
- ///
- /// <param name="params">
- /// An AcGiSkyParameters object that contains the sky properties of this light.
- /// </param>
- virtual void setSkyParameters(const AcGiSkyParameters& params) = 0;
- /// <summary>
- /// Provides access to sky parameters for this light.
- /// </summary>
- ///
- /// <param name="params">
- /// An AcGiSkyParameters object that contains the sky properties of this light.
- /// </param>
- virtual void skyParameters(AcGiSkyParameters& params) const = 0;
- };
- ////////////////////////////////////////////////////////////////////////
- // class AcGiWebLightTraits
- ////////////////////////////////////////////////////////////////////////
- /// <summary>
- /// Extended distant light interface allowing for photometric traits.
- /// </summary>
- ///
- class AcGiWebLightTraits : public AcGiPointLightTraits
- {
- public:
- ACRX_DECLARE_MEMBERS(AcGiWebLightTraits);
- /// <summary>
- /// Types of web files
- /// </summary>
- enum WebFileType
- {
- /// <summary>
- /// Type C web file
- /// </summary>
- kTypeC = 1,
- /// <summary>
- /// Type B web file
- /// </summary>
- kTypeB = 2,
- /// <summary>
- /// Type A web file
- /// </summary>
- kTypeA = 3
- };
- /// <summary>
- /// Types of symmetry in the web file
- /// </summary>
- enum WebSymmetry
- {
- /// <summary>
- /// No symmetry
- /// </summary>
- kNoSymmetry = 0,
-
- /// <summary>
- /// Symmetric about the XZ plane
- /// </summary>
- kSingleSymmetry = 1,
-
- /// <summary>
- /// Symmetric about the XZ and YZ planes
- /// </summary>
- kDoubleSymmetry = 2,
- /// <summary>
- /// Symmetric about the Z axis
- /// </summary>
- kAxialSymmetry = 3,
- };
- /// <summary>
- /// Sets the path to the file containing the light's goniometric
- /// data (i.e. Illuminating Engineering Society or IES file). Only
- /// applies to photometric lights.
- /// </summary>
- ///
- /// <param name="webFile">
- /// Input ACHAR* const pointer to the light's IES file.
- /// </param>
- virtual void setWebFile(const ACHAR* webFile) = 0;
-
- /// <summary>
- /// The path to the file containing the light's goniometric
- /// data (i.e. Illuminating Engineering Society or IES file).
- /// </summary>
- ///
- /// <param name="webFile">
- /// Output ACHAR* const pointer to the light's IES file.
- /// </param>
- virtual void webFile(AcString& webFile) const = 0;
- /// <summary>
- /// Sets the rotation offset (specified in XYZ Euler angles) used to
- /// orient the goniometric data relative to the light orientation.
- /// </summary>
- ///
- /// <param name="rotation">
- /// Input rotation offset specified in XYZ Euler angles.
- /// </param>
- virtual void setWebRotation(AcGeVector3d rotation) = 0;
-
- /// <summary>
- /// The rotation offset (specified in XYZ Euler angles) used to
- /// orient the goniometric data relative to the light orientation.
- /// </summary>
- ///
- /// <param name="rotation">
- /// Output rotation offset specified in XYZ Euler angles.
- /// </param>
- virtual void webRotation(AcGeVector3d& rotation) const = 0;
- /// <summary>
- /// Explicitly set the flux value in lumens for the web light.
- /// </summary>
- ///
- /// <param name="flux">
- /// The explicit flux value in lumens for the web light.
- /// </param>
- virtual void setWebFlux(double flux) const = 0;
- /// <summary>
- /// Returns the flux value in lumens set for the web light.
- /// </summary>
- ///
- /// <returns>
- /// The flux value set for the web light in lumens.
- /// </returns>
- virtual double webFlux() const = 0;
- /// <summary>
- /// Sets the type of web file which was set by setWebFile().
- /// </summary>
- ///
- /// <param name="type">
- /// The type of the web file specified by setWebFile().
- /// </param>
- virtual void setWebFileType (WebFileType type) = 0;
- /// <summary>
- /// Returns the type of web file.
- /// </summary>
- ///
- /// <returns>
- /// The type of web file.
- /// </returns>
- virtual WebFileType webFileType (void) const = 0;
- /// <summary>
- /// Sets the symmetry of web file which was set by setWebFile().
- /// </summary>
- ///
- /// <param name="symmetry">
- /// The symmetry of the web file specified by setWebFile().
- /// </param>
- virtual void setWebSymmetry (WebSymmetry symmetry) = 0;
-
- /// <summary>
- /// Returns the type of symmetry in the web file.
- /// </summary>
- ///
- /// <returns>
- /// The type of symmetry in the web file.
- /// </returns>
- virtual WebSymmetry webSymmetry (void) const = 0;
- /// <summary>
- /// This method sets a flag to indicate that the IES file based web light is a bilaterally symmetric luminaire
- /// that exhibits symmetry about the 90 to 270 degree plane. In this case, in the corresponding IES file,
- /// the first value for the horizontal angle will be 90 degrees and the last value for the horizontal angle
- /// will be 270 degrees. This method can be used to establish the web light as having this characteristic,
- /// such that any special processing that should apply to this type of web light can be conditioned upon this
- /// flag. For more information, consult the following publication, which describes the IES file format
- /// standard in full:
- ///
- /// IESNA LM-63-95,
- /// IESNA Standard File Format for Electronic Transfer of Photometric Data,
- /// By the IESNA (Illuminating Engineering Socety of North America) Computer Committee.
- /// </summary>
- ///
- /// <param name="symmetry">
- /// The value of the horizontal angle 90 to 270 flag for the web file
- /// specified by setWebFile().
- /// </param>
- virtual void setWebHorzAng90to270 (bool bIs90to270) = 0;
-
- /// <summary>
- /// Returns whether the horizontal angle 90 to 270 flag is set.
- /// </summary>
- ///
- /// <returns>
- /// The setting of the horizontal angle 90 to 270 flag.
- /// </returns>
- virtual bool webHorzAng90to270 (void) const = 0;
- };
- #pragma pack (pop)
|