00001 // Filename: geomDrawCallbackData.I00002 // Created by: drose (13Mar09)00003 //00004 ////////////////////////////////////////////////////////////////////00005 //00006 // PANDA 3D SOFTWARE00007 // Copyright (c) Carnegie Mellon University. All rights reserved.00008 //00009 // All use of this software is subject to the terms of the revised BSD00010 // license. You should have received a copy of this license along00011 // with this source code in a file named "LICENSE."00012 //00013 ////////////////////////////////////////////////////////////////////00014
00015
00016 ////////////////////////////////////////////////////////////////////00017 // Function: GeomDrawCallbackData::Constructor00018 // Access: Public00019 // Description:00020 ////////////////////////////////////////////////////////////////////00021 INLINE GeomDrawCallbackData::
00022 GeomDrawCallbackData(CullableObject *obj, GraphicsStateGuardianBase *gsg,
00023 bool force) :
00024 _obj(obj),
00025 _gsg(gsg),
00026 _force(force),
00027 _lost_state(true)
00028 {
00029 }
00030
00031 ////////////////////////////////////////////////////////////////////00032 // Function: GeomDrawCallbackData::get_object00033 // Access: Published00034 // Description: Returns a pointer to the particular object that is00035 // being drawn.00036 ////////////////////////////////////////////////////////////////////00037 INLINE CullableObject *GeomDrawCallbackData::00038get_object() const {
00039 return _obj;
00040 }
00041
00042 ////////////////////////////////////////////////////////////////////00043 // Function: GeomDrawCallbackData::get_gsg00044 // Access: Published00045 // Description: Returns a pointer to the current GSG.00046 ////////////////////////////////////////////////////////////////////00047 INLINE GraphicsStateGuardianBase *GeomDrawCallbackData::00048get_gsg() const {
00049 return _gsg;
00050 }
00051
00052 ////////////////////////////////////////////////////////////////////00053 // Function: GeomDrawCallbackData::get_force00054 // Access: Published00055 // Description: Returns true if any required data should be forced00056 // into memory if necessary to render the object, or00057 // false if the object should be omitted if some of the00058 // data is not available (at least until the data00059 // becomes available later).00060 ////////////////////////////////////////////////////////////////////00061 INLINE boolGeomDrawCallbackData::00062get_force() const {
00063 return _force;
00064 }
00065
00066 ////////////////////////////////////////////////////////////////////00067 // Function: GeomDrawCallbackData::set_lost_state00068 // Access: Published00069 // Description: Sets the lost_state flag. If this is true, the00070 // callback does not have to be quite so careful to00071 // clean up after itself; Panda will assume that the00072 // graphics state is in an unknown state after the00073 // callback has finished, and will issue all the00074 // necessary calls to restore it. If this is false,00075 // Panda will assume the callback will leave the00076 // graphics state exactly as it came in, and won't00077 // bother to try to restore it. The default is true.00078 ////////////////////////////////////////////////////////////////////00079 INLINE voidGeomDrawCallbackData::00080set_lost_state(bool lost_state) {
00081 _lost_state = lost_state;
00082 }
00083
00084 ////////////////////////////////////////////////////////////////////00085 // Function: GeomDrawCallbackData::get_lost_state00086 // Access: Published00087 // Description: Returns the lost_state flag. See set_lost_state().00088 ////////////////////////////////////////////////////////////////////00089 INLINE boolGeomDrawCallbackData::00090get_lost_state() const {
00091 return _lost_state;
00092 }