Point Class

From TouchDesigner Documentation
Jump to: navigation, search

A Point describes an instance to a single geometry point. They are accessible through the SOP.points member.


indexint (Read Only):

The point index in the list.

ownerOP (Read Only):

The OP to which this object belongs.

Ptd.AttributeData :

The coordinates as AttributeData. Individual components can be read or written with the [] operator.

point.P[0] = 5
point.P = (1,0,1)

xfloat :

Get or set x coordinate value. This is the same as P[0].

yfloat :

Get or set y coordinate value. This is the same as P[1].

zfloat :

Get or set z coordinate value. This is the same as P[2].

normPtdu.Position (Read Only):

The normalized position of this point within the bounding box of the SOP. Will always be in the range [0,1]. Expressed as tdu.Position object.


In addition to the above members, all attributes are members as well.

For example, if the Point contains texture coordinates, they may be accessed with:Point.uv

box = op('box1')
print(box.N[0], box.N[1], box.N[2])
print(box.uv[0], box.uv[1], box.uv[2])

See: Attribute Class for more information.



Destroy and remove the actual point this object refers to. This operation is only valid when the primitive belongs to a scriptSOP. Note: after this call, other existing Point objects in this SOP may no longer be valid.

TouchDesigner Build:

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.

An Operator Family that reads, creates and modifies 3D polygons, curves, NURBS surfaces, spheres, meatballs and other 3D surface data.

Information associated with SOP geometry. Points and primitives (polygons, NURBS, etc.) can have any number of attributes - position (P) is standard, and built-in optional attributes are normals (N), texture coordinates (uv), color (Cd), etc.