API Panel.PCloud.Create

From Flowcode Help
Jump to navigationJump to search

<sidebar>API Contents</sidebar> Creates a new point cloud tied to a position handle

Class hierarchy

Panel

PCloud
Create

Parameters

HANDLE Pos

The position to display the cloud at

UINT DrawMode

The appearance of the points
Typical values for this parameter:
Name Description
Mode_Point Displays cloud as points
Mode_Line Displays cloud as joined lines
Mode_Solid Displays cloud as a solid surface

ULONG RGBA

The default colour of the points


Return value

HANDLE

A handle to the new point cloud


Detailed description

Landscape using mandelbrot set
Torus rendered with Mode_Line

A point cloud is a series of points that can represent a graph, shape or terrain in Flowcode. All the parameters passed to this function can be altered using specific calls.


Point clouds can either be rendered using a chain of points, or a grid of points. There is no difference when displaying with Mode_Point, but for other modes a chain will render each point as though it is connected to the last, where as a grid assumes a 2-dimensional map, and connects each point to the one above and to the right of it, breaking the sequence at the end of each row of the grid.

Ordering of points in a chain and grid


The Pos is a position handle that the point cloud will scale to. The range of a point cloud in any axis is -1 to 1. This means that, for example -1 can be considered far left, and 1 as far right. To automatically scale a point cloud to this range, use UnitScale.


The Pos will be tracked by default. This means that the point cloud will take the shape of the position, and if that position changes at any time, the point cloud will change with it. The SetPos allows this option to be explicitly set.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Panel.PCloud.Create(pos, ::Panel.PCloud.Mode_Point, rgba)

No additional examples