MCPcopy Create free account
hub / github.com/Kitware/VTK / Rotate

Method Rotate

Common/Transforms/vtkTransform2D.cxx:87–107  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

85
86//------------------------------------------------------------------------------
87void vtkTransform2D::Rotate(double angle)
88{
89 if (angle == 0.0)
90 {
91 return;
92 }
93
94 // convert to radians
95 angle = vtkMath::RadiansFromDegrees(angle);
96 double c = cos(angle);
97 double s = sin(angle);
98
99 double matrix[3][3];
100 vtkMatrix3x3::Identity(*matrix);
101 matrix[0][0] = c;
102 matrix[0][1] = s;
103 matrix[1][0] = -s;
104 matrix[1][1] = c;
105 vtkMatrix3x3::Multiply3x3(this->Matrix->GetData(), *matrix, this->Matrix->GetData());
106 this->Matrix->Modified();
107}
108
109//------------------------------------------------------------------------------
110void vtkTransform2D::Scale(double x, double y)

Callers 3

RotateWXYZFunction · 0.45
RotateWXYZFunction · 0.45
RotateWXYZFunction · 0.45

Calls 6

IdentityFunction · 0.70
cosFunction · 0.50
sinFunction · 0.50
Multiply3x3Function · 0.50
GetDataMethod · 0.45
ModifiedMethod · 0.45

Tested by 1

RotateWXYZFunction · 0.36