Newton Dynamics  4.00
ndModelList.h
1 /* Copyright (c) <2003-2022> <Julio Jerez, Newton Game Dynamics>
2 *
3 * This software is provided 'as-is', without any express or implied
4 * warranty. In no event will the authors be held liable for any damages
5 * arising from the use of this software.
6 *
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely, subject to the following restrictions:
10 *
11 * 1. The origin of this software must not be misrepresented; you must not
12 * claim that you wrote the original software. If you use this software
13 * in a product, an acknowledgment in the product documentation would be
14 * appreciated but is not required.
15 *
16 * 2. Altered source versions must be plainly marked as such, and must not be
17 * misrepresented as being the original software.
18 *
19 * 3. This notice may not be removed or altered from any source distribution.
20 */
21 
22 #ifndef __ND_MODEL_LIST_H__
23 #define __ND_MODEL_LIST_H__
24 
25 #include "ndNewtonStdafx.h"
26 
27 class ndModel;
28 
29 class ndModelList : public ndList<ndSharedPtr<ndModel>, ndContainersFreeListAlloc<ndSharedPtr<ndModel>*>>
30 {
31  ndModelList();
32 
33  void UpdateDirtyList();
34  ndArray<ndModel*>& GetUpdateList();
35  void RemoveModel(ndSharedPtr<ndModel>& model);
36  void AddModel(ndSharedPtr<ndModel>& model, ndWorld* const world);
37 
38  ndArray<ndModel*> m_updateArray;
39  bool m_dirty;
40  friend class ndWorld;
41  friend class ndLoadSave;
42 };
43 
44 #endif
ndModelList
Definition: ndModelList.h:30
ndSharedPtr
Definition: ndSharedPtr.h:17
ndArray< ndModel * >
ndModel
Definition: ndModel.h:33
ndLoadSave
Definition: ndLoadSave.h:56
ndList
Definition: ndList.h:33
ndWorld
Definition: ndWorld.h:47