SALOME documentation central

VISU.View3D Interface Reference

3D view interface More...

import "VISU_Gen.idl";

Inheritance diagram for VISU.View3D:
Inheritance graph

Public Types

enum  ViewType {
  FRONT, BACK, LEFT, RIGHT,
  TOP, BOTTOM
}
enum  Axis { XAxis, YAxis, ZAxis }
typedef double XYZ [3]
enum  ViewRepresentation { OBJECTBROWSER, VIEWER, PYTHON, MESSAGES }
 

ViewRepresentation enumeration

More...
enum  ViewPosition {
  TOP, CENTER, BOTTOM, RIGHT,
  LEFT
}

Public Member Functions

void FitAll ()
void SetView (in ViewType theType)
void SetPointOfView (in XYZ theCoord)
XYZ GetPointOfView ()
void SetViewUp (in XYZ theDir)
XYZ GetViewUp ()
void SetFocalPoint (in XYZ theDir)
XYZ GetFocalPoint ()
void SetParallelScale (in double theScale)
double GetParallelScale ()
void ScaleView (in Axis theAxis, in double theParam)
void RemoveScale ()
boolean SaveViewParams (in string theName)
boolean RestoreViewParams (in string theName)
PresentationType GetPresentationType (in ScalarMap thePrs)
string SetPresentationType (in ScalarMap thePrs, in PresentationType thePrsType)
string SetQuadratic2DPresentationType (in ScalarMap thePrs, in Quadratic2DPresentationType theType)
Quadratic2DPresentationType GetQuadratic2DPresentationType (in ScalarMap thePrs)
boolean IsShrinked (in ScalarMap thePrs)
string SetShrinked (in ScalarMap thePrs, in boolean isShrinked)
boolean IsShaded (in ScalarMap thePrs)
string SetShaded (in ScalarMap thePrs, in boolean isShaded)
double GetOpacity (in ScalarMap thePrs)
string SetOpacity (in ScalarMap thePrs, in double theOpacity)
double GetLineWidth (in ScalarMap thePrs)
string SetLineWidth (in ScalarMap thePrs, in double theLineWidth)
void ShowPart (in ViewRepresentation ViewRepr, in boolean state)
boolean IsPartShown (in ViewRepresentation ViewRepr)
void SplitRight ()
 Split workarea of this view.
void SplitLeft ()
 Split workarea of this view.
void SplitBottom ()
 Split workarea of this view.
void SplitTop ()
 Split workarea of this view.
void OnTop ()
void Attract (in View theView)
void AttractAll (in View theView)
void SetRelativePositionInSplitter (in double thePosition)
void SetRelativeSizeInSplitter (in double theSize)
void SetRelativePositionX (in double thePosition)
void SetRelativePositionY (in double thePosition)
void SetRelativeSizeX (in double theSize)
void SetRelativeSizeY (in double theSize)
void SetViewWidth (in long Width)
void SetViewHeight (in long Height)
long GetViewWidth ()
long GetViewHeight ()
void SetViewPositionHorizontal (in ViewPosition ViewPosHor)
void SetViewPositionVertical (in ViewPosition ViewPosVer)
void SetRelativePosition (in double x, in double y)
void SetRelativeSize (in double x, in double y)
void Minimize ()
void Restore ()
void Maximize ()
void SetTitle (in string theTitle)
string GetTitle ()
void SetBackground (in SALOMEDS::Color theColor)
SALOMEDS::Color GetBackground ()
void EraseAll ()
void DisplayAll ()
void Erase (in PrsObject thePrsObj)
void Display (in PrsObject thePrsObj)
void DisplayOnly (in PrsObject thePrsObj)
void Update ()
boolean SavePicture (in string theFileName)
IdType GetID ()
VISUType GetType ()

Detailed Description

This interface contains a set of methods necessary for representation of objects in 3D space.


Member Typedef Documentation

typedef double VISU.View3D.XYZ[3]

Data type defining coordinates in 3D space.


Member Enumeration Documentation

This enumeration contains a set of elements determining a predefined point of view (position of the camera in 3D space relative to the presentable object).

