Warning, /include/opencascade/IntRes2d_Transition.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1992-06-10
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016
0017 #include <Standard_DomainError.hxx>
0018
0019 std::ostream& operator << (std::ostream&, IntRes2d_Transition&);
0020
0021 inline IntRes2d_Transition::IntRes2d_Transition (const Standard_Boolean Tangent,
0022 const IntRes2d_Position Pos,
0023 const IntRes2d_TypeTrans Type ):
0024
0025 tangent(Tangent),posit(Pos),typetra(Type),situat(IntRes2d_Unknown),oppos(Standard_False)
0026
0027 {
0028 }
0029
0030 inline IntRes2d_Transition::IntRes2d_Transition (const Standard_Boolean Tangent,
0031 const IntRes2d_Position Pos,
0032 const IntRes2d_Situation Situ,
0033 const Standard_Boolean Oppos):
0034 tangent(Tangent),posit(Pos),typetra(IntRes2d_Touch),
0035 situat(Situ),oppos(Oppos)
0036 {
0037 }
0038
0039 inline IntRes2d_Transition::IntRes2d_Transition (const IntRes2d_Position Pos):
0040
0041 tangent(Standard_True),posit(Pos),typetra(IntRes2d_Undecided),situat(IntRes2d_Unknown),oppos(Standard_False)
0042 {
0043 }
0044
0045 inline void IntRes2d_Transition::SetValue (const Standard_Boolean Tangent,
0046 const IntRes2d_Position Pos,
0047 const IntRes2d_TypeTrans Type ) {
0048
0049 tangent=Tangent;
0050 posit=Pos;
0051 typetra=Type;
0052 }
0053
0054 inline void IntRes2d_Transition::SetValue (const Standard_Boolean Tangent,
0055 const IntRes2d_Position Pos,
0056 const IntRes2d_Situation Situ,
0057 const Standard_Boolean Oppos) {
0058
0059 tangent=Tangent;
0060 posit=Pos;
0061 typetra=IntRes2d_Touch;
0062 situat=Situ;
0063 oppos=Oppos;
0064
0065 }
0066
0067 inline void IntRes2d_Transition::SetValue (const IntRes2d_Position Pos ) {
0068
0069 posit=Pos;
0070 typetra=IntRes2d_Undecided;
0071 }
0072
0073 inline void IntRes2d_Transition::SetPosition (const IntRes2d_Position Pos ) {
0074
0075 posit=Pos;
0076 }
0077
0078 inline IntRes2d_Position IntRes2d_Transition::PositionOnCurve () const {
0079
0080 return posit;
0081 }
0082
0083 inline IntRes2d_TypeTrans IntRes2d_Transition::TransitionType () const {
0084
0085 return typetra;
0086 }
0087
0088 inline Standard_Boolean IntRes2d_Transition::IsTangent () const {
0089
0090 if (typetra==IntRes2d_Undecided) {
0091 throw Standard_DomainError();
0092 }
0093 return tangent;
0094 }
0095
0096 inline IntRes2d_Situation IntRes2d_Transition::Situation () const {
0097
0098 if (typetra!=IntRes2d_Touch) {
0099 throw Standard_DomainError();
0100 }
0101 return situat;
0102 }
0103
0104 inline Standard_Boolean IntRes2d_Transition::IsOpposite () const {
0105
0106 if (typetra!=IntRes2d_Touch) {
0107 throw Standard_DomainError();
0108 }
0109 return oppos;
0110 }
0111