Close

Point Class

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


Members

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.

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

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.

TouchDesigner Build: