-
Notifications
You must be signed in to change notification settings - Fork 1
/
Sphere.h
30 lines (27 loc) · 1.11 KB
/
Sphere.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "4dm.h"
namespace fdm
{
class Sphere : public Mesh
{
public:
std::vector<glm::vec4> s; // 0x8
std::vector<glm::vec3> t; // 0x20
int vertCount() const override
{
return reinterpret_cast<int (__thiscall*)(const Sphere* self)>(getFuncAddr((int)Func::Sphere::vertCount))(this);
}
int buffSize(int buffIndex) const override
{
return reinterpret_cast<int (__thiscall*)(const Sphere* self, int buffIndex)>(getFuncAddr((int)Func::Sphere::buffSize))(this, buffIndex);
}
Sphere(int edges)
{
reinterpret_cast<void(__thiscall*)(Sphere* self, int edges)>(getFuncAddr((int)Func::Sphere::Sphere))(this, edges);
}
inline static void generateCirclePolygons(int wi, std::vector<glm::vec4>* verts, std::vector<glm::vec3>* tuvs, const std::vector<float>* sinVert, const std::vector<float>* cosVert)
{
return reinterpret_cast<void (__fastcall*)(int wi, std::vector<glm::vec4>* verts, std::vector<glm::vec3>* tuvs, const std::vector<float>* sinVert, const std::vector<float>* cosVert)>(getFuncAddr((int)Func::Sphere::generateCirclePolygons))(wi, verts, tuvs, sinVert, cosVert);
}
};
}