Plasma Engine  2.0
Loading...
Searching...
No Matches
MeshAssetObjects.h
1#pragma once
2
3#include <EditorFramework/Assets/SimpleAssetDocument.h>
4#include <EditorPluginAssets/Util/AssetUtils.h>
5#include <RendererCore/Meshes/MeshBufferUtils.h>
6#include <ToolsFoundation/Object/DocumentObjectBase.h>
7
9
11{
12 using StorageType = plInt8;
13
14 enum Enum
15 {
16 File,
17 Box,
18 Rect,
19 Cylinder,
20 Cone,
21 Pyramid,
22 Sphere,
23 HalfSphere,
24 GeodesicSphere,
25 Capsule,
26 Torus,
27
28 Default = File
29 };
30};
31
32PL_DECLARE_REFLECTABLE_TYPE(PL_NO_LINKAGE, plMeshPrimitive);
33
35{
36 PL_ADD_DYNAMIC_REFLECTION(plMeshAssetProperties, plReflectedClass);
37
38public:
41
42 static void PropertyMetaStateEventHandler(plPropertyMetaStateEvent& e);
43
44 plString m_sMeshFile;
45 float m_fUniformScaling = 1.0f;
46
47 float m_fRadius = 0.5f;
48 float m_fRadius2 = 0.5f;
49 float m_fHeight = 1.0f;
50 plAngle m_Angle = plAngle::MakeFromDegree(360.0f);
51 plUInt16 m_uiDetail = 0;
52 plUInt16 m_uiDetail2 = 0;
53 bool m_bCap = true;
54 bool m_bCap2 = true;
55
56 plEnum<plBasisAxis> m_RightDir = plBasisAxis::PositiveY;
57 plEnum<plBasisAxis> m_UpDir = plBasisAxis::PositiveZ;
58 bool m_bFlipForwardDir = false;
59
60 plMeshPrimitive::Enum m_PrimitiveType = plMeshPrimitive::Default;
61
62 bool m_bRecalculateNormals = false;
63 bool m_bRecalculateTrangents = true;
64 bool m_bImportMaterials = true;
65
66 plEnum<plMeshNormalPrecision> m_NormalPrecision;
67 plEnum<plMeshTexCoordPrecision> m_TexCoordPrecision;
68 plEnum<plMeshVertexColorConversion> m_VertexColorConversion;
69
71
72 plUInt32 m_uiVertices = 0;
73 plUInt32 m_uiTriangles = 0;
74};
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
static constexpr plAngle MakeFromDegree(float fDegree)
Creates an instance of plAngle that was initialized from degree. (Performs a conversion)
Definition Angle_inl.h:33
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition MeshAssetObjects.h:35
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition MeshAssetObjects.h:11
Event that is broadcast whenever information about how to present properties is required.
Definition PropertyMetaState.h:35