CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbRasterImage.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 license
16// 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
24
25
26
27#ifndef __IMGENT_H
28#define __IMGENT_H
30#include "TD_PackPush.h"
31
32#include "Ge/GePoint2dArray.h"
33
34class OdRasterImageImpl;
35
36#include "DbImage.h"
37#include "DbRasterImageDef.h"
38
47{
48public:
50
52
54 {
55 kInvalid, // Invalid
56 kRect, // Rectangular
57 kPoly // Polygonal
58 };
59
61 {
62 kShow = 1, // Show
63 kShowUnAligned = 2, // Show unaligned
64 kClip = 4, // Clip
65 kTransparent = 8 // Transparent
66 };
67
72 virtual void setImageDefId(
73 OdDbObjectId imageDefId);
74
78 virtual OdDbObjectId imageDefId() const;
79
88 virtual void setReactorId(
89 OdDbObjectId reactorId);
90
98 virtual OdDbObjectId reactorId() const;
99
105 virtual void setClipBoundary(
106 const OdGePoint2dArray& clipPoints);
107
113 virtual const OdGePoint2dArray& clipBoundary() const;
114
118 bool isClipped() const;
119
131 OdGePoint3dArray& vertices) const;
132
140
145
150
156 OdInt8 brightness );
157
163 virtual OdInt8 brightness() const;
164
170 OdInt8 contrast );
171
177 virtual OdInt8 contrast() const;
178
185 OdInt8 fade );
186
192 virtual OdInt8 fade() const;
193
211 virtual void setDisplayOpt(
212 ImageDisplayOpt optionIndex,
213 bool value);
214
221 virtual bool isSetDisplayOpt(
222 ImageDisplayOpt option) const;
223
231 bool getCachedValue = false) const;
232
242 virtual OdGeVector2d scale() const;
243
259 virtual bool setOrientation(
260 const OdGePoint3d& origin,
261 const OdGeVector3d& u,
262 const OdGeVector3d& v);
263
274 virtual void getOrientation(
275 OdGePoint3d& origin,
276 OdGeVector3d& u,
277 OdGeVector3d& v) const;
278
284 virtual void setClipInverted(bool val);
285
289 virtual bool isClipInverted() const;
290
291
304
307
308 virtual void dwgOutFields(
309 OdDbDwgFiler* pFiler) const ODRX_OVERRIDE;
310
313
314 virtual void dxfOutFields(
315 OdDbDxfFiler* pFiler) const ODRX_OVERRIDE;
316
317 virtual void subClose() ODRX_OVERRIDE;
318
319 /*
320 virtual void subSwapIdWith(OdDbObjectId otherId, bool swapXdata = false, bool swapExtDict = false);
321 */
322
323 virtual bool subWorldDraw(
324 OdGiWorldDraw* pWd) const ODRX_OVERRIDE;
325
326 virtual void subViewportDraw(
328
329 virtual OdResult subGetGeomExtents(
330 OdGeExtents3d& extents) const ODRX_OVERRIDE;
331
332 virtual OdResult subGetClassID(
333 void* pClsid) const ODRX_OVERRIDE;
334
335 virtual OdResult subTransformBy(
336 const OdGeMatrix3d& xfm) ODRX_OVERRIDE;
337
338 virtual OdResult subExplode(
339 OdRxObjectPtrArray& entitySet) const ODRX_OVERRIDE;
340
341 virtual OdDbObjectPtr subDeepClone(
342 OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary) const ODRX_OVERRIDE;
343
344 /*
345 virtual void getOsnapPoints( OdDb::OsnapMode osnapMode,
346 OdGsMarker gsSelectionMark, const OdGePoint3d& pickPoint,
347 const OdGePoint3d& lastPoint, const OdGeMatrix3d& viewXform,
348 OdGePoint3dArray& snapPoints, OdDbIntArray& geomIds) const;
349
350 virtual void getGripPoints(OdGePoint3dArray& gripPoints,
351 OdDbIntArray& osnapModes, OdDbIntArray& geomIds) const;
352
353 virtual void moveGripPointsAt(const OdDbIntArray& indices, const OdGeVector3d& offset);
354
355 virtual void getStretchPoints(OdGePoint3dArray& stretchPoints) const;
356
357 virtual void moveStretchPointsAt(const OdDbIntArray& indices, const OdGeVector3d& offset);
358
359 virtual void transformBy(const OdGeMatrix3d& xform);
360 virtual void getTransformedCopy(const OdGeMatrix3d& xform, OdDbEntity** ent) const;
361 virtual OdResult explode(OdRxObjectPtrArray& entitySet) const; //Replace OdRxObjectPtrArray
362 virtual bool subGetGeomExtents(OdGeExtents3d& extents) const;
363
364 virtual void getSubentPathsAtGsMarker(OdDb::SubentType type,
365 OdGsMarker gsMark, const OdGePoint3d& pickPoint,
366 const OdGeMatrix3d& viewXform, int& numPaths,
367 OdDbFullSubentPath*& subentPaths, int numInserts = 0,
368 OdDbObjectId* entAndInsertStack = 0) const;
369
370 virtual void getGsMarkersAtSubentPath(
371 const OdDbFullSubentPath& subPath,
372 OdGsMarkerArray& gsMarkers) const;
373
374 virtual OdDbEntityPtr subentPtr(const OdDbFullSubentPath& id) const;
375 virtual void saveAs(OdGiWorldDraw* mode, OdDb::EntSaveAsType st);
376 virtual void intersectWith(const OdDbEntity* ent,
377 OdDb::Intersect intType, OdGePoint3dArray& points,
378 OdGsMarker thisGsMarker = 0, OdGsMarker otherGsMarker = 0) const;
379
380 virtual void intersectWith(const OdDbEntity* ent,
381 OdDb::Intersect intType, const OdGePlane& projPlane,
382 OdGePoint3dArray& points, OdGsMarker thisGsMarker = 0,
383 OdGsMarker otherGsMarker = 0) const;
384 */
385};
386
394inline void pixelToModel(
395 const OdGeMatrix3d& xfm,
396 const OdGePoint2d& pixelPoint,
397 OdGePoint3d& modelPoint)
398{
399 modelPoint.set(pixelPoint.x, pixelPoint.y, 0);
400 modelPoint.transformBy(xfm);
401}
402
411inline void modelToPixel(
412 const OdGeMatrix3d& xfm,
413 const OdGePoint3d& modelPoint,
414 OdGePoint2d& pixelPoint)
415{
416 OdGePoint3d modelPt = modelPoint;
417 modelPt.transformBy(xfm);
418 pixelPoint.set(modelPt.x, modelPt.y);
419}
420
421inline void modelToPixel(
422 const OdGeVector3d& viewDir,
423 const OdGeMatrix3d& xfm,
424 const OdGePlane& plane,
425 const OdGePoint3d& modelPoint,
426 OdGePoint2d& pixelPoint)
427{
428 OdGePoint3d ptOnPlane = modelPoint.project(plane, viewDir);
429 ptOnPlane.transformBy(xfm);
430 pixelPoint.set(ptOnPlane.x, ptOnPlane.y);
431}
432
434 const OdGeVector3d& u,
435 const OdGeVector3d& v,
436 double ySize)
437{
438 OdGeVector3d vOffset(0.5 * u + (ySize - 0.5) * v);
440 x.setCoordSystem( origin + vOffset, u, -v, u.crossProduct(v));
441 return x;
442}
443
448
449#include "TD_PackPop.h"
450
451#endif // __IMGENT_H
452
OdSmartPtr< OdDbRasterImage > OdDbRasterImagePtr
OdGeMatrix3d pixelToModelTransform(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, double ySize)
void pixelToModel(const OdGeMatrix3d &xfm, const OdGePoint2d &pixelPoint, OdGePoint3d &modelPoint)
void modelToPixel(const OdGeMatrix3d &xfm, const OdGePoint3d &modelPoint, OdGePoint2d &pixelPoint)
#define ISM_EXPORT
unsigned int OdUInt32
signed char OdInt8
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
virtual void getOrientation(OdGePoint3d &origin, OdGeVector3d &u, OdGeVector3d &v) const
virtual void setImageDefId(OdDbObjectId imageDefId)
virtual bool isClipInverted() const
virtual OdResult getVertices(OdGePoint3dArray &vertices) const
virtual OdGeVector2d scale() const
virtual OdResult setBrightness(OdInt8 brightness)
virtual void setClipBoundary(const OdGePoint2dArray &clipPoints)
virtual OdDbObjectId reactorId() const
virtual void setClipInverted(bool val)
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const ODRX_OVERRIDE
virtual OdGeMatrix3d getPixelToModelTransform() const
virtual OdResult setFade(OdInt8 fade)
ClipBoundaryType clipBoundaryType() const
virtual OdDbObjectId imageDefId() const
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const ODRX_OVERRIDE
virtual void setDisplayOpt(ImageDisplayOpt optionIndex, bool value)
virtual OdGeVector2d imageSize(bool getCachedValue=false) const
virtual void setClipBoundaryToWholeImage()
virtual bool setOrientation(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler) ODRX_OVERRIDE
virtual OdInt8 fade() const
virtual const OdGePoint2dArray & clipBoundary() const
virtual void setReactorId(OdDbObjectId reactorId)
virtual void subClose() ODRX_OVERRIDE
virtual OdResult setContrast(OdInt8 contrast)
virtual OdInt8 brightness() const
virtual OdInt8 contrast() const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler) ODRX_OVERRIDE
ODDB_DECLARE_MEMBERS(OdDbRasterImage)
bool isClipped() const
virtual bool isSetDisplayOpt(ImageDisplayOpt option) const
OdGePoint2d & set(double xx, double yy)
Definition: GePoint2d.h:400
OdGePoint3d & transformBy(const OdGeMatrix3d &xfm)
double y
Definition: GePoint3d.h:496
double x
Definition: GePoint3d.h:495
OdGePoint3d project(const OdGePlanarEnt &plane, const OdGeVector3d &vect) const
OdGeVector3d crossProduct(const OdGeVector3d &vect) const
Definition: GeVector3d.h:595
const GLfloat * v
Definition: gles2_ext.h:315
GLfloat x
Definition: gles2_ext.h:314
GLsizei const GLfloat * value
Definition: gles2_ext.h:302