CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef ODGSVIEWIMPL_INC
25 #define ODGSVIEWIMPL_INC
76 bool enableLayerVisibilityPerView =
false);
163 virtual void dolly(
double xDolly,
double yDolly,
double zDolly);
164 virtual void roll(
double rollAngle);
165 virtual void orbit(
double xOrbit,
double yOrbit);
166 virtual void zoom(
double zoomFactor);
167 virtual void pan(
double xPan,
double yPan);
185 bool isDependentViewportView()
const;
186 bool isDependentGeometryView()
const;
187 bool isHelperView()
const;
218 OdGePoint2d& pixelArea,
bool includePerspective =
true)
const;
227 bool defaultLightingEnabled()
const;
269 bool isSnapping()
const;
270 void setSnapping(
bool val);
271 bool isRegenOnDrawForbidden()
const;
272 void setRegenOnDrawForbidden(
bool val);
273 bool isAccumulateVpChanges()
const;
287 bool isSupportPlotStyles()
const;
350 kProjectionIncludeDept = (1 << 0),
351 kProjectionIncludeClip = (1 << 1),
352 kProjectionIncludePerspective = (1 << 2),
353 kProjectionIncludeRotation = (1 << 3),
354 kProjectionIncludeAll = 0x0F,
355 kProjectionIncludeAllNoDept = kProjectionIncludeAll & ~kProjectionIncludeDept
371 bool isCompletelyVisible()
const;
372 void setCompletelyVisible(
bool val);
403 const OdGePoint3d& pointOnCurve,
bool bRecalculate =
false)
const;
411 #ifdef ODGS_LOCAL_IDS
415 return m_localId.localViewportId(pModel);
417 virtual bool isLocalViewportIdCompatible(
const OdGsViewImpl *pView)
const;
437 virtual bool sceneDept(
double& zNear,
double& zFar)
const;
449 virtual bool usesDept(
double* pMinDeptSupported = 0,
double* pMaxDeptSupported = 0)
const;
463 inline bool isCheckValid()
const;
464 inline void setCheckValid(
bool bValue)
const;
465 inline bool isInvalid()
const;
466 inline void setInvalid(
bool bValue)
const;
467 inline void setPerspectiveEnabled(
bool bValue)
const;
470 inline bool isNonRectClipped()
const;
537 inline bool isRotated()
const;
575 double actualFieldWidth()
const;
579 double actualFieldHeight()
const;
683 bool hasViewport3dClipping()
const;
696 enum EGsViewImplFlags
698 kFirstViewImplFlag = 1,
700 kInvalid = kFirstViewImplFlag << 0,
701 kCheckValid = kFirstViewImplFlag << 1,
702 kBorderVisible = kFirstViewImplFlag << 2,
703 kDoFrontClip = kFirstViewImplFlag << 3,
704 kDoBackClip = kFirstViewImplFlag << 4,
705 kPerspectiveEnabled = kFirstViewImplFlag << 5,
706 kHidden = kFirstViewImplFlag << 6,
707 kTransparentClearColor = kFirstViewImplFlag << 7,
708 kDevBgClearColor = kFirstViewImplFlag << 8,
709 kEyeToWorldValid = kFirstViewImplFlag << 9,
710 kWorldToEyeValid = kFirstViewImplFlag << 10,
711 kSnapping = kFirstViewImplFlag << 11,
712 kForbidDrawableRegenDraw = kFirstViewImplFlag << 12,
713 kDepViewInside = kFirstViewImplFlag << 13,
714 kLegacyWireframe = kFirstViewImplFlag << 14,
722 kLegacyHidden = kFirstViewImplFlag << 15,
723 kPlotTransparency = kFirstViewImplFlag << 16,
724 kAccumulateVpChanges = kFirstViewImplFlag << 17,
725 kDefaultLightingEnabled = kFirstViewImplFlag << 18
767 double m_deviation[5];
783 kWorldToDeviceValid = (1 << 0),
784 kSceneDeptInvalid = (1 << 1)
802 #ifdef ODGS_LOCAL_IDS
819 friend class GsViewImplHelper;
905 return rotation == 90 || rotation == 270;
1000 #endif // ODGSVIEWIMPL_INC
virtual void orbit(double xOrbit, double yOrbit)
virtual OdGePoint3d position() const
#define GETBIT(flags, bit)
int lineweightToPixels(OdDb::LineWeight lineweight) const
virtual OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)
OdGeMatrix3d projectionMatrix(OdUInt32 nIncludes, OdGsOverlayId nOverlay=kGsMainOverlay) const
OdGeMatrix3d & setCoordSystem(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
OdGsBaseVectorizeDevice * m_pDevice
virtual void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
void setSceneDeptInvalid(OdGsOverlayId nOverlay, bool bSet) const
double m_linetypeAlternateScaleMultiplier
double focalLength() const
bool isLayerVisible(OdDbStub *layerId) const
virtual void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)
virtual void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
OdGeMatrix3d m_eyeToWorld
virtual void getViewport(OdGsDCRectDouble &screenRec) const
static OdGsViewImpl * safeCast(OdGsView *pView)
virtual void setEnableFrontClip(bool enable)
void screenRectNorm(OdGsDCRect &normalizedRect) const
bool setModeOverride(RenderMode mode)
OdGsPropertiesPtr m_pProperties
virtual const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
double getLinetypeGenerationCriteria() const
virtual OdGeMatrix3d screenMatrix() const
short viewportRotation() const
virtual bool isPerspective() const
ClearColor clearColor() const
virtual void clearFrozenLayers()
bool hasViewport3dClipping() const
virtual void initLights(OdRxIterator *pLightsIterator)
virtual bool isViewRegenerated() const
virtual bool isLegacyWireframeMode() const
OdGePoint2dArray m_nrcPoints
virtual OdGeMatrix3d projectionMatrix() const
virtual double lensLength() const
GLuint GLsizei GLsizei GLint GLenum * type
virtual void enableStereo(bool enabled)
virtual bool visualStyle(OdGiVisualStyle &vs) const
OdGeMatrix3d m_worldToEye
void setCullingVolume(OdGsCullingVolumePtr newVol)
OdGeMatrix3d worldToDeviceMatrix(OdGsOverlayId nOverlay) const
ODRX_DECLARE_MEMBERS(OdGsViewImpl)
OdDbStub * m_pVisualStyleId
OdGsCullingVolumePtr m_pCullingVolume
virtual void getViewportBorderProperties(ODCOLORREF &color, int &width) const
virtual bool isInInteractivity() const
virtual void getStereoParameters(double &magnitude, double ¶llax) const
virtual OdDbStub * visualStyle() const
#define SETBIT(flags, bit, value)
OdDb::LineWeight getLineweight() const
virtual void clientViewInfo(OdGsClientViewInfo &viewInfo) const
virtual void getViewport(OdGsDCRect &screenRect) const
virtual bool sceneDept(double &zNear, double &zFar) const
OdGsPropertiesPtr getViewportPropertiesForType(OdGsProperties::PropertiesType type) const
virtual void setViewportBorderProperties(ODCOLORREF color, int width)
const OdGePoint2d & dcUpperRight() const
OdGiRegenType getRegenType() const
virtual bool isLegacyHiddenMode() const
virtual bool pointInView(const OdGePoint3d &pt) const
virtual bool cullingVolumeIntersectWithOpt(const OdGsCullingPrimitive &prim) const
const OdGeMatrix3d & eyeToWorldMatrix() const
double actualFieldWidth() const
OdGeMatrix3d eyeToScreenMatrix(OdGsOverlayId nOverlay=kGsMainOverlay) const
virtual void roll(double rollAngle)
virtual void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)
double m_linetypeScaleMultiplier
virtual bool isStereoEnabled() const
double m_dInteractivityFrameRate
virtual bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const
OdGsBaseVectorizeDevice * baseDevice()
virtual double fieldHeight() const
double linetypeAlternateScaleMultiplier() const
virtual void dolly(double xDolly, double yDolly, double zDolly)
virtual OdGsModel * getModel(const OdGiDrawable *pDrawable) const
void onWorldToEyeChanged()
virtual void viewParameters(OdGsView *pView) const
virtual OdGeMatrix3d objectToDeviceMatrix() const
void setWorldToDeviceInvalid()
OdUInt32 frozenLayers() const
virtual void propagateLayersChanges()
virtual bool isSupportLegacyHiddenMode() const
virtual OdGeMatrix3d worldToDeviceMatrix() const
virtual double getDeviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve, bool bRecalculate=false) const
OdGePoint2d m_dcScreenMin
virtual void setVisualStyle(OdDbStub *visualStyleId)
OdDbStubPtrArray m_frozenLayersDiff
virtual bool isCullingVolumeInitialized() const
static double lensLengthToFOV(double lensLength)
virtual bool saveClientViewState(OdGsFiler *pFiler) const
virtual void cullingVolumeTransformBy(const OdGeMatrix3d &xfm)
int cachedDrawables() const
bool isValidViewportId(const OdUInt32 vpId) const
virtual void dolly(const OdGeVector3d &dollyVector)
virtual OdDbStub * background() const
virtual void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &dcPts) const
OdGeMatrix3d perspectiveMatrix() const
double calcDeviation(const OdGiDeviationType type, const OdGePoint3d &pt) const
virtual bool viewExtents(OdGeBoundBlock3d &extents) const =0
OdGiClipBoundaryWithAbstractData * viewport3dClippingObject()
OdDbStub * m_pBackgroundId
virtual void setLensLength(double lensLength)
virtual void setBackground(OdDbStub *backgroundId)
virtual void invalidate()=0
double unrotatedFieldHeight() const
bool defaultLightingEnabled() const
virtual void setViewportClipRegion(int numContours, const int *numVertices, const OdGePoint2d *vertices)
virtual void init(OdGsBaseVectorizeDevice *pDevice, const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)
virtual void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
virtual double linetypeScaleMultiplier() const
virtual void invalidateCachedViewportGeometry()
const OdGePoint2d & dcScreenMin() const
const OdGeVector3d & eyeVector() const
virtual void setLineweightToDcScale(double scale)
virtual int partialUpdateExtentsEnlargement() const
const OdGeMatrix3d & worldToEyeMatrix() const
bool isSupportPlotStyles() const
const OdGeExtents3d & getExtents() const
virtual const OdDbStubPtrArray & getFrozenLayersDiff() const
virtual bool saveViewState(OdGsFiler *pFiler) const
virtual RenderMode mode() const
virtual double lineweightToDcScale() const
virtual void setVisualStyle(const OdGiVisualStyle &visualStyle)
virtual void setLegacyWireframeMode(bool bSet)
virtual void endInteractivity()
GsViewOverlayDataContainer m_overlayData
OdUInt32 m_gsViewImplFlags
bool isRegenOnDrawForbidden() const
void setContextualColors(OdGiContextualColors *pColors)
virtual double interactivityFrameRate() const
virtual void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, Projection projection=kParallel)
OdGePoint2d m_dcLowerLeft
virtual void setLegacyHiddenMode(bool bSet)
bool isDependentGeometryView() const
double getLinetypeScaleMultiplier() const
virtual bool pointInViewport(const OdGePoint2d &screenPoint) const
virtual void setViewportBorderVisibility(bool visible)
OdSharedPtr< OdGiClipBoundaryWithAbstractData > m_p3dClip
bool isViewportOnScreen() const
virtual void invalidate(const OdGsDCRect &rect)
bool doInversePerspectivePt(OdGePoint3d &point) const
virtual void enableDefaultLighting(bool bEnable, DefaultLightingType lightType=kTwoLights)
const OdGiContextualColors * contextualColors() const
OdIntPtr drawablesFilterFunction() const
bool isHelperView() const
static double lensLengthFromFOV(double fovAngle)
virtual void propagateInvalidVpFlag()
GLint GLenum GLsizei width
OdDbStub * getViewportObjectId() const
OdGiRegenType m_regenerationType
const OdGePoint2d & dcLowerLeft() const
void setInversion(bool invertedX, bool invertedY)
OdDbStubPtrArray m_frozenLayers
OdGsNode * getRootNode(DrawableHolder &holder)
void viewportDcCorners(OdGePoint2d &lower_left, OdGePoint2d &upper_right) const
OdGsCullingVolumePtr cullingVolume() const
bool doPerspectivePt(OdGePoint3d &point) const
virtual void setLineweightEnum(int numLineweights, const OdUInt8 *lineweights)
const OdUInt8Array & getLweightsEnum() const
OdGeMatrix3d inverse() const
virtual void setPlotTransparency(bool bSet)
void screenRect(OdGsDCPoint &lowerLeft, OdGsDCPoint &upperRight) const
virtual bool isSupportLegacyWireframeMode() const
OdGsClientViewInfo m_viewInfo
OdRxObjectPtr m_pGsReserved
virtual void setViewport(const OdGsDCRectDouble &screenRec)
virtual void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
DefaultLightingType defaultLightingType() const
virtual void updateViewProps(bool bFullUpdate=true)
OdGsBaseModulePtr m_pModule
virtual void zoom(double zoomFactor)
virtual bool isPlotTransparency() const
virtual OdGsModelArray getModelList() const
virtual bool sceneDept(double &zNear, double &zFar, OdGsOverlayId nOverlay) const
const OdGsBaseVectorizeDevice * baseDevice() const
bool isAccumulateVpChanges() const
virtual bool exceededBounds()
virtual void initCullingVolume()
virtual void clearLinetypeCache()=0
OdUInt32 viewportId() const
virtual void setViewport3dClipping(const OdGiClipBoundary *pBoundary, const OdGiAbstractClipBoundary *pClipInfo=NULL)
virtual double fieldWidth() const
virtual void setClearColor(ClearColor color)
OdGePoint2d m_dcScreenMax
virtual void setEnableBackClip(bool enable)
void unregisterOverlay(const OdGsModel *pModel)
virtual bool isValid() const
virtual bool isViewportBorderVisible() const
virtual void pan(double xPan, double yPan)
virtual void setMode(RenderMode mode)
const OdGeVector3d & xVector() const
bool isCompletelyVisible() const
void frozenLayers(OdDbStubPtrArray &frozenLayers) const
DrawableHolderArray m_drawables
#define GS_TOOLKIT_EXPORT
void setCheckValid(bool bValue) const
virtual void thawLayer(OdDbStub *layerID)
const OdGsBaseModule * getGsModulePtr() const
OdGeMatrix3d objectToDeviceMatrix(OdGsOverlayId nOverlay) const
bool updateViewportProperties(OdUInt32 incFlags)
const OdGeMatrix3d & rotationMatrix() const
virtual void setStereoParameters(double magnitude, double parallax)
virtual OdGeMatrix3d viewingMatrix() const
virtual void setViewport(const OdGsDCRect &screenRect)
bool isDependentViewportView() const
virtual OdGePoint3d target() const
const OdGeVector3d & getUpVector() const
bool m_bInInteractivityMode
virtual OdGsCullingVolume::IntersectionStatus cullingVolumeIntersectWith(const OdGsCullingPrimitive &prim) const
void setPerspectiveEnabled(bool bValue) const
OdDbStubPtrArray m_lastFrozenLayers
double windowAspect() const
virtual void select(const OdGsDCPoint *points, int numPoints, OdGsSelectionReactor *pReactor, SelectionMode mode=kCrossing)
virtual OdGsDevice * device() const
const OdGePoint2d & dcScreenMax() const
virtual void invalidate(const OdGeExtents3d &worldExt, const OdGsModel *pModel, OdDb::LineWeight extendByLineweight=OdDb::kLnWt000)
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)
OdGsDCRectArray invalidRects(OdGsOverlayId nOverlay=kGsMainOverlay) const
void setRegenOnDrawForbidden(bool val)
OdGsPropertiesPtr getViewportPropertiesRoot() const
virtual void setFrontClip(double distance)
OdGiDrawablePtr drawableAt(DrawableHolder &drawableHolder)
virtual bool isBackClipped() const
OdGiDrawablePtr m_pViewportTrans
virtual OdGeVector3d upVector() const
DefaultLightingType m_defaultLightingType
virtual bool loadClientViewState(OdGsFiler *pFiler)
void setSnapping(bool val)
OdGeMatrix3d m_worldToDeviceMatrix
virtual bool loadViewState(OdGsFiler *pFiler)
void setInvalid(bool bValue) const
virtual double frontClip() const
virtual void select(const OdGePoint2d *aPtDc, int numPoints, OdGsSelectionReactor *pReactor, SelectionMode mode=kCrossing)=0
double unrotatedFieldWidth() const
virtual bool isFrontClipped() const
virtual void freezeLayer(OdDbStub *layerID)
void invalidateCachedViewportGeometry(OdUInt32 mask)
virtual bool usesDept(double *pMinDeptSupported=0, double *pMaxDeptSupported=0) const
virtual void invalidate()
OdDbStub * annotationScaleId() const
void registerOverlay(const OdGsModel *pModel)
virtual bool add(OdGiDrawable *sceneGraph, OdGsModel *model)
virtual void beginInteractivity(double frameRateInHz)
double lineweightToPixels(double lineweight) const
double actualFieldHeight() const
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &givenWorldpt, OdGePoint2d &pixelArea, bool includePerspective=true) const
bool isNonRectClipped() const
double m_lineweightToDcScale
void screenRect(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
void invalidateRegion(const OdGiPathNode &path)
virtual void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
OdGiContextualColorsPtr contextColors
virtual bool erase(OdGiDrawable *sceneGraph)
virtual void setBackClip(double distance)
bool isCheckValid() const
OdGePoint2d m_dcUpperRight
virtual double backClip() const
virtual void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
void setCompletelyVisible(bool val)