-------------------------------------------------------------------------------------- Description: Returns size (dimension) of an element. It is pre-defined for all element types except for CUSTOM when m_dimension is used. Return Value: Size (dimension) of an element. --------------------------------------------------------------------------------------
| 116 | // Size (dimension) of an element. |
| 117 | // -------------------------------------------------------------------------------------- |
| 118 | unsigned Tr2ParticleElementDeclaration::GetSize() const |
| 119 | { |
| 120 | // We have pre-defined sizes for for all types except CUSTOM |
| 121 | static const unsigned sizes[Tr2ParticleElementDeclarationName::CUSTOM] = { |
| 122 | 2, |
| 123 | 3, |
| 124 | 3, |
| 125 | 1, |
| 126 | }; |
| 127 | if( m_name.m_type == Tr2ParticleElementDeclarationName::CUSTOM ) |
| 128 | { |
| 129 | return m_dimension; |
| 130 | } |
| 131 | return sizes[m_name.m_type]; |
| 132 | } |
| 133 | |
| 134 | // -------------------------------------------------------------------------------------- |
| 135 | // Description: |
no outgoing calls
no test coverage detected