aboutsummaryrefslogtreecommitdiff
path: root/KaplaDemo/samples/sampleViewer3/Fracture/Compound.h
diff options
context:
space:
mode:
authorgit perforce import user <a@b>2016-10-25 12:29:14 -0600
committerSheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees>2016-10-25 18:56:37 -0500
commit3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch)
treefa6485c169e50d7415a651bf838f5bcd0fd3bfbd /KaplaDemo/samples/sampleViewer3/Fracture/Compound.h
downloadphysx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz
physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip
Initial commit:
PhysX 3.4.0 Update @ 21294896 APEX 1.4.0 Update @ 21275617 [CL 21300167]
Diffstat (limited to 'KaplaDemo/samples/sampleViewer3/Fracture/Compound.h')
-rw-r--r--KaplaDemo/samples/sampleViewer3/Fracture/Compound.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/KaplaDemo/samples/sampleViewer3/Fracture/Compound.h b/KaplaDemo/samples/sampleViewer3/Fracture/Compound.h
new file mode 100644
index 00000000..cfa635b6
--- /dev/null
+++ b/KaplaDemo/samples/sampleViewer3/Fracture/Compound.h
@@ -0,0 +1,59 @@
+#ifndef COMPOUND
+#define COMPOUND
+
+#include <foundation/PxVec3.h>
+#include <foundation/PxPlane.h>
+#include <foundation/PxBounds3.h>
+#include <foundation/PxTransform.h>
+#include <PsArray.h>
+#include <PxRigidDynamic.h>
+
+#include "Shader.h"
+
+#include "CompoundBase.h"
+
+using namespace physx;
+
+class Convex;
+class Particles;
+class Mesh;
+class SimScene;
+class CompoundGeometry;
+class XMLParser;
+
+class ShaderShadow;
+
+using namespace physx::fracture;
+
+class Compound : public base::Compound
+{
+ friend class SimScene;
+protected:
+ Compound(SimScene* scene, PxReal contactOffset = 0.005f, PxReal restOffset = -0.001f):
+ physx::fracture::base::Compound((base::SimScene*)scene,contactOffset,restOffset) {}
+public:
+
+ virtual void convexAdded(base::Convex* c, Shader* shader);
+ virtual void convexRemoved(base::Convex* c);
+
+ bool createFromXml(XMLParser *p, float scale, const PxTransform &trans, bool ignoreVisualMesh = false);
+
+ void setShader(Shader* shader, const ShaderMaterial &mat) { mShader = shader; mShaderMat = mat; }
+ Shader* getShader() const { return mShader; }
+ const ShaderMaterial& getShaderMat() { return mShaderMat; }
+
+ virtual void draw(bool useShader, bool debug = false);
+
+ virtual void clear();
+
+ virtual void copyShaders(base::Compound*);
+
+protected:
+
+ virtual float getSleepingThresholdRB();
+
+ Shader *mShader;
+ ShaderMaterial mShaderMat;
+};
+
+#endif