OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKV3d
AIS


AIS_Axis Class Reference

Locates the x, y and z axes in an Interactive Object.
These are used to orient it correctly in presentations
from different viewpoints, or to construct a revolved
shape, for example, from one of the axes. Conversely,
an axis can be created to build a revolved shape and
then situated relative to one of the axes of the view.
.

#include <AIS_Axis.hxx>

Inheritance diagram for AIS_Axis:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT AIS_Axis (const Handle(Geom_Line)&aComponent)
 Initializes the line aComponent
.
Standard_EXPORT AIS_Axis (const Handle(Geom_Axis2Placement)&aComponent, const AIS_TypeOfAxis anAxisType)
 initializes the axis2 position
aComponent. The coordinate system used is right-handed.

Standard_EXPORT AIS_Axis (const Handle(Geom_Axis1Placement)&anAxis)
 Initializes the axis1 position anAxis.
.
const Handle_Geom_Line & Component () const
 Returns the axis entity aComponent and identifies it
as a component of a shape.
.
Standard_EXPORT void SetComponent (const Handle(Geom_Line)&aComponent)
 Sets the coordinates of the lin aComponent.
.
const Handle_Geom_Axis2Placement & Axis2Placement () const
 Returns the position of axis2 and positions it by
identifying it as the x, y, or z axis and giving its
direction in 3D space. The coordinate system used is right-handed.
.
Standard_EXPORT void SetAxis2Placement (const Handle(Geom_Axis2Placement)&aComponent, const AIS_TypeOfAxis anAxisType)
 Allows you to provide settings for aComponent:the
position and direction of an axis in 3D space. The
coordinate system used is right-handed.
.
Standard_EXPORT void SetAxis1Placement (const Handle(Geom_Axis1Placement)&anAxis)
 Constructs a new line to serve as the axis anAxis in 3D space.
.
AIS_TypeOfAxis TypeOfAxis () const
 Returns the type of axis.
.
void SetTypeOfAxis (const AIS_TypeOfAxis aTypeAxis)
 Constructs the entity aTypeAxis to stock information
concerning type of axis.
.
Standard_Boolean IsXYZAxis () const
 Returns a signature of 2 for axis datums. When you
activate mode 2 by a signature, you pick AIS objects
of type AIS_Axis.
.
Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const
 Returns true if the interactive object accepts the display mode aMode.
.
virtual Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Geom_Transformation)&aTrsf, const Handle(Prs3d_Presentation)&aPresentation)
 computes the presentation according to a point of view
given by <aprojector>.
To be Used when the associated degenerated Presentations
have been transformed by <atrsf> which is not a Pure
Translation. The HLR Prs can't be deducted automatically
WARNING :<atrsf> must be applied
to the object to display before computation !!!

virtual Standard_Integer Signature () const
 Specifies additional characteristics of Interactive
Objects. A signature is, in fact, an index with integer
values assigned different properties.
This method is frequently used in conjuction with
Type to give a particular type and signature to an
Interactive Object. By default, the Interactive Object
has a None type and a signature of 0. Among the
datums, this signature is attributed to the shape
The remaining datums have the following default signatures:
- Point signature 1
- Axis signature 2
- Trihedron signature 3
- PlaneTrihedron signature 4
- Line signature 5
- Circle signature 6
- Plane signature 7.
.
virtual AIS_KindOfInteractive Type () const
 Returns the kind of Interactive Object:
- None
- Datum
- Relation
- Object
By default, the interactive object has a None type.
Because specific shapes entail different behavior
according to their sub-shapes, you may need to
create a Local Context. This will allow you to
specify the additional characteristics which you
need to handle these shapes.
.
Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor)
 only the interactive obj knowns which Drawer attribute
is affected by the color (ex: for a wire, it's the
wireaspect field of the drawer, but for a vertex, only
the point aspect field is affected by the color)
WARNING : Do not forget to set the corresponding fields
here (hasOwnColor and myOwnColor)

Standard_EXPORT void SetColor (const Quantity_Color &aColor)
Standard_EXPORT void SetWidth (const Standard_Real aValue)
 Allows you to provide the setting aValue for width.
Only the Interactive Object knows which Drawer
attribute is affected by the width setting.
.
Standard_EXPORT void UnsetColor ()
 Removes color settings. Only the Interactive Object
knows which Drawer attribute is affected by the color
setting. For a wire, for example, wire aspect is the
attribute affected. For a vertex, however, only point
aspect is affected by the color setting.
.
Standard_EXPORT void UnsetWidth ()
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Member Functions

Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)&aPresentationManager, const Handle(Prs3d_Presentation)&aPresentation, const Standard_Integer aMode=0)
 Calculates the 3D view aPresentation and its
updates. The latter are managed by aPresentationManager.
aPresentableObject has the display mode aMode;
this has the default value of 0, that is, the wireframe display mode.
.
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Prs3d_Presentation)&aPresentation)
 Calculates the 3D view aPresentation and its
updates. The latter are managed by
aPresentationManager. Each of the views in the
viewer and every modification such as rotation, for
example, entails recalculation.
It must be redefined to implement hidden line removal
for the object. The user never calls this method
himself. This is done via the InteractiveContext object
and is dependent on the point of view from which the
object is displayed.
.
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager2d)&aPresentationManager, const Handle(Graphic2d_GraphicObject)&aPresentation, const Standard_Integer aMode=0)
 Calculates the 2D view aPresentation and its
