CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FMMdlSurface.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef __FMMDL_SURFACE_H__
25#define __FMMDL_SURFACE_H__
26
27#include "Modeler/FMMdlEntity.h"
28#include "Ge/GeLine3d.h"
29
30namespace FacetModeler
31{
32
37 {
38 public:
43
50 virtual Surface* copy(Body& to) const;
51
55 enum Type {
58
61
63 kCone = 2,
64
67
69 kTorus = 4,
70
73 };
74
80 virtual Type type() const;
81
92 virtual OdGeVector3d normal(const Vertex& atV, const Face& atF) const;
93
102 virtual void transform(const OdGeMatrix3d& x);
103
117 virtual int compare(const Surface* pOther, double eps) const;
118
124 Surface* next() const;
125
131 void setNext(Surface* s);
132
137
138 protected:
139
150 int surface_compare(const Surface* pOther, double eps) const;
151
161 virtual Surface* clone(Body& to) const;
162
163 private:
164
168 Surface(const Surface&);
169
177 Surface& operator=(const Surface& other);
178
179 Surface* m_pNext; // Next Surface pointer.
180
181 //DOM-IGNORE-BEGIN
182 friend class Body;
183 friend class BodyImpl;
184 friend class BodyCustom;
185 friend class CFxFacetModelerHelper; //FELIX_CHANGE
186 //DOM-IGNORE-END
187 };
188
194 public:
201
207 virtual Type type() const;
208
215 virtual Surface* copy(Body& to) const;
216
223 void findSharpEdges(const Body& body, double angleTol);
224
230 bool belongsToSharpEdge(const Vertex* vertex) const;
231
235 int nSharpEdges() const;
236
240 double creaseAngle() const;
241
242 protected:
246 std::set<const Vertex*> m_setSharpEdge;
247
252 };
253
258 public:
266
273
279 const OdGeLine3d& axis() const;
280
286 const OdGeVector3d& startDir() const;
287
301 int compare(const Surface* pOther, double eps) const;
302
303 protected:
304 OdGeLine3d m_axis; // Rotation axis vector.
305 OdGeVector3d m_startDir; // Start direction vector.
306 };
307
312 public:
320 Sphere(const OdGePoint3d& center, double radius, OdUInt32 approx);
321
327 Type type() const;
328
334 const OdGePoint3d& center() const;
335
341 double radius() const;
342
349
360 OdGeVector3d normal(const Vertex& atV, const Face& atF) const;
361
368
382 int compare(const Surface* pOther, double eps) const;
383
390 Surface* copy(Body& to) const;
391
392 protected:
393 OdGePoint3d m_center; // Center point coordinates.
394 double m_radius; // Radius value.
395 OdUInt32 m_approximation; // Approximation.
396 };
397
402 public:
412 double dRadius, OdUInt32 approx);
413
419 Type type() const;
420
426 double radius() const;
427
434
445 OdGeVector3d normal(const Vertex& atV, const Face& atF) const;
446
453
467 int compare(const Surface* pOther, double eps) const;
468
475 Surface* copy(Body& to) const;
476
477 protected:
478 double m_radius; // Radius value.
479 OdUInt32 m_approximation; // Approximation.
480 };
481
486 public:
497 double bottomRadius, double topRadius, OdUInt32 approx);
498
504 Type type() const;
505
511 double radius() const;
512
518 double topRadius() const;
519
525 double tanAngle() const;
526
533
544 OdGeVector3d normal(const Vertex& atV, const Face& atF) const;
545
552
566 int compare(const Surface* pOther, double e) const;
567
574 Surface* copy(Body& to) const;
575
576 protected:
577 double m_radius; // Radius value.
578 double m_tanAngle; // Angle tangent value.
579 OdUInt32 m_approximation; // Approximation.
580 };
581
586 public:
598 double majorRadius, double minorRadius,
599 OdUInt32 majorApprox, OdUInt32 minorApprox);
600
606 Type type() const;
607
613 double majorRadius() const;
614
620 double minorRadius() const;
621
628
635
646 OdGeVector3d normal(const Vertex& atV, const Face& atF) const;
647
654
668 int compare(const Surface* pOther, double e) const;
669
676 Surface* copy(Body& to) const;
677
678 protected:
679 double m_majorRadius; // Major radius value.
680 double m_minorRadius; // Minor radius value.
681 OdUInt32 m_majorApprox; // Major approximation.
682 OdUInt32 m_minorApprox; // Minor approximation.
683 };
684
685}
686
687#endif //__FMMDL_SURFACE_H__
#define FMGEOMETRY_API
unsigned int OdUInt32
Type type() const
double tanAngle() const
int compare(const Surface *pOther, double e) const
Surface * copy(Body &to) const
Cone(const OdGeLine3d &axis, const OdGeVector3d &startDir, double bottomRadius, double topRadius, OdUInt32 approx)
double topRadius() const
double radius() const
OdUInt32 approximation() const
OdGeVector3d normal(const Vertex &atV, const Face &atF) const
void transform(const OdGeMatrix3d &x)
Cylinder(const OdGeLine3d &axis, const OdGeVector3d &startDir, double dRadius, OdUInt32 approx)
int compare(const Surface *pOther, double eps) const
double radius() const
Surface * copy(Body &to) const
void transform(const OdGeMatrix3d &x)
OdGeVector3d normal(const Vertex &atV, const Face &atF) const
OdUInt32 approximation() const
const OdGeVector3d & startDir() const
Revolution(const OdGeLine3d &axis, const OdGeVector3d &startDir)
const OdGeLine3d & axis() const
int compare(const Surface *pOther, double eps) const
void transform(const OdGeMatrix3d &x)
virtual Surface * copy(Body &to) const
ShadedSurface(double creaseAngle=0)
std::set< const Vertex * > m_setSharpEdge
virtual Type type() const
void findSharpEdges(const Body &body, double angleTol)
bool belongsToSharpEdge(const Vertex *vertex) const
const OdGePoint3d & center() const
Sphere(const OdGePoint3d &center, double radius, OdUInt32 approx)
OdGeVector3d normal(const Vertex &atV, const Face &atF) const
Surface * copy(Body &to) const
int compare(const Surface *pOther, double eps) const
void transform(const OdGeMatrix3d &x)
double radius() const
OdUInt32 approximation() const
virtual Surface * clone(Body &to) const
virtual Surface * copy(Body &to) const
virtual OdGeVector3d normal(const Vertex &atV, const Face &atF) const
int surface_compare(const Surface *pOther, double eps) const
virtual int compare(const Surface *pOther, double eps) const
virtual Type type() const
friend class CFxFacetModelerHelper
void setNext(Surface *s)
Surface * next() const
virtual void transform(const OdGeMatrix3d &x)
friend class BodyCustom
void transform(const OdGeMatrix3d &x)
double minorRadius() const
int compare(const Surface *pOther, double e) const
OdUInt32 minorApproximation() const
Surface * copy(Body &to) const
Torus(const OdGeLine3d &axis, const OdGeVector3d &startDir, double majorRadius, double minorRadius, OdUInt32 majorApprox, OdUInt32 minorApprox)
double majorRadius() const
OdUInt32 majorApproximation() const
OdGeVector3d normal(const Vertex &atV, const Face &atF) const
Type type() const
GLfloat x
Definition gles2_ext.h:314