Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
PbDomain.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2018 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PB_DOMAIN_
25#define _PB_DOMAIN_
26
27#include <Inventor/SbLinear.h>
28#include <Inventor/SbBox.h>
30
31class SoTransform ;
33
92class PbDomain : public PbBase {
93
94
95 public:
96
97
98
109
110
111
120
125
129 PbDomain(const PbDomain &domain) ;
130
135
140
144 PbDomain(float xmin, float ymin, float xmax, float ymax, BoundingBoxType type = AS_IS) ;
145
149 PbDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax,
150 BoundingBoxType type = AS_IS) ;
151
155 void setDomain(float xmin, float ymin, float xmax, float ymax, BoundingBoxType type = AS_IS) ;
156
160 void setDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax,
161 BoundingBoxType type = AS_IS) ;
162
167
172
177 void getDomain(float &xmin, float &ymin, float &xmax, float &ymax) const ;
178
183 void getDomain(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const ;
184
189 void getDomain(SbBox2f &box) const ;
190
195 void getDomain(SbBox3f &box) const ;
196
201
206 { return m_transformType ; }
207
212
217
222
226 int operator==(const PbDomain &dom) ;
227
231 int operator!=(const PbDomain &dom) {return !(*this == dom) ;}
232
236 PbDomain& operator=(const PbDomain &domain) ;
237
238 /*----------------------------------------------------------------------------*/
239 private:
240 void getDelta(float &deltaX, float &deltaY) const
241 { deltaX = m_delta[0] ; deltaY = m_delta[1] ; }
242
243 void getDelta(float &deltaX, float &deltaY, float &deltaZ) const
244 { deltaX = m_delta[0] ; deltaY = m_delta[1] ; deltaZ = m_delta[2] ; }
245
246 float getDeltaX() const
247 { return m_delta[0] ; }
248
249 float getDeltaY() const
250 { return m_delta[1] ; }
251
252 float getDeltaZ() const
253 { return m_delta[2] ; }
254
255 SbBool isHomogeneous() const ;
256
257 private:
258 // Used by constructor per copy and affectation operator
259 void copy(const PbDomain &domain, SbBool isConstructorPerCopy) ;
260
261 void init(float xmin, float ymin, float xmax, float ymax, BoundingBoxType type = AS_IS) ;
262 void init3(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax,
263 BoundingBoxType type = AS_IS) ;
264
265 float m_min[3], m_max[3], m_delta[3] ;
266 TransformType m_transformType ;
267} ;
268
269/*---------------------------------------------------------------------------*/
270
271#endif /* _PB_DOMAIN_ */
272
float ymin
Definition PbBasic.h:61
float xmax
New Data type.
Definition PbBasic.h:60
float zmin
Definition PbBasic.h:63
float ymax
Definition PbBasic.h:62
float zmax
Definition PbBasic.h:64
static void init()
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
Definition PbBase.h:49
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to define a domain...
Definition PbDomain.h:92
PbDomain(SbBox3f &box, BoundingBoxType type=AS_IS)
Constructor of a 3D domain.
PbDomain & operator=(const PbDomain &domain)
Assignment operator.
void getDomain(SbBox3f &box) const
Gets the 3D domain.
PbDomain()
Default constructor.
PbDomain(float xmin, float ymin, float xmax, float ymax, BoundingBoxType type=AS_IS)
Constructor of a 2D domain.
void getDomain(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const
Gets the 3D domain.
void getDomain(float &xmin, float &ymin, float &xmax, float &ymax) const
Gets the 2D domain.
TransformType getTransformType() const
Gets the type of transformation.
Definition PbDomain.h:205
PbDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, BoundingBoxType type=AS_IS)
Constructor of a 3D domain.
int operator==(const PbDomain &dom)
Equality comparison operator.
int operator!=(const PbDomain &dom)
Inequality comparison operator.
Definition PbDomain.h:231
SoTransform * getTransform() const
Get the domain transform matrix in an SoTransform object.
TransformType
Transform type.
Definition PbDomain.h:102
@ SCALE_Y_FIXED
Definition PbDomain.h:105
@ SCALE_MAX_XYZ_FIXED
Definition PbDomain.h:107
@ SCALE_Z_FIXED
Definition PbDomain.h:106
@ TRANSFORM_01
Definition PbDomain.h:103
@ SCALE_X_FIXED
Definition PbDomain.h:104
BoundingBoxType
Bounding box interpretation.
Definition PbDomain.h:115
@ MAX_BOUNDED_CUBE
Definition PbDomain.h:118
@ MIN_BOUNDING_CUBE
Definition PbDomain.h:117
void setDomain(float xmin, float ymin, float xmax, float ymax, BoundingBoxType type=AS_IS)
Sets a 2D domain.
void setDomain(SbBox3f &box, BoundingBoxType type=AS_IS)
Sets a 3D domain.
PbDomain(const PbDomain &domain)
Copy constructor.
void setTransformType(TransformType type)
Sets the type of transformation.
void setDomain(SbBox2f &box, BoundingBoxType type=AS_IS)
Sets a 2D domain.
void setDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, BoundingBoxType type=AS_IS)
Sets a 3D domain.
SbMatrix getMatrix() const
Get the domain transform matrix in an SbMatrix object.
PbDomain(SbBox2f &box, BoundingBoxType type=AS_IS)
Constructor of a 2D domain.
void getDomain(SbBox2f &box) const
Gets the 2D domain.
SoMatrixTransform * getMatrixTransform() const
Get the domain transform matrix in an SoMatrixTransform object.
2D box class.
Definition SbBox.h:1798
3D box class.
Definition SbBox.h:649
4x4 matrix class.
Definition SbMatrix.h:309
Node that specifies a 3D geometric transformation as a matrix.
General 3D geometric transformation node.
int SbBool
Boolean type.
Definition SbBase.h:87