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;
#define GS_TOOLKIT_EXPORT
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
OdGeMatrix3d & setCoordSystem(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
OdGeMatrix3d inverse() const
const OdGeExtents3d & getExtents() const
OdDb::LineWeight getLineweight() const
virtual void invalidate()=0
void setWorldToDeviceInvalid()
void setSceneDeptInvalid(OdGsOverlayId nOverlay, bool bSet) const
const OdGePoint2d & dcScreenMin() const
OdUInt32 viewportId() const
virtual void endInteractivity()
virtual double interactivityFrameRate() const
virtual void dolly(const OdGeVector3d &dollyVector)
virtual void invalidateCachedViewportGeometry()
virtual bool exceededBounds()
double m_dInteractivityFrameRate
void setPerspectiveEnabled(bool bValue) const
virtual const OdDbStubPtrArray & getFrozenLayersDiff() const
virtual bool isViewRegenerated() const
virtual bool saveViewState(OdGsFiler *pFiler) const
virtual void setEnableBackClip(bool enable)
OdGsClientViewInfo m_viewInfo
virtual void initLights(OdRxIterator *pLightsIterator)
OdDbStubPtrArray m_frozenLayersDiff
virtual OdGsDevice * device() const
const OdGeMatrix3d & eyeToWorldMatrix() const
virtual double getDeviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve, bool bRecalculate=false) const
OdGePoint2d m_dcUpperRight
virtual bool visualStyle(OdGiVisualStyle &vs) const
virtual void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
bool isDependentViewportView() const
double windowAspect() const
virtual OdGePoint3d position() const
virtual bool isPlotTransparency() const
virtual OdGePoint3d target() const
virtual OdGeMatrix3d screenMatrix() const
virtual bool pointInView(const OdGePoint3d &pt) const
OdDbStub * annotationScaleId() const
bool isLayerVisible(OdDbStub *layerId) const
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &givenWorldpt, OdGePoint2d &pixelArea, bool includePerspective=true) const
const OdGiContextualColors * contextualColors() const
bool isSupportPlotStyles() const
OdGeMatrix3d m_worldToEye
bool m_bInInteractivityMode
virtual OdGeMatrix3d objectToDeviceMatrix() const
DefaultLightingType m_defaultLightingType
virtual bool isSupportLegacyHiddenMode() const
void setContextualColors(OdGiContextualColors *pColors)
OdGiDrawablePtr drawableAt(DrawableHolder &drawableHolder)
void screenRectNorm(OdGsDCRect &normalizedRect) const
OdGsDCRectArray invalidRects(OdGsOverlayId nOverlay=kGsMainOverlay) const
virtual bool isValid() const
virtual void setViewport(const OdGsDCRect &screenRect)
virtual void cullingVolumeTransformBy(const OdGeMatrix3d &xfm)
OdGiRegenType m_regenerationType
virtual void propagateLayersChanges()
virtual void clearFrozenLayers()
const OdGePoint2d & dcUpperRight() const
virtual void roll(double rollAngle)
virtual void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)
virtual OdGeVector3d upVector() const
virtual void freezeLayer(OdDbStub *layerID)
double getLinetypeGenerationCriteria() const
virtual OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)
OdGeMatrix3d perspectiveMatrix() const
virtual void viewParameters(OdGsView *pView) const
virtual bool cullingVolumeIntersectWithOpt(const OdGsCullingPrimitive &prim) const
double actualFieldHeight() const
void invalidateRegion(const OdGiPathNode &path)
ODRX_DECLARE_MEMBERS(OdGsViewImpl)
OdGsPropertiesPtr getViewportPropertiesRoot() const
int lineweightToPixels(OdDb::LineWeight lineweight) const
double focalLength() const
void screenRect(OdGsDCPoint &lowerLeft, OdGsDCPoint &upperRight) const
virtual void select(const OdGsDCPoint *points, int numPoints, OdGsSelectionReactor *pReactor, SelectionMode mode=kCrossing)
virtual bool isPerspective() const
const OdGeVector3d & getUpVector() const
virtual OdDbStub * visualStyle() const
virtual void setLensLength(double lensLength)
virtual void invalidate(const OdGsDCRect &rect)
virtual double lineweightToDcScale() const
const OdGsBaseVectorizeDevice * baseDevice() const
double m_linetypeAlternateScaleMultiplier
virtual void orbit(double xOrbit, double yOrbit)
double linetypeAlternateScaleMultiplier() const
virtual void getViewport(OdGsDCRect &screenRect) const
OdGePoint2d m_dcScreenMax
double actualFieldWidth() const
void setInversion(bool invertedX, bool invertedY)
virtual double lensLength() const
void setInvalid(bool bValue) const
void setRegenOnDrawForbidden(bool val)
virtual void setLegacyWireframeMode(bool bSet)
virtual void select(const OdGePoint2d *aPtDc, int numPoints, OdGsSelectionReactor *pReactor, SelectionMode mode=kCrossing)=0
virtual bool add(OdGiDrawable *sceneGraph, OdGsModel *model)
const OdGePoint2d & dcScreenMax() const
ClearColor clearColor() const
const OdGsBaseModule * getGsModulePtr() const
virtual OdGsModelArray getModelList() const
OdDbStubPtrArray m_lastFrozenLayers
virtual void enableStereo(bool enabled)
virtual void getViewportBorderProperties(ODCOLORREF &color, int &width) const
virtual void zoom(double zoomFactor)
double m_lineweightToDcScale
virtual OdDbStub * background() const
OdGsCullingVolumePtr m_pCullingVolume
virtual void setLineweightToDcScale(double scale)
virtual void updateViewProps(bool bFullUpdate=true)
OdGeMatrix3d m_eyeToWorld
virtual RenderMode mode() const
virtual OdGeMatrix3d projectionMatrix() const
const OdUInt8Array & getLweightsEnum() const
OdGsNode * getRootNode(DrawableHolder &holder)
virtual void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &dcPts) const
virtual void init(OdGsBaseVectorizeDevice *pDevice, const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)
virtual bool isSupportLegacyWireframeMode() const
const OdGeMatrix3d & worldToEyeMatrix() const
OdGiDrawablePtr m_pViewportTrans
OdGePoint2dArray m_nrcPoints
virtual void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
OdGePoint2d m_dcScreenMin
virtual bool loadClientViewState(OdGsFiler *pFiler)
OdDbStub * getViewportObjectId() const
void setCompletelyVisible(bool val)
virtual void dolly(double xDolly, double yDolly, double zDolly)
virtual bool usesDept(double *pMinDeptSupported=0, double *pMaxDeptSupported=0) const
OdGePoint2d m_dcLowerLeft
void screenRect(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
OdDbStub * m_pVisualStyleId
virtual void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
void registerOverlay(const OdGsModel *pModel)
bool hasViewport3dClipping() const
bool defaultLightingEnabled() const
virtual void pan(double xPan, double yPan)
bool isViewportOnScreen() const
virtual void setVisualStyle(OdDbStub *visualStyleId)
double lineweightToPixels(double lineweight) const
void onWorldToEyeChanged()
virtual void setClearColor(ClearColor color)
virtual void setViewport(const OdGsDCRectDouble &screenRec)
const OdGeVector3d & eyeVector() const
const OdGeVector3d & xVector() const
virtual bool loadViewState(OdGsFiler *pFiler)
void setCheckValid(bool bValue) const
virtual void invalidate()
virtual double frontClip() const
OdDbStub * m_pBackgroundId
static double lensLengthFromFOV(double fovAngle)
double getLinetypeScaleMultiplier() const
virtual bool isLegacyHiddenMode() const
OdGeMatrix3d projectionMatrix(OdUInt32 nIncludes, OdGsOverlayId nOverlay=kGsMainOverlay) const
bool isAccumulateVpChanges() const
GsViewOverlayDataContainer m_overlayData
OdGeMatrix3d worldToDeviceMatrix(OdGsOverlayId nOverlay) const
double calcDeviation(const OdGiDeviationType type, const OdGePoint3d &pt) const
OdUInt32 frozenLayers() const
virtual double fieldWidth() const
bool doPerspectivePt(OdGePoint3d &point) const
virtual void initCullingVolume()
virtual void setLineweightEnum(int numLineweights, const OdUInt8 *lineweights)
virtual void setStereoParameters(double magnitude, double parallax)
DefaultLightingType defaultLightingType() const
virtual bool sceneDept(double &zNear, double &zFar, OdGsOverlayId nOverlay) const
double m_linetypeScaleMultiplier
OdGsBaseVectorizeDevice * baseDevice()
virtual void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
virtual bool isStereoEnabled() const
virtual bool isCullingVolumeInitialized() const
bool isRegenOnDrawForbidden() const
OdGsBaseVectorizeDevice * m_pDevice
OdSharedPtr< OdGiClipBoundaryWithAbstractData > m_p3dClip
bool isHelperView() const
virtual void setBackground(OdDbStub *backgroundId)
virtual bool sceneDept(double &zNear, double &zFar) const
int cachedDrawables() const
virtual bool isBackClipped() const
virtual void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, Projection projection=kParallel)
virtual OdGeMatrix3d worldToDeviceMatrix() const
virtual bool pointInViewport(const OdGePoint2d &screenPoint) const
virtual void propagateInvalidVpFlag()
virtual void beginInteractivity(double frameRateInHz)
OdIntPtr drawablesFilterFunction() const
virtual bool erase(OdGiDrawable *sceneGraph)
virtual double fieldHeight() const
virtual void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
bool setModeOverride(RenderMode mode)
virtual void setBackClip(double distance)
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)
double unrotatedFieldHeight() const
virtual void setVisualStyle(const OdGiVisualStyle &visualStyle)
virtual const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
OdGsCullingVolumePtr cullingVolume() const
virtual OdGsCullingVolume::IntersectionStatus cullingVolumeIntersectWith(const OdGsCullingPrimitive &prim) const
OdRxObjectPtr m_pGsReserved
virtual void setLegacyHiddenMode(bool bSet)
virtual void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
virtual bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const
virtual bool isFrontClipped() const
OdGeMatrix3d objectToDeviceMatrix(OdGsOverlayId nOverlay) const
OdGsBaseModulePtr m_pModule
virtual void clearLinetypeCache()=0
bool updateViewportProperties(OdUInt32 incFlags)
virtual void getViewport(OdGsDCRectDouble &screenRec) const
void setSnapping(bool val)
virtual void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)
void frozenLayers(OdDbStubPtrArray &frozenLayers) const
virtual void thawLayer(OdDbStub *layerID)
static OdGsViewImpl * safeCast(OdGsView *pView)
short viewportRotation() const
virtual void setEnableFrontClip(bool enable)
virtual int partialUpdateExtentsEnlargement() const
bool doInversePerspectivePt(OdGePoint3d &point) const
OdGiClipBoundaryWithAbstractData * viewport3dClippingObject()
OdDbStubPtrArray m_frozenLayers
bool isValidViewportId(const OdUInt32 vpId) const
OdGiRegenType getRegenType() const
virtual bool isLegacyWireframeMode() const
virtual bool isInInteractivity() const
virtual void setMode(RenderMode mode)
virtual double backClip() const
static double lensLengthToFOV(double lensLength)
OdGsPropertiesPtr m_pProperties
virtual void setViewportClipRegion(int numContours, const int *numVertices, const OdGePoint2d *vertices)
virtual void setPlotTransparency(bool bSet)
virtual void setViewport3dClipping(const OdGiClipBoundary *pBoundary, const OdGiAbstractClipBoundary *pClipInfo=NULL)
virtual OdGeMatrix3d viewingMatrix() const
void viewportDcCorners(OdGePoint2d &lower_left, OdGePoint2d &upper_right) const
virtual void enableDefaultLighting(bool bEnable, DefaultLightingType lightType=kTwoLights)
virtual bool isViewportBorderVisible() const
DrawableHolderArray m_drawables
bool isDependentGeometryView() const
bool isCheckValid() const
OdGeMatrix3d eyeToScreenMatrix(OdGsOverlayId nOverlay=kGsMainOverlay) const
virtual bool saveClientViewState(OdGsFiler *pFiler) const
virtual bool viewExtents(OdGeBoundBlock3d &extents) const =0
virtual OdGsModel * getModel(const OdGiDrawable *pDrawable) const
virtual void setViewportBorderVisibility(bool visible)
void invalidateCachedViewportGeometry(OdUInt32 mask)
OdGsPropertiesPtr getViewportPropertiesForType(OdGsProperties::PropertiesType type) const
virtual void getStereoParameters(double &magnitude, double ¶llax) const
bool isCompletelyVisible() const
const OdGePoint2d & dcLowerLeft() const
OdUInt32 m_gsViewImplFlags
const OdGeMatrix3d & rotationMatrix() const
virtual void invalidate(const OdGeExtents3d &worldExt, const OdGsModel *pModel, OdDb::LineWeight extendByLineweight=OdDb::kLnWt000)
void setCullingVolume(OdGsCullingVolumePtr newVol)
double unrotatedFieldWidth() const
virtual void clientViewInfo(OdGsClientViewInfo &viewInfo) const
virtual void setFrontClip(double distance)
bool isNonRectClipped() const
void unregisterOverlay(const OdGsModel *pModel)
virtual void setViewportBorderProperties(ODCOLORREF color, int width)
virtual double linetypeScaleMultiplier() const
GLint GLenum GLsizei width
GLuint GLsizei GLsizei GLint GLenum * type
OdGiContextualColorsPtr contextColors
OdGeMatrix3d m_worldToDeviceMatrix