0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / Geom / Geom_Surface.cxx
CommitLineData
b311480e 1// Created on: 1993-03-10
2// Created by: JCV
3// Copyright (c) 1993-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
42cf5bc1 17
18#include <Geom_Curve.hxx>
19#include <Geom_Surface.hxx>
20#include <Geom_UndefinedDerivative.hxx>
21#include <Geom_UndefinedValue.hxx>
22#include <gp_GTrsf2d.hxx>
23#include <gp_Pnt.hxx>
24#include <gp_Trsf.hxx>
25#include <gp_Vec.hxx>
26#include <Standard_NoSuchObject.hxx>
27#include <Standard_RangeError.hxx>
28#include <Standard_Type.hxx>
7fd59977 29
92efcf78 30IMPLEMENT_STANDARD_RTTIEXT(Geom_Surface,Geom_Geometry)
31
7fd59977 32typedef Geom_Surface Surface;
7fd59977 33
34//=======================================================================
35//function : UReversed
36//purpose :
37//=======================================================================
38
c04c30b3 39Handle(Geom_Surface) Geom_Surface::UReversed () const
7fd59977 40{
c04c30b3 41 Handle(Geom_Surface) S = Handle(Geom_Surface)::DownCast(Copy());
7fd59977 42 S->UReverse();
43 return S;
44}
45
46
47//=======================================================================
48//function : VReversed
49//purpose :
50//=======================================================================
51
c04c30b3 52Handle(Geom_Surface) Geom_Surface::VReversed () const
7fd59977 53{
c04c30b3 54 Handle(Geom_Surface) S = Handle(Geom_Surface)::DownCast(Copy());
7fd59977 55 S->VReverse();
56 return S;
57}
58
59
60//=======================================================================
61//function : TransformParameters
62//purpose :
63//=======================================================================
64
65void Geom_Surface::TransformParameters(Standard_Real& ,
66 Standard_Real& ,
67 const gp_Trsf& ) const
68{
69}
70
71//=======================================================================
72//function : ParametricTransformation
73//purpose :
74//=======================================================================
75
76gp_GTrsf2d Geom_Surface::ParametricTransformation(const gp_Trsf&) const
77{
78 gp_GTrsf2d dummy;
79 return dummy;
80}
81
82//=======================================================================
83//function : UPeriod
84//purpose :
85//=======================================================================
86
87Standard_Real Geom_Surface::UPeriod() const
88{
89 Standard_NoSuchObject_Raise_if
90 ( !IsUPeriodic(),"Geom_Surface::UPeriod");
91
92 Standard_Real U1, U2, V1, V2;
93 Bounds(U1,U2,V1,V2);
94 return ( U2 - U1);
95}
96
97
98//=======================================================================
99//function : VPeriod
100//purpose :
101//=======================================================================
102
103Standard_Real Geom_Surface::VPeriod() const
104{
105 Standard_NoSuchObject_Raise_if
106 ( !IsVPeriodic(),"Geom_Surface::VPeriod");
107
108 Standard_Real U1, U2, V1, V2;
109 Bounds(U1,U2,V1,V2);
110 return ( V2 - V1);
111}
112
113//=======================================================================
114//function : Value
115//purpose :
116//=======================================================================
117
118gp_Pnt Geom_Surface::Value(const Standard_Real U,
119 const Standard_Real V)const
120{
121 gp_Pnt P;
122 D0(U,V,P);
123 return P;
124}
bc73b006 125
126//=======================================================================
127//function : DumpJson
128//purpose :
129//=======================================================================
130void Geom_Surface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
131{
132 OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
133
134 OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Geometry)
135}