Enumerator:
FRONT 
BACK 
LEFT 
RIGHT 
TOP 
BOTTOM 

This enumeration contains a set of elements determining the axis

Enumerator:
XAxis 
YAxis 
ZAxis 

displaying part ("ALL" isn't setable)

Enumerator:
OBJECTBROWSER 
VIEWER 
PYTHON 
MESSAGES 
enum VISU::View::ViewPosition [inherited]
Enumerator:
TOP 
CENTER 
BOTTOM 
RIGHT 
LEFT 

Member Function Documentation

void VISU.View3D.FitAll (  ) 

Makes all presentations, which are currently present in the view, completely visible.

void VISU.View3D.SetView ( in ViewType  theType  ) 

Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means a predefined position of the camera in 3D space with respect to the object which is represented.)

void VISU.View3D.SetPointOfView ( in XYZ  theCoord  ) 

Sets the position of the camera in 3D space. This point is used as the first point of the vector defining the view direction of the camera.

XYZ VISU.View3D.GetPointOfView (  ) 

Gets the position of the camera in 3D space. This point is used as the first point of the vector defining the view direction of the camera.

void VISU.View3D.SetViewUp ( in XYZ  theDir  ) 

Sets the vertical line of the camera in 3D space.

XYZ VISU.View3D.GetViewUp (  ) 

Gets the vertical line of the camera in 3D space.

void VISU.View3D.SetFocalPoint ( in XYZ  theDir  ) 

Sets the point of sight of the camera. This point is used as the second point of the vector defining the view direction of the camera.

XYZ VISU.View3D.GetFocalPoint (  ) 

Gets the point of sight of the camera. This point is used as the second point of the vector defining the view direction of the camera.

void VISU.View3D.SetParallelScale ( in double  theScale  ) 

Zooming of the presentable object. Sets the scale.

double VISU.View3D.GetParallelScale (  ) 

Zooming of the presentable object. Gets the scale.

void VISU.View3D.ScaleView ( in Axis  theAxis,
in double  theParam 
)

Scaling of the view along a definite axis.

Parameters:
theAxis The axis of the scaling
theParam The coefficient of the scaling
void VISU.View3D.RemoveScale (  ) 

Removes the scaling of the view.

boolean VISU.View3D.SaveViewParams ( in string  theName  ) 

Saves view parameters.

Returns:
True if the view parameters have been created, False if the parameters have been modified.
Parameters:
theName The name under which the view parameters will be saved.
boolean VISU.View3D.RestoreViewParams ( in string  theName  ) 

Restores view parameters.

Returns:
True if the view parameters have been found and applied to the view, False if the parameters with this name don't exist.
Parameters:
theName The name of the view parameters which will be restored.
PresentationType VISU.View3D.GetPresentationType ( in ScalarMap  thePrs  ) 

Get representation type of the given presentation in this view.

Parameters:
thePrs Object to get a representation type of.
Returns:
PresentationType Representation type of object in this view.
string VISU.View3D.SetPresentationType ( in ScalarMap  thePrs,
in PresentationType  thePrsType 
)

Set representation type of the given presentation in this view.

Parameters:
thePrs Object to set a representation type of.
thePrsType Representation type to be set to the given object.
Returns:
Empty string in case of success, error description in case of failure.
string VISU.View3D.SetQuadratic2DPresentationType ( in ScalarMap  thePrs,
in Quadratic2DPresentationType  theType 
)

Set representation type of 2D quadratic elements of the given presentation in this view.

Parameters:
thePrs Object to set a representation type of 2D quadratic elements.
theType Representation type of 2D quadratic elements to be set to the given object.
Returns:
Empty string in case of success, error description in case of failure.
Quadratic2DPresentationType VISU.View3D.GetQuadratic2DPresentationType ( in ScalarMap  thePrs  ) 

Get representation type of the 2D quadratic mesh elements of given presentation in this view.

Parameters:
thePrs Object to get a representation type of 2D quadratic mesh elements.
Returns:
Quadratic2DPresentationType Representation type of 2D quadratic mesh elements in this view.
boolean VISU.View3D.IsShrinked ( in ScalarMap  thePrs  ) 

