MeshLib Python Docs
Loading...
Searching...
No Matches
meshlib.mrviewerpy.Viewport Class Reference

Public Member Functions

None cameraLookAlong (self, meshlib.mrmeshpy.Vector3f dir, meshlib.mrmeshpy.Vector3f up)
 
None cameraRotateAround (self, meshlib.mrmeshpy.Line3f axis, float angle)
 
meshlib.mrmeshpy.Vector3f projectToViewportSpace (self, meshlib.mrmeshpy.Vector3f arg0)
 
meshlib.mrmeshpy.ViewportId id (self)
 

Detailed Description

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.

Member Function Documentation

◆ cameraLookAlong()

None meshlib.mrviewerpy.Viewport.cameraLookAlong ( self,
meshlib.mrmeshpy.Vector3f dir,
meshlib.mrmeshpy.Vector3f 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 meshlib.mrviewerpy.Viewport.cameraRotateAround ( self,
meshlib.mrmeshpy.Line3f 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.ViewportId meshlib.mrviewerpy.Viewport.id ( self)

◆ projectToViewportSpace()

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

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