updates. The latter are managed by aPresentationManager.
aPresentableObject has the display mode aMode;
this has the default value of 0, that is, the wireframe display mode.
Note that this syntax is not used in AIS as that
package only concerns 3D display.
.
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)&aSelection, const Standard_Integer aMode)
 Recovers and calculates any sensitive primitive,
aSelection, available in Shape mode, specified by
aMode. As a rule, these are sensitive faces.
This method is defined as virtual. This enables you to
implement it in the creation of a new class of AIS
Interactive Object. You need to do this and in so
doing, redefine this method, if you create a class
which enriches the list of signatures and types.
.
Standard_EXPORT void ComputeFields ()

Private Attributes

Handle_Geom_Line myComponent
Handle_Geom_Axis2Placement myAx2
gp_Pnt myPfirst
gp_Pnt myPlast
AIS_TypeOfAxis myTypeOfAxis
Standard_Boolean myIsXYZAxis
gp_Dir myDir
Standard_Real myVal
Standard_CString myText
Handle_Prs3d_LineAspect myLineAspect

Constructor & Destructor Documentation

Standard_EXPORT AIS_Axis::AIS_Axis const Handle(Geom_Line)&  aComponent  ) 
 

Standard_EXPORT AIS_Axis::AIS_Axis const Handle(Geom_Axis2Placement)&  aComponent,
const AIS_TypeOfAxis  anAxisType
 

Standard_EXPORT AIS_Axis::AIS_Axis const Handle(Geom_Axis1Placement)&  anAxis  ) 
 


Member Function Documentation

Standard_EXPORT Standard_Boolean AIS_Axis::AcceptDisplayMode const Standard_Integer  aMode  )  const [virtual]
 

Reimplemented from AIS_InteractiveObject.

const Handle_Geom_Axis2Placement& AIS_Axis::Axis2Placement  )  const
 

const Handle_Geom_Line& AIS_Axis::Component  )  const
 

Standard_EXPORT void AIS_Axis::Compute const Handle(PrsMgr_PresentationManager2d)&  aPresentationManager,
const Handle(Graphic2d_GraphicObject)&  aPresentation,
const Standard_Integer  aMode = 0
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT void AIS_Axis::Compute const Handle(Prs3d_Projector)&  aProjector,
const Handle(Prs3d_Presentation)&  aPresentation
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT void AIS_Axis::Compute const Handle(PrsMgr_PresentationManager3d)&  aPresentationManager,
const Handle(Prs3d_Presentation)&  aPresentation,
const Standard_Integer  aMode = 0
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

virtual Standard_EXPORT void AIS_Axis::Compute const Handle(Prs3d_Projector)&  aProjector,
const Handle(Geom_Transformation)&  aTrsf,
const Handle(Prs3d_Presentation)&  aPresentation
[virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT void AIS_Axis::ComputeFields  )  [private]
 

Standard_EXPORT void AIS_Axis::ComputeSelection const Handle(SelectMgr_Selection)&  aSelection,
const Standard_Integer  aMode
[private, virtual]
 

Implements SelectMgr_SelectableObject.

Standard_EXPORT const AIS_Axis::Handle Standard_Type   )  const
 

Reimplemented from AIS_InteractiveObject.

Standard_Boolean AIS_Axis::IsXYZAxis  )  const [inline]
 

Standard_EXPORT void AIS_Axis::SetAxis1Placement const Handle(Geom_Axis1Placement)&  anAxis  ) 
 

Standard_EXPORT void AIS_Axis::SetAxis2Placement const Handle(Geom_Axis2Placement)&  aComponent,
const AIS_TypeOfAxis  anAxisType
 

Standard_EXPORT void AIS_Axis::SetColor const Quantity_Color &  aColor  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.

Standard_EXPORT void AIS_Axis::SetColor const Quantity_NameOfColor  aColor  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.

Standard_EXPORT void AIS_Axis::SetComponent const Handle(Geom_Line)&  aComponent  ) 
 

void AIS_Axis::SetTypeOfAxis const AIS_TypeOfAxis  aTypeAxis  )  [inline]
 

Standard_EXPORT void AIS_Axis::SetWidth const Standard_Real  aValue  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.

Standard_Integer AIS_Axis::Signature  )  const [inline, virtual]
 

Reimplemented from AIS_InteractiveObject.

AIS_KindOfInteractive AIS_Axis::Type  )  const [inline, virtual]
 

Reimplemented from AIS_InteractiveObject.

AIS_TypeOfAxis AIS_Axis::TypeOfAxis  )  const [inline]
 

Standard_EXPORT void AIS_Axis::UnsetColor  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.

Standard_EXPORT void AIS_Axis::UnsetWidth  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.


Field Documentation

Handle_Geom_Axis2Placement AIS_Axis::myAx2 [private]
 

Handle_Geom_Line AIS_Axis::myComponent [private]
 

gp_Dir AIS_Axis::myDir [private]
 

Standard_Boolean AIS_Axis::myIsXYZAxis [private]
 

Handle_Prs3d_LineAspect AIS_Axis::myLineAspect [private]
 

gp_Pnt AIS_Axis::myPfirst [private]
 

gp_Pnt AIS_Axis::myPlast [private]
 

Standard_CString AIS_Axis::myText [private]
 

AIS_TypeOfAxis AIS_Axis::myTypeOfAxis [private]
 

Standard_Real AIS_Axis::myVal [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:55:05 2008 for OpenCASCADE by  doxygen 1.4.1