should return concrete NodePaths, not const refs

This commit is contained in:
David Rose 2007-12-14 19:40:55 +00:00
parent 4a2a85bedc
commit 0cd1b7a065
2 changed files with 10 additions and 10 deletions

View File

@ -237,7 +237,7 @@ close_window() {
// in the scene graph. This node may be moved around to
// represent the viewpoint.
////////////////////////////////////////////////////////////////////
const NodePath &WindowFramework::
NodePath WindowFramework::
get_camera_group() {
if (_camera_group.is_empty()) {
_camera_group = get_render().attach_new_node("camera_group");
@ -250,7 +250,7 @@ get_camera_group() {
// Access: Public
// Description: Returns the root of the 3-d scene graph.
////////////////////////////////////////////////////////////////////
const NodePath &WindowFramework::
NodePath WindowFramework::
get_render() {
if (_render.is_empty()) {
_render = NodePath("render");
@ -269,7 +269,7 @@ get_render() {
// Access: Public
// Description: Returns the root of the 2-d scene graph.
////////////////////////////////////////////////////////////////////
const NodePath &WindowFramework::
NodePath WindowFramework::
get_render_2d() {
if (_render_2d.is_empty()) {
_render_2d = NodePath("render_2d");
@ -317,7 +317,7 @@ get_render_2d() {
// Description: Returns the node under the 2-d scene graph that is
// scaled to suit the window's aspect ratio.
////////////////////////////////////////////////////////////////////
const NodePath &WindowFramework::
NodePath WindowFramework::
get_aspect_2d() {
if (_aspect_2d.is_empty()) {
PGTop *top = new PGTop("aspect_2d");
@ -357,7 +357,7 @@ get_aspect_2d() {
// Description: Returns the node in the data graph corresponding to
// the mouse associated with this window.
////////////////////////////////////////////////////////////////////
const NodePath &WindowFramework::
NodePath WindowFramework::
get_mouse() {
if (_mouse.is_empty()) {
NodePath mouse = _panda_framework->get_mouse(_window);

View File

@ -71,15 +71,15 @@ protected:
public:
INLINE PandaFramework *get_panda_framework() const;
INLINE GraphicsWindow *get_graphics_window() const;
const NodePath &get_camera_group();
NodePath get_camera_group();
INLINE int get_num_cameras() const;
INLINE Camera *get_camera(int n) const;
const NodePath &get_render();
const NodePath &get_render_2d();
const NodePath &get_aspect_2d();
const NodePath &get_mouse();
NodePath get_render();
NodePath get_render_2d();
NodePath get_aspect_2d();
NodePath get_mouse();
void enable_keyboard();
void setup_trackball();