1#ifndef ULT_SQUARE_SHAPE_H_INCLUDED
2#define ULT_SQUARE_SHAPE_H_INCLUDED
8#define ULT_UNIT_SQUARE_VERTEX_TOTAL 4
9#define ULT_UNIT_SQUARE_INDEX_TOTAL 6
10#define ULT_UNIT_SQUARE_STRIDE sizeof(Ult::stUnitSquareVertex)
29 if (!model) {
return false; }
32 { +1*width, -1*height, 0, 1, 0, 0, 0, 1 },
33 { -1*width, -1*height, 0, 0, 0, 0, 0, 1 },
34 { -1*width, +1*height, 0, 0, 1, 0, 0, 1 },
35 { +1*width, +1*height, 0, 1, 1, 0, 0, 1 }
51 (
char*)UnitSquareData)) {
52 printf(
"Failed to set square vertices\n");
58 printf(
"Failed to set square indices\n");
#define ULT_UNIT_SQUARE_INDEX_TOTAL
Definition SquareShape.h:9
#define ULT_UNIT_SQUARE_STRIDE
Definition SquareShape.h:10
#define ULT_UNIT_SQUARE_VERTEX_TOTAL
Definition SquareShape.h:8
Definition ModelData.h:26
void Clear()
Definition ModelData.cpp:21
bool SetIndices(int totalIndices, unsigned int *indices)
Definition ModelData.cpp:36
bool AddDescriptorElement(ElementType type)
Definition ModelData.h:49
bool SetVertices(PrimitiveType type, int totalVertices, int stride, char *vertices)
Definition ModelData.cpp:53
@ ULT_TRI_LIST
Definition PrimitiveType.h:12
@ ULT_VERTEX_3F
Definition ElementType.h:13
@ ULT_TEX1_2F
Definition ElementType.h:16
@ ULT_NORMAL_3F
Definition ElementType.h:14
bool CreateSquareMesh(float width, float height, ModelData *model)
Definition SquareShape.h:27
bool CreateUnitSquareMesh(Ult::ModelData *model)
Definition SquareShape.h:70
Definition SquareShape.h:16
float z
Definition SquareShape.h:17
float nz
Definition SquareShape.h:19
float ny
Definition SquareShape.h:19
float y
Definition SquareShape.h:17
float nx
Definition SquareShape.h:19
float x
Definition SquareShape.h:17
float tv1
Definition SquareShape.h:18
float tu1
Definition SquareShape.h:18