All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VisualizationBase Class CAT3DViewpoint

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---VisualizationBase.CATViewpoint
          |
          +---CAT3DViewpoint
 

Usage: you must use this class as is. You should never derive it.


public class CAT3DViewpoint

Class that represents the way the 3D scene is seen.


Constructor and Destructor Index


o CAT3DViewpoint()
Creates a non-initialized viewpoint.
o CAT3DViewpoint(CAT3DViewpoint&)
Creates a new viewpoint by copying geometrical values.
o CAT3DViewpoint(CATMathPointf&,CATMathDirectionf&,CATMathDirectionf&,float,float,CATProjectionType,float)
Creates a new viewpoint from its main characteristics.

Method Index


o AddFurtiveRep(CAT3DRep*)
Adds a furtive representation in the scene the observator may seen.
o AddRep(CAT3DRep*)
Adds a representation in the scene the observator may seen.
o ComputeModelFromPixel(float,float,CATMathPointf&,CATMathPointf&,float,float,float,float)
Computes the line of indication from a pixel position on the window.
o GetBoundingSphere()
Gets the bounding sphere of all non-furtive representation of the scene.
o GetFocusDistance()
Gets the focus distance.
o GetGravityDirection()
Sets the gravity direction.
o GetGravityMode()
Gets the gravity mode .
o GetOrigin()
Gets viewpoint eye position.
o GetProjectionType()
Gets the type of projection on the window.
o GetSightDirection()
Gets viewpoint sight.
o GetTarget()
Gets the target location.
o GetUpDirection()
Gets viewpoint up.
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 Reframe(float,float,float,float,CAT3DBoundingSphere&)
Reframes the model in the window.
o RemoveFurtiveRep(CAT3DRep*)
Removes the representation from the furtive list.
o RemoveRep(CAT3DRep*)
Removes the representation from the furtive list.
o Set(CATMathPointf&,CATMathDirectionf&,CATMathDirectionf&)
Sets viewpoint location (main characteristics).
o SetFocus(float&)
Sets the focus distance.
o SetGravityDirection(CATMathDirectionf&)
Sets the gravity direction.
o SetGravityMode(CATViewpointGravityMode)
Sets the gravity mode .
o SetOrigin(CATMathPointf&)
Sets viewpoint eye position.
o SetProjectionType(CATProjectionType)
Sets the type of projection.
o SetSightDirection(CATMathDirectionf&)
Sets viewpoint sight.
o SetTarget(CATMathPointf&)
Sets the Target.
o SetUpDirection(CATMathDirectionf&)
Sets viewpoint up.
o operator =(CAT3DViewpoint&)
Copies the geometric definition of a CAT3DViewpoint.

Constructor and Destructor


