| 91 | } |
| 92 | |
| 93 | void VertexDeclaration::GetComponent(VertexComponent component, bool* enabled, ComponentType* type, std::size_t* offset) const |
| 94 | { |
| 95 | #ifdef NAZARA_DEBUG |
| 96 | if (component > VertexComponent_Max) |
| 97 | { |
| 98 | NazaraError("Vertex component out of enum"); |
| 99 | return; |
| 100 | } |
| 101 | #endif |
| 102 | |
| 103 | #if NAZARA_UTILITY_SAFE |
| 104 | if (component == VertexComponent_Unused) |
| 105 | { |
| 106 | NazaraError("Cannot get \"unused\" component"); |
| 107 | return; |
| 108 | } |
| 109 | #endif |
| 110 | |
| 111 | const Component& vertexComponent = m_components[component]; |
| 112 | |
| 113 | if (enabled) |
| 114 | *enabled = vertexComponent.enabled; |
| 115 | |
| 116 | if (type) |
| 117 | *type = vertexComponent.type; |
| 118 | |
| 119 | if (offset) |
| 120 | *offset = vertexComponent.offset; |
| 121 | } |
| 122 | |
| 123 | bool VertexDeclaration::HasComponent(VertexComponent component) const |
| 124 | { |
no outgoing calls
no test coverage detected