0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / Vrml / Vrml_Transform.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-02-12
2// Created by: Alexander BRIVIN
3// Copyright (c) 1997-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 _Vrml_Transform_HeaderFile
18#define _Vrml_Transform_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <gp_Vec.hxx>
25#include <Vrml_SFRotation.hxx>
26#include <Standard_OStream.hxx>
27class gp_Vec;
28class Vrml_SFRotation;
29
30
31//! defines a Transform of VRML specifying transform
32//! properties.
33//! This node defines a geometric 3D transformation consisting of (in order)
34//! a (possibly) non-uniform scale about an arbitrary point, a rotation about
35//! an arbitrary point and axis and translation.
36//! By default :
37//! myTranslation (0,0,0)
38//! myRotation (0,0,1,0)
39//! myScaleFactor (1,1,1)
40//! myScaleOrientation (0,0,1,0)
41//! myCenter (0,0,0)
42class Vrml_Transform
43{
44public:
45
46 DEFINE_STANDARD_ALLOC
47
48
49 Standard_EXPORT Vrml_Transform();
50
51 Standard_EXPORT Vrml_Transform(const gp_Vec& aTranslation, const Vrml_SFRotation& aRotation, const gp_Vec& aScaleFactor, const Vrml_SFRotation& aScaleOrientation, const gp_Vec& aCenter);
52
53 Standard_EXPORT void SetTranslation (const gp_Vec& aTranslation);
54
55 Standard_EXPORT gp_Vec Translation() const;
56
57 Standard_EXPORT void SetRotation (const Vrml_SFRotation& aRotation);
58
59 Standard_EXPORT Vrml_SFRotation Rotation() const;
60
61 Standard_EXPORT void SetScaleFactor (const gp_Vec& aScaleFactor);
62
63 Standard_EXPORT gp_Vec ScaleFactor() const;
64
65 Standard_EXPORT void SetScaleOrientation (const Vrml_SFRotation& aScaleOrientation);
66
67 Standard_EXPORT Vrml_SFRotation ScaleOrientation() const;
68
69 Standard_EXPORT void SetCenter (const gp_Vec& aCenter);
70
71 Standard_EXPORT gp_Vec Center() const;
72
73 Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
74
75
76
77
78protected:
79
80
81
82
83
84private:
85
86
87
88 gp_Vec myTranslation;
89 Vrml_SFRotation myRotation;
90 gp_Vec myScaleFactor;
91 Vrml_SFRotation myScaleOrientation;
92 gp_Vec myCenter;
93
94
95};
96
97
98
99
100
101
102
103#endif // _Vrml_Transform_HeaderFile