0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_Transform.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-12-09
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1994-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepBuilderAPI_Transform_HeaderFile
18#define _BRepBuilderAPI_Transform_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <gp_Trsf.hxx>
25#include <TopLoc_Location.hxx>
26#include <Standard_Boolean.hxx>
27#include <BRepBuilderAPI_ModifyShape.hxx>
28#include <TopTools_ListOfShape.hxx>
29class Standard_NoSuchObject;
30class gp_Trsf;
31class TopoDS_Shape;
32
33
34//! Geometric transformation on a shape.
35//! The transformation to be applied is defined as a
36//! gp_Trsf transformation, i.e. a transformation which does
37//! not modify the underlying geometry of shapes.
38//! The transformation is applied to:
39//! - all curves which support edges of a shape, and
40//! - all surfaces which support its faces.
41//! A Transform object provides a framework for:
42//! - defining the geometric transformation to be applied,
43//! - implementing the transformation algorithm, and
44//! - consulting the results.
45class BRepBuilderAPI_Transform : public BRepBuilderAPI_ModifyShape
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
52 //! Constructs a framework for applying the geometric
53 //! transformation T to a shape. Use the function Perform
54 //! to define the shape to transform.
55 Standard_EXPORT BRepBuilderAPI_Transform(const gp_Trsf& T);
56
57 //! Creates a transformation from the gp_Trsf <T>, and
58 //! applies it to the shape <S>. If the transformation
59 //! is direct and isometric (determinant = 1) and
60 //! <Copy> = Standard_False, the resulting shape is
61 //! <S> on which a new location has been set.
62 //! Otherwise, the transformation is applied on a
63 //! duplication of <S>.
64 Standard_EXPORT BRepBuilderAPI_Transform(const TopoDS_Shape& S, const gp_Trsf& T, const Standard_Boolean Copy = Standard_False);
65
66 //! pplies the geometric transformation defined at the
67 //! time of construction of this framework to the shape S.
68 //! - If the transformation T is direct and isometric, in
69 //! other words, if the determinant of the vectorial part
70 //! of T is equal to 1., and if Copy equals false (the
71 //! default value), the resulting shape is the same as
72 //! the original but with a new location assigned to it.
73 //! - In all other cases, the transformation is applied to a duplicate of S.
74 //! Use the function Shape to access the result.
75 //! Note: this framework can be reused to apply the same
76 //! geometric transformation to other shapes. You only
77 //! need to specify them by calling the function Perform again.
78 Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False);
79
80 //! Returns the modified shape corresponding to <S>.
81 Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const Standard_OVERRIDE;
82
83 //! Returns the list of shapes modified from the shape
84 //! <S>.
85 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE;
86
87
88
89
90protected:
91
92
93
94
95
96private:
97
98
99
100 gp_Trsf myTrsf;
101 TopLoc_Location myLocation;
102 Standard_Boolean myUseModif;
103
104
105};
106
107
108
109
110
111
112
113#endif // _BRepBuilderAPI_Transform_HeaderFile