NAP
geometryfromfile.h
1 #pragma once
2 
3 // External Includes
4 #include <mesh.h>
5 
6 namespace nap
7 {
33  class NAPAPI GeometryFromFile : public IMesh
34  {
35  RTTI_ENABLE(IMesh)
36  public:
37  GeometryFromFile(Core& core);
38 
45  virtual bool init(utility::ErrorState& errorState) override;
46 
50  virtual MeshInstance& getMeshInstance() override { return *mMeshInstance; }
51 
55  virtual const MeshInstance& getMeshInstance() const override { return *mMeshInstance; }
56 
57  std::string mPath;
60  ECullMode mCullMode = ECullMode::Back;
61  bool mGenerateNormals = false;
62  float mSmoothingAngle = 60.0f;
63  bool mCalculateTangents = true;
64 
65  private:
66  RenderService* mRenderService = nullptr;
67  std::unique_ptr<MeshInstance> mMeshInstance = nullptr;
68  };
69 }
nap::GeometryFromFile
Definition: geometryfromfile.h:33
nap::EMemoryUsage::Static
@ Static
Buffer data is uploaded only once from the CPU to the GPU.
nap::EPolygonMode
EPolygonMode
Definition: mesh.h:55
nap::ECullMode
ECullMode
Definition: mesh.h:43
nap::EMemoryUsage
EMemoryUsage
Definition: gpubuffer.h:41
nap::utility::ErrorState
Definition: errorstate.h:19
nap::IMesh
Definition: mesh.h:394
nap::GeometryFromFile::mPath
std::string mPath
Property: 'Path' path to the geometry (.fbx, .obj, etc.) file on disk.
Definition: geometryfromfile.h:57
nap::RenderService
Definition: renderservice.h:275
nap::Core
Definition: core.h:82
nap::ECullMode::Back
@ Back
Cull back facing triangles.
nap::EPolygonMode::Fill
@ Fill
Polygons are interpreted and rendered using the specified 'EDrawMode'.
nap
Definition: templateapp.h:17
nap::GeometryFromFile::getMeshInstance
virtual const MeshInstance & getMeshInstance() const override
Definition: geometryfromfile.h:55
nap::MeshInstance
Definition: mesh.h:196
nap::GeometryFromFile::getMeshInstance
virtual MeshInstance & getMeshInstance() override
Definition: geometryfromfile.h:50