immediate_geometry.h
1 #ifndef IMMEDIATE_GEOMETRY_H
2 #define IMMEDIATE_GEOMETRY_H
3 
4 #include "scene/3d/visual_instance.h"
5 #include "scene/resources/mesh.h"
6 
8 
10 
11 
12  RID im;
13  List<Ref<Texture> > cached_textures;
14  bool empty;
15  AABB aabb;
16 protected:
17 
18  static void _bind_methods();
19 public:
20 
21 
22  void begin(Mesh::PrimitiveType p_primitive,const Ref<Texture>& p_texture);
23  void set_normal(const Vector3& p_normal);
24  void set_tangent(const Plane& p_tangent);
25  void set_color(const Color& p_color);
26  void set_uv(const Vector2& tex_uv);
27  void set_uv2(const Vector2& tex_uv);
28 
29  void add_vertex(const Vector3& p_vertex);
30 
31  void end();
32  void clear();
33 
34 
35  void add_sphere(int p_lats,int p_lons,float p_radius);
36 
37 
38 
39  virtual AABB get_aabb() const;
40  virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const;
41 
44 };
45 
46 #endif // IMMEDIATE_GEOMETRY_H
Definition: immediate_geometry.h:7
Definition: aabb.h:43
Definition: color.h:37
Definition: vector3.h:38
Definition: list.h:44
Definition: rid.h:47
Definition: math_2d.h:65
Definition: plane.h:35
Definition: visual_instance.h:84