Get shrink state of the given presentation in this view.

Parameters:
thePrs Object to get a shrink state of.
Returns:
TRUE if thePrs is shrinked in this view, FALSE overwise.
string VISU.View3D.SetShrinked ( in ScalarMap  thePrs,
in boolean  isShrinked 
)

Make the given presentation shrinked or not shrinked in this view.

Parameters:
thePrs Object to change a shrink state of.
isShrinked Pass TRUE to make thePrs shrinked, FALSE overwise.
Returns:
Empty string in case of success, error description in case of failure.
boolean VISU.View3D.IsShaded ( in ScalarMap  thePrs  ) 

Get shading state of the given presentation in this view.

Parameters:
thePrs Object to get a shading state of.
Returns:
TRUE if thePrs is shaded in this view, FALSE overwise.
string VISU.View3D.SetShaded ( in ScalarMap  thePrs,
in boolean  isShaded 
)

Make the given presentation shaded or not shaded in this view.

Parameters:
thePrs Object to set a shading state of.
isShaded Pass TRUE to make thePrs shaded, FALSE overwise.
Returns:
Empty string in case of success, error description in case of failure.
double VISU.View3D.GetOpacity ( in ScalarMap  thePrs  ) 

Get opacity of the given presentation in this view.

Parameters:
thePrs Object to get an opacity of.
Returns:
Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
string VISU.View3D.SetOpacity ( in ScalarMap  thePrs,
in double  theOpacity 
)

Set opacity of the given presentation in this view.

Parameters:
thePrs Object to set an opacity of.
theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
Returns:
Empty string in case of success, error description in case of failure.
double VISU.View3D.GetLineWidth ( in ScalarMap  thePrs  ) 

Get line width of the given presentation in this view.

Parameters:
thePrs Object to get a line width of.
Returns:
Line width of thePrs in this view.
string VISU.View3D.SetLineWidth ( in ScalarMap  thePrs,
in double  theLineWidth 
)

Set line width of the given presentation in this view.

Parameters:
thePrs Object to set a line width of.
theLineWidth Line width value. Recommended values are in range [1, 10].
Returns:
Empty string in case of success, error description in case of failure.
void VISU.View.ShowPart ( in ViewRepresentation  ViewRepr,
in boolean  state 
) [inherited]
boolean VISU.View.IsPartShown ( in ViewRepresentation  ViewRepr  )  [inherited]
void VISU.View.SplitRight (  )  [inherited]

New methods for view parameters management.

Horizontally split workarea of this view. This view is moved in a new right area.

void VISU.View.SplitLeft (  )  [inherited]

Horizontally split workarea of this view. This view stays in an old left area, others are moved in a new right area.

void VISU.View.SplitBottom (  )  [inherited]

Vertically split workarea of this view. This view is moved in a new bottom area.

void VISU.View.SplitTop (  )  [inherited]

Vertically split workarea of this view. This view stays in an old top area, others are moved in a new bottom area.

void VISU.View.OnTop (  )  [inherited]

Put this view window on top of its work area.

void VISU.View.Attract ( in View  theView  )  [inherited]

Put theView in workarea of this view right after it. If theView was alone in its workarea, workarea of theView will be destroyed. If theView was in the same workarea with this view, simple reordering will take place.

Parameters:
theView A view window to be attracted to this one.
void VISU.View.AttractAll ( in View  theView  )  [inherited]

Put all the view windows from workarea of theView in workarea of this view right after it. Workarea of theView will be destroyed. If theView was in the same workarea with this view, simple reordering will take place.

Parameters:
theView A view window to be attracted to this one together with all its workarea.
void VISU.View.SetRelativePositionInSplitter ( in double  thePosition  )  [inherited]

Set position of this view window relatively its splitter.

Parameters:
thePosition Desired position of this view window relatively its splitter. Meaningfull values lays in range [0..1].

Direction of positioning is defined by the splitter orientation.

