MeshLib Python Docs
Loading...
Searching...
No Matches
mrviewerpy.ConstViewport Class Reference
Inheritance diagram for mrviewerpy.ConstViewport:

Public Member Functions

 __init__ (self, *args, **kwargs)
None cameraLookAlong (self, meshlib.mrmeshpy.ConstVector3f dir, meshlib.mrmeshpy.ConstVector3f up)
None cameraRotateAround (self, meshlib.mrmeshpy.ConstLine3f axis, float angle)
meshlib.mrmeshpy.Vector3f projectToViewportSpace (self, meshlib.mrmeshpy.ConstVector3f input)
meshlib.mrmeshpy.ConstViewportId id (self)

Static Protected Attributes

typing _offsetof_id = 0

Detailed Description

Generated from:  MR::PythonViewer::Viewport

Viewport is a rectangular area, in which the objects of interest are going to be rendered.
An application can have a number of viewports each with its own ID.

Constructor & Destructor Documentation

◆ __init__()

mrviewerpy.ConstViewport.__init__ ( self,
* args,
** kwargs )
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: meshlib.mrviewerpy.ConstViewport, id: meshlib.mrmeshpy.ConstViewportId) -> None

2. __init__(self: meshlib.mrviewerpy.ConstViewport, arg0: meshlib.mrviewerpy.ConstViewport) -> None

Implicit copy constructor.

3. __init__(self: meshlib.mrviewerpy.ConstViewport, : meshlib.mrviewerpy.ConstViewport) -> None

Member Function Documentation

◆ cameraLookAlong()

None mrviewerpy.ConstViewport.cameraLookAlong ( self,
meshlib.mrmeshpy.ConstVector3f dir,
meshlib.mrmeshpy.ConstVector3f up )
Set camera look direction and up direction (they should be perpendicular)
this function changes camera position and do not change camera spot (0,0,0) by default
to change camera position use setCameraTranslation after this function

◆ cameraRotateAround()

None mrviewerpy.ConstViewport.cameraRotateAround ( self,
meshlib.mrmeshpy.ConstLine3f axis,
float angle )
Rotates camera around axis +direction applied to axis point
note: this can make camera clip objects (as far as distance to scene center is not fixed)

◆ id()

meshlib.mrmeshpy.ConstViewportId mrviewerpy.ConstViewport.id ( self)

◆ projectToViewportSpace()

meshlib.mrmeshpy.Vector3f mrviewerpy.ConstViewport.projectToViewportSpace ( self,
meshlib.mrmeshpy.ConstVector3f input )
Project world space point to viewport coordinates (in pixels), (0,0) will be at the top-left corner of the viewport.

Member Data Documentation

◆ _offsetof_id

typing mrviewerpy.ConstViewport._offsetof_id = 0
staticprotected

The documentation for this class was generated from the following file: