Panda3D
Loading...
Searching...
No Matches
displayRegionDrawCallbackData.h
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 displayRegionDrawCallbackData.h
10 * @author drose
11 * @date 2009-03-13
12 */
13
14#ifndef DISPLAYREGIONDRAWCALLBACKDATA_H
15#define DISPLAYREGIONDRAWCALLBACKDATA_H
16
17#include "pandabase.h"
18#include "callbackData.h"
19
20class CullResult;
21class SceneSetup;
22
23/**
24 * This specialization on CallbackData is passed when the callback is
25 * initiated from the draw traversal, for a DisplayRegion.
26 */
27class EXPCL_PANDA_DISPLAY DisplayRegionDrawCallbackData : public CallbackData {
28public:
29 DisplayRegionDrawCallbackData(CullResult *cull_result, SceneSetup *scene_setup);
30
31PUBLISHED:
32 virtual void output(std::ostream &out) const;
33
34 INLINE CullResult *get_cull_result() const;
35 INLINE SceneSetup *get_scene_setup() const;
36
37 virtual void upcall();
38
39private:
40 CullResult *_cull_result;
41 SceneSetup *_scene_setup;
42
43public:
44 static TypeHandle get_class_type() {
45 return _type_handle;
46 }
47 static void init_type() {
48 CallbackData::init_type();
49 register_type(_type_handle, "DisplayRegionDrawCallbackData",
50 CallbackData::get_class_type());
51 }
52 virtual TypeHandle get_type() const {
53 return get_class_type();
54 }
55 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
56
57private:
58 static TypeHandle _type_handle;
59};
60
62
63#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void upcall()
You should make this call during the callback if you want to continue the normal function that would ...
This stores the result of a BinCullHandler traversal: an ordered collection of CullBins,...
Definition cullResult.h:44
SceneSetup * get_scene_setup() const
Returns a pointer to the SceneSetup object, which contains information about the camera and such.
CullResult * get_cull_result() const
Returns a pointer to the CullResult, the list of CullableObjects that should be drawn in this Display...
This object holds the camera position, etc., and other general setup information for rendering a part...
Definition sceneSetup.h:32
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.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...