prepare to implement AuxSceneData

This commit is contained in:
David Rose 2004-09-27 23:58:27 +00:00
parent e2118e70a0
commit d31b91e758
12 changed files with 126 additions and 1 deletions

View File

@ -12,6 +12,7 @@
accumulatedAttribs.I accumulatedAttribs.h \
alphaTestAttrib.I alphaTestAttrib.h \
ambientLight.I ambientLight.h \
auxSceneData.I auxSceneData.h \
bamFile.I bamFile.h \
billboardEffect.I billboardEffect.h \
binCullHandler.I binCullHandler.h \
@ -103,6 +104,7 @@
accumulatedAttribs.cxx \
alphaTestAttrib.cxx \
ambientLight.cxx \
auxSceneData.cxx \
bamFile.cxx \
billboardEffect.cxx \
binCullHandler.cxx \
@ -192,6 +194,7 @@
accumulatedAttribs.I accumulatedAttribs.h \
alphaTestAttrib.I alphaTestAttrib.h \
ambientLight.I ambientLight.h \
auxSceneData.I auxSceneData.h \
bamFile.I bamFile.h \
billboardEffect.I billboardEffect.h \
binCullHandler.I binCullHandler.h \

View File

@ -0,0 +1,28 @@
// Filename: auxSceneData.I
// Created by: drose (27Sep04)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
//
// All use of this software is subject to the terms of the Panda 3d
// Software license. You should have received a copy of this license
// along with this source code; you will also find a current copy of
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
//
// To contact the maintainers of this program write to
// panda3d-general@lists.sourceforge.net .
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function: AuxSceneData::Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE AuxSceneData::
AuxSceneData() {
}

View File

@ -0,0 +1,21 @@
// Filename: auxSceneData.cxx
// Created by: drose (27Sep04)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
//
// All use of this software is subject to the terms of the Panda 3d
// Software license. You should have received a copy of this license
// along with this source code; you will also find a current copy of
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
//
// To contact the maintainers of this program write to
// panda3d-general@lists.sourceforge.net .
//
////////////////////////////////////////////////////////////////////
#include "auxSceneData.h"
TypeHandle AuxSceneData::_type_handle;

View File

@ -0,0 +1,62 @@
// Filename: auxSceneData.h
// Created by: drose (27Sep04)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
//
// All use of this software is subject to the terms of the Panda 3d
// Software license. You should have received a copy of this license
// along with this source code; you will also find a current copy of
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
//
// To contact the maintainers of this program write to
// panda3d-general@lists.sourceforge.net .
//
////////////////////////////////////////////////////////////////////
#ifndef AUXSCENEDATA_H
#define AUXSCENEDATA_H
#include "pandabase.h"
#include "typedReferenceCount.h"
////////////////////////////////////////////////////////////////////
// Class : AuxSceneData
// Description : This is a base class for a generic data structure
// that can be attached per-instance to the camera, to
// store per-instance data that must be preserved over
// multiple frames.
//
// In particular, this is used to implement the
// FadeLODNode, which must remember during traversal at
// what point it is in the fade, separately for each
// instance and for each camera.
////////////////////////////////////////////////////////////////////
class EXPCL_PANDA AuxSceneData : public TypedReferenceCount {
public:
INLINE AuxSceneData();
public:
static TypeHandle get_class_type() {
return _type_handle;
}
static void init_type() {
TypedReferenceCount::init_type();
register_type(_type_handle, "AuxSceneData",
TypedReferenceCount::get_class_type());
}
virtual TypeHandle get_type() const {
return get_class_type();
}
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private:
static TypeHandle _type_handle;
};
#include "auxSceneData.I"
#endif

View File

@ -29,6 +29,7 @@
#include "pmap.h"
class DisplayRegion;
class AuxSceneData;
////////////////////////////////////////////////////////////////////
// Class : Camera
@ -76,6 +77,10 @@ PUBLISHED:
bool has_tag_state(const string &tag_state) const;
CPT(RenderState) get_tag_state(const string &tag_state) const;
public:
// void set_aux_scene_data(const NodePath &node_path, AuxSceneData *data);
// AuxSceneData *get_aux_scene_data(const NodePath &node_path) const;
private:
void add_display_region(DisplayRegion *display_region);
void remove_display_region(DisplayRegion *display_region);

View File

@ -23,6 +23,7 @@
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "config_pgraph.h"
TypeHandle ColorScaleAttrib::_type_handle;

View File

@ -20,6 +20,7 @@
#include "alphaTestAttrib.h"
#include "ambientLight.h"
#include "auxSceneData.h"
#include "billboardEffect.h"
#include "camera.h"
#include "clipPlaneAttrib.h"
@ -183,6 +184,7 @@ init_libpgraph() {
AlphaTestAttrib::init_type();
AmbientLight::init_type();
AuxSceneData::init_type();
BillboardEffect::init_type();
Camera::init_type();
ClipPlaneAttrib::init_type();

View File

@ -19,6 +19,7 @@
#include "lodNode.h"
#include "cullTraverserData.h"
#include "cullTraverser.h"
#include "config_pgraph.h"
TypeHandle LODNode::_type_handle;

View File

@ -24,6 +24,7 @@
#include "pmap.h"
#include "colorScaleAttrib.h"
#include "cullTraverserData.h"
#include "cullTraverser.h"
#include <math.h>

View File

@ -19,6 +19,7 @@
#include "renderAttrib.h"
#include "bamReader.h"
#include "indent.h"
#include "config_pgraph.h"
RenderAttrib::Attribs *RenderAttrib::_attribs = NULL;
TypeHandle RenderAttrib::_type_handle;

View File

@ -19,6 +19,7 @@
#include "renderEffect.h"
#include "bamReader.h"
#include "indent.h"
#include "config_pgraph.h"
RenderEffect::Effects *RenderEffect::_effects = NULL;
TypeHandle RenderEffect::_type_handle;

View File

@ -781,7 +781,6 @@ fillin(DatagramIterator &scan, BamReader *manager) {
manager->read_pointer(scan);
}
else {
pgraph_cat.debug() << "came here too\n";
// read the boolean if _off_all_stages
_off_all_stages = scan.get_bool();
// read the number of off_stages