summaryrefslogtreecommitdiff
path: root/src/GC/GC_MakeRotation.cxx
blob: 8e0574f6c524f2f6ae10d04d3b99a83dd65c9b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// File:	GC_MakeRotation.cxx
// Created:	Fri Oct  2 16:37:27 1992
// Author:	Remi GILET
//		<reg@topsn3>

#include <GC_MakeRotation.ixx>
#include <GC_MakeRotation.hxx>
#include <StdFail_NotDone.hxx>

//=========================================================================
//   Creation d une rotation 3d de gp d angle Angle par rapport a une     +
//   droite Line.                                                         +
//=========================================================================

GC_MakeRotation::GC_MakeRotation(const gp_Lin&  Line  ,
				   const Standard_Real     Angle ) {
  TheRotation = new Geom_Transformation();
  TheRotation->SetRotation(gp_Ax1(Line.Location(),Line.Direction()),Angle);
}

//=========================================================================
//   Creation d une rotation 3d de gp d angle Angle par rapport a un      +
//   axe Axis.                                                            +
//=========================================================================

GC_MakeRotation::GC_MakeRotation(const gp_Ax1&  Axis  ,
				   const Standard_Real     Angle ) {
  TheRotation = new Geom_Transformation();
  TheRotation->SetRotation(Axis,Angle);
}

//=========================================================================
//   Creation d une rotation 3d de gp d angle Angle par rapport a une     +
//   droite issue du point Point et de direction Direc.                   +
//=========================================================================

GC_MakeRotation::GC_MakeRotation(const gp_Pnt&  Point ,
				   const gp_Dir&  Direc ,
				   const Standard_Real     Angle ) {
  TheRotation = new Geom_Transformation();
  TheRotation->SetRotation(gp_Ax1(Point,Direc),Angle);
}

const Handle(Geom_Transformation)& GC_MakeRotation::Value() const
{ 
  return TheRotation;
}

const Handle(Geom_Transformation)& GC_MakeRotation::Operator() const 
{
  return TheRotation;
}

GC_MakeRotation::operator Handle(Geom_Transformation) () const
{
  return TheRotation;
}