v_sim.GlWindow

Fields

Name

Type

Access

Description

bottom

float

r/w

the bottom of the viewport on y axis ;

extens

float

r/w

additional length to add to length0 to obtain the global viewable area.

far

float

r/w

the end of the viewport on z axis (z for observer) ;

height

int

r/w

the height of the window ;

left

float

r/w

the left of the viewport on x axis ;

near

float

r/w

the beginning of the viewport on z axis (z for observer) ;

right

float

r/w

the right of the viewport on x axis ;

top

float

r/w

the top of the viewport on y axis ;

unit

v_sim.Units

r/w

the v_sim.Units of extens.

width

int

r/w

the width of the window ;

Methods

getAddLength (unit)

getFileUnitPerPixel ()

setAddLength (value, unit)

setViewport (width, height)

Details

class v_sim.GlWindow

Values to describe the window where the render is done.

getAddLength(unit)
Parameters:

unit (v_sim.Units or None) – a location for the unit of the returned value.

Returns:

the additional length to be added to the camera object size to obtain the full viewable area.

Return type:

float

The viewable area is defined by the v_sim.GlCamera size, as set by v_sim.GlCamera.setRefLength() and by additional space setup by v_sim.GlWindow.setAddLength().

New in version 3.7.

getFileUnitPerPixel()
Returns:

how much of a unit of file is in a pixel.

Return type:

float

This method is used to know the ratio of a pixel with the unit of the file. WARNING : this method is valid only when the camera is position at infinity.

setAddLength(value, unit)
Parameters:
  • value (float) – a float value (positive).

  • unit (v_sim.Units) – the unit of value.

Returns:

True if the value is indeed changed.

Return type:

bool

The viewable area is defined by the v_sim.GlCamera size, as set by v_sim.GlCamera.setRefLength() and by additional space setup by this routine.

New in version 3.7.

setViewport(width, height)
Parameters:
  • width (int) – the new horizontal size ;

  • height (int) – the new vertical size.

Returns:

True the size of self is actually changed.

Return type:

bool

It changes the size of the OpenGl area and reccompute the OpenGL viewport.