All Frameworks Class Hierarchy This Framework Previous Next Indexes
Visualization Class CATViewer
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---System.CATEventSubscriber
|
+---System.CATCommand
|
+---Dialog.CATDialog
|
+---Dialog.CATDlgBox
|
+---Dialog.CATDlgFrame
|
+---CATViewer
Usage: you must use this class as is. You should never derive it.
public class CATViewer
Class to display Graphic Representations on the screen.
Constructor and Destructor Index
- o
~CATViewer()
-
Method Index
- o
AddRep(CAT2DRep*)
- Adds a representation 2D in the main CAT2DViewpoint.
- o
AddRep(CAT3DRep*)
- Adds a representation 3D in the Main 3D Viewpoint.
- o
AddRepFurtive(CAT2DRep*)
- Adds a furtive representation in the Main CAT2DViewpoint.
- o
AddRepFurtive(CAT3DRep*)
- Adds a 3D furtive representation in the main CAT3DViewpoint.
- o
AddViewpoint(CATViewpoint*,CATViewerPlacement)
- Adds a new viewpoint in the Viewer's list with the highest/lowest priority.
- o
CATDeclareCBEvent(VIEWER_FEEDBACK_UPDATE)
- Event sent when something happens to the viewer.
- o
ClassId()
- Returns the class identifier for which the given object is an instance.
- o
DisplayNextViewpoint()
- Restores the Viewpoint store after the current viepoint.
- o
DisplayPreviousViewpoint()
- Restores the Viewpoint store before the current viepoint.
- o
Draw()
- Asks for generating a new "image" displayed in the Viewer's screen.
- o
DrawElement(CATRepPath&)
- Draws a CATRepPath without redrawing the entire screen .
- o
DrawElements(list<CATRepPath>&)
- Draws a list of CATRepPath without redrawing the entire screen.
- o
End2DRemoveReps()
- Updates the 2D viewpoint to take into account the removal of reps.
- o
End2DRemoveRepsFurtive()
- Updates the 2D viewpoint to take into account the removal of reps.
- o
EndRemoveReps()
- Updates the 3D viewpoint to take into account the removal of reps.
- o
EndRemoveRepsFurtive()
- Updates the 3D viewpoint to take into account the removal of reps.
- o
GetBackgroundColor(float*,float*,float*)
- Retreives the background color.
- o
GetCATColormap()
- Gets the CATColormMap.
- o
GetContextualMenu()
- Gets the CATDlgContextualMenu displayed when you right click on the viewer.
- o
GetDefaultBackgroundIndicator()
- Gets the default CATIndicator associated to the backGround.
- o
GetFeedbackMode()
- Returns the feedback mode.
- o
GetGlobalAmbientLight(float*,float*,float*)
- Retreives the global ambient light color.
- o
GetGraphicSize(float*,float*)
- Gets the size in pixel of the viewer.
- o
GetLightSourceReps(CAT3DLightSourceRep*&,CAT3DLightSourceRep*&)
- Gets the two CAT3DLightSourceRep associated to the viewer.
- o
GetMMInSupportUnit()
- Gets the Inverse of the size(height) of a pixel in millimeter.
- o
GetMain2DViewpoint()
- Gets the main CAT2DViewopint.
- o
GetMain3DViewpoint()
- Gets the main CAT3DViewopint.
- o
GetMainViewpoint()
- Gets the main viewpoint.
- o
GetManipulatorToActive()
- Gets the CATManipulator to activate.
- o
GetOverlayViewpoint()
- Gets the OverlayViewpoint.
- o
GetPickingOptions()
- Gets the options attached to this viewer for picking.
- o
GetSupport()
- Gets the CATSupport associated to the CATViewer.
- o
IsBackgroundGraduated()
- Gets whether or not the background is graduated.
- o
IsFullScreen()
- Gets whether or not the Viewer is in fullScreen.
- o
IsNextViewpoint()
- Gets wether or not there is a viewpoint store after the current one.
- o
IsPreviousViewpoint()
- Gets wether or not there is a viewpoint store before the current one.
- o
Pick(CATPickingStyle,CATMathPointf&,CATMathDirectionf&,float,float,float,float,CATPickPathList&,CATRepPath*,int)
- Generates a CATPickPathList corresponding to all representations laying under
the given position.
- o
Pick(CATPickingStyle,float,float,float,float,CATPickPathList&,CATRepPath*,float*,int,int)
- Generates a CATPickPathList corresponding to all representations laying under
the given position.
- o
Reframe()
- Changes the Main Viewpoint to have all the repreentations visible on screen.
- o
RemoveManipulatorToActive()
- Removes the CATManipulator to be activated.
- o
RemoveRep(CAT2DRep*)
- Removes a representation 2D from the main CAT2DViewpoint.
- o
RemoveRep(CAT3DRep*)
- Removes a representation 3D from the main CAT3DViewpoint.
- o
RemoveRepFurtive(CAT2DRep*)
- Removes a 2D furtive representation from Main 2D Viewpoint .
- o
RemoveRepFurtive(CAT3DRep*)
- Removes a 3D furtive representation from main 3D Viewpoint.
- o
RemoveReps(CAT2DRep*)
- Removes a representation 2D from the main CAT2DViewpoint.
- o
RemoveReps(CAT3DRep*)
- Removes a representation 3D from the Main CAT3DViewpoint to be visualized.
- o
RemoveRepsFurtive(CAT2DRep*)
- Removes a furtive representation from the Main 2D Viewpoint.
- o
RemoveRepsFurtive(CAT3DRep*)
- Removes a furtive representation from the main 3D Viewpoint.
- o
RemoveViewpoint(CATViewpoint*)
- Removes the viewpoint from the viewer's list.
- o
Resize(float,float)
- Resize the viewer.
- o
SaveViewpoint()
- Stores the Current MainViewpoint so that it can be restored later.
- o
SetBackgroundColor(float,float,float,int)
- Sets the background color.
- o
SetCursor(CATDialog::CATDlgCursor)
- Sets the cursor displayed when the mouse is over the viewer.
- o
SetFeedbackMode(CATBoolean)
- Sets the feedback mode.
- o
SetFullScreen(int)
- Sets the viewer's FullScreen state.
- o
SetGlobalAmbientLight(float,float,float)
- Sets the global ambient light color.
- o
SetGraduatedBackground(int)
- Sets whether or not the background is graduated.
- o
SetIndicator(CATIndicator*,CATViewerPlacement)
- Sets the current indicator.
- o
SetLightSourceReps(CAT3DLightSourceRep*,CAT3DLightSourceRep*)
- Sets the two CAT3DLightSourceRep associated to the viewer.
- o
SetMainViewpoint(CATViewpoint*)
- Sets the main viewpoint of the viewer.
- o
SetManipulatorToActive(CATManipulator*)
- Sets the CATManipulator to activate on next mouse interaction.
- o
SetViewMode(int,int)
- Sets the viewmode for viewer enclosed in the current CATSupport.
- o
UndrawElement(CATRepPath&)
- Undraws a CATRepPath if it is Furtive .
- o
UndrawElements(list<CATRepPath>&)
- Undraws a list of CATRepPath if they are Furtive .
- o
ViewMode(int)
- Returns whether or not the given mode is active.
Constructor and Destructor
o ~CATViewer
| public virtual ~CATViewer( | ) |
-
Methods
o AddRep
-
Adds a representation 2D in the main CAT2DViewpoint.
The representation will appear only at the next
CATViewer.Draw
- Parameters:
-
- iRep
- The
CAT2DRep to add
o AddRep
-
Adds a representation 3D in the Main 3D Viewpoint.
The representation will appears only at the next CATViewer::Draw
- Parameters:
-
- iRep
- The rep to Add
o AddRepFurtive
| public virtual void AddRepFurtive( | CAT2DRep* | iRep) |
-
Adds a furtive representation in the Main CAT2DViewpoint.
Role:The furtive representation will be displayed
with the XOR color. See the
DrawElement method
- Parameters:
-
- iRep
- the
CAT2DRep to add
o AddRepFurtive
| public virtual void AddRepFurtive( | CAT3DRep* | iRep) |
-
Adds a 3D furtive representation in the main CAT3DViewpoint.
- Parameters:
-
- iRep
- The 3D Rep to add
o AddViewpoint
-
Adds a new viewpoint in the Viewer's list with the highest/lowest priority.
The representations of this viewpoint will be displayed behind the other viewpoints
- Parameters:
-
- iViewpoint
- the Viewpoint to add
- iPlace
- Legal values: Foreground and Background
o CATDeclareCBEvent
| public CATDeclareCBEvent( | VIEWER_FEEDBACK_UPDATE | ) |
-
Event sent when something happens to the viewer.
Role: This event contains a
CATVisViewerFeedbackEvent class pointer to describe itself. This event is not dispatched when the end user uses the Preselection Navigator.
Sample of callback:
::AddCallback(this,
_myViewer,
CATViewer::VIEWER_FEEDBACK_UPDATE(),
(CATSubscriberMethod)&MyClass::MyCBMethod,
NULL);
o ClassId
-
Returns the class identifier for which the given object is an instance.
o DisplayNextViewpoint
| public virtual void DisplayNextViewpoint( | ) |
-
Restores the Viewpoint store after the current viepoint.
o DisplayPreviousViewpoint
| public virtual void DisplayPreviousViewpoint( | ) |
-
Restores the Viewpoint store before the current viepoint.
o Draw
| public virtual void Draw( | ) |
-
Asks for generating a new "image" displayed in the Viewer's screen.
This image is composed of all representations attached to each viewpoint.
This image is not computed immediately but as soon as possible.
o DrawElement
-
Draws a CATRepPath without redrawing the entire screen .
if the
CATRepPath is furtive. The
CATRepPath is drawn in XOR mode
- Parameters:
-
- iPath
- the CATRepPath to redraw
o DrawElements
| public virtual void DrawElements( | list<CATRepPath>& | iPaths) |
-
Draws a list of CATRepPath without redrawing the entire screen.
if the
CATRepPath is furtive. The
CATRepPath is drawn in XOR mode
- Parameters:
-
- iPaths
- the list of
CATRepPath to redraw
o End2DRemoveReps
| public virtual void End2DRemoveReps( | ) |
-
Updates the 2D viewpoint to take into account the removal of reps.
Call that method after removing many representations with RemoveReps
o End2DRemoveRepsFurtive
| public virtual void End2DRemoveRepsFurtive( | ) |
-
Updates the 2D viewpoint to take into account the removal of reps.
Call that method after removing many representations with RemoveRepsFurtive
o EndRemoveReps
| public virtual void EndRemoveReps( | ) |
-
Updates the 3D viewpoint to take into account the removal of reps.
Call that method after removing many representations with RemoveReps
o EndRemoveRepsFurtive
| public virtual void EndRemoveRepsFurtive( | ) |
-
Updates the 3D viewpoint to take into account the removal of reps.
Call that method after removing many representations with RemoveRepsFurtive
o GetBackgroundColor
| public void GetBackgroundColor( | float* | oR, |
| float* | oG, |
| float* | oB) |
-
Retreives the background color.
- Parameters:
-
- oR
- the red composant color.
- oG
- the green composant color.
- oB
- the blue composant color.
o GetCATColormap
-
Gets the CATColormMap.
- Returns:
- the CATColorMap
o GetContextualMenu
-
Gets the CATDlgContextualMenu displayed when you right click on the viewer.
o GetDefaultBackgroundIndicator
-
Gets the default CATIndicator associated to the backGround.
o GetFeedbackMode
-
Returns the feedback mode.
- Returns:
- The feedback mode.
TRUE if the feedback mode is active, FALSE otherwise.
o GetGlobalAmbientLight
| public void GetGlobalAmbientLight( | float* | oR, |
| float* | oG, |
| float* | oB) |
-
Retreives the global ambient light color.
- Parameters:
-
- oR
- the red composant color.
- oG
- the green composant color.
- oB
- the blue composant color.
o GetGraphicSize
| public void GetGraphicSize( | float* | owidth, |
| float* | oheight) const |
-
Gets the size in pixel of the viewer.
- Parameters:
-
- owidth
-
- oheight
o GetLightSourceReps
-
Gets the two CAT3DLightSourceRep associated to the viewer.
o GetMMInSupportUnit
| public float GetMMInSupportUnit( | )const |
-
Gets the Inverse of the size(height) of a pixel in millimeter.
o GetMain2DViewpoint
-
Gets the main CAT2DViewopint.
- Returns:
- the main
CAT2DViewpoint
o GetMain3DViewpoint
-
Gets the main CAT3DViewopint.
- Returns:
- the main
CAT3DViewpoint
o GetMainViewpoint
-
Gets the main viewpoint.
This viewpoint is the one being modified by local transformations
o GetManipulatorToActive
-
Gets the CATManipulator to activate.
- Returns:
- the
CATManipulator to Activate
o GetOverlayViewpoint
-
Gets the OverlayViewpoint.
Role:
This viewpoint is a
CAT2DViewpoint displayed in front of any other representation
- Returns:
- the overlay
CAT2DViewpoint
o GetPickingOptions
-
Gets the options attached to this viewer for picking.
- Returns:
- the options used for picking.
o GetSupport
-
Gets the CATSupport associated to the CATViewer.
- Returns:
- the
CATSupport
o IsBackgroundGraduated
| public int IsBackgroundGraduated( | )const |
-
Gets whether or not the background is graduated.
- Returns:
- the result of the test
o IsFullScreen
| public virtual int IsFullScreen( | )const |
-
Gets whether or not the Viewer is in fullScreen.
o IsNextViewpoint
| public virtual int IsNextViewpoint( | )const |
-
Gets wether or not there is a viewpoint store after the current one.
- Returns:
- the result of the test
o IsPreviousViewpoint
| public virtual int IsPreviousViewpoint( | )const |
-
Gets wether or not there is a viewpoint store before the current one.
- Returns:
- the result of the test
o Pick
-
Generates a CATPickPathList corresponding to all representations laying under
the given position.
- Parameters:
-
- istyle
- A CATPickingStyle specifying the way the
CATPickPathList is generated
- iorg
- The Point from wich we pick
- idir
- The direction into wich we pick
- ineard
- The distance from iorg at wich we begin to pick
- ifard
- The distance from iorg at wich we stop to pick
- oPlist
- The
CATPickPathList generated
- irepp
- The
CATRepPath we want to pick on. If this parameter is NULL, we pick on all representations
- ipick_style
- The
CATViewModeType used to do the picking
o Pick
| public void Pick( | const CATPickingStyle | istyle, |
| const float | ix, |
| const float | iy, |
| const float | idx, |
| const float | idy, |
| CATPickPathList& | oPlist, |
| CATRepPath* | irepp | = NULL, |
| const float* | ipolygon | = NULL, |
| const int | inb_point | = 0, |
| const int | ipick_style | = 0) |
-
Generates a CATPickPathList corresponding to all representations laying under
the given position.
- Parameters:
-
- istyle
- A CATPickingStyle specifying the way the
CATPickPathList is generated
- ix
- The x coordinate of the position at wich we want to pick
- iy
- The y coordinate of the position at wich we want to pick
- idx
- The width in pixel
- idy
- The height in pixel
- oPlist
- The CATPickPathList generated
- irepp
- The CATRepPath we want to pick on. If this parameter is NULL, we pick on all representations
- ipolygon
- If the CATPickingStyle is CATPickingInsidePolygon, define the polygon used for the picking
- inb_point
- If the CATPickingStyle is CATPickingInsidePolygon, define the number of points in the polygon
- ipick_style
- The
CATViewModeType used to do the picking
o Reframe
| public virtual void Reframe( | ) |
-
Changes the Main Viewpoint to have all the repreentations visible on screen.
o RemoveManipulatorToActive
| public void RemoveManipulatorToActive( | ) |
-
Removes the CATManipulator to be activated.
o RemoveRep
| public virtual void RemoveRep( | CAT2DRep* | iRep) |
-
Removes a representation 2D from the main CAT2DViewpoint.
The representation will disappear at the next
CATViewer.Draw
- Parameters:
-
- iRep
- the
CAT2DRep to remove
o RemoveRep
| public virtual void RemoveRep( | CAT3DRep* | iRep) |
-
Removes a representation 3D from the main CAT3DViewpoint.
The representation will appears at he next
CATViewer.Draw Use this method in the process of removing many representations
- Parameters:
-
- iRep
- The 3D rep to remove
o RemoveRepFurtive
| public virtual void RemoveRepFurtive( | CAT2DRep* | iRep) |
-
Removes a 2D furtive representation from Main 2D Viewpoint .
- Parameters:
-
- iRep
- the
CAT2DRep to remove
o RemoveRepFurtive
| public virtual void RemoveRepFurtive( | CAT3DRep* | iRep) |
-
Removes a 3D furtive representation from main 3D Viewpoint.
- Parameters:
-
- iRep
- The 3D Rep to remove
o RemoveReps
| public virtual void RemoveReps( | CAT2DRep* | iRep) |
-
Removes a representation 2D from the main CAT2DViewpoint.
The representation will appears at the next
CATViewer.Draw Use this method in the process of removing many representations
- Parameters:
-
- iRep
- the
CAT2DRep to remove
o RemoveReps
| public virtual void RemoveReps( | CAT3DRep* | iRep) |
-
Removes a representation 3D from the Main CAT3DViewpoint to be visualized.
The representation will appears at he next CATViewer::Draw
- Parameters:
-
- iRep
- the 3D Rep to remove
o RemoveRepsFurtive
| public virtual void RemoveRepsFurtive( | CAT2DRep* | iRep) |
-
Removes a furtive representation from the Main 2D Viewpoint.
Role:The representation will disappear at the next
CATViewer.Draw. Use this method in the process of removing many representations.
o RemoveRepsFurtive
| public virtual void RemoveRepsFurtive( | CAT3DRep* | iRep) |
-
Removes a furtive representation from the main 3D Viewpoint.
The representation will disappear at the next
CATViewer.Draw Use this method in the process of removing many representations
- Parameters:
-
- iRep
- The 3D Rep to remove
o RemoveViewpoint
-
Removes the viewpoint from the viewer's list.
- Parameters:
-
- iViewpoint
-
CATViewpoint to remove
o Resize
| public void Resize( | const float | iWidth, |
| const float | iHeight) |
-
Resize the viewer.
- Parameters:
-
- iWidth
- the new width in pixel for the viewer.
- iHeight
- the new width in pixel for the viewer.
o SaveViewpoint
| public virtual void SaveViewpoint( | ) |
-
Stores the Current MainViewpoint so that it can be restored later.
o SetBackgroundColor
| public virtual void SetBackgroundColor( | const float | iR, |
| const float | iG, |
| const float | iB, |
| const int | save | =1) |
-
Sets the background color.
- Parameters:
-
- iR
- the red composant color.
- iG
- the green composant color.
- iB
- the blue composant color.
o SetCursor
| public CATDialog::CATDlgCursor SetCursor( | CATDialog::CATDlgCursor | iCursor) |
-
Sets the cursor displayed when the mouse is over the viewer.
- Parameters:
-
- iCursor
o SetFeedbackMode
| public void SetFeedbackMode( | const CATBoolean | iOnOff | =FALSE) |
-
Sets the feedback mode.
- Parameters:
-
- iOnOff
- The feedback mode.
Legal values:
- FALSE= Off (default value), no feedback
- TRUE= On , a
CATVisViewerFeedbackEvent is sent when something appends in the viewer.
o SetFullScreen
| public virtual void SetFullScreen( | const int | iOnOff | =1) |
-
Sets the viewer's FullScreen state.
- Parameters:
-
- iOnOff
- the FullScreen mode
o SetGlobalAmbientLight
| public void SetGlobalAmbientLight( | const float | iR, |
| const float | iG, |
| const float | iB) |
-
Sets the global ambient light color.
- Parameters:
-
- iR
- the red composant color.
- iG
- the green composant color.
- iB
- the blue composant color.
o SetGraduatedBackground
| public virtual void SetGraduatedBackground( | const int | iActive) |
-
Sets whether or not the background is graduated.
- Parameters:
-
- iActive
- 0 = off.
1 = on.
o SetIndicator
-
Sets the current indicator. The Background and foreground indicator are
two uniques indicators. When you set the indicators, YOU MUST SAVE the
previous one to put yours. Then at the end of your use, you connect back
the saved one.
- Parameters:
-
- iIndic
- the
CATIndicator
- iPlace
- Placement Background or Foregroung
- Returns:
- Previous Current indicator to save.
o SetLightSourceReps
-
Sets the two CAT3DLightSourceRep associated to the viewer.
- Parameters:
-
- lightRep1
- the first light source
- lightRep2
- the second light source
o SetMainViewpoint
-
Sets the main viewpoint of the viewer.
- Parameters:
-
- viewpoint
- the viewpoint that is to be manipulated by local transformations
o SetManipulatorToActive
-
Sets the CATManipulator to activate on next mouse interaction.
- Parameters:
-
- iManip
- the
CATManipulator to activate
o SetViewMode
| public void SetViewMode( | const int | iMode, |
| const int | iActive) |
-
Sets the viewmode for viewer enclosed in the current CATSupport.
- Parameters:
-
- iMode
- The viewer mode
Legal values:
CATViewModeType
- iActive
- 0 = off.
1 = on.
o UndrawElement
-
Undraws a CATRepPath if it is Furtive .
- Parameters:
-
- iPath
- the
CATRepPath to undraw
o UndrawElements
| public virtual void UndrawElements( | list<CATRepPath>& | iPaths) |
-
Undraws a list of CATRepPath if they are Furtive .
- Parameters:
-
- iPaths
- the list of
CATRepPath to undraw
o ViewMode
| public int ViewMode( | const int | iMode) const |
-
Returns whether or not the given mode is active.
- Parameters:
-
- iMode
- the viewer mode.
Legal values:
CATViewModeType
This object is included in the file: CATViewer.h
If needed, your Imakefile.mk should include the module: CATVisualization