Model.viewset#

Model.viewset(a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23, a30, a31, a32, a33, minx, miny, maxx, maxy)#

Sets the model orientation and visible area. The values a00-a33 define the view. The current values of a00-a33 can be queried using Model.hm_getcurrentview().

Parameters:
  • a00 (double) – The (1,1) element in 4x4 matrix that is used to define the the view.

  • a01 (double) – The (1,2) element in 4x4 matrix that is used to define the the view.

  • a02 (double) – The (1,3) element in 4x4 matrix that is used to define the the view.

  • a03 (double) – The (1,4) element in 4x4 matrix that is used to define the the view.

  • a10 (double) – The (2,1) element in 4x4 matrix that is used to define the the view.

  • a11 (double) – The (2,2) element in 4x4 matrix that is used to define the the view.

  • a12 (double) – The (2,3) element in 4x4 matrix that is used to define the the view.

  • a13 (double) – The (2,4) element in 4x4 matrix that is used to define the the view.

  • a20 (double) – The (3,1) element in 4x4 matrix that is used to define the the view.

  • a21 (double) – The (3,2) element in 4x4 matrix that is used to define the the view.

  • a22 (double) – The (3,3) element in 4x4 matrix that is used to define the the view.

  • a23 (double) – The (3,4) element in 4x4 matrix that is used to define the the view.

  • a30 (double) – The (4,1) element in 4x4 matrix that is used to define the the view.

  • a31 (double) – The (4,2) element in 4x4 matrix that is used to define the the view.

  • a32 (double) – The (4,3) element in 4x4 matrix that is used to define the the view.

  • a33 (double) – The (4,4) element in 4x4 matrix that is used to define the the view.

  • minx (double) – The viewport x-axis minimum value.

  • miny (double) – The viewport y-axis minimum value.

  • maxx (double) – The viewport x-axis maximum value.

  • maxy (double) – The viewport y-axis maximum value.

Note

The current values of a00-a33 can be queried using the Model.hm_getcurrentview()

Example#

Rotate the model so the z - axis is point out of the screen , with the max visible area set to ( -0.5,-0.5 ) to ( 0.5,0.5 )#
import hm
import hm.entities as ent

model = hm.Model()

model.viewset(
    a00=1,
    a01=0,
    a02=0,
    a03=0,
    a10=0,
    a11=1,
    a12=0,
    a13=0,
    a20=0,
    a21=0,
    a22=1,
    a23=0,
    a30=0,
    a31=0,
    a32=0,
    a33=1,
    minx=-0.5,
    miny=-0.5,
    maxx=0.5,
    maxy=0.5,
)