X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FV3d%2FV3d_PositionLight.hxx;h=b0b781f010096b7ef480dd66e0b7ec69df864be5;hp=1d0784ca22dd6e9d460577b5e44f0b4b8a10b816;hb=f7fc0c03be6c5254f6f33b28e0a0b772bd4f0011;hpb=ee2be2a8812d44c030fe6745498c7d7f54a8bdc4 diff --git a/src/V3d/V3d_PositionLight.hxx b/src/V3d/V3d_PositionLight.hxx index 1d0784ca22..b0b781f010 100644 --- a/src/V3d/V3d_PositionLight.hxx +++ b/src/V3d/V3d_PositionLight.hxx @@ -22,93 +22,23 @@ #include #include -class V3d_View; -class V3d_Viewer; -class V3d_PositionLight; -DEFINE_STANDARD_HANDLE(V3d_PositionLight, V3d_Light) - //! Base class for Positional, Spot and Directional Light classes. -class V3d_PositionLight : public V3d_Light +class V3d_PositionLight : public Graphic3d_CLight { -public: - - //! Defines the position of the light source. Should be redefined! - Standard_EXPORT virtual void SetPosition (const Standard_Real theX, - const Standard_Real theY, - const Standard_Real theZ) = 0; - - //! Defines the target of the light (the center of the sphere). - Standard_EXPORT void SetTarget (const Standard_Real theX, - const Standard_Real theY, - const Standard_Real theZ); - - //! Define the radius. - Standard_EXPORT void SetRadius (const Standard_Real theRadius); - - //! Calculate the position of the light, on the hide face of the picking sphere. - Standard_EXPORT void OnHideFace (const Handle(V3d_View)& theView); - - //! Calculate the position of the light, on the seen face of the picking sphere. - Standard_EXPORT void OnSeeFace (const Handle(V3d_View)& theView); - - //! Tracking the light position, or the light space, - //! or the radius of the light space, that depends of - //! initial picking "theWhatPick" (see the pick method). - //! If theWhatPick is SPACELIGHT, then the parameters - //! theXpix, theYpix are the coordinates of a translation vector. - Standard_EXPORT void Tracking (const Handle(V3d_View)& theView, - const V3d_TypeOfPickLight theWathPick, - const Standard_Integer theXpix, - const Standard_Integer theYpix); - - //! Display the graphic structure of light source - //! in the chosen view. We have three type of representation - //! - SIMPLE : Only the light source is displayed. - //! - PARTIAL : The light source and the light space are - //! displayed. - //! - COMPLETE : The light source, the light space and the - //! radius of light space are displayed. - //! We can choose the "SAMELAST" as parameter of representation - //! In this case the graphic structure representation will be - //! the last displayed. - Standard_EXPORT virtual void Display (const Handle(V3d_View)& theView, - const V3d_TypeOfRepresentation theRepresentation = V3d_SIMPLE); - - //! Erase the graphic structure of light source. - Standard_EXPORT void Erase(); - - //! Returns the radius of the picking sphere. - Standard_EXPORT Standard_Real Radius() const; - - //! Returns the visibility status - //! If True the source is visible. - //! If False it's hidden. - Standard_EXPORT Standard_Boolean SeeOrHide (const Handle(V3d_View)& theView) const; - - //! Returns the position of the light source. - Standard_EXPORT virtual void Position (Standard_Real& theX, - Standard_Real& theY, - Standard_Real& theZ) const = 0; - - //! Returns the position of the target of the light source. - Standard_EXPORT void Target (Standard_Real& theX, - Standard_Real& theY, - Standard_Real& theZ) const; - - DEFINE_STANDARD_RTTIEXT(V3d_PositionLight,V3d_Light) - + DEFINE_STANDARD_RTTIEXT(V3d_PositionLight, Graphic3d_CLight) protected: - Standard_EXPORT V3d_PositionLight (const Handle(V3d_Viewer)& theViewer); + //! Protected constructor. + Standard_EXPORT V3d_PositionLight (Graphic3d_TypeOfLightSource theType); - Graphic3d_Vertex myTarget; - V3d_TypeOfRepresentation myTypeOfRepresentation; +//! @name hidden properties not applicable to positional light +protected: -private: + using Graphic3d_CLight::Position; + using Graphic3d_CLight::SetPosition; - //! Defines representation of the light source. - Standard_EXPORT virtual void Symbol (const Handle(Graphic3d_Group)& theSymbol, - const Handle(V3d_View)& theView) const = 0; }; +DEFINE_STANDARD_HANDLE(V3d_PositionLight, Graphic3d_CLight) + #endif // _V3d_PositionLight_HeaderFile