diff options
| author | git perforce import user <a@b> | 2016-10-25 12:29:14 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees> | 2016-10-25 18:56:37 -0500 |
| commit | 3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch) | |
| tree | fa6485c169e50d7415a651bf838f5bcd0fd3bfbd /KaplaDemo/samples/sampleViewer3/SceneKaplaTower.h | |
| download | physx-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/SceneKaplaTower.h')
| -rw-r--r-- | KaplaDemo/samples/sampleViewer3/SceneKaplaTower.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/KaplaDemo/samples/sampleViewer3/SceneKaplaTower.h b/KaplaDemo/samples/sampleViewer3/SceneKaplaTower.h new file mode 100644 index 00000000..d709251c --- /dev/null +++ b/KaplaDemo/samples/sampleViewer3/SceneKaplaTower.h @@ -0,0 +1,41 @@ +#ifndef SCENE_KAPLA_TOWER_H +#define SCENE_KAPLA_TOWER_H + +#include "SceneKapla.h" + +using namespace physx; + +// --------------------------------------------------------------------- +class SceneKaplaTower : public SceneKapla +{ +public: + SceneKaplaTower(PxPhysics* pxPhysics, PxCooking *pxCooking, bool isGrb, + Shader *defaultShader, const char *resourcePath, float slowMotionFactor); + + virtual ~SceneKaplaTower(){} + + virtual void handleKeyDown(unsigned char key, int x, int y); + + virtual void preSim(float dt); + virtual void postSim(float dt); + + virtual void onInit(PxScene* pxScene); + +private: + + + + void createGeometricTower(PxU32 height, PxU32 nbFacets, PxVec3 dims, PxVec3 startPos, PxReal startDensity, PxMaterial* material, ShaderMaterial& mat); + void createCommunicationWire(PxVec3 startPos, PxVec3 endPos,PxReal connectRadius, PxReal connectHeight, PxReal density, PxReal offset, PxRigidDynamic* startBody, + PxRigidDynamic* endBody, PxMaterial* material, ShaderMaterial& mat, PxQuat& rot); + void createTwistTower(PxU32 height, PxU32 nbBlocksPerLayer, PxVec3 dims, PxVec3 startPos, PxMaterial* material, ShaderMaterial& mat); + void createRectangularTower(PxU32 nbX, PxU32 nbZ, PxU32 height, PxVec3 dims, PxVec3 centerPos, PxMaterial* material, ShaderMaterial& mat); + //void createCylindricalTower(PxU32 nbRadialPoints, PxReal maxRadius, PxReal minRadius, PxU32 height, PxVec3 dims, PxVec3 centerPos, PxMaterial* material, ShaderMaterial& mat); + + PxReal mAccumulatedTime; + + bool hadInteraction; + PxU32 nbProjectiles; + +}; +#endif // SCENE_BOXES_H |