Port Polymorphism and Data Integrity

 
 
 

The data that connects to or passes through an ICENodePort or ICENodePort can be described in three different ways:

Some ICENodePort or ICENodePorts support polymorphism, which basically means that the data passing through does not need to match some preset criteria on type, structure and context. For example, the CompareNode takes any boolean, integer, float, vector, matrix, rotation, or quaternion in its two input ports; however, these types must match each other. In other words, you want to avoid comparing apples and oranges.

The way that the integrity of the port data is enforced is to create a kind of a constraint, or limitation on the type, structure, and context of port data when needed. These are noted in the reference documentation under the Restrictions section. So following the previous CompareNode example, this section notes that the types must match for the data connected in the first port and the second port (but since the result port will always be boolean, it has no restriction). In addition, all input and output nodes are constrained to the same structure and context.

Tip

Understanding how to constrain port data because very important when it comes to creating your own custom nodes. For more information, see Handling Port Polymorphism.