MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / GetComponent

Method GetComponent

src/Nazara/Utility/VertexDeclaration.cpp:93–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 4

World.cppFile · 0.45
LuaBinding_SDKMethod · 0.45
EnsureStateUpdateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected