sead
Loading...
Searching...
No Matches
seadPrimitiveRendererUtil.h
Go to the documentation of this file.
1#ifndef SEAD_PRIMITIVE_RENDERER_UTIL_H_
2#define SEAD_PRIMITIVE_RENDERER_UTIL_H_
3
4#include <gfx/seadColor.h>
5#include <math/seadVector.h>
6
7namespace sead { namespace PrimitiveRendererUtil {
8
9struct Vertex
10{
13 Color4f color;
14};
15#ifdef cafe
16static_assert(sizeof(Vertex) == 0x24, "sead::PrimitiveRendererUtil::Vertex size mismatch");
17#endif // cafe
18
19void setQuadVertex(Vertex* vtx, u16* idx);
20void setLineVertex(Vertex* vtx, u16* idx);
21void setCubeVertex(Vertex* vtx, u16* idx);
22void setWireCubeVertex(Vertex* vtx, u16* idx);
23void setSphereVertex(Vertex* vtx, u16* idx, s32 sizeX, s32 sizeY);
24void setDiskVertex(Vertex* vtx, u16* idx, s32 divNum);
25void setCylinderVertex(Vertex* vtx, u16* idx, s32 divNum);
26
27inline s32 calcDiskVertexNum(s32 divNum) { return divNum + 1; }
28inline s32 calcDiskIndexNum(s32 divNum) { return divNum * 3; }
29
30} } // namespace sead::PrimitiveRendererUtil
31
32#endif // SEAD_PRIMITIVE_RENDERER_UTIL_H_
Definition seadAssert.h:44
Vector2< f32 > Vector2f
Definition seadVector.h:238
Vector3< f32 > Vector3f
Definition seadVector.h:239
Definition seadColor.h:9