CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
AECGrConstraintImpl.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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
16// license agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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#ifndef __AECGRIP_CONSTRAINT_IMPL_H__
24#define __AECGRIP_CONSTRAINT_IMPL_H__
25
28#include "FMContour3D.h"
29#include <Ge/GeLineSeg3d.h>
30#include <Ge/GeLine3d.h>
31#include <Ge/GeCircArc3d.h>
32
36class OdGeRay3dExt : public OdGeRay3d
37{
38 public:
40 {}
42 const OdGePoint3d& point,
43 const OdGeVector3d& vect) : OdGeRay3d( point, vect )
44 {}
45
46 virtual bool hasStartPoint( OdGePoint3d& pt ) const
47 { pt = pointOnLine(); return true; }
48
49 virtual bool hasEndPoint( OdGePoint3d& ) const
50 { return false; }
51
52 virtual OdGePoint3d evalPoint( double param, int numDeriv, OdGeVector3dArray& derivatives ) const
53 {
54 OdGePoint3d ptRes = pointOnLine() + direction() * param;
55 OdUInt32 i, iSize = numDeriv;
56 derivatives.resize( iSize );
57 for( i = 0; i < iSize; i++ )
58 derivatives[ i ] = OdGeVector3d::kIdentity;
59 return ptRes;
60 }
61};
62
66class AECBASE_API AECGripConstraintNone : public AECGripConstraint
67{
69
70 public:
73 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
74 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
75};
77
82{
84
85 public:
86 virtual void transformBy( const OdGeMatrix3d& mTr ) = 0;
87};
89
94{
96
97 public:
98 void setPlane( const OdGePlane& cPlane ) { m_cPlane = cPlane; }
99 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
100 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
101
102 virtual void transformBy( const OdGeMatrix3d& mTr )
103 {
104 m_cPlane.transformBy( mTr );
105 }
106
107 private:
108 OdGePlane m_cPlane;
109};
111
116{
118
119 public:
120 void setRay( const OdGeRay3dExt& cRay ) { m_cRay = cRay; }
121 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
122 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
123 virtual void transformBy( const OdGeMatrix3d& mTr )
124 {
125 m_cRay.transformBy( mTr );
126 }
127
128 private:
129 OdGeRay3dExt m_cRay;
130};
132
137{
139
140 public:
141 void setLine( const OdGeLine3d& cLine ) { m_cLine = cLine; }
142 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
143 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
144 virtual void transformBy( const OdGeMatrix3d& mTr )
145 {
146 m_cLine.transformBy( mTr );
147 }
148
149 private:
150 OdGeLine3d m_cLine;
151};
153
158{
160
161 public:
162 void setSegment( const OdGePoint3d& p1, const OdGePoint3d& p2 )
163 {
164 m_cSeg.set( p1, p2 );
165 }
166 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
167 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
168 virtual void transformBy( const OdGeMatrix3d& mTr )
169 {
170 m_cSeg.transformBy( mTr );
171 }
172
173 private:
174 OdGeLineSeg3d m_cSeg;
175};
177
182{
184
185 public:
186 void set( const OdGePoint3d& pt, const OdGeVector3d& v1, const OdGeVector3d& v2 )
187 {
188 m_pt = pt;
189 m_v1 = v1;
190 m_v2 = v2;
191 }
192 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
193 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
194 virtual void transformBy( const OdGeMatrix3d& mTr )
195 {
196 m_pt.transformBy( mTr );
197 m_v1.transformBy( mTr );
198 m_v2.transformBy( mTr );
199 }
200
201 private:
202 OdGePoint3d m_pt;
203 OdGeVector3d m_v1;
204 OdGeVector3d m_v2;
205};
207
212{
214
215 public:
216 void set( const FacetModeler::Contour2D& cBase )
217 {
218 m_cBase = FacetModeler::Contour3D( cBase );
219 }
220 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
221 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
222 virtual void transformBy( const OdGeMatrix3d& mTr )
223 {
224 m_cBase.transformBy( mTr );
225 }
226
227 private:
229};
231
236{
238
239 public:
240 void setCircle( const OdGeCircArc3d& cCircle )
241 {
242 m_circ = cCircle;
243 }
244 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
245 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
246 virtual void transformBy( const OdGeMatrix3d& mTr )
247 {
248 m_circ.transformBy( mTr );
249 }
250
251 private:
252 OdGeCircArc3d m_circ;
253};
255
260{
262
263 public:
264 void setRadialRay( const OdGeRay3dExt& cRay ) { m_cRay = cRay; }
265 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
266 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
267 virtual void transformBy( const OdGeMatrix3d& mTr )
268 {
269 m_cRay.transformBy( mTr );
270 }
271
272 private:
273 OdGeRay3dExt m_cRay;
274};
276
281{
283
284 public:
285 void set( const OdDbObjectId& idCurve )
286 {
287 m_idCurve = idCurve;
288 }
289 virtual AECGr::Result apply( const OdGeVector3d& vViewDir,
290 const OdGePoint3d& ptGrip, OdGePoint3d& ptNew );
291 virtual void transformBy( const OdGeMatrix3d& )
292 {
293 }
294
295 private:
296 OdDbObjectId m_idCurve;
297};
299
300#endif // __AECGRIP_CONSTRAINT_IMPL_H__
OdSmartPtr< AECGripConstraintToPolyline > AECGripConstraintToPolylinePtr
OdSmartPtr< AECGripConstraintToPlaneRayRay > AECGripConstraintToPlaneRayRayPtr
OdSmartPtr< AECGripConstraintToAcDbCurve > AECGripConstraintToAcDbCurvePtr
OdSmartPtr< AECGripConstraintToLineRay > AECGripConstraintToLineRayPtr
OdSmartPtr< AECGripConstraintToRadialRay > AECGripConstraintToRadialRayPtr
OdSmartPtr< AECGripConstraintToLine > AECGripConstraintToLinePtr
OdSmartPtr< AECGripConstraintToCircle > AECGripConstraintToCirclePtr
OdSmartPtr< AECGripConstraintNone > AECGripConstraintNonePtr
OdSmartPtr< AECGripConstraintToPlane > AECGripConstraintToPlanePtr
OdSmartPtr< AECGripConstraintToLineSegment > AECGripConstraintToLineSegmentPtr
OdSmartPtr< AECGripConstraintCursorBased > AECGripConstraintCursorBasedPtr
unsigned int OdUInt32
#define ODRX_DECLARE_MEMBERS(ClassName)
Definition: RxObject.h:112
virtual void transformBy(const OdGeMatrix3d &mTr)=0
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
void set(const OdDbObjectId &idCurve)
virtual void transformBy(const OdGeMatrix3d &)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
void setCircle(const OdGeCircArc3d &cCircle)
virtual void transformBy(const OdGeMatrix3d &mTr)
void setLine(const OdGeLine3d &cLine)
virtual void transformBy(const OdGeMatrix3d &mTr)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
virtual void transformBy(const OdGeMatrix3d &mTr)
void setRay(const OdGeRay3dExt &cRay)
virtual void transformBy(const OdGeMatrix3d &mTr)
void setSegment(const OdGePoint3d &p1, const OdGePoint3d &p2)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
void setPlane(const OdGePlane &cPlane)
virtual void transformBy(const OdGeMatrix3d &mTr)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
virtual void transformBy(const OdGeMatrix3d &mTr)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
void set(const OdGePoint3d &pt, const OdGeVector3d &v1, const OdGeVector3d &v2)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
void set(const FacetModeler::Contour2D &cBase)
virtual void transformBy(const OdGeMatrix3d &mTr)
virtual AECGr::Result apply(const OdGeVector3d &vViewDir, const OdGePoint3d &ptGrip, OdGePoint3d &ptNew)
void setRadialRay(const OdGeRay3dExt &cRay)
virtual void transformBy(const OdGeMatrix3d &mTr)
void resize(size_type logicalLength, const T &value)
Definition: OdArray.h:1185
OdGeVector3d direction() const
OdGePoint3d pointOnLine() const
virtual bool hasEndPoint(OdGePoint3d &) const
OdGeRay3dExt(const OdGePoint3d &point, const OdGeVector3d &vect)
virtual bool hasStartPoint(OdGePoint3d &pt) const
virtual OdGePoint3d evalPoint(double param, int numDeriv, OdGeVector3dArray &derivatives) const
static GE_STATIC_EXPORT const OdGeVector3d kIdentity
Definition: GeVector3d.h:100
GLfloat GLfloat v1
Definition: gles2_ext.h:295
GLfloat GLfloat GLfloat v2
Definition: gles2_ext.h:296
Result
Definition: AECGr.h:57