CommonLibVR
BSModelDB.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTSingleton.h"
4 #include "RE/E/ErrorCodes.h"
5 #include "RE/N/NiSmartPointer.h"
6 
7 namespace RE
8 {
9  class NiNode;
10 
11  namespace BSModelDB
12  {
13  struct DBTraits
14  {
15  public:
16  inline static constexpr auto RTTI = RTTI_BSModelDB__DBTraits;
17  inline static constexpr std::uint32_t LOAD_QUEUE_SIZE = 8;
18  inline static constexpr std::uint32_t RELEASE_QUEUE_SIZE = 2;
19 
21 
22  struct ArgsType
23  {
24  public:
25  // members
26  std::uint32_t LODmult{ 0 }; // 0
27  std::uint32_t texLoadLevel{ 3 }; // 4
28  bool unk8{ true }; // 8
29  bool unk9{ false }; // 9
30  bool unkA{ true }; // A
31  bool postProcess{ true }; // B
32  };
33  static_assert(sizeof(ArgsType) == 0xC);
34  };
35  static_assert(std::is_empty_v<DBTraits>);
36 
37  class BSModelProcessor : public BSTSingletonExplicit<BSModelProcessor>
38  {
39  public:
40  inline static constexpr auto RTTI = RTTI_BSModelDB__BSModelProcessor;
41  inline static constexpr auto VTABLE = VTABLE_BSModelDB__BSModelProcessor;
42 
43  virtual ~BSModelProcessor();
44 
45  // add
46  virtual void PostCreate(const DBTraits::ArgsType& a_args, const char* modelName, NiPointer<NiNode>& a_root, std::uint32_t& a_typeOut);
47  };
48 
49  BSResource::ErrorCode Demand(const char* a_modelPath, NiPointer<NiNode>& a_modelOut, const DBTraits::ArgsType& a_args);
50  }
51 }
Definition: BSModelDB.h:38
virtual void PostCreate(const DBTraits::ArgsType &a_args, const char *modelName, NiPointer< NiNode > &a_root, std::uint32_t &a_typeOut)
static constexpr auto VTABLE
Definition: BSModelDB.h:41
static constexpr auto RTTI
Definition: BSModelDB.h:40
Definition: NiSmartPointer.h:9
BSResource::ErrorCode Demand(const char *a_modelPath, NiPointer< NiNode > &a_modelOut, const DBTraits::ArgsType &a_args)
ErrorCode
Definition: ErrorCodes.h:8
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSModelDB__BSModelProcessor(static_cast< std::uint64_t >(684857))
constexpr std::array< REL::ID, 1 > VTABLE_BSModelDB__BSModelProcessor
Definition: Offsets_VTABLE.h:9246
constexpr REL::ID RTTI_BSModelDB__DBTraits(static_cast< std::uint64_t >(690665))
Definition: BSModelDB.h:23
std::uint32_t texLoadLevel
Definition: BSModelDB.h:27
bool postProcess
Definition: BSModelDB.h:31
bool unk8
Definition: BSModelDB.h:28
bool unk9
Definition: BSModelDB.h:29
std::uint32_t LODmult
Definition: BSModelDB.h:26
bool unkA
Definition: BSModelDB.h:30
Definition: BSModelDB.h:14
static constexpr auto RTTI
Definition: BSModelDB.h:16
static constexpr std::uint32_t LOAD_QUEUE_SIZE
Definition: BSModelDB.h:17
static constexpr std::uint32_t RELEASE_QUEUE_SIZE
Definition: BSModelDB.h:18
Definition: BSTSingleton.h:11