28 assert(diag.
length() > FLT_EPSILON &&
"Box has no size!");
42 assert(diag.
length() > FLT_EPSILON &&
"Box has no size!");
88 I16[i++] = 8;
I16[i++] = 9;
I16[i++] = 10;
89 I16[i++] = 8;
I16[i++] = 10;
I16[i++] = 11;
96 I16[i++] = 12;
I16[i++] = 13;
I16[i++] = 14;
97 I16[i++] = 12;
I16[i++] = 14;
I16[i++] = 15;
104 I16[i++] = 16;
I16[i++] = 17;
I16[i++] = 18;
105 I16[i++] = 16;
I16[i++] = 18;
I16[i++] = 19;
112 I16[i++] = 20;
I16[i++] = 21;
I16[i++] = 22;
113 I16[i++] = 20;
I16[i++] = 22;
I16[i] = 23;
115 UV[0].resize(6ull * 4ull);
116 for (
SLint i = 0; i < 6; i++)
SLVec2< SLfloat > SLVec2f
SLVec3< SLfloat > SLVec3f
Toplevel holder of the assets meshes, materials, textures and shaders.
SLBox(SLAssetManager *assetMgr, SLfloat minx=0, SLfloat miny=0, SLfloat minz=0, SLfloat maxx=1, SLfloat maxy=1, SLfloat maxz=1, const SLstring &name="box mesh", SLMaterial *mat=nullptr)
SLBox::SLBox ctor with min. & max. coords. of the axis aligned box.
SLVec3f _max
maximum corner
void buildMesh(SLMaterial *mat)
SLBox::buildMesh fills in the underlying arrays from the SLMesh object.
SLVec3f _min
minimal corner
Defines a standard CG material with textures and a shader program.
An SLMesh object is a triangulated mesh, drawn with one draw call.
SLVushort I16
Vector of vertex indices 16 bit.
SLVVec3f N
Vector for vertex normals (opt.) layout (location = 1)
virtual void deleteData()
SLMesh::deleteData deletes all mesh data and vbo's.
SLVVec2f UV[2]
Array of 2 Vectors for tex. coords. (opt.) layout (location = 2)
SLVVec3f P
Vector for vertex positions layout (location = 0)
void set(const T X, const T Y, const T Z)