VisualizationFoundation 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,CATMathPoint&,CATMathPoint&,float,float,float,float)
Computes the line of indication from a pixel position on the window.
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 GetEyePosition()
Gets viewpoint eye position.
o GetFocusDistance()
Gets the focus distance.
o GetGravityDirection()
Sets the gravity direction.
o GetGravityMode()
Gets the gravity mode .
o GetOrigin()
o GetProjectionType()
Gets the type of projection on the window.
o GetSightDirection()
Gets viewpoint sight.
o GetTarget()
o GetTargetPosition()
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(CATMathPoint&,CATMathDirectionf&,CATMathDirectionf&)
Sets viewpoint location (main characteristics).
o Set(CATMathPointf&,CATMathDirectionf&,CATMathDirectionf&)
o SetAddToDialogFlag(unsigned int)
Allow to add or remove rep in the dialog bag.
o SetEyePosition(CATMathPoint&)
Sets viewpoint eye position.
o SetFocus(float&)
Sets the focus distance.
o SetGravityDirection(CATMathDirectionf&)
Sets the gravity direction.
o SetGravityMode(CATViewpointGravityMode)
Sets the gravity mode .
o SetOrigin(CATMathPointf&)
o SetProjectionType(CATProjectionType)
Sets the type of projection.
o SetSightDirection(CATMathDirectionf&)
Sets viewpoint sight.
o SetTarget(CATMathPointf&)
o SetTargetPosition(CATMathPoint&)
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 )
Creates a new viewpoint by copying geometrical values.
o CAT3DViewpoint
public CAT3DViewpoint( const iEye,
const iSight,
const iUp,
const iNearDistance=1.0,
const iFarDistance=10000,
iProjectionType=CONIC,
const 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 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 3D
o AddRep
public AddRep( iRep)
Adds a representation in the scene the observator may seen.
Parameters:
iRep
Representation 3D
o ComputeModelFromPixel
public virtual ComputeModelFromPixel( const iX,
const iY,
oNearPoint,
oFarPoint,
const iWidth,
const iHeight,
const mmInSupportUnit,
const 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 ComputeModelFromPixel
public virtual ComputeModelFromPixel( const iX,
const iY,
oNearPoint,
oFarPoint,
const iWidth,
const iHeight,
const mmInSupportUnit,
const 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 GetBoundingSphere()
Gets the bounding sphere of all non-furtive representation of the scene.
Returns:
CAT3DBoundingSphere
o GetEyePosition
public virtual GetEyePosition()
Gets viewpoint eye position.
Returns:
The Position of the Eye
o GetFocusDistance
public virtual GetFocusDistance()
Gets the focus distance.
Returns:
The distance from the Eye to the target.
o GetGravityDirection
public virtual GetGravityDirection()
Sets the gravity direction.
Returns:
Direction in model coordinates, positive towards the up.
o GetGravityMode
public virtual GetGravityMode()
Gets the gravity mode .
o GetOrigin
public virtual GetOrigin()
Deprecated:
R216 In favor of CATMathPoint & GetEyePosition() Gets viewpoint eye position.
Returns:
The Position of the Eye
o GetProjectionType
public GetProjectionType()
Gets the type of projection on the window.
o GetSightDirection
public virtual GetSightDirection()
Gets viewpoint sight.
Returns:
Sight Direction (Direction where the observator looks at)
o GetTarget
public virtual GetTarget()
Deprecated:
R216 In favor of CATMathPoint GetTargetPosition 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 GetTargetPosition
public virtual GetTargetPosition()
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 GetUpDirection()
Gets viewpoint up.
Returns:
Up direction (Direction of the observator head's top)
o Is3D
public virtual Is3D()
Retrieves whether viewpoint is a three dimensional one or not.
Returns:
The value is always TRUE.
o Reframe
public virtual Reframe( const iWidth,
const iHeight,
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 Reframe
public virtual Reframe( const iWidth,
const iHeight,
const mmInSupportUnit,
const ratioWH,
const 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 RemoveFurtiveRep( iRep)
Removes the representation from the furtive list.
Parameters:
iRep
Representation 3D
o RemoveRep
public RemoveRep( iRep)
Removes the representation from the furtive list.
Parameters:
iRep
Representation 3D
o Set
public virtual Set( const iEye,
const iSight,
const 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 Set
public virtual Set( const iEye,
const iSight,
const iUp)
Deprecated:
R216 In favor of void Set( const CATMathPoint &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 SetAddToDialogFlag
public SetAddToDialogFlag( i_onOffFlag)
Allow to add or remove rep in the dialog bag.
Parameters:
i_onOffFlag
: switch the mode indialog mode
o SetEyePosition
public virtual SetEyePosition( const iEye)
Sets viewpoint eye position.
Parameters:
iEye
Position of the Eye
o SetFocus
public virtual SetFocus( const )
Sets the focus distance.
Parameters:
iFocusDistance
The distance from the Eye to the target
o SetGravityDirection
public virtual SetGravityDirection( const iDirection)
Sets the gravity direction.
Parameters:
iDirection
Direction in model coordinates, positive towards the up.
o SetGravityMode
public virtual SetGravityMode( const iGravity)
Sets the gravity mode .
Parameters:
iGravityMode
o SetOrigin
public virtual SetOrigin( const iEye)
Deprecated:
R216 In favor of SetEyePosition (const CATMathPoint &iEye) Sets viewpoint eye position.
Parameters:
iEye
Position of the Eye
o SetProjectionType
public SetProjectionType( iType)
Sets the type of projection.
o SetSightDirection
public virtual SetSightDirection( const iSight)
Sets viewpoint sight.
Parameters:
iSight
Sight Direction (Direction where the observator looks at)
o SetTarget
public virtual SetTarget( const iTargetPosition)
Deprecated:
R216 In favor of SetTargetPosition (const CATMathPoint &iTargetPosition) Sets the Target.
Role:It changes the focus (CONIC proj type) or the origin (CYLINDRIC). Sight direction stays invariant.
o SetTargetPosition
public virtual SetTargetPosition( const iTargetPosition)
Sets the Target.
Role:It changes the focus (CONIC proj type) or the origin (CYLINDRIC). Sight direction stays invariant.
o SetUpDirection
public virtual SetUpDirection( const iUp)
Sets viewpoint up.
Parameters:
iUp
Up direction (Direction of the observator head's top)
o operator =
public operator =( const )
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: CATVisFoundation

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.