Dense Point Cloud module API
Accessing dense point clouds
The number of dense point clouds being passed into the node can be found:
num= pfpy.getNumDenseClouds()
print("node is reading", num, "dense clouds")
A reference to an existing dense point cloud can be obtained as follows:
c= pfpy.getDenseCloudRef(index)
where index is an integer indicating which cloud to read in the range 0 and N-1 inclusive, where N is the number of clouds returned by pfpy.getNumDenseClouds().
By calling the Dense Point Cloud API functions described below, cloud data can be read.
API functions
Examples of these functions in use are provided by the python scripts available in the exports, macros and nodes installation folders.
getName()
Parameters:
none
Description:
Returns the dense point cloud name
Example:
c= pfpy.getDenseCloudRef(0)
print("Dense cloud is named", c.getName())
getNumPoints()
Parameters:
none
Description:
Returns the number of points in the dense point cloud
Example:
c= pfpy.getDenseCloudRef(0)
print("Point count= ", m.getNumPoints())
getPointPos(index)
Parameters:
unsigned integer point index number
Description:
Returns the position of the specified point
Example:
c= pfpy.getDenseCloudRef(0)
print("Point 100 position= ", c.getPointPos(100))
print("Point 100 normal= ", c.getPointNormal(100))
print("Point 100 colour= ", c.getPointColour(100))
getPointNormal(index)
Parameters:
unsigned integer point index number
Description:
Returns the normal of the specified point
Example:
c= pfpy.getDenseCloudRef(0)
print("Point 100 position= ", c.getPointPos(100))
print("Point 100 normal= ", c.getPointNormal(100))
print("Point 100 colour= ", c.getPointColour(100))
getPointColour(index)
Parameters:
unsigned integer point index number
Description:
Returns the colour of the specified point in the range [0..1]
Example:
c= pfpy.getDenseCloudRef(0)
print("Point 100 position= ", c.getPointPos(100))
print("Point 100 normal= ", c.getPointNormal(100))
print("Point 100 colour= ", c.getPointColour(100))