Panda3D
Loading...
Searching...
No Matches
physxObjectCollection.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file physxObjectCollection.h
10 * @author enn0x
11 * @date 2009-11-08
12 */
13
14#ifndef PHYSXOBJECTCOLLECTION_H
15#define PHYSXOBJECTCOLLECTION_H
16
17#include "pandabase.h"
18
19#include "config_physx.h"
20
21/**
22 *
23 */
24template <class T>
25class EXPCL_PANDAPHYSX PhysxObjectCollection {
26
27public:
28 INLINE unsigned int size() const;
29 INLINE void add(PT(T) object);
30 INLINE void remove(PT(T) object);
31 INLINE T *get(unsigned int index) const;
32 INLINE T *operator [] (unsigned int index) const;
33
34 INLINE void ls() const;
35 INLINE void ls(std::ostream &out, int indent_level=0) const;
36
37private:
38 pvector<PT(T)> _objects;
39};
40
42
43#endif // PHYSXOBJECTCOLLECTION_H
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.