Dali 3D User Interface Engine
geometry.h
Go to the documentation of this file.
1 #ifndef DALI_GEOMETRY_H
2 #define DALI_GEOMETRY_H
3 
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // EXTERNAL INCLUDES
22 #include <cstddef> // std::size_t
23 
24 // INTERNAL INCLUDES
25 #include <dali/public-api/object/handle.h> // Dali::Handle
26 #include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
27 #include <dali/devel-api/object/property-buffer.h> // Dali::PropertyBuffer
28 
29 namespace Dali
30 {
31 
32 namespace Internal DALI_INTERNAL
33 {
34 class Geometry;
35 }
36 
41 {
42 public:
43 
45  {
52  TRIANGLE_STRIP
53  };
54 
58  struct Property
59  {
60  enum
61  {
64  };
65  };
66 
72  static Geometry New();
73 
77  Geometry();
78 
82  ~Geometry();
83 
89  Geometry( const Geometry& handle );
90 
98  static Geometry DownCast( BaseHandle handle );
99 
106  Geometry& operator=( const Geometry& handle );
107 
115  std::size_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
116 
122  std::size_t GetNumberOfVertexBuffers() const;
123 
131  void RemoveVertexBuffer( std::size_t index );
132 
143  void SetIndexBuffer( PropertyBuffer& indexBuffer );
144 
150  void SetGeometryType( GeometryType geometryType );
151 
159  GeometryType GetGeometryType() const;
160 
170  void SetRequiresDepthTesting( bool requiresDepthTest );
171 
177  bool GetRequiresDepthTesting() const;
178 
179 public:
185  explicit DALI_INTERNAL Geometry( Internal::Geometry* pointer );
186 };
187 
188 } //namespace Dali
189 
190 #endif // DALI_GEOMETRY_H
Dali Docs Home
Read more about Dali