Codeblocks

PhysicsMaterial.h

Aug 9th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef PHYSMAT_H
  2. #define PHYSMAT_H
  3. #pragma once
  4.  
  5. #include "Libraries/Util.h"
  6. #include <string>
  7.  
  8. namespace Leadwerks {
  9.     class Material;
  10.    
  11.     class PhysicsMaterial {
  12.     public:
  13.         PhysicsMaterial(Material* mat);
  14.         std::string GetSurfaceProperty();
  15.     private:
  16.         std::string surfaceProperty;
  17.     };
  18.  
  19.     inline PhysicsMaterial* GetPhysicsFromMaterial(Material* mat) {
  20.         if (mat->GetUserData() == NULL) {
  21.             new PhysicsMaterial(mat);
  22.         }
  23.         return static_cast<PhysicsMaterial*>(mat->GetUserData());
  24.     }
  25. }
  26. #endif
Add Comment
Please, Sign In to add comment