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

Method InternalDeepCopy

Common/Transforms/vtkTransform.cxx:104–142  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

102
103//------------------------------------------------------------------------------
104void vtkTransform::InternalDeepCopy(vtkAbstractTransform* gtrans)
105{
106 vtkTransform* transform = static_cast<vtkTransform*>(gtrans);
107
108 // copy the input
109 this->SetInput(transform->Input);
110
111 // copy the concatenation
112 this->Concatenation->DeepCopy(transform->Concatenation);
113
114 // copy the stack
115 if (transform->Stack)
116 {
117 if (this->Stack == nullptr)
118 {
119 this->Stack = vtkTransformConcatenationStack::New();
120 }
121 this->Stack->DeepCopy(transform->Stack);
122 }
123 else
124 {
125 if (this->Stack)
126 {
127 this->Stack->Delete();
128 this->Stack = nullptr;
129 }
130 }
131
132 // legacy stuff: copy Point and DoublePoint
133 for (int j = 0; j < 3; j++)
134 {
135 this->Point[j] = transform->Point[j];
136 this->DoublePoint[j] = transform->DoublePoint[j];
137 }
138
139 // to support the legacy hack in InternalUpdate
140 this->Matrix->DeepCopy(transform->Matrix);
141 this->MatrixUpdateMTime = this->Matrix->GetMTime();
142}
143
144//------------------------------------------------------------------------------
145void vtkTransform::InternalUpdate()

Callers 2

DeepCopyMethod · 0.45
UpdateMethod · 0.45

Calls 5

SetInputMethod · 0.95
DeleteMethod · 0.65
NewFunction · 0.50
DeepCopyMethod · 0.45
GetMTimeMethod · 0.45

Tested by

no test coverage detected