11#pragma warning(disable : 4786)
84 virtual void Dump(
void (*pTracer)(
const char*, ...))
const;
143 : m_capacity(capacity), m_size(0), m_ppLODObject(new const
LODObject*[capacity])
148 for (i = 0; i < (int) m_capacity; i++) {
149 m_ppLODObject[i] = 0;
161 delete[] m_ppLODObject;
179 assert((0 <= i) && (i < (
int) m_size));
181 return m_ppLODObject[i];
187 assert(m_size < m_capacity);
189 m_ppLODObject[m_size++] = pLOD;
200 pLOD = m_ppLODObject[--m_size];
203 m_ppLODObject[m_size] = 0;
211inline void LODListBase::Dump(
void (*pTracer)(
const char*, ...))
const
215 pTracer(
"LODListBase<0x%x>: Capacity=%d, Size=%d\n", (
void*)
this, m_capacity, m_size);
217 for (i = 0; i < (int) m_size; i++) {
218 pTracer(
" [%d]: LOD<0x%x>\n", i, m_ppLODObject[i]);
221 for (i = (
int) m_size; i < (int) m_capacity; i++) {
222 assert(m_ppLODObject[i] == 0);
276#pragma warning(default : 4786)
[AI] Abstract base class for an ordered list of LODObject pointers, where each entry represents an in...
virtual ~LODListBase()
[AI] Destructor.
const LODObject * operator[](int) const
[AI] Returns a pointer to the LODObject at the given index.
const LODObject * PopBack()
[AI] Removes and returns the last LODObject pointer from the list.
const LODObject * PushBack(const LODObject *)
[AI] Adds a new LODObject pointer at the end of the list.
size_t Size() const
[AI] Returns the current number of LODObject pointers contained.
LODListBase(size_t capacity)
[AI] Constructs a new LODListBase with specified storage capacity.
size_t Capacity() const
[AI] Returns the maximum number of LODObject pointers the list can hold.
[AI] Type-safe extension of LODListBase, templated for any LODObject-derived type.
const T * PushBack(const T *)
[AI] Typed append.
const T * PopBack()
[AI] Typed remove.
LODList(size_t capacity)
[AI] Constructs a type-safe LODList with given capacity.
const T * operator[](int) const
[AI] Typed access to the LODObject at position i.
[AI] Abstract base class for a Level-of-Detail (LOD) variant of a geometric object.