// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _BRepExtrema_SolutionElem_HeaderFile #define _BRepExtrema_SolutionElem_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _gp_Pnt_HeaderFile #include #endif #ifndef _BRepExtrema_SupportType_HeaderFile #include #endif #ifndef _TopoDS_Vertex_HeaderFile #include #endif #ifndef _TopoDS_Edge_HeaderFile #include #endif #ifndef _TopoDS_Face_HeaderFile #include #endif class gp_Pnt; class TopoDS_Vertex; class TopoDS_Edge; class TopoDS_Face; //! This class is used to store information relative to the
//! minimum distance between two shapes.
class BRepExtrema_SolutionElem { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } Standard_EXPORT BRepExtrema_SolutionElem() : myDist(0.), myPoint(0.,0.,0.), mySupType(BRepExtrema_IsVertex), myPar1(0.), myPar2(0.) { } //! initialisation of the fields
//! This constructor is used when the solution of a distance is a Vertex.
//! The different initialized fields are:
//! _ the distance d
//! _ the solution point
//! _ the type of solution
//! _ and the Vertex.
Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Vertex& vertex) : myDist(d), myPoint(Pt), mySupType(SolType), myVertex(vertex), myPar1(0.), myPar2(0.) { } //! initialisation of the fiels.
//! This constructor is used when the solution of distance is on an Edge.
//! The different initialized fields are:
//! _ the distance d,
//! _ the solution point,
//! _ the type of solution,
//! _ the Edge,
//! _ and the parameter t to locate the solution.
Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Edge& edge,const Standard_Real t) : myDist(d), myPoint(Pt), mySupType(SolType), myEdge(edge), myPar1(t), myPar2(0.) { } //! initialisation of the fields
//! This constructor is used when the solution of distance is in
//! a Face. The different initialized fields are:
//! _ the distance d,
//! _ the solution point,
//! _ the type of solution,
//! _ the Face,
//! _ and the parameter u et v to locate the solution.
Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Face& face,const Standard_Real u,const Standard_Real v) : myDist(d), myPoint(Pt), mySupType(SolType), myFace(face), myPar1(u), myPar2(v) { } //! returns the value of the minimum distance.
Standard_EXPORT Standard_Real Dist() const { return myDist; } //! returns the solution point.
Standard_EXPORT const gp_Pnt & Point() const { return myPoint; } //! returns the Support type :
//! IsVertex => The solution is a vertex.
//! IsOnEdge => The solution belongs to an Edge.
//! IsInFace => The solution is inside a Face.
Standard_EXPORT BRepExtrema_SupportType SupportKind() const { return mySupType; } //! returns the vertex if the solution is a Vertex.
Standard_EXPORT const TopoDS_Vertex & Vertex() const { return myVertex; } //! returns the vertex if the solution is an Edge.
Standard_EXPORT const TopoDS_Edge & Edge() const { return myEdge; } //! returns the vertex if the solution is an Face.
Standard_EXPORT const TopoDS_Face & Face() const { return myFace; } //! returns the parameter t if the solution is on Edge.
Standard_EXPORT void EdgeParameter(Standard_Real& par1) const { par1 = myPar1; } //! returns the parameters u et v if the solution is in a Face.
Standard_EXPORT void FaceParameter(Standard_Real& par1,Standard_Real& par2) const { par1 = myPar1; par2 = myPar2; } private: Standard_Real myDist; gp_Pnt myPoint; BRepExtrema_SupportType mySupType; TopoDS_Vertex myVertex; TopoDS_Edge myEdge; TopoDS_Face myFace; Standard_Real myPar1; Standard_Real myPar2; }; #endif