/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #ifndef itkQuadEdgeMeshPoint_hxx #define itkQuadEdgeMeshPoint_hxx namespace itk { // --------------------------------------------------------------------- // ResetEdge would be a better name than Initialize. template void QuadEdgeMeshPoint::Initialize() { m_Edge = static_cast(nullptr); } // --------------------------------------------------------------------- template QuadEdgeMeshPoint::QuadEdgeMeshPoint() { this->Initialize(); } // --------------------------------------------------------------------- template QuadEdgeMeshPoint::QuadEdgeMeshPoint(const Superclass & r) : Superclass(r) { this->Initialize(); } // --------------------------------------------------------------------- template QuadEdgeMeshPoint & QuadEdgeMeshPoint::operator=(const Superclass & r) { this->Superclass::operator=(r); this->Initialize(); return (*this); } // --------------------------------------------------------------------- template QuadEdgeMeshPoint & QuadEdgeMeshPoint::operator=(const ValueType r[VPointDimension]) { this->Superclass::operator=(r); this->Initialize(); return (*this); } template bool QuadEdgeMeshPoint::IsInternal() const { if (this->GetEdge()) { return this->GetEdge()->IsOriginInternal(); } return false; } /** Return the valence of this QuadEdgeMeshPoint i.e. the number of edges constituting * the Onext ring to which this point belongs. * @return the valence when an entry in the Onext ring is present, * and -1 otherwise. */ template int QuadEdgeMeshPoint::GetValence() const { int valence = -1; // error code by default if (this->GetEdge()) { valence = this->GetEdge()->GetOrder(); } return valence; } /** Set Edge * */ template void QuadEdgeMeshPoint::SetEdge(TQuadEdge * inputEdge) { m_Edge = inputEdge; } /** Get Edge * */ template TQuadEdge * QuadEdgeMeshPoint::GetEdge() const { return m_Edge; } /** Get Edge non-const version * */ template TQuadEdge * QuadEdgeMeshPoint::GetEdge() { return (m_Edge); } /** Set Point Coordinates * */ template void QuadEdgeMeshPoint::SetPoint(const Superclass & point) { this->Superclass::operator=(point); } } // namespace itk #endif