v_sim.SurfaceIterPoly

Fields

Name

Type

Access

Description

i

int

r/w

the index of the current polygon.

points

v_sim.SurfacePoints

r/w

the storage for polygons.

surf

v_sim.Surface

r/w

the parent v_sim.Surface.

valid

bool

r/w

a flag True, as long as the iterator is valid.

Methods

addInvertedVertices (vertices)

addVertices (vertices)

getVertices (vertices)

getZ (view)

next ()

Details

class v_sim.SurfaceIterPoly

Structures used to iterate on polygons of surf.

New in version 3.8.

addInvertedVertices(vertices)
Parameters:

vertices ([float]) – an array to store the vertex coordinates and normals.

Like v_sim.SurfaceIterPoly.addVertices(), but using normal vectors pointing in the opposite direction.

New in version 3.9.

addVertices(vertices)
Parameters:

vertices ([float]) – an array to store the vertex coordinates and normals.

Retrieve the position and normal of the point refered by self, using the v_sim.GlExtPackingModels.XYZ_NRM layout.

New in version 3.9.

getVertices(vertices)
Parameters:

vertices ([v_sim.SurfacePoint]) – an array to store the vertex coordinates and normals.

Retrieve the position and normal of the point refered by self.

New in version 3.8.

getZ(view)
Parameters:

view (v_sim.GlView) – the v_sim.GlView the surface is projected to.

Returns:

True if polygon defined by self is drawn and z is computed

z:

a location to store double.

Return type:

(bool, z: float)

Retrieve the z value in the viewport basis of the drawn polygon defined by self. If the polygon is not drawn, z is not computed.

New in version 3.8.

next()

Iterate to the next drawn polygon.

New in version 3.8.