diff options
Diffstat (limited to 'KaplaDemo/samples/sampleViewer3/Fracture/Mesh.h')
| -rw-r--r-- | KaplaDemo/samples/sampleViewer3/Fracture/Mesh.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/KaplaDemo/samples/sampleViewer3/Fracture/Mesh.h b/KaplaDemo/samples/sampleViewer3/Fracture/Mesh.h new file mode 100644 index 00000000..a1f15544 --- /dev/null +++ b/KaplaDemo/samples/sampleViewer3/Fracture/Mesh.h @@ -0,0 +1,32 @@ +#ifndef MESH +#define MESH + +#include <foundation/PxVec3.h> +#include <PsArray.h> +#include <PsAllocator.h> + +#include "Shader.h" + +#include "MeshBase.h" + +using namespace physx::fracture; + +class Mesh : public base::Mesh +{ +public: + bool loadFromObjFile(const std::string &filename); + + void setShader(Shader* shader, const ShaderMaterial &mat) { mShader = shader; mShaderMat = mat; } + Shader* getShader() const { return mShader; } + const ShaderMaterial& getShaderMat() { return mShaderMat; } + void draw(bool useShader); +protected: + // shading + Shader *mShader; + ShaderMaterial mShaderMat; + Shader *mWrinkleShader; + + shdfnd::Array<std::string> mNames; +}; + +#endif
\ No newline at end of file |