All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VisualizationBase Class CAT2DViewpoint

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---VisualizationBase.CATViewpoint
          |
          +---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
public 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 CAT2DViewpoint& iViewpoint)
Creates a new viewpoint by copying geometrical values.
o CAT2DViewpoint
public CAT2DViewpoint( const CATMathPoint2Df& iEye,
const float 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 void AddFurtiveRep(CAT2DRep* 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
public void AddRep(CAT2DRep* iRep)
Adds a representation in the scene the observator may seen.
Parameters:
iRep
Representation 2D
o ComputeModelFromPixel
public virtual void ComputeModelFromPixel( const float x,
const float y,
CATMathPointf& neard,
CATMathPointf& fard,
const float width,
const float height,
const float mmInSupportUnit,
const float 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 void ComputeModelFromPixel( const float iXPixel,
const float iYPixel,
float& oXModel,
float& oYModel,
const float& width,
const float& height,
const float& mmInSupportUnit,
const float& 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
public Anchor GetAnchor()
Gets the Anchor type.
o GetDepth
public int GetDepth()const
Gets the Depth mode.
Returns:
The Depth mode.
o GetOrigin
public CATMathPoint2Df GetOrigin()const
Gets the origin.
Returns:
The eye position.
o GetTranslationBounds
public virtual int GetTranslationBounds(float& XMinModel,
float& XMaxModel,
float& YMinModel,
float& YMaxModel) const
Gets the limits between which the viewpoint can move.
o GetZoomType
public virtual CATViewpointZoomType GetZoomType()const
Gets the zoom type.
o Is3D
public virtual CATBoolean Is3D()
Retrieves whether viewpoint is a three dimensional one or not.
Returns:
The value is always FALSE.
o Reframe
public virtual void Reframe( const float iWidth,
const float iHeight,
const float mmInSupportUnit,
const float 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 void ReframeOn( const float& XMinModel,
const float& XMaxModel,
const float& YMinModel,
const float& YMaxModel,
const float& width,
const float& height,
const float& mmInSupportUnit,
const float& 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 void RemoveFurtiveRep(CAT2DRep* iRep)
Removes the representation from the furtive list.
Parameters:
iRep
Representation 2D
o RemoveRep
public void RemoveRep(CAT2DRep* iRep)
Removes the representation from the furtive list.
Parameters:
iRep
Representation 2D
o SetAnchor
public void SetAnchor( const Anchor iAnchor)
Sets the Anchor type.
Parameters:
iAnchor
Usually Center or UpLeft
o SetDepth
public void SetDepth( const int 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
CATGraphicAttributeSet.GetPriority method.
o SetOrigin
public virtual void SetOrigin( const CATMathPoint2Df& iEye)
Sets the origin.
Parameters:
iEye
The eye posision
o SetTranslationBounds
public virtual void SetTranslationBounds( const float XMinModel=-1.e+10,
const float XMaxModel=1.e+10,
const float YMinModel=-1.e+10,
const float YMaxModel=1.e+10)
Sets the limits between which the viewpoint can move.
o SetZoom
public void SetZoom( const float& iZoom)
Sets the zoom value.
Parameters:
iZoom
Value meaning depends of the zoom type.
o SetZoomType
public virtual void SetZoomType( const CATViewpointZoomType iZoomType)
Sets the zoom type.
Parameters:
iZoomType
The zoom type
o operator *=
public CAT2DViewpoint & operator *=( const CAT3x3Matrix& iMatrix)
Applies a geometic transformation to the viewpoint. That transformation is defined by the CAT3x3matrix
o operator =
public CAT2DViewpoint & operator =( const CAT2DViewpoint& 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: CATViz

Copyright © 2003, Dassault Systèmes. All rights reserved.