# Visualization
TKService
Aspect

# Aspect_Grid Class Reference

`#include <Aspect_Grid.hxx>`

Inheritance diagram for Aspect_Grid:

[legend]

## Public Member Functions

Standard_EXPORT void | SetXOrigin (const Quantity_Length anOrigin)
| defines the x Origin of the grid.
Standard_EXPORT void | SetYOrigin (const Quantity_Length anOrigin)
| defines the y Origin of the grid.
Standard_EXPORT void | SetRotationAngle (const Quantity_PlaneAngle anAngle)
| defines the orientation of the the grid.
Standard_EXPORT void | Rotate (const Quantity_PlaneAngle anAngle)
| Rotate the grid from a relative angle. .
Standard_EXPORT void | Translate (const Quantity_Length aDx, const Quantity_Length aDy)
| Translate the grid from a relative distance. .
virtual Standard_EXPORT void | SetColors (const Quantity_Color &aColor, const Quantity_Color &aTenthColor)
| Change the colors of the grid .
Standard_EXPORT void | Hit (const Quantity_Length X, const Quantity_Length Y, Quantity_Length &gridX, Quantity_Length &gridY) const
| returns the point of the grid the closest to the point X,Y if the grid is active. If the grid is not active returns X,Y.
virtual Standard_EXPORT void | Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length &gridX, Quantity_Length &gridY) const =0
| returns the point of the grid the closest to the point X,Y
Standard_EXPORT void | Activate ()
| activates the grid. The Hit method will return gridx and gridx computed according to the steps of the grid.
Standard_EXPORT void | Deactivate ()
| deactivates the grid. The hit method will return gridx and gridx as the enter value X & Y.
Standard_EXPORT Quantity_Length | XOrigin () const
| returns the x Origin of the grid.
Standard_EXPORT Quantity_Length | YOrigin () const
| returns the x Origin of the grid.
Standard_EXPORT Quantity_PlaneAngle | RotationAngle () const
| returns the x Angle of the grid.
Standard_EXPORT Standard_Boolean | IsActive () const
| Returns TRUE when the grid is active. .
Standard_EXPORT void | Colors (Quantity_Color &aColor, Quantity_Color &aTenthColor) const
| Returns the colors of the grid. .
Standard_EXPORT void | SetDrawMode (const Aspect_GridDrawMode aDrawMode)
| Change the grid aspect. .
Standard_EXPORT Aspect_GridDrawMode | DrawMode () const
| Returns the grid aspect. .
virtual Standard_EXPORT void | Display ()
| Display the grid at screen. .
virtual Standard_EXPORT void | Erase () const
| Erase the grid from screen. .
virtual Standard_EXPORT Standard_Boolean | IsDisplayed () const
| Returns TRUE when the grid is displayed at screen. .
virtual Standard_EXPORT void | Init ()=0
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Member Functions

Standard_EXPORT | Aspect_Grid (const Quantity_Length anXOrigin=0.0, const Quantity_Length anYOrigin=0.0, const Quantity_PlaneAngle aRotationAngle=0, const Quantity_Color &aColor=Quantity_NOC_GRAY50, const Quantity_Color &aTenthColor=Quantity_NOC_GRAY70)
| creates a new grid. By default this grid is not active.
virtual Standard_EXPORT void | UpdateDisplay ()
| Updates the grid parameters. .

## Protected Attributes

Quantity_PlaneAngle | myRotationAngle
Quantity_Length | myXOrigin
Quantity_Length | myYOrigin
Quantity_Color | myColor
Quantity_Color | myTenthColor

## Private Attributes

Standard_Boolean | myIsActive
Standard_Boolean | myIsDisplayed
Aspect_GridDrawMode | myDrawMode

## Constructor & Destructor Documentation

Standard_EXPORT Aspect_Grid::Aspect_Grid | ( | const Quantity_Length | anXOrigin = `0.0`,
|  | const Quantity_Length | anYOrigin = `0.0`,
|  | const Quantity_PlaneAngle | aRotationAngle = `0`,
|  | const Quantity_Color & | aColor = `Quantity_NOC_GRAY50`,
|  | const Quantity_Color & | aTenthColor = `Quantity_NOC_GRAY70`
| ) | `[protected]`

## Member Function Documentation

Standard_EXPORT void Aspect_Grid::Activate | ( |  | ) |

Standard_EXPORT void Aspect_Grid::Colors | ( | Quantity_Color & | aColor,
|  | Quantity_Color & | aTenthColor
| ) | const