o CAT3DViewpoint
public CAT3DViewpoint()
Creates a non-initialized viewpoint.
At the first display (when the viewer will appears) a reframe will automatically been done on the viewpoint.
o CAT3DViewpoint
public CAT3DViewpoint( const CAT3DViewpoint& )
Creates a new viewpoint by copying geometrical values.
o CAT3DViewpoint
public CAT3DViewpoint( const CATMathPointf& iEye,
const CATMathDirectionf& iSight,
const CATMathDirectionf& iUp,
const float iNearDistance=1.0,
const float iFarDistance=10000,
CATProjectionType iProjectionType=CONIC,
const float iFocusDistance=0)
Creates a new viewpoint from its main characteristics.
Parameters:
iEye
Position of the Eye
iSight
Sight Direction (Direction where the observator looks at)
iUp
Up direction (Direction of the observator head's top)
iNearDistance
Distance from the Eye to the near clipping plane
iFarDistance
Distance from the Eye to the far clipping plane
iProjectionType
The Projection type
  • CONIC
  • CYLINDRIC
iFocusDistance
The distance from the Eye to the target

Methods


o AddFurtiveRep
public void AddFurtiveRep(CAT3DRep* 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 3D
o AddRep
public void AddRep(CAT3DRep* iRep)
Adds a representation in the scene the observator may seen.
Parameters:
iRep
Representation 3D
o ComputeModelFromPixel
public virtual void ComputeModelFromPixel( const float iX,
const float iY,
CATMathPointf& oNearPoint,
CATMathPointf& oFarPoint,
const float iWidth,
const float iHeight,
const float mmInSupportUnit,
const float ratioWH)
Computes the line of indication from a pixel position on the window.
Parameters:
iX
Position in X of the point (pixel coordinates : x=0 left window)
iY
Position in Y of the point (pixel coordinates : y=0 top of window)
oNearPoint
Returns the nearest point (seen) of the line
oFarPoint
Returns the farest point (seen) of the line
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 GetBoundingSphere
public CAT3DBoundingSphere GetBoundingSphere()
Gets the bounding sphere of all non-furtive representation of the scene.
Returns:
CAT3DBoundingSphere
o GetFocusDistance
public virtual inline float GetFocusDistance()const
Gets the focus distance.
Returns:
The distance from the Eye to the target.
o GetGravityDirection
public virtual const CATMathDirectionf & GetGravityDirection()const
Sets the gravity direction.
Returns:
Direction in model coordinates, positive towards the up.
o GetGravityMode
public virtual inline CATViewpointGravityMode GetGravityMode()const
Gets the gravity mode .
o GetOrigin
public virtual inline const CATMathPointf & GetOrigin()const
Gets viewpoint eye position.
Returns:
The Position of the Eye
o GetProjectionType
public inline CATProjectionType GetProjectionType()const
Gets the type of projection on the window.
o GetSightDirection
public virtual inline const CATMathDirectionf & GetSightDirection()const
Gets viewpoint sight.
Returns:
Sight Direction (Direction where the observator looks at)
o GetTarget
public virtual inline CATMathPointf GetTarget()const
Gets the target location.
Role:The target is the point situated a a Focus distance from the eye of the viewpoint in the sight direction. This point can be also called focal point.
Returns:
Target point
o GetUpDirection
public virtual inline const CATMathDirectionf & GetUpDirection()const
Gets viewpoint up.
Returns:
Up direction (Direction of the observator head's top)
o Is3D
public virtual CATBoolean Is3D()
Retrieves whether viewpoint is a three dimensional one or not.
Returns:
The value is always TRUE.
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 Reframe
public virtual void Reframe( const float iWidth,
const float iHeight,
const float mmInSupportUnit,
const float ratioWH,
const CAT3DBoundingSphere& iBs3D)
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
iBs3D
CAT3DBoundingSphere we want to fit on the specified position
o RemoveFurtiveRep
public void RemoveFurtiveRep(CAT3DRep* iRep)
Removes the representation from the furtive list.
Parameters:
iRep
Representation 3D
o RemoveRep
public void RemoveRep(CAT3DRep* iRep)
Removes the representation from the furtive list.
Parameters:
iRep
Representation 3D
o Set
public virtual void Set( const CATMathPointf& iEye,
const CATMathDirectionf& iSight,
const CATMathDirectionf& iUp)
Sets viewpoint location (main characteristics).
Parameters:
iEye
Position of the Eye
iSight
Sight Direction (Direction where the observator looks at)
iUp
Up direction (Direction of the observator head's top)
o SetFocus
public virtual void SetFocus( const float& )
Sets the focus distance.
Parameters:
iFocusDistance
The distance from the Eye to the target
o SetGravityDirection
public virtual void SetGravityDirection( const CATMathDirectionf& iDirection)
Sets the gravity direction.
Parameters:
iDirection
Direction in model coordinates, positive towards the up.
o SetGravityMode
public virtual void SetGravityMode( const CATViewpointGravityMode iGravityMode)
Sets the gravity mode .
Parameters:
iGravityMode
o SetOrigin
public virtual void SetOrigin( const CATMathPointf& iEye)
Sets viewpoint eye position.
Parameters:
iEye
Position of the Eye
o SetProjectionType
public void SetProjectionType(CATProjectionType iType)
Sets the type of projection.
o SetSightDirection
public virtual void SetSightDirection( const CATMathDirectionf& iSight)
Sets viewpoint sight.
Parameters:
iSight
Sight Direction (Direction where the observator looks at)
o SetTarget
public virtual void SetTarget( const CATMathPointf& iTargetPosition)
Sets the Target.
Role:It changes the focus (CONIC proj type) or the origin (CYLINDRIC). Sight direction stays invariant.
o SetUpDirection
public virtual void SetUpDirection( const CATMathDirectionf& iUp)
Sets viewpoint up.
Parameters:
iUp
Up direction (Direction of the observator head's top)
o operator =
public CAT3DViewpoint & operator =( const CAT3DViewpoint& )
Copies the geometric definition of a CAT3DViewpoint.

This object is included in the file: CAT3DViewpoint.h
If needed, your Imakefile.mk should include the module: CATViz

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