Panda3D
Loading...
Searching...
No Matches
geomDrawCallbackData.cxx
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 geomDrawCallbackData.cxx
10 * @author drose
11 * @date 2009-03-13
12 */
13
15#include "cullableObject.h"
17
18TypeHandle GeomDrawCallbackData::_type_handle;
19
20/**
21 *
22 */
23void GeomDrawCallbackData::
24output(std::ostream &out) const {
25 out << get_type() << "(" << (void *)_obj << ", " << (void *)_gsg
26 << ", " << _force << ")";
27}
28
29/**
30 * You should make this call during the callback if you want to continue the
31 * normal rendering function that would have been done in the absence of a
32 * callback.
33 *
34 * Specifically, this method will add the Geoms in this node to the list of
35 * renderable objects for drawing. If this callback was made on a
36 * CallbackNode, it doesn't actually do anything, since only a GeomNode holds
37 * geoms.
38 */
40upcall() {
41 // Go ahead and draw the object, if we have one.
42 if (_obj->_geom != nullptr) {
43 if (_lost_state) {
44 // Tell the GSG to forget its state.
45 _gsg->clear_state_and_transform();
46 }
47
48 _obj->_geom->draw(_gsg, _obj->_munged_data, _force,
50 }
51}
virtual void upcall()
You should make this call during the callback if you want to continue the normal rendering function t...
get_current_thread
Returns a pointer to the currently-executing Thread object.
Definition thread.h:109
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.