virtual Standard_EXPORT void Aspect_Grid::Compute | ( | const Quantity_Length | X,
|  | const Quantity_Length | Y,
|  | Quantity_Length & | gridX,
|  | Quantity_Length & | gridY
| ) | const`[pure virtual]`

| Implemented in Aspect_CircularGrid, and Aspect_RectangularGrid.

Standard_EXPORT void Aspect_Grid::Deactivate | ( |  | ) |

virtual Standard_EXPORT void Aspect_Grid::Display | ( |  | ) | `[virtual]`

| Reimplemented in V2d_CircularGrid, V2d_RectangularGrid, V3d_CircularGrid, and V3d_RectangularGrid.

Standard_EXPORT Aspect_GridDrawMode Aspect_Grid::DrawMode | ( |  | ) | const

virtual Standard_EXPORT void Aspect_Grid::Erase | ( |  | ) | const`[virtual]`

| Reimplemented in V2d_CircularGrid, V2d_RectangularGrid, V3d_CircularGrid, and V3d_RectangularGrid.

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

| Reimplemented in Aspect_CircularGrid, Aspect_RectangularGrid, V2d_CircularGrid, V2d_RectangularGrid, V3d_CircularGrid, and V3d_RectangularGrid.

Standard_EXPORT void Aspect_Grid::Hit | ( | const Quantity_Length | X,
|  | const Quantity_Length | Y,
|  | Quantity_Length & | gridX,
|  | Quantity_Length & | gridY
| ) | const

virtual Standard_EXPORT void Aspect_Grid::Init | ( |  | ) | `[pure virtual]`

| Implemented in Aspect_CircularGrid, and Aspect_RectangularGrid.

Standard_EXPORT Standard_Boolean Aspect_Grid::IsActive | ( |  | ) | const

virtual Standard_EXPORT Standard_Boolean Aspect_Grid::IsDisplayed | ( |  | ) | const`[virtual]`

| Reimplemented in V2d_CircularGrid, V2d_RectangularGrid, V3d_CircularGrid, and V3d_RectangularGrid.

Standard_EXPORT void Aspect_Grid::Rotate | ( | const Quantity_PlaneAngle | anAngle | ) |

Standard_EXPORT Quantity_PlaneAngle Aspect_Grid::RotationAngle | ( |  | ) | const

virtual Standard_EXPORT void Aspect_Grid::SetColors | ( | const Quantity_Color & | aColor,
|  | const Quantity_Color & | aTenthColor
| ) | `[virtual]`

| Reimplemented in V3d_CircularGrid, and V3d_RectangularGrid.

Standard_EXPORT void Aspect_Grid::SetDrawMode | ( | const Aspect_GridDrawMode | aDrawMode | ) |

Standard_EXPORT void Aspect_Grid::SetRotationAngle | ( | const Quantity_PlaneAngle | anAngle | ) |

Standard_EXPORT void Aspect_Grid::SetXOrigin | ( | const Quantity_Length | anOrigin | ) |

Standard_EXPORT void Aspect_Grid::SetYOrigin | ( | const Quantity_Length | anOrigin | ) |

Standard_EXPORT void Aspect_Grid::Translate | ( | const Quantity_Length | aDx,
|  | const Quantity_Length | aDy
| ) |

virtual Standard_EXPORT void Aspect_Grid::UpdateDisplay | ( |  | ) | `[protected, virtual]`

| Reimplemented in V2d_CircularGrid, V2d_RectangularGrid, V3d_CircularGrid, and V3d_RectangularGrid.

Standard_EXPORT Quantity_Length Aspect_Grid::XOrigin | ( |  | ) | const

Standard_EXPORT Quantity_Length Aspect_Grid::YOrigin | ( |  | ) | const

## Field Documentation

Quantity_Color Aspect_Grid::myColor `[protected]`

Aspect_GridDrawMode Aspect_Grid::myDrawMode `[private]`

Standard_Boolean Aspect_Grid::myIsActive `[private]`

Standard_Boolean Aspect_Grid::myIsDisplayed `[private]`

Quantity_PlaneAngle Aspect_Grid::myRotationAngle `[protected]`

Quantity_Color Aspect_Grid::myTenthColor `[protected]`

Quantity_Length Aspect_Grid::myXOrigin `[protected]`

Quantity_Length Aspect_Grid::myYOrigin `[protected]`

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

- Aspect_Grid.hxx