VisualizationFoundation CAT2DViewpoint
Usage: you must use this class as is. You should never derive it.
public class CAT2DViewpoint
Class that represents the way the 2D scene is seen.
Role:
A 2D viewpoint describes a list of 2D representations of a scene
seen by an observer position (point-of-view) through a
viewer's graphic window.
Constructor and Destructor Index
- o
CAT2DViewpoint()
- Creates a non-initialized viewpoint.
- o
CAT2DViewpoint(CAT2DViewpoint&)
- Creates a new viewpoint by copying geometrical values.
- o
CAT2DViewpoint(CATMathPoint2Df&,float)
- Creates a new viewpoint with main characteristics.
- o
~CAT2DViewpoint()
-
Method Index
- o
AddFurtiveRep(CAT2DRep*)
- Adds a furtive representation in the scene the observator may seen.
- o
AddRep(CAT2DRep*)
- Adds a representation in the scene the observator may seen.
- o
ComputeModelFromPixel(float,float,CATMathPointf&,CATMathPointf&,float,float,float,float)
- Computes the point laying under a given pixel position.
- o
ComputeModelFromPixel(float,float,float&,float&,float&,float&,float&,float&)
- Computes the point laying under a given pixel position.
- o
GetAnchor()
- Gets the Anchor type.
- o
GetDepth()
- Gets the Depth mode.
- o
GetOrigin()
- Gets the origin.
- o
GetTranslationBounds(float&,float&,float&,float&)
- Gets the limits between which the viewpoint can move.
- o
GetZoomType()
- Gets the zoom type.
- o
Is3D()
- Retrieves whether viewpoint is a three dimensional one or not.
- o
Reframe(float,float,float,float)
- Reframes the model in the window.
- o
ReframeOn(float&,float&,float&,float&,float&,float&,float&,float&)
- Reframes the model in the window.
- o
RemoveFurtiveRep(CAT2DRep*)
- Removes the representation from the furtive list.
- o
RemoveRep(CAT2DRep*)
- Removes the representation from the furtive list.
- o
SetAnchor(Anchor)
- Sets the Anchor type.
- o
SetDepth(int)
- Sets the Depth mode.
- o
SetOrigin(CATMathPoint2Df&)
- Sets the origin.
- o
SetTranslationBounds(float,float,float,float)
- Sets the limits between which the viewpoint can move.
- o
SetZoom(float&)
- Sets the zoom value.
- o
SetZoomType(CATViewpointZoomType)
- Sets the zoom type.
- o
operator *=(CAT3x3Matrix&)
- Applies a geometic transformation to the viewpoint.
- o
operator =(CAT2DViewpoint&)
- Copies the geometric definition of a CAT3DViewpoint.
Enumerated Type Index
- o
Anchor
- Anchor types.
Constructor and Destructor
o CAT2DViewpoint
-
Creates a non-initialized viewpoint.
Role:At the first display (when the viewer will appear)
a reframe will automatically been done on the viewpoint.
o CAT2DViewpoint
public CAT2DViewpoint( | const | iViewpoint) |
-
Creates a new viewpoint by copying geometrical values.
- Eye position and orientation (Origin, Zoom, ZoomType)
- Dynamic behaviour (Anchor, Bounds)
o CAT2DViewpoint
public CAT2DViewpoint( | const | iEye, |
| const | iZoom | =1.) |
-
Creates a new viewpoint with main characteristics.
- Parameters:
-
- iEye
- Position of the Eye
- iZoom
- Zoom factor)
o ~CAT2DViewpoint
public virtual ~CAT2DViewpoint( | ) |
-
Methods
o AddFurtiveRep
public AddFurtiveRep( | | iRep) |
-
Adds a furtive representation in the scene the observator may seen.
Pixels of Furtive representations may not be in the expected color but can
be displayed and hidden without re-drawind the whole scene. Must be used for
temporary displays
- Parameters:
-
- iRep
- Representation 2D
o AddRep
-
Adds a representation in the scene the observator may seen.
- Parameters:
-
- iRep
- Representation 2D
o ComputeModelFromPixel
public virtual ComputeModelFromPixel( | const | x, |
| const | y, |
| | neard, |
| | fard, |
| const | width, |
| const | height, |
| const | mmInSupportUnit, |
| const | ratioWH) |
-
Computes the point laying under a given pixel position.
- Parameters:
-
- x
- Position in X of the point
- y
- Position in Y of the point
- neard
- Nearest point in the viewpoint under the given position
- fard
- farest point in the viewpoint under the given position
- width
- Width in pixels of the window
- height
- Height in pixels of the window
- mmInSupportunit
- Inverse of the size(height) of a pixel in millimeter
- ratioWH
- Ratio Height of a pixel / Width of a pixel
The neard and fard CATMathPointf are 3D point. Ignore the z coordinate.
o ComputeModelFromPixel
public ComputeModelFromPixel( | const | iXPixel, |
| const | iYPixel, |
| | oXModel, |
| | oYModel, |
| const | width, |
| const | height, |
| const | mmInSupportUnit, |
| const | ratioWH) |
-
Computes the point laying under a given pixel position.
- Parameters:
-
- iXPixel
- Position in X of the point
- iYPixel
- Position in Y of the point
- oXModel
- X coordinate of the model point nder the given position
- oYModel
- Y coordinate of the model point nder the given position
- width
- Width in pixels of the window
- height
- Height in pixels of the window
- mmInSupportunit
- Inverse of the size(height) of a pixel in millimeter
- ratioWH
- Ratio Height of a pixel / Width of a pixel
o GetAnchor
-
Gets the Anchor type.
o GetDepth
-
Gets the Depth mode.
- Returns:
- The Depth mode.
o GetOrigin
-
Gets the origin.
- Returns:
- The eye position.
o GetTranslationBounds
public virtual GetTranslationBounds( | | XMinModel, |
| | XMaxModel, |
| | YMinModel, |
| | YMaxModel) |
-
Gets the limits between which the viewpoint can move.
o GetZoomType
public virtual GetZoomType( | ) |
-
Gets the zoom type.
o Is3D
-
Retrieves whether viewpoint is a three dimensional one or not.
- Returns:
- The value is always FALSE.
o Reframe
public virtual Reframe( | const | width, |
| const | height, |
| const | mmInSupportUnit, |
| const | ratioWH) |
-
Reframes the model in the window.
- Parameters:
-
- iWidth
- Wight of the window (in pixel)
- iHeight
- Height of the window (in pixel)
- mmInSupportUnit
- Inverse of the size(height) of a pixel in millimeter
- ratioWH
- Ratio Height of a pixel / Width of a pixel
o ReframeOn
public virtual ReframeOn( | const | XMinModel, |
| const | XMaxModel, |
| const | YMinModel, |
| const | YMaxModel, |
| const | width, |
| const | height, |
| const | mmInSupportUnit, |
| const | ratioWH) |
-
Reframes the model in the window.
- Parameters:
-
- XMinModel
- Leftmost coordinate to be seen
- XMaxModel
- Rightmost coordinate to be seen
- YMinModel
- Bottommost coordinate to be seen
- YMaxModel
- Topmost corrrdinate to be seen
- width
- Wight of the window (in pixel)
- height
- Height of the window (in pixel)
- mmInSupportUnit
- Inverse of the size(height) of a pixel in millimeter
- ratioWH
- Ratio Height of a pixel / Width of a pixel
o RemoveFurtiveRep
public RemoveFurtiveRep( | | iRep) |
-
Removes the representation from the furtive list.
- Parameters:
-
- iRep
- Representation 2D
o RemoveRep
-
Removes the representation from the furtive list.
- Parameters:
-
- iRep
- Representation 2D
o SetAnchor
public SetAnchor( | const | iAnchor) |
-
Sets the Anchor type.
- Parameters:
-
- iAnchor
- Usually Center or UpLeft
o SetDepth
public SetDepth( | const | iDepthMode) |
-
Sets the Depth mode.
- Parameters:
-
- iDepthMode
- The Depth mode
Legal values:
- 1 the draw priority is the same as the selection priority
- 0 otherwise (default value)
.
The priority of each element attached to the viewpoint is retrieval
with the
method.
o SetOrigin
public virtual SetOrigin( | const | iEye) |
-
Sets the origin.
- Parameters:
-
- iEye
- The eye posision
o SetTranslationBounds
public virtual SetTranslationBounds( | const | XMinModel | =-1.e+10, |
| const | XMaxModel | =1.e+10, |
| const | YMinModel | =-1.e+10, |
| const | YMaxModel | =1.e+10) |
-
Sets the limits between which the viewpoint can move.
o SetZoom
public SetZoom( | const | iZoom) |
-
Sets the zoom value.
- Parameters:
-
- iZoom
- Value meaning depends of the zoom type.
o SetZoomType
public virtual SetZoomType( | const | iZoomType) |
-
Sets the zoom type.
- Parameters:
-
- iZoomType
- The zoom type
o operator *=
public operator *=( | const | iMatrix) |
-
Applies a geometic transformation to the viewpoint.
That transformation is defined by the CAT3x3matrix
o operator =
public operator =( | const | iViewpoint) |
-
Copies the geometric definition of a CAT3DViewpoint.
Enumerated Types
o Anchor
-
enum Anchor {
UpLeft,
Up,
UpRight,
Left,
Center,
Right,
DownLeft,
Down,
DownRight
}
Anchor types.
Role:The anchor type gives the location in the window
where the origin is projected. When zooming, this point will stay
invariant.
This object is included in the file: CAT2DViewpoint.h
If needed, your Imakefile.mk should include the module: CATVisFoundation
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.