24#ifndef ODGSVIEWIMPL_INC
25#define ODGSVIEWIMPL_INC
120 bool enableLayerVisibilityPerView =
false);
696 virtual void dolly(
double xDolly,
double yDolly,
double zDolly);
712 virtual void roll(
double rollAngle);
730 virtual void orbit(
double xOrbit,
double yOrbit);
737 virtual void zoom(
double zoomFactor);
755 virtual void pan(
double xPan,
double yPan);
853 bool isDependentViewportView()
const;
854 bool isDependentGeometryView()
const;
855 bool isHelperView()
const;
1011 OdGePoint2d& pixelArea,
bool includePerspective =
true)
const;
1083 bool defaultLightingEnabled()
const;
1182 bool isSnapping()
const;
1183 void setSnapping(
bool val);
1184 bool isRegenOnDrawForbidden()
const;
1185 void setRegenOnDrawForbidden(
bool val);
1186 bool isAccumulateVpChanges()
const;
1213 bool isSupportPlotStyles()
const;
1362 kProjectionIncludeDept = (1 << 0),
1363 kProjectionIncludeClip = (1 << 1),
1364 kProjectionIncludePerspective = (1 << 2),
1365 kProjectionIncludeRotation = (1 << 3),
1366 kProjectionIncludeAll = 0x0F,
1367 kProjectionIncludeAllNoDept = kProjectionIncludeAll & ~kProjectionIncludeDept
1413 bool isCompletelyVisible()
const;
1414 void setCompletelyVisible(
bool val);
1498 const OdGePoint3d& pointOnCurve,
bool bRecalculate =
false)
const;
1518 return m_localId.localViewportId(pModel);
1574 virtual bool usesDept(
double* pMinDeptSupported = 0,
double* pMaxDeptSupported = 0)
const;
1588 inline bool isCheckValid()
const;
1589 inline void setCheckValid(
bool bValue)
const;
1591 inline void setInvalid(
bool bValue)
const;
1592 inline void setPerspectiveEnabled(
bool bValue)
const;
1593 inline void setAccumulateVpChanges(
bool bSet );
1600 inline bool isNonRectClipped()
const;
1759 inline bool isRotated()
const;
1834 double actualFieldWidth()
const;
1838 double actualFieldHeight()
const;
1944 bool hasViewport3dClipping()
const;
2037 void addClippingShape(const
OdSiShape*);
2044 void removeClippingShape(const
OdSiShape*);
2064 enum EGsViewImplFlags
2066 kFirstViewImplFlag = 1,
2068 kInvalid = kFirstViewImplFlag << 0,
2069 kCheckValid = kFirstViewImplFlag << 1,
2070 kBorderVisible = kFirstViewImplFlag << 2,
2071 kDoFrontClip = kFirstViewImplFlag << 3,
2072 kDoBackClip = kFirstViewImplFlag << 4,
2073 kPerspectiveEnabled = kFirstViewImplFlag << 5,
2074 kHidden = kFirstViewImplFlag << 6,
2075 kTransparentClearColor = kFirstViewImplFlag << 7,
2076 kDevBgClearColor = kFirstViewImplFlag << 8,
2077 kEyeToWorldValid = kFirstViewImplFlag << 9,
2078 kWorldToEyeValid = kFirstViewImplFlag << 10,
2079 kSnapping = kFirstViewImplFlag << 11,
2080 kForbidDrawableRegenDraw = kFirstViewImplFlag << 12,
2081 kDepViewInside = kFirstViewImplFlag << 13,
2082 kLegacyWireframe = kFirstViewImplFlag << 14,
2090 kLegacyHidden = kFirstViewImplFlag << 15,
2091 kPlotTransparency = kFirstViewImplFlag << 16,
2092 kAccumulateVpChanges = kFirstViewImplFlag << 17,
2093 kDefaultLightingEnabled = kFirstViewImplFlag << 18,
2094 kSSAOEnabled = kFirstViewImplFlag << 19
2138 double m_deviation[5];
2155 kWorldToDeviceValid = (1 << 0),
2156 kSceneDeptInvalid = (1 << 1),
2157 kViewToScreenValid = (1 << 2)
2169 : m_nOverlayFlags(0)
2170 , m_nearClipPlaneDist1(0.0)
2171 , m_farClipPlaneDist1(0.0)
2172 , m_nearClipPlaneDist2(0.0)
2173 , m_farClipPlaneDist2(0.0)
2204 friend class GsViewImplHelper;
2320 return rotation == 90 || rotation == 270;
#define GS_TOOLKIT_EXPORT
GS_TOOLKIT_EXPORT double calcFocalLength(double lensLength, double fieldWidth, double fieldHeight)
OdArray< const OdSiShape *, OdMemoryAllocator< const OdSiShape * > > OdSiShapeConstPtrArray
bool isInvalid(const ViewPropsArray &props)
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
bool contains(const ConstForPtrT &value, size_type start=0) const
bool find(const ConstForPtrT &value, size_type &findIndex, size_type start=0) const
typename A::size_type size_type
OdArray & removeAt(size_type arrayIndex)
size_type append(const T &value)
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 enableSSAO(bool bEnable)=0
virtual void invalidate()=0
virtual OdUInt32 antiAliasingMode() const =0
virtual void enableAntiAliasing(OdUInt32 nMode)=0
virtual bool ssaoMode() const =0
bool hasInvalidRects(OdUInt32 nOverlays=kGsAllOverlays) const
void clearInvalidRects(OdUInt32 nOverlays=kGsAllOverlays)
void setWorldToDeviceInvalid()
void setSceneDeptInvalid(OdGsOverlayId nOverlay, bool bSet) const
OdUInt32 viewportId() const
virtual void endInteractivity()
const OdGePoint2d & dcScreenMin() const
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 OdGiRegenType getRegenType() 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
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
void setCenter(const OdGePoint2d ¢er)
virtual OdGeMatrix3d screenMatrix() const
virtual bool pointInView(const OdGePoint3d &pt) const
OdDbStub * getViewportObjectId() const
bool isLayerVisible(OdDbStub *layerId) const
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &givenWorldpt, OdGePoint2d &pixelArea, bool includePerspective=true) const
OdUInt32 m_antiAliasingMode
const OdGiContextualColors * contextualColors() const
bool isSupportPlotStyles() const
OdGeMatrix3d m_worldToEye
bool m_bInInteractivityMode
OdGeMatrix3d eyeToScreenMatrix(double nearClipPlaneDist, double farClipPlaneDist, OdGsOverlayId overlayId) const
virtual OdDbStub * background() const
virtual OdGeMatrix3d objectToDeviceMatrix() const
DefaultLightingType m_defaultLightingType
virtual bool isSupportLegacyHiddenMode() const
void setContextualColors(OdGiContextualColors *pColors)
virtual OdDbStub * rootDrawableIdAt(int i, OdGsModelPtr *pModelReturn=0) const
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)
const OdGePoint2d & dcScreenMax() const
virtual void cullingVolumeTransformBy(const OdGeMatrix3d &xfm)
OdGiRegenType m_regenerationType
virtual void propagateLayersChanges()
virtual void clearFrozenLayers()
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
OdGsOverlayId extentsToPixels(OdGsDCRect &rc, const OdGeExtents3d &worldExt, const OdGsBaseModel *pModel, OdDb::LineWeight extendByLineweight=OdDb::kLnWt000) const
OdGeMatrix3d projectionMatrix(double nearClipPlaneDist, double farClipPlaneDist, OdUInt32 projectionFlags) 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)
virtual void invalidate(const OdGeExtents3d &worldExt, const OdGsBaseModel *pModel, OdDb::LineWeight extendByLineweight=OdDb::kLnWt000)
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
virtual void setLensLength(double lensLength)
virtual void invalidate(const OdGsDCRect &rect)
OdGePoint3d focusPoint() const
virtual double lineweightToDcScale() const
double m_linetypeAlternateScaleMultiplier
virtual const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
virtual void orbit(double xOrbit, double yOrbit)
double linetypeAlternateScaleMultiplier() const
virtual void getViewport(OdGsDCRect &screenRect) const
OdGePoint2d m_dcScreenMax
virtual OdUInt32 antiAliasingMode() const
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)
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
OdGsCullingVolumePtr m_pCullingVolume
OdGsViewLocalId m_localId
OdSiShapeConstPtrArray m_clippingShapes
virtual void setLineweightToDcScale(double scale)
virtual void updateViewProps(bool bFullUpdate=true)
OdGeMatrix3d m_eyeToWorld
virtual RenderMode mode() const
virtual OdGeMatrix3d projectionMatrix() const
virtual void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &dcPts) const
void removeClippingShape(const OdSiShape *)
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)
const OdGeMatrix3d & rotationMatrix() const
OdGePoint2d m_dcScreenMin
virtual bool loadClientViewState(OdGsFiler *pFiler)
void setCompletelyVisible(bool val)
virtual void dolly(double xDolly, double yDolly, double zDolly)
virtual int numRootDrawables() const
virtual bool usesDept(double *pMinDeptSupported=0, double *pMaxDeptSupported=0) const
OdGePoint2d m_dcLowerLeft
virtual OdGsDevice * device() const
void screenRect(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
OdDbStub * m_pVisualStyleId
virtual void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
const OdSiShapeConstPtrArray & clippingShapes() const
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
virtual bool isLocalViewportIdCompatible(const OdGsViewImpl *pView) const
void onWorldToEyeChanged()
const OdGePoint2d & center() const
virtual void setClearColor(ClearColor color)
virtual void setViewport(const OdGsDCRectDouble &screenRec)
virtual bool loadViewState(OdGsFiler *pFiler)
void setCheckValid(bool bValue) const
virtual void invalidate()
virtual double frontClip() const
OdDbStub * m_pBackgroundId
void getClippingPlanes(double &nearClipPlaneDist, double &farClipPlaneDist, OdGsOverlayId overlayId, OdUInt32 projectionFlags) const
static double lensLengthFromFOV(double fovAngle)
double getLinetypeScaleMultiplier() const
virtual bool isLegacyHiddenMode() const
const OdUInt8Array & getLweightsEnum() 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
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
OdDbStub * annotationScaleId() const
void getUnrotatedFieldSize(double &fieldWidth, double &fieldHeight) 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)
const OdGsBaseVectorizeDevice * baseDevice() const
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)
double unrotatedFieldHeight() const
virtual void setVisualStyle(const OdGiVisualStyle &visualStyle)
virtual const OdDbStubPtrArray & getFrozenLayersDiff() 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 enableSSAO(bool bEnable) ODRX_OVERRIDE
virtual void clearLinetypeCache()=0
virtual bool ssaoMode() const ODRX_OVERRIDE
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
OdGsViewLocalId & getViewLocalId()
OdGiClipBoundaryWithAbstractData * viewport3dClippingObject()
OdDbStubPtrArray m_frozenLayers
bool isValidViewportId(const OdUInt32 vpId) const
virtual bool isLegacyWireframeMode() const
OdGeMatrix3d screenMatrix(double nearClipPlaneDist, double farClipPlaneDist) const
virtual void collide(OdGiPathNode const *const *pInputList, OdUInt32 nInputListSize, OdGsCollisionDetectionReactor *pReactor, OdGiPathNode const *const *pCollisionWithList=NULL, OdUInt32 nCollisionWithListSize=0, const OdGsCollisionDetectionContext *pCtx=NULL)=0
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 OdGsModel * getModel(const OdGiDrawable *pDrawable) const
virtual void enableDefaultLighting(bool bEnable, DefaultLightingType lightType=kTwoLights)
const OdGePoint2d & dcLowerLeft() const
virtual bool isViewportBorderVisible() const
DrawableHolderArray m_drawables
bool isDependentGeometryView() const
bool isCheckValid() const
OdGeMatrix3d eyeToScreenMatrix(OdGsOverlayId nOverlay=kGsMainOverlay) const
void setClippingShapes(const OdSiShapeConstPtrArray &s)
const OdGeVector3d & getUpVector() const
virtual bool saveClientViewState(OdGsFiler *pFiler) const
virtual bool viewExtents(OdGeBoundBlock3d &extents) const =0
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
void addClippingShape(const OdSiShape *)
OdUInt32 m_gsViewImplFlags
const OdGePoint2d & dcUpperRight() const
void setCullingVolume(OdGsCullingVolumePtr newVol)
virtual void enableAntiAliasing(OdUInt32 nMode)
void setAccumulateVpChanges(bool bSet)
virtual OdDbStub * visualStyle() const
OdUInt32 localViewportId(const OdGsBaseModel *pModel) const
double unrotatedFieldWidth() const
virtual void clientViewInfo(OdGsClientViewInfo &viewInfo) const
virtual void registerOverlay(const OdGsModel *pModel)
const OdGeVector3d & xVector() const
virtual void unregisterOverlay(const OdGsModel *pModel)
virtual void setFrontClip(double distance)
OdGsNode * getRootNode(DrawableHolder &holder)
virtual OdGiDrawablePtr rootDrawableAt(int i, OdGsModelPtr *pModelReturn=0) const
bool isNonRectClipped() const
OdGsBaseVectorizeDevice * baseDevice()
virtual void setViewportBorderProperties(ODCOLORREF color, int width)
const OdGeVector3d & eyeVector() const
virtual double linetypeScaleMultiplier() const
GLint GLenum GLsizei width
GLuint GLsizei GLsizei GLint GLenum * type
OdGiContextualColorsPtr contextColors
OdGsDCRectArray m_invalidRects
double m_farClipPlaneDist2
OdGeMatrix3d m_viewToScreenMat
double m_nearClipPlaneDist2
double m_farClipPlaneDist1
double m_nearClipPlaneDist1
OdGeMatrix3d m_worldToDeviceMatrix