subdivpatch1cached.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // ======================================================================== //
  2. // Copyright 2009-2017 Intel Corporation //
  3. // //
  4. // Licensed under the Apache License, Version 2.0 (the "License"); //
  5. // you may not use this file except in compliance with the License. //
  6. // You may obtain a copy of the License at //
  7. // //
  8. // http://www.apache.org/licenses/LICENSE-2.0 //
  9. // //
  10. // Unless required by applicable law or agreed to in writing, software //
  11. // distributed under the License is distributed on an "AS IS" BASIS, //
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
  13. // See the License for the specific language governing permissions and //
  14. // limitations under the License. //
  15. // ======================================================================== //
  16. #pragma once
  17. #include "../geometry/primitive.h"
  18. #include "../subdiv/subdivpatch1base.h"
  19. namespace embree
  20. {
  21. struct __aligned(64) SubdivPatch1Cached : public SubdivPatch1Base
  22. {
  23. struct Type : public PrimitiveType
  24. {
  25. Type ();
  26. size_t size(const char* This) const;
  27. };
  28. static Type type;
  29. struct TypeCached : public PrimitiveType
  30. {
  31. TypeCached ();
  32. size_t size(const char* This) const;
  33. };
  34. static TypeCached type_cached;
  35. public:
  36. /*! constructor for cached subdiv patch */
  37. SubdivPatch1Cached (const unsigned int gID,
  38. const unsigned int pID,
  39. const unsigned int subPatch,
  40. const SubdivMesh *const mesh,
  41. const size_t time,
  42. const Vec2f uv[4],
  43. const float edge_level[4],
  44. const int subdiv[4],
  45. const int simd_width)
  46. : SubdivPatch1Base(gID,pID,subPatch,mesh,time,uv,edge_level,subdiv,simd_width) {}
  47. };
  48. }