diff options
Diffstat (limited to 'scene/resources/multimesh.h')
-rw-r--r-- | scene/resources/multimesh.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h index 0cf9e92def..85c8718aa7 100644 --- a/scene/resources/multimesh.h +++ b/scene/resources/multimesh.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -30,16 +30,31 @@ #define MULTIMESH_H #include "scene/resources/mesh.h" - +#include "servers/visual_server.h" class MultiMesh : public Resource { OBJ_TYPE( MultiMesh, Resource ); RES_BASE_EXTENSION("mmsh"); +public: - AABB aabb; + enum TransformFormat { + TRANSFORM_2D = VS::MULTIMESH_TRANSFORM_2D, + TRANSFORM_3D = VS::MULTIMESH_TRANSFORM_3D + }; + + enum ColorFormat { + COLOR_NONE = VS::MULTIMESH_COLOR_NONE, + COLOR_8BIT = VS::MULTIMESH_COLOR_8BIT, + COLOR_FLOAT = VS::MULTIMESH_COLOR_FLOAT, + }; +private: Ref<Mesh> mesh; RID multimesh; + TransformFormat transform_format; + ColorFormat color_format; + + protected: static void _bind_methods(); @@ -55,6 +70,12 @@ public: void set_mesh(const Ref<Mesh>& p_mesh); Ref<Mesh> get_mesh() const; + void set_color_format(ColorFormat p_color_format); + ColorFormat get_color_format() const; + + void set_transform_format(TransformFormat p_transform_format); + TransformFormat get_transform_format() const; + void set_instance_count(int p_count); int get_instance_count() const; @@ -64,11 +85,8 @@ public: void set_instance_color(int p_instance, const Color& p_color); Color get_instance_color(int p_instance) const; - void set_aabb(const AABB& p_aabb); virtual AABB get_aabb() const; - void generate_aabb(); - virtual RID get_rid() const; MultiMesh(); @@ -76,4 +94,8 @@ public: }; + +VARIANT_ENUM_CAST( MultiMesh::TransformFormat ); +VARIANT_ENUM_CAST( MultiMesh::ColorFormat); + #endif // MULTI_MESH_H |