void VISU.View.SetRelativeSizeInSplitter ( in double  theSize  )  [inherited]

Set size of this view window relatively its splitter.

Parameters:
theSize Desired size of this view window relatively its splitter. Meaningfull values lays in range [0..1].

Direction of resizing is defined by the splitter orientation.

void VISU.View.SetRelativePositionX ( in double  thePosition  )  [inherited]

Set horizontal position of this view window relatively its workstack.

Parameters:
thePosition Desired horizontal position of this view window relatively its workstack. Meaningfull values lays in range [0..1].
void VISU.View.SetRelativePositionY ( in double  thePosition  )  [inherited]

Set vertical position of this view window relatively its workstack.

Parameters:
thePosition Desired vertical position of this view window relatively its workstack. Meaningfull values lays in range [0..1].
void VISU.View.SetRelativeSizeX ( in double  theSize  )  [inherited]

Set horizontal size of this view window relatively its workstack.

Parameters:
theSize Desired horizontal size of this view window relatively its workstack. Meaningfull values lays in range [0..1].
void VISU.View.SetRelativeSizeY ( in double  theSize  )  [inherited]

Set vertical size of this view window relatively its workstack.

Parameters:
theSize Desired vertical size of this view window relatively its workstack. Meaningfull values lays in range [0..1].
void VISU.View.SetViewWidth ( in long  Width  )  [inherited]

Old methods for view parameters management, they don't work now

void VISU.View.SetViewHeight ( in long  Height  )  [inherited]
long VISU.View.GetViewWidth (  )  [inherited]
long VISU.View.GetViewHeight (  )  [inherited]
void VISU.View.SetViewPositionHorizontal ( in ViewPosition  ViewPosHor  )  [inherited]
void VISU.View.SetViewPositionVertical ( in ViewPosition  ViewPosVer  )  [inherited]
void VISU.View.SetRelativePosition ( in double  x,
in double  y 
) [inherited]
void VISU.View.SetRelativeSize ( in double  x,
in double  y 
) [inherited]
void VISU.View.Minimize (  )  [inherited]
void VISU.View.Restore (  )  [inherited]
void VISU.View.Maximize (  )  [inherited]
void VISU.View.SetTitle ( in string  theTitle  )  [inherited]

Sets the title of the View frame.

Parameters:
theTitle String parameter defining the title of the View frame.
string VISU.View.GetTitle (  )  [inherited]

Gets the title of the View frame.

void VISU.View.SetBackground ( in SALOMEDS::Color  theColor  )  [inherited]

Sets background color of the View frame.

Parameters:
theColor Background color defined in SALOMEDS.Color enumeration.
SALOMEDS::Color VISU.View.GetBackground (  )  [inherited]

Gets background color of the View frame.

void VISU.View.EraseAll (  )  [inherited]

Removes all presentations (presentable objects) from the view.

void VISU.View.DisplayAll (  )  [inherited]

Displays all presentations (presentable objects) in the view.

void VISU.View.Erase ( in PrsObject  thePrsObj  )  [inherited]

Removes a definite presentation (presentable object) from the view.

Parameters:
thePrsObj The presentation (presentable object) which should be deleted.
void VISU.View.Display ( in PrsObject  thePrsObj  )  [inherited]

Displays a definite presentation (presentable object) in the view.

Parameters:
thePrsObj The presentation (presentable object) which should be displayed.
void VISU.View.DisplayOnly ( in PrsObject  thePrsObj  )  [inherited]

Allows to display only a definite presentation (presentable object) in the view. All other presentations are removed from the view.

Parameters:
thePrsObj The presentation (presentable object) which should be displayed.
void VISU.View.Update (  )  [inherited]

Updates the view.

boolean VISU.View.SavePicture ( in string  theFileName  )  [inherited]

Saves the view.

Parameters:
theFileName The name of the file where the view will be saved.
Returns:
True, if the view have been saved successfully.
IdType VISU.Base.GetID (  )  [inherited]

Returns ID of the object.

VISUType VISU.Base.GetType (  )  [inherited]

Returns the type of the presentable object

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator

Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS