diff options
author | clayjohn <claynjohn@gmail.com> | 2022-09-16 09:54:42 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-09-19 08:53:10 -0700 |
commit | 87710517fae21aa23390055ec3e64564b9d0f93e (patch) | |
tree | 850243a4a4f9671fa7272409798bb36b93bcf1fb /scene/resources | |
parent | 99e06740cf123a1e9b91be61864f8764729d5264 (diff) |
Add QuadMesh back as a subclass of PlaneMesh.
This simplifies the creation of billboarded meshes without any code overhead.
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/primitive_meshes.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h index 280477ebfa..65823a8f7f 100644 --- a/scene/resources/primitive_meshes.h +++ b/scene/resources/primitive_meshes.h @@ -262,6 +262,18 @@ public: VARIANT_ENUM_CAST(PlaneMesh::Orientation) +/* + A flat rectangle, inherits from PlaneMesh but defaults to facing the Z-plane. +*/ +class QuadMesh : public PlaneMesh { + GDCLASS(QuadMesh, PlaneMesh); + +public: + QuadMesh() { + set_orientation(FACE_Z); + } +}; + /** A prism shapen, handy for ramps, triangles, etc. */ |