Point Class

From Derivative
Jump to: navigation, search

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


Members

Point.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)

Point.ownerOP (Read Only):

The OP to which this object belongs.

Point.xfloat :

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

Point.yfloat :

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

Point.zfloat :

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

Point.indexint (Read Only):

The point index in the list.

Attributes

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.

Methods

Point.destroy()None:

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.

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.

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

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