|
Open CASCADE Technology
6.5.4
|
Creation and modification of a spot.
#include <V3d_SpotLight.hxx>

Public Member Functions | |
| V3d_SpotLight (const Handle< V3d_Viewer > &VM, const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, const V3d_TypeOfOrientation Direction=V3d_XnegYnegZpos, const Quantity_NameOfColor Color=Quantity_NOC_WHITE, const Quantity_Coefficient Attenuation1=1.0, const Quantity_Coefficient Attenuation2=0.0, const Quantity_Coefficient Concentration=1.0, const Quantity_PlaneAngle Angle=0.523599) | |
| Creates a light source of the Spot type in the viewer. The attenuation factor F which determines the illumination of a surface depends on the following formula : F = 1/(A1 + A2*Length) A1,A2 being the 2 factors of attenuation Length is the distance from the source to the surface. The default values (1.0,0.0) correspond to a minimum of attenuation . The concentration factor determines the dispersion of the light on the surface, the default value (1.0) corresponds to a minimum of dispersion . //! Warning! raises BadValue from Viewer - If one of the coefficients is not between 0 and 1 . If the lighting angle is <= 0 ou > PI . | |
| V3d_SpotLight (const Handle< V3d_Viewer > &VM, const V3d_Coordinate Xt, const V3d_Coordinate Yt, const V3d_Coordinate Zt, const V3d_Coordinate Xp, const V3d_Coordinate Yp, const V3d_Coordinate Zp, const Quantity_NameOfColor Color=Quantity_NOC_WHITE, const Quantity_Coefficient Attenuation1=1.0, const Quantity_Coefficient Attenuation2=0.0, const Quantity_Coefficient Concentration=1.0, const Quantity_PlaneAngle Angle=0.523599) | |
| Creates a light source of the Spot type in the viewer. Xt,Yt,Zt : Coordinate of light source Target. Xp,Yp,Zp : Coordinate of light source Position. The others parameters describe before. //! Warning! raises BadValue from Viewer - If one of the coefficients is not between 0 and 1 . If the lighting angle is <= 0 ou > PI . | |
| virtual void | SetPosition (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z) |
| Defines the position of the light source. | |
| void | SetDirection (const Quantity_Parameter Vx, const Quantity_Parameter Vy, const Quantity_Parameter Vz) |
| Defines the direction of the light source. If the normal vector is NULL. | |
| void | SetDirection (const V3d_TypeOfOrientation Orientation) |
| Defines the direction of the light source according to a predefined directional vector. | |
| void | SetAttenuation (const Quantity_Coefficient A1, const Quantity_Coefficient A2) |
| Defines the coefficients of attenuation. Warning! raises BadValue from Viewer if one of the coefficient is <0 ou >1 . | |
| void | SetConcentration (const Quantity_Coefficient C) |
| Defines the coefficient of concentration. if the coefficient is <0 ou >1 . | |
| void | SetAngle (const Quantity_PlaneAngle Angle) |
| Defines the spot angle in RADIANS. Warning: raises BadValue from from Viewer If the angle is <= 0 ou > PI . | |
| void | Display (const Handle< V3d_View > &aView, const V3d_TypeOfRepresentation Representation) |
| Display the graphic structure of light source in the choosen view. We have three type of representation | |
| void | Direction (Quantity_Parameter &Vx, Quantity_Parameter &Vy, Quantity_Parameter &Vz) const |
| Returns the direction of the light source defined by Vx,Vy,Vz. | |
| void | Position (V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const |
| Returns the position of the light source. | |
| void | Attenuation (Quantity_Coefficient &A1, Quantity_Coefficient &A2) const |
| Returns the attenuation factors A1,A2 of the light source. | |
| Quantity_Coefficient | Concentration () const |
| Quantity_PlaneAngle | Angle () const |
| Returns the spot angle. | |
| V3d_SpotLight::V3d_SpotLight | ( | const Handle< V3d_Viewer > & | VM, |
| const V3d_Coordinate | X, | ||
| const V3d_Coordinate | Y, | ||
| const V3d_Coordinate | Z, | ||
| const V3d_TypeOfOrientation | Direction = V3d_XnegYnegZpos, |
||
| const Quantity_NameOfColor | Color = Quantity_NOC_WHITE, |
||
| const Quantity_Coefficient | Attenuation1 = 1.0, |
||
| const Quantity_Coefficient | Attenuation2 = 0.0, |
||
| const Quantity_Coefficient | Concentration = 1.0, |
||
| const Quantity_PlaneAngle | Angle = 0.523599 |
||
| ) |
| V3d_SpotLight::V3d_SpotLight | ( | const Handle< V3d_Viewer > & | VM, |
| const V3d_Coordinate | Xt, | ||
| const V3d_Coordinate | Yt, | ||
| const V3d_Coordinate | Zt, | ||
| const V3d_Coordinate | Xp, | ||
| const V3d_Coordinate | Yp, | ||
| const V3d_Coordinate | Zp, | ||
| const Quantity_NameOfColor | Color = Quantity_NOC_WHITE, |
||
| const Quantity_Coefficient | Attenuation1 = 1.0, |
||
| const Quantity_Coefficient | Attenuation2 = 0.0, |
||
| const Quantity_Coefficient | Concentration = 1.0, |
||
| const Quantity_PlaneAngle | Angle = 0.523599 |
||
| ) |
| Quantity_PlaneAngle V3d_SpotLight::Angle | ( | ) | const |
| void V3d_SpotLight::Attenuation | ( | Quantity_Coefficient & | A1, |
| Quantity_Coefficient & | A2 | ||
| ) | const |
| void V3d_SpotLight::Direction | ( | Quantity_Parameter & | Vx, |
| Quantity_Parameter & | Vy, | ||
| Quantity_Parameter & | Vz | ||
| ) | const |
| void V3d_SpotLight::Display | ( | const Handle< V3d_View > & | aView, |
| const V3d_TypeOfRepresentation | Representation | ||
| ) | [virtual] |
Reimplemented from V3d_PositionLight.
| void V3d_SpotLight::Position | ( | V3d_Coordinate & | X, |
| V3d_Coordinate & | Y, | ||
| V3d_Coordinate & | Z | ||
| ) | const [virtual] |
Implements V3d_PositionLight.
| void V3d_SpotLight::SetDirection | ( | const Quantity_Parameter | Vx, |
| const Quantity_Parameter | Vy, | ||
| const Quantity_Parameter | Vz | ||
| ) |
| void V3d_SpotLight::SetDirection | ( | const V3d_TypeOfOrientation | Orientation | ) |
| virtual void V3d_SpotLight::SetPosition | ( | const V3d_Coordinate | X, |
| const V3d_Coordinate | Y, | ||
| const V3d_Coordinate | Z | ||
| ) | [virtual] |
Implements V3d_PositionLight.
1.8.0