# Visualization
TKV3d
V3d

# V3d_DirectionalLight Class Reference

Create and modify a directional light source
in a viewer.
.

`#include <V3d_DirectionalLight.hxx>`

Inheritance diagram for V3d_DirectionalLight:

[legend]

## Public Member Functions

Standard_EXPORT | V3d_DirectionalLight (const Handle(V3d_Viewer)&VM, const V3d_TypeOfOrientation Direction=V3d_XposYposZpos, const Quantity_NameOfColor Color=Quantity_NOC_WHITE, const Standard_Boolean Headlight=Standard_False)
| Creates a directional light source in the viewer. .
Standard_EXPORT | V3d_DirectionalLight (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 Standard_Boolean Headlight=Standard_False)
| Creates a directional light source in the viewer. Xt,Yt,Zt : Coordinate of light source Target. Xp,Yp,Zp : Coordinate of light source Position. The others parameters describe before. .
Standard_EXPORT void | SetDirection (const V3d_TypeOfOrientation Direction)
| Defines the direction of the light source by a predefined orientation. .
Standard_EXPORT void | SetDirection (const Quantity_Parameter Xm, const Quantity_Parameter Ym, const Quantity_Parameter Zm)
| Defines the direction of the light source by the predefined vector Xm,Ym,Zm. Warning: raises BadValue from Viewer if the vector is null. .
Standard_EXPORT void | SetDisplayPosition (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z)
| Defines the point of light source representation. .
virtual Standard_EXPORT void | SetPosition (const V3d_Coordinate Xp, const V3d_Coordinate Yp, const V3d_Coordinate Zp)
| Calls SetDisplayPosition method. .
Standard_EXPORT 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
- SIMPLE : Only the light source is displayed.
- PARTIAL : The light source and the light space are
displayed.
- COMPLETE : The same representation as PARTIAL.
We can choose the "SAMELAST" as parameter of representation
In this case the graphic structure representation will be
the last displayed.
.

virtual Standard_EXPORT void | Position (V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const
| Calls DisplayPosition method. .
Standard_EXPORT void | DisplayPosition (V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const
| Returns the choosen position to represent the light source. .
Standard_EXPORT void | Direction (Quantity_Parameter &Vx, Quantity_Parameter &Vy, Quantity_Parameter &Vz) const
| Returns the Vx,Vy,Vz direction of the light source. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Private Member Functions

Standard_EXPORT void | Symbol (const Handle(Graphic3d_Group)&gsymbol, const Handle(V3d_View)&aView) const
| Defines the representation of the directional light source. .

## Private Attributes

Graphic3d_Vertex | MyDisplayPosition

## Constructor & Destructor Documentation

Standard_EXPORT V3d_DirectionalLight::V3d_DirectionalLight | ( | const Handle(V3d_Viewer)& | VM,
|  | const V3d_TypeOfOrientation | Direction = `V3d_XposYposZpos`,
|  | const Quantity_NameOfColor | Color = `Quantity_NOC_WHITE`,
|  | const Standard_Boolean | Headlight = `Standard_False`
| ) |

Standard_EXPORT V3d_DirectionalLight::V3d_DirectionalLight | ( | 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 Standard_Boolean | Headlight = `Standard_False`
| ) |

## Member Function Documentation

Standard_EXPORT void V3d_DirectionalLight::Direction | ( | Quantity_Parameter & | Vx,
|  | Quantity_Parameter & | Vy,
|  | Quantity_Parameter & | Vz
| ) | const

Standard_EXPORT void V3d_DirectionalLight::Display | ( | const Handle(V3d_View)& | aView,
|  | const V3d_TypeOfRepresentation | Representation
| ) | `[virtual]`

| Reimplemented from V3d_PositionLight.

Standard_EXPORT void V3d_DirectionalLight::DisplayPosition | ( | V3d_Coordinate & | X,
|  | V3d_Coordinate & | Y,
|  | V3d_Coordinate & | Z
| ) | const

Standard_EXPORT const V3d_DirectionalLight::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from V3d_PositionLight.

virtual Standard_EXPORT void V3d_DirectionalLight::Position | ( | V3d_Coordinate & | X,
|  | V3d_Coordinate & | Y,
|  | V3d_Coordinate & | Z
| ) | const`[virtual]`

| Implements V3d_PositionLight.

Standard_EXPORT void V3d_DirectionalLight::SetDirection | ( | const Quantity_Parameter | Xm,
|  | const Quantity_Parameter | Ym,
|  | const Quantity_Parameter | Zm
| ) |

Standard_EXPORT void V3d_DirectionalLight::SetDirection | ( | const V3d_TypeOfOrientation | Direction | ) |

Standard_EXPORT void V3d_DirectionalLight::SetDisplayPosition | ( | const V3d_Coordinate | X,
|  | const V3d_Coordinate | Y,
|  | const V3d_Coordinate | Z
| ) |

virtual Standard_EXPORT void V3d_DirectionalLight::SetPosition | ( | const V3d_Coordinate | Xp,
|  | const V3d_Coordinate | Yp,
|  | const V3d_Coordinate | Zp
| ) | `[virtual]`

| Implements V3d_PositionLight.

Standard_EXPORT void V3d_DirectionalLight::Symbol | ( | const Handle(Graphic3d_Group)& | gsymbol,
|  | const Handle(V3d_View)& | aView
| ) | const`[private, virtual]`

| Implements V3d_PositionLight.

## Field Documentation

Graphic3d_Vertex V3d_DirectionalLight::MyDisplayPosition `[private]`

The documentation for this class was generated from the following file:

- V3d_DirectionalLight.hxx