------------------------------------------------------------------------------
| 1563 | |
| 1564 | //------------------------------------------------------------------------------ |
| 1565 | int vtkDataSetAttributes::CheckNumberOfComponents(vtkAbstractArray* aa, int attributeType) |
| 1566 | { |
| 1567 | int numComp = aa->GetNumberOfComponents(); |
| 1568 | |
| 1569 | if (vtkDataSetAttributes::AttributeLimits[attributeType] == MAX) |
| 1570 | { |
| 1571 | if (numComp > vtkDataSetAttributes::NumberOfAttributeComponents[attributeType]) |
| 1572 | { |
| 1573 | return 0; |
| 1574 | } |
| 1575 | else |
| 1576 | { |
| 1577 | return 1; |
| 1578 | } |
| 1579 | } |
| 1580 | else if (vtkDataSetAttributes::AttributeLimits[attributeType] == EXACT) |
| 1581 | { |
| 1582 | if (numComp == vtkDataSetAttributes::NumberOfAttributeComponents[attributeType] || |
| 1583 | (numComp == 6 && attributeType == TENSORS)) // TENSORS6 support |
| 1584 | { |
| 1585 | return 1; |
| 1586 | } |
| 1587 | else |
| 1588 | { |
| 1589 | return 0; |
| 1590 | } |
| 1591 | } |
| 1592 | else if (vtkDataSetAttributes::AttributeLimits[attributeType] == NOLIMIT) |
| 1593 | { |
| 1594 | return 1; |
| 1595 | } |
| 1596 | else |
| 1597 | { |
| 1598 | return 0; |
| 1599 | } |
| 1600 | } |
| 1601 | |
| 1602 | //------------------------------------------------------------------------------ |
| 1603 | vtkDataArray* vtkDataSetAttributes::GetAttribute(int attributeType) |
no test coverage detected