Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "StdAfx.h"
- class PhysX;
- class NxActor;
- class InputMesh;
- #include <vector>
- #include "float3.h"
- #include "LevelElement.h"
- #include "d3dutil.h"
- #include "vertex.h"
- class Box: public LevelElement
- {
- public:
- Box(tstring Soort,PhysX* physx,D3DXVECTOR3 pos,float width,float height,float depth,float UScale, float VScale,int bodyType);
- virtual ~Box(void);
- virtual void SetBodyType(int bodyType);
- virtual void Initialize(ContentManager *pContentManager);
- virtual void Tick(const InputState& refInputState);
- virtual void Draw(const RenderContext* pRenderContext);
- void SetEffect(ID3D10Effect* effect);
- void TriggerNormal();
- void TriggerMulti();
- void TriggerLife();
- void TriggerNitro();
- void TriggerTNT();
- void TriggerCheckpoint();
- void TriggerAkuAku();
- void TriggerSteel();
- void TriggerQuestion();
- tstring GetSoort() const {return m_Soort;}
- void Checksoort(tstring kind);
- D3DXVECTOR3 GetPos() const {return m_Pos;}
- virtual void Translate(const D3DXVECTOR3 pos);
- virtual void InitActor(){}
- virtual NxActor* GetActor(){return m_pActor;}
- static const int RIGID = 1, STATIC = 2, GHOST = 3;
- protected:
- vector<VertexPosNormTex> m_Vertices;
- vector<DWORD>m_VecIndices;
- void BuildStacks(vector<VertexPosNormTex>& vertices, vector<DWORD>& indices);
- void DefineInputLayout();
- void CreateEffect(ContentManager *pContentManager);
- ID3D10InputLayout* m_pVertexLayout;
- ID3D10Buffer* m_pVertexBuffer;
- ID3D10Buffer* m_pIndexBuffer;
- ID3D10ShaderResourceView * m_pTextureRV;
- ID3D10Effect* m_pDefaultEffect;
- ID3D10EffectTechnique* m_pDefaultTechnique;
- ID3D10EffectMatrixVariable* m_pWorldViewProjectionVariable;
- ID3D10EffectMatrixVariable* m_pWorldVariable;
- ID3D10EffectShaderResourceVariable* m_pDiffuseMapVariabele;
- void AddTriangle (unsigned int a, unsigned int b, unsigned c);
- void AddQuad(unsigned int a, unsigned int b, unsigned int c,unsigned int d);
- UINT m_VertexBufferStride;
- tstring m_TextureName;
- UINT m_NumIndices;
- UINT m_NumSlices;
- UINT m_NumStacks;
- float m_UScale;
- float m_VScale;
- tstring m_Soort;
- D3DXVECTOR3 m_Pos;
- virtual void InitActor(int bodytype);
- NxActor *m_pActor;
- PhysX* m_pPhysX;
- float m_Width,m_Height,m_Depth;
- private:
- void FillVertexAndIndexBuffer();
- void GetEffectVariables(ID3D10Effect* pEffect);
- Box(const Box& t);
- Box& operator=(const Box& t);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement