NAP
gnomonmesh.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // External Includes
8 #include <nap/resource.h>
9 #include <renderablemesh.h>
10 
11 namespace nap
12 {
18  class NAPAPI GnomonMesh : public IMesh
19  {
20  RTTI_ENABLE(IMesh)
21  public:
22  // Constructor
23  GnomonMesh(Core& core);
24 
30  virtual bool init(utility::ErrorState& errorState) override;
31 
35  virtual MeshInstance& getMeshInstance() override { return *mMeshInstance; }
36 
40  virtual const MeshInstance& getMeshInstance() const override { return *mMeshInstance; }
41 
42  float mSize = 1.0f;
43  glm::vec3 mPosition = { 0.0f, 0.0f, 0.0f };
44 
45  private:
46  std::unique_ptr<nap::MeshInstance> mMeshInstance = nullptr;
47  nap::RenderService* mRenderService = nullptr;
48  };
49 }
nap::GnomonMesh::getMeshInstance
virtual MeshInstance & getMeshInstance() override
Definition: gnomonmesh.h:35
nap::utility::ErrorState
Definition: errorstate.h:19
nap::IMesh
Definition: mesh.h:394
nap::RenderService
Definition: renderservice.h:275
nap::Core
Definition: core.h:82
nap::GnomonMesh
Definition: gnomonmesh.h:18
nap
Definition: templateapp.h:17
nap::GnomonMesh::getMeshInstance
virtual const MeshInstance & getMeshInstance() const override
Definition: gnomonmesh.h:40
nap::MeshInstance
Definition: mesh.h:196