00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CULLABLEOBJECT_H
00020 #define CULLABLEOBJECT_H
00021
00022 #include "pandabase.h"
00023
00024 #include "geom.h"
00025 #include "renderState.h"
00026 #include "transformState.h"
00027 #include "pointerTo.h"
00028 #include "referenceCount.h"
00029 #include "geomNode.h"
00030 #include "cullTraverserData.h"
00031
00032
00033
00034
00035
00036
00037
00038
00039 class EXPCL_PANDA CullableObject {
00040 public:
00041 INLINE CullableObject(CullableObject *next = NULL);
00042 INLINE CullableObject(const CullTraverserData &data,
00043 GeomNode *geom_node, int i,
00044 CullableObject *next = NULL);
00045 INLINE CullableObject(Geom *geom, const RenderState *state,
00046 const TransformState *transform,
00047 CullableObject *next = NULL);
00048
00049 INLINE CullableObject(const CullableObject ©);
00050 INLINE void operator = (const CullableObject ©);
00051
00052 INLINE bool has_decals() const;
00053
00054 public:
00055 ~CullableObject();
00056
00057
00058
00059
00060
00061 INLINE void *operator new(size_t size);
00062 INLINE void operator delete(void *ptr);
00063 void output(ostream &out) const;
00064
00065 PUBLISHED:
00066 INLINE static int get_num_ever_allocated();
00067
00068 public:
00069 PT(Geom) _geom;
00070 CPT(RenderState) _state;
00071 CPT(TransformState) _transform;
00072 CullableObject *_next;
00073
00074 private:
00075 static CullableObject *_deleted_chain;
00076 static int _num_ever_allocated;
00077
00078 public:
00079 static TypeHandle get_class_type() {
00080 return _type_handle;
00081 }
00082 static void init_type() {
00083 register_type(_type_handle, "CullableObject");
00084 }
00085
00086 private:
00087 static TypeHandle _type_handle;
00088 };
00089
00090 INLINE ostream &operator << (ostream &out, const CullableObject &object) {
00091 object.output(out);
00092 return out;
00093 }
00094
00095 #include "cullableObject.I"
00096
00097 #endif