1#ifndef SEAD_PRIMITIVE_RENDERER_H_
2#define SEAD_PRIMITIVE_RENDERER_H_
4#include <gfx/seadColor.h>
5#include <gfx/seadPrimitiveRendererBase.h>
6#include <heap/seadDisposer.h>
7#include <math/seadBoundBox.h>
51 static_assert(
sizeof(
QuadArg) == 0x38,
"sead::PrimitiveRenderer::QuadArg size mismatch");
74 static_assert(
sizeof(
UVArg) == 0x10,
"sead::PrimitiveRenderer::UVArg size mismatch");
107 static_assert(
sizeof(
CubeArg) == 0x38,
"sead::PrimitiveRenderer::CubeArg size mismatch");
181static_assert(
sizeof(
PrimitiveRenderer) == 0x54,
"sead::PrimitiveRenderer size mismatch");
Definition seadCamera.h:16
Definition seadDisposer.h:12
Definition seadPrimitiveRendererBase.h:16
Definition seadPrimitiveRenderer.h:78
const Color4f & getColor1() const
Definition seadPrimitiveRenderer.h:98
CubeArg & setCenter(const Vector3f &p)
Definition seadPrimitiveRenderer.h:88
Vector3f mSize
Definition seadPrimitiveRenderer.h:102
CubeArg & setCornerAndSize(const Vector3f &p, const Vector3f &size)
Definition seadPrimitiveRenderer.cpp:435
CubeArg()
Definition seadPrimitiveRenderer.h:80
const Color4f & getColor0() const
Definition seadPrimitiveRenderer.h:97
CubeArg & setColor(const Color4f &color)
Definition seadPrimitiveRenderer.h:93
const Vector3f & getCenter() const
Definition seadPrimitiveRenderer.h:95
CubeArg & setSize(const Vector3f &size)
Definition seadPrimitiveRenderer.h:89
Color4f mColor1
Definition seadPrimitiveRenderer.h:104
Color4f mColor0
Definition seadPrimitiveRenderer.h:103
CubeArg & setBoundBox(const BoundBox3f &box)
Definition seadPrimitiveRenderer.cpp:443
const Vector3f & getSize() const
Definition seadPrimitiveRenderer.h:96
Vector3f mCenter
Definition seadPrimitiveRenderer.h:101
CubeArg & setColor(const Color4f &c0, const Color4f &c1)
Definition seadPrimitiveRenderer.h:92
Definition seadPrimitiveRenderer.h:17
Color4f mColor0
Definition seadPrimitiveRenderer.h:46
const Color4f & getColor0() const
Definition seadPrimitiveRenderer.h:39
QuadArg & setCornerAndSize(const Vector3f &p, const Vector2f &size)
Definition seadPrimitiveRenderer.cpp:396
bool mHorizontal
Definition seadPrimitiveRenderer.h:48
QuadArg & setColor(const Color4f &colorT, const Color4f &colorB)
Definition seadPrimitiveRenderer.cpp:417
const Vector3f & getCenter() const
Definition seadPrimitiveRenderer.h:37
QuadArg & setCenter(const Vector3f &p)
Definition seadPrimitiveRenderer.h:28
Color4f mColor1
Definition seadPrimitiveRenderer.h:47
QuadArg()
Definition seadPrimitiveRenderer.h:19
const Color4f & getColor1() const
Definition seadPrimitiveRenderer.h:40
Vector3f mCenter
Definition seadPrimitiveRenderer.h:44
QuadArg & setColor(const Color4f &color)
Definition seadPrimitiveRenderer.h:34
const Vector2f & getSize() const
Definition seadPrimitiveRenderer.h:38
bool isHorizontal() const
Definition seadPrimitiveRenderer.h:41
Vector2f mSize
Definition seadPrimitiveRenderer.h:45
QuadArg & setBoundBox(const BoundBox2f &box, f32 z)
Definition seadPrimitiveRenderer.cpp:406
QuadArg & setSize(const Vector2f &size)
Definition seadPrimitiveRenderer.h:29
QuadArg & setSize(f32 w, f32 h)
Definition seadPrimitiveRenderer.h:30
QuadArg & setColorHorizontal(const Color4f &colorL, const Color4f &colorR)
Definition seadPrimitiveRenderer.cpp:426
Definition seadPrimitiveRenderer.h:55
Vector2f mUVSrc
Definition seadPrimitiveRenderer.h:70
UVArg()
Definition seadPrimitiveRenderer.h:57
UVArg & setUVSrc(const Vector2f &uv_src)
Definition seadPrimitiveRenderer.h:63
UVArg & setUVSize(const Vector2f &uv_size)
Definition seadPrimitiveRenderer.h:64
Vector2f mUVSize
Definition seadPrimitiveRenderer.h:71
const Vector2f & getUVSize() const
Definition seadPrimitiveRenderer.h:67
const Vector2f & getUVSrc() const
Definition seadPrimitiveRenderer.h:66
Definition seadPrimitiveRenderer.h:12
void drawSphere8x16(const Vector3f &pos, f32 radius, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:292
void drawCircle32(const Color4f &color)
Definition seadPrimitiveRenderer.cpp:131
void drawLine(const Vector3f &from, const Vector3f &to, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:260
void drawCircle16(const Color4f &color)
Definition seadPrimitiveRenderer.cpp:126
void drawQuad(const Texture &texture, const QuadArg &arg, const UVArg &uv_arg=UVArg())
Definition seadPrimitiveRenderer.cpp:167
void drawCylinder32(const Color4f &color)
Definition seadPrimitiveRenderer.h:147
void drawSphere8x16(const Color4f &color)
Definition seadPrimitiveRenderer.h:137
void drawDisk32(const Vector3f &pos, f32 radius, const Color4f ¢er, const Color4f &edge)
Definition seadPrimitiveRenderer.cpp:308
void drawSphere8x16(const Color4f &north, const Color4f &south)
Definition seadPrimitiveRenderer.cpp:111
void drawWireCube(const Color4f &c0, const Color4f &c1)
Definition seadPrimitiveRenderer.cpp:96
Matrix34f mModelMtx
Definition seadPrimitiveRenderer.h:178
void drawCube(const CubeArg &arg)
Definition seadPrimitiveRenderer.cpp:209
PrimitiveRenderer()
Definition seadPrimitiveRenderer.cpp:16
void drawCylinder32(const Vector3f &pos, f32 radius, f32 height, const Color4f &top_color, const Color4f &btm_color)
Definition seadPrimitiveRenderer.cpp:367
void drawCube(const Color4f &color)
Definition seadPrimitiveRenderer.h:129
void drawLine(const Vector3f &from, const Vector3f &to, const Color4f &c0, const Color4f &c1)
Definition seadPrimitiveRenderer.cpp:231
void begin()
Definition seadPrimitiveRenderer.cpp:66
void drawQuad(const Color4f &color)
Definition seadPrimitiveRenderer.h:123
void drawBox(const Color4f &colorL, const Color4f &colorR)
Definition seadPrimitiveRenderer.cpp:86
void drawSphere4x8(const Color4f &north, const Color4f &south)
Definition seadPrimitiveRenderer.cpp:106
void drawDisk16(const Vector3f &pos, f32 radius, const Color4f ¢er, const Color4f &edge)
Definition seadPrimitiveRenderer.cpp:297
void prepare(Heap *heap, const SafeString &path)
Definition seadPrimitiveRenderer.cpp:45
void drawWireCube(const CubeArg &arg)
Definition seadPrimitiveRenderer.cpp:220
PrimitiveRendererBase * mRendererImpl
Definition seadPrimitiveRenderer.h:177
void drawDisk32(const Vector3f &pos, f32 radius, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:324
void drawQuad(const Texture &texture, const Color4f &colorL, const Color4f &colorR, const Vector2f &uv_src=Vector2f::zero, const Vector2f &uv_size=Vector2f::ones)
Definition seadPrimitiveRenderer.cpp:81
void drawCylinder16(const Vector3f &pos, f32 radius, f32 height, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:362
void drawCube(const Color4f &c0, const Color4f &c1)
Definition seadPrimitiveRenderer.cpp:91
void drawSphere4x8(const Color4f &color)
Definition seadPrimitiveRenderer.h:135
void drawCylinder32(const Color4f &top, const Color4f &btm)
Definition seadPrimitiveRenderer.cpp:141
void drawCylinder16(const Vector3f &pos, f32 radius, f32 height, const Color4f &top_color, const Color4f &btm_color)
Definition seadPrimitiveRenderer.cpp:351
void drawSphere8x16(const Vector3f &pos, f32 radius, const Color4f &north, const Color4f &south)
Definition seadPrimitiveRenderer.cpp:281
void drawDisk16(const Color4f ¢er, const Color4f &edge)
Definition seadPrimitiveRenderer.cpp:116
void drawCircle32(const Vector3f &pos, f32 radius, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:340
void drawWireCube(const Color4f &color)
Definition seadPrimitiveRenderer.h:131
void drawDisk16(const Vector3f &pos, f32 radius, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:319
void drawSphere4x8(const Vector3f &pos, f32 radius, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:276
void drawCircle16(const Vector3f &pos, f32 radius, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:329
void drawCylinder16(const Color4f &color)
Definition seadPrimitiveRenderer.h:145
void drawSphere4x8(const Vector3f &pos, f32 radius, const Color4f &north, const Color4f &south)
Definition seadPrimitiveRenderer.cpp:265
void drawBox(const QuadArg &arg)
Definition seadPrimitiveRenderer.cpp:188
void drawBox(const Color4f &color)
Definition seadPrimitiveRenderer.h:127
void drawAxis(const Vector3f &pos, f32 scale)
Definition seadPrimitiveRenderer.cpp:383
void drawLine(const Color4f &color)
Definition seadPrimitiveRenderer.h:133
void drawQuad(const QuadArg &arg)
Definition seadPrimitiveRenderer.cpp:146
void setProjection(const Projection &projection)
Definition seadPrimitiveRenderer.cpp:56
void drawCylinder32(const Vector3f &pos, f32 radius, f32 height, const Color4f &color)
Definition seadPrimitiveRenderer.cpp:378
void drawDisk32(const Color4f ¢er, const Color4f &edge)
Definition seadPrimitiveRenderer.cpp:121
void drawQuad(const Texture &texture, const Color4f &color=Color4f::cWhite, const Vector2f &uv_src=Vector2f::zero, const Vector2f &uv_size=Vector2f::ones)
Definition seadPrimitiveRenderer.h:125
void prepareFromBinary(Heap *heap, const void *bin_data, u32 bin_size)
Definition seadPrimitiveRenderer.cpp:39
void setModelMatrix(const Matrix34f &model_to_world_matrix)
Definition seadPrimitiveRenderer.cpp:61
void drawDisk32(const Color4f &color)
Definition seadPrimitiveRenderer.h:141
void drawQuad(const Color4f &colorL, const Color4f &colorR)
Definition seadPrimitiveRenderer.cpp:76
void end()
Definition seadPrimitiveRenderer.cpp:71
virtual ~PrimitiveRenderer()
Definition seadPrimitiveRenderer.cpp:23
void setCamera(const Camera &camera)
Definition seadPrimitiveRenderer.cpp:51
void drawDisk16(const Color4f &color)
Definition seadPrimitiveRenderer.h:139
void drawLine(const Color4f &c0, const Color4f &c1)
Definition seadPrimitiveRenderer.cpp:101
void doPrepare_(Heap *heap)
Definition seadPrimitiveRenderer.cpp:28
void drawCylinder16(const Color4f &top, const Color4f &btm)
Definition seadPrimitiveRenderer.cpp:136
Definition seadProjection.h:19
Definition seadTexture.h:9
Definition seadAssert.h:44
Vector2< f32 > Vector2f
Definition seadVector.h:238
SafeStringBase< char > SafeString
Definition seadSafeString.h:409
Vector3< f32 > Vector3f
Definition seadVector.h:239
BoundBox2< f32 > BoundBox2f
Definition seadBoundBox.h:187
BoundBox3< f32 > BoundBox3f
Definition seadBoundBox.h:188
Matrix34< f32 > Matrix34f
Definition seadMatrix.h:342
#define SEAD_SINGLETON_DISPOSER(CLASS)
Definition seadDisposer.h:29
static const Color4f cWhite
Definition seadColor.h:64