Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CullableObject Class Reference

The smallest atom of cull. More...

#include <cullableObject.h>

List of all members.

Public Member Functions

 CullableObject (CullableObject *next=NULL)
 Creates an empty CullableObject whose pointers can be filled in later.

 CullableObject (const CullTraverserData &data, GeomNode *geom_node, int i, CullableObject *next=NULL)
 Creates a CullableObject based on the ith Geom from the indicated GeomNode, with the render state from the indicated CullTraverserData.

 CullableObject (Geom *geom, const RenderState *state, const TransformState *transform, CullableObject *next=NULL)
 Creates a CullableObject based the indicated geom, with the indicated render state and transform.

 CullableObject (const CullableObject &copy)
 Copies the CullableObject, but does not copy its children (decals).

void operator= (const CullableObject &copy)
 Copies the CullableObject, but does not copy its children (decals).

bool has_decals () const
 Returns true if the object has one or more decals placed on it, false otherwise.

 ~CullableObject ()
 Automatically deletes the whole chain of these things.

void * operator new (size_t size)
 Allocates the memory for a new CullableObject.

void operator delete (void *ptr)
 Frees the memory for a deleted CullableObject.

void output (ostream &out) const

Static Public Member Functions

int get_num_ever_allocated ()
 Returns the number of CullableObject pointers ever simultaneously allocated; these are now either in active use or have been recycled into the deleted CullableObject pool to be used again.

TypeHandle get_class_type ()
void init_type ()

Public Attributes

PointerTo< Geom_geom
ConstPointerTo< RenderState_state
ConstPointerTo< TransformState_transform
CullableObject * _next

Static Private Attributes

CullableObject * _deleted_chain = (CullableObject *)NULL
int _num_ever_allocated = 0
TypeHandle _type_handle


Detailed Description

The smallest atom of cull.

This is normally just a Geom and its associated state, but it also represent a number of Geoms to be drawn together, with a number of Geoms decalled onto them.

Definition at line 48 of file cullableObject.h.


Constructor & Destructor Documentation

CullableObject::CullableObject CullableObject *  next = NULL  )  [inline]
 

Creates an empty CullableObject whose pointers can be filled in later.

Definition at line 33 of file cullableObject.I.

References INLINE.

CullableObject::CullableObject const CullTraverserData data,
GeomNode geom_node,
int  i,
CullableObject *  next = NULL
[inline]
 

Creates a CullableObject based on the ith Geom from the indicated GeomNode, with the render state from the indicated CullTraverserData.

Definition at line 51 of file cullableObject.I.

References INLINE.

CullableObject::CullableObject Geom geom,
const RenderState state,
const TransformState transform,
CullableObject *  next = NULL
[inline]
 

Creates a CullableObject based the indicated geom, with the indicated render state and transform.

Definition at line 72 of file cullableObject.I.

References INLINE, and NULL.

CullableObject::CullableObject const CullableObject &  copy  )  [inline]
 

Copies the CullableObject, but does not copy its children (decals).

Definition at line 94 of file cullableObject.I.

References _next, INLINE, and NULL.

CullableObject::~CullableObject  ) 
 

Automatically deletes the whole chain of these things.

Definition at line 38 of file cullableObject.cxx.

References _geom, and NULL.


Member Function Documentation

TypeHandle CullableObject::get_class_type void   )  [inline, static]
 

Definition at line 88 of file cullableObject.h.

int CullableObject::get_num_ever_allocated  )  [inline, static]
 

Returns the number of CullableObject pointers ever simultaneously allocated; these are now either in active use or have been recycled into the deleted CullableObject pool to be used again.

Definition at line 197 of file cullableObject.I.

bool CullableObject::has_decals  )  const [inline]
 

Returns true if the object has one or more decals placed on it, false otherwise.

Definition at line 130 of file cullableObject.I.

References _deleted_chain, _next, and INLINE.

Referenced by CullResult::add_object().

void CullableObject::init_type void   )  [inline, static]
 

Definition at line 91 of file cullableObject.h.

void CullableObject::operator delete void *  ptr  )  [inline]
 

Frees the memory for a deleted CullableObject.

This is specialized here to provide for fast allocation of these things (since we may create and destroy thousands of these each frame).

Definition at line 176 of file cullableObject.I.

void * CullableObject::operator new size_t  size  )  [inline]
 

Allocates the memory for a new CullableObject.

This is specialized here to provide for fast allocation of these things (since we may create and destroy thousands of these each frame).

Definition at line 149 of file cullableObject.I.

References _num_ever_allocated, and INLINE.

void CullableObject::operator= const CullableObject &  copy  )  [inline]
 

Copies the CullableObject, but does not copy its children (decals).

Definition at line 113 of file cullableObject.I.

References _deleted_chain, _next, _num_ever_allocated, INLINE, NULL, and operator new().

void CullableObject::output ostream &  out  )  const
 

Definition at line 53 of file cullableObject.cxx.


Member Data Documentation

CullableObject * CullableObject::_deleted_chain = (CullableObject *)NULL [static, private]
 

Definition at line 25 of file cullableObject.cxx.

Referenced by has_decals(), and operator=().

PointerTo< Geom > CullableObject::_geom
 

Definition at line 78 of file cullableObject.h.

Referenced by CullHandler::draw_with_decals(), ~CullableObject(), and CullHandler::~CullHandler().

CullableObject* CullableObject::_next
 

Definition at line 81 of file cullableObject.h.

Referenced by CullableObject(), CullHandler::draw_with_decals(), has_decals(), and operator=().

int CullableObject::_num_ever_allocated = 0 [static, private]
 

Definition at line 26 of file cullableObject.cxx.

Referenced by operator new(), and operator=().

ConstPointerTo< RenderState > CullableObject::_state
 

Definition at line 79 of file cullableObject.h.

Referenced by CullResult::add_object(), CullHandler::draw_with_decals(), and CullHandler::~CullHandler().

ConstPointerTo< TransformState > CullableObject::_transform
 

Definition at line 80 of file cullableObject.h.

Referenced by CullHandler::draw_with_decals(), and CullHandler::~CullHandler().

TypeHandle CullableObject::_type_handle [static, private]
 

Definition at line 27 of file cullableObject.cxx.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:49:00 2003 for Panda by doxygen1.3