v_sim.SurfacePoints

Fields

Name

Type

Access

Description

bufferSize

int

r/w

number of stored float in addition to coordinates and normals ;

nsurf

int

r/w

number of surfaces encoded in this structure ;

num_points

int

r/w

number of vertices stored in this structure ;

num_polys

int

r/w

number of polygoins stored in this structure ;

num_polys_surf

int

r/w

number of visible polygons stored in this structure per surface ;

poly_num_vertices

int

r/w

gives the number of vertices used by each polygons ;

poly_points_data

float

r/w

vectors giving additional data of vertex i.

poly_surf_index

int

r/w

gives the id of the surface for each polygon, this value ranges from - nsurf to + nsurf. abs(id - 1) gives the index of the surface the polygon is attached to. If values are negative, then the polygon is currently not used ;

poly_vertices

int

r/w

returns the id j of the vertices of polygon i ;

Methods

addPoly (vertices, polys)

check ()

free ()

hide (resource, planes)

init (bufferSize)

remove (pos)

transform (trans)

translate (xyz)

Details

class v_sim.SurfacePoints

This structure stores geometric description of surfaces. Several surfaces are stored in a single structure for improved performances.

addPoly(vertices, polys)
Parameters:

Add a new surface in self with the given definition of vertices and polys.

New in version 3.8.

check()

A debug routines to check that all pointers and size are relevant. It should not be used outside a debug area because it can be slow.

free()

Free all allocated arrays of the given set of points. The point structure itself is not freed.

hide(resource, planes)
Parameters:
Returns:

True if some polygons of self have changed visibility.

edges:

a v_sim.SurfacePoints location.

Return type:

(bool, edges: v_sim.SurfacePoints)

Apply the masking properties of planes on self, creating additional vertices and polygons to smooth the edges of the cut surface in edges.

New in version 3.8.

init(bufferSize)
Parameters:

bufferSize (int) – the number of additional data to coordinates and normals.

Initialise a v_sim.SurfacePoints structure. It must be done before any use.

remove(pos)
Parameters:

pos (int) – an integer between 0 and points->nsurf.

Remove the points belonging to surface number pos.

transform(trans)
Parameters:

trans (float) – a matrix.

Apply trans matrix to all vertices coordinates stored by self.

New in version 3.7.

translate(xyz)
Parameters:

xyz (float) – a given translation in cartesian coordinates.

In devel…