diff --git a/dtool/src/cppparser/cppArrayType.cxx b/dtool/src/cppparser/cppArrayType.cxx index cc7d01609b..e5970d3c12 100644 --- a/dtool/src/cppparser/cppArrayType.cxx +++ b/dtool/src/cppparser/cppArrayType.cxx @@ -1,6 +1,19 @@ -// Filename: cppArrayType.C +// Filename: cppArrayType.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPArrayType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPArrayType:: CPPArrayType(CPPType *element_type, CPPExpression *bounds) : @@ -30,7 +43,7 @@ CPPArrayType(CPPType *element_type, CPPExpression *bounds) : //////////////////////////////////////////////////////////////////// bool CPPArrayType:: is_fully_specified() const { - return CPPType::is_fully_specified() && + return CPPType::is_fully_specified() && _element_type->is_fully_specified(); } @@ -89,7 +102,7 @@ is_equivalent(const CPPType &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPArrayType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPArrayType:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -100,12 +113,12 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, } CPPArrayType *rep = new CPPArrayType(*this); - rep->_element_type = + rep->_element_type = _element_type->substitute_decl(subst, current_scope, global_scope) ->as_type(); - + if (_bounds != NULL) { - rep->_bounds = + rep->_bounds = _bounds->substitute_decl(subst, current_scope, global_scope) ->as_expression(); } @@ -123,7 +136,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPArrayType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPArrayType:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -155,14 +168,14 @@ output_instance(ostream &out, int indent_level, CPPScope *scope, brackets << "]"; string bracketsstr = brackets.str(); - _element_type->output_instance(out, indent_level, scope, complete, + _element_type->output_instance(out, indent_level, scope, complete, prename, name + bracketsstr); } //////////////////////////////////////////////////////////////////// // Function: CPPArrayType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPArrayType:: get_subtype() const { @@ -172,7 +185,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPArrayType::as_array_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPArrayType *CPPArrayType:: as_array_type() { diff --git a/dtool/src/cppparser/cppArrayType.h b/dtool/src/cppparser/cppArrayType.h index d02968a48d..2045fa42b0 100644 --- a/dtool/src/cppparser/cppArrayType.h +++ b/dtool/src/cppparser/cppArrayType.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPARRAYTYPE_H #define CPPARRAYTYPE_H diff --git a/dtool/src/cppparser/cppBisonDefs.h b/dtool/src/cppparser/cppBisonDefs.h index ec86fbe239..a8d98ed98a 100644 --- a/dtool/src/cppparser/cppBisonDefs.h +++ b/dtool/src/cppparser/cppBisonDefs.h @@ -1,7 +1,20 @@ -// Filename: cppBison.h +// Filename: cppBisonDefs.h // Created by: drose (17Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPBISON_H #define CPPBISON_H diff --git a/dtool/src/cppparser/cppClassTemplateParameter.cxx b/dtool/src/cppparser/cppClassTemplateParameter.cxx index 32e74d9b01..627996a0c6 100644 --- a/dtool/src/cppparser/cppClassTemplateParameter.cxx +++ b/dtool/src/cppparser/cppClassTemplateParameter.cxx @@ -1,6 +1,19 @@ -// Filename: cppClassTemplateParameter.C +// Filename: cppClassTemplateParameter.cxx // Created by: drose (28Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPClassTemplateParameter::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPClassTemplateParameter:: CPPClassTemplateParameter(CPPIdentifier *ident, CPPType *default_type) : @@ -36,7 +49,7 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPClassTemplateParameter::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPClassTemplateParameter:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -56,7 +69,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { //////////////////////////////////////////////////////////////////// // Function: CPPClassTemplateParameter::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPClassTemplateParameter:: get_subtype() const { @@ -66,7 +79,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPClassTemplateParameter::as_classTemplateParameter // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPClassTemplateParameter *CPPClassTemplateParameter:: as_class_template_parameter() { diff --git a/dtool/src/cppparser/cppClassTemplateParameter.h b/dtool/src/cppparser/cppClassTemplateParameter.h index 65ea2e3849..280bc3ab20 100644 --- a/dtool/src/cppparser/cppClassTemplateParameter.h +++ b/dtool/src/cppparser/cppClassTemplateParameter.h @@ -2,6 +2,19 @@ // Created by: drose (28Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPCLASSTEMPLATEPARAMETER_H #define CPPCLASSTEMPLATEPARAMETER_H diff --git a/dtool/src/cppparser/cppCommentBlock.cxx b/dtool/src/cppparser/cppCommentBlock.cxx index f0cb9aeb31..5cd4014a1e 100644 --- a/dtool/src/cppparser/cppCommentBlock.cxx +++ b/dtool/src/cppparser/cppCommentBlock.cxx @@ -1,6 +1,19 @@ -// Filename: cppCommentBlock.C +// Filename: cppCommentBlock.cxx // Created by: drose (15Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cppCommentBlock.h" diff --git a/dtool/src/cppparser/cppCommentBlock.h b/dtool/src/cppparser/cppCommentBlock.h index 6a996ff612..21e5b79ea8 100644 --- a/dtool/src/cppparser/cppCommentBlock.h +++ b/dtool/src/cppparser/cppCommentBlock.h @@ -1,6 +1,19 @@ // Filename: cppCommentBlock.h // Created by: drose (15Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CPPCOMMENTBLOCK_H diff --git a/dtool/src/cppparser/cppConstType.cxx b/dtool/src/cppparser/cppConstType.cxx index 6b8d547cc6..28c367a7b7 100644 --- a/dtool/src/cppparser/cppConstType.cxx +++ b/dtool/src/cppparser/cppConstType.cxx @@ -1,6 +1,19 @@ -// Filename: cppConstType.C +// Filename: cppConstType.cxx // Created by: drose (28Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPConstType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPConstType:: CPPConstType(CPPType *wrapped_around) : @@ -28,17 +41,17 @@ CPPConstType(CPPType *wrapped_around) : //////////////////////////////////////////////////////////////////// bool CPPConstType:: is_fully_specified() const { - return CPPType::is_fully_specified() && + return CPPType::is_fully_specified() && _wrapped_around->is_fully_specified(); } //////////////////////////////////////////////////////////////////// // Function: CPPConstType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPConstType:: -substitute_decl(CPPDeclaration::SubstDecl &subst, +substitute_decl(CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) { SubstDecl::const_iterator si = subst.find(this); if (si != subst.end()) { @@ -46,7 +59,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, } CPPConstType *rep = new CPPConstType(*this); - rep->_wrapped_around = + rep->_wrapped_around = _wrapped_around->substitute_decl(subst, current_scope, global_scope) ->as_type(); @@ -114,7 +127,7 @@ is_equivalent(const CPPType &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPConstType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPConstType:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -134,14 +147,14 @@ void CPPConstType:: output_instance(ostream &out, int indent_level, CPPScope *scope, bool complete, const string &prename, const string &name) const { - _wrapped_around->output_instance(out, indent_level, scope, complete, + _wrapped_around->output_instance(out, indent_level, scope, complete, "const " + prename, name); } //////////////////////////////////////////////////////////////////// // Function: CPPConstType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPConstType:: get_subtype() const { @@ -151,7 +164,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPConstType::as_const_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPConstType *CPPConstType:: as_const_type() { diff --git a/dtool/src/cppparser/cppConstType.h b/dtool/src/cppparser/cppConstType.h index 8708dc1b68..b298b085f9 100644 --- a/dtool/src/cppparser/cppConstType.h +++ b/dtool/src/cppparser/cppConstType.h @@ -2,6 +2,19 @@ // Created by: drose (28Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPCONSTTYPE_H #define CPPCONSTTYPE_H diff --git a/dtool/src/cppparser/cppDeclaration.cxx b/dtool/src/cppparser/cppDeclaration.cxx index 8411265ae0..e113eee476 100644 --- a/dtool/src/cppparser/cppDeclaration.cxx +++ b/dtool/src/cppparser/cppDeclaration.cxx @@ -1,6 +1,19 @@ -// Filename: cppDeclaration.C +// Filename: cppDeclaration.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration:: CPPDeclaration(const CPPFile &file) : @@ -24,7 +37,7 @@ CPPDeclaration(const CPPFile &file) : //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration:: CPPDeclaration(const CPPDeclaration ©) : @@ -38,7 +51,7 @@ CPPDeclaration(const CPPDeclaration ©) : //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration:: ~CPPDeclaration() { @@ -47,7 +60,7 @@ CPPDeclaration:: //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::Equivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPDeclaration:: operator == (const CPPDeclaration &other) const { @@ -60,7 +73,7 @@ operator == (const CPPDeclaration &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::Nonequivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPDeclaration:: operator != (const CPPDeclaration &other) const { @@ -70,7 +83,7 @@ operator != (const CPPDeclaration &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPDeclaration:: operator < (const CPPDeclaration &other) const { @@ -121,10 +134,10 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::instantiate // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPDeclaration:: -instantiate(const CPPTemplateParameterList *, +instantiate(const CPPTemplateParameterList *, CPPScope *, CPPScope *, CPPPreprocessor *error_sink) const { if (error_sink != NULL) { @@ -136,7 +149,7 @@ instantiate(const CPPTemplateParameterList *, //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPDeclaration:: substitute_decl(SubstDecl &subst, CPPScope *, CPPScope *) { @@ -150,7 +163,7 @@ substitute_decl(SubstDecl &subst, CPPScope *, CPPScope *) { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_instance // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstance *CPPDeclaration:: as_instance() { @@ -160,7 +173,7 @@ as_instance() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_class_template_parameter // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPClassTemplateParameter *CPPDeclaration:: as_class_template_parameter() { @@ -170,7 +183,7 @@ as_class_template_parameter() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_typedef // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypedef *CPPDeclaration:: as_typedef() { @@ -180,7 +193,7 @@ as_typedef() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_type_declaration // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypeDeclaration *CPPDeclaration:: as_type_declaration() { @@ -190,7 +203,7 @@ as_type_declaration() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_expression // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression *CPPDeclaration:: as_expression() { @@ -200,7 +213,7 @@ as_expression() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPType *CPPDeclaration:: as_type() { @@ -210,7 +223,7 @@ as_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_namespace // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPNamespace *CPPDeclaration:: as_namespace() { @@ -220,7 +233,7 @@ as_namespace() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_using // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPUsing *CPPDeclaration:: as_using() { @@ -230,7 +243,7 @@ as_using() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_simple_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPSimpleType *CPPDeclaration:: as_simple_type() { @@ -240,7 +253,7 @@ as_simple_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_pointer_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPPointerType *CPPDeclaration:: as_pointer_type() { @@ -250,7 +263,7 @@ as_pointer_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_reference_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPReferenceType *CPPDeclaration:: as_reference_type() { @@ -260,7 +273,7 @@ as_reference_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_array_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPArrayType *CPPDeclaration:: as_array_type() { @@ -270,7 +283,7 @@ as_array_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_const_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPConstType *CPPDeclaration:: as_const_type() { @@ -280,7 +293,7 @@ as_const_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_function_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionType *CPPDeclaration:: as_function_type() { @@ -290,7 +303,7 @@ as_function_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_function_group // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionGroup *CPPDeclaration:: as_function_group() { @@ -300,7 +313,7 @@ as_function_group() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_extension_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExtensionType *CPPDeclaration:: as_extension_type() { @@ -310,7 +323,7 @@ as_extension_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_struct_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPStructType *CPPDeclaration:: as_struct_type() { @@ -320,7 +333,7 @@ as_struct_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_enum_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPEnumType *CPPDeclaration:: as_enum_type() { @@ -330,7 +343,7 @@ as_enum_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_tbd_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTBDType *CPPDeclaration:: as_tbd_type() { @@ -340,7 +353,7 @@ as_tbd_type() { //////////////////////////////////////////////////////////////////// // Function: CPPDeclaration::as_type_proxy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypeProxy *CPPDeclaration:: as_type_proxy() { diff --git a/dtool/src/cppparser/cppDeclaration.h b/dtool/src/cppparser/cppDeclaration.h index c0efd94e8e..463a6375a5 100644 --- a/dtool/src/cppparser/cppDeclaration.h +++ b/dtool/src/cppparser/cppDeclaration.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPDECLARATION_H #define CPPDECLARATION_H diff --git a/dtool/src/cppparser/cppEnumType.cxx b/dtool/src/cppparser/cppEnumType.cxx index 2bbb6162e1..cc861bc7fc 100644 --- a/dtool/src/cppparser/cppEnumType.cxx +++ b/dtool/src/cppparser/cppEnumType.cxx @@ -1,6 +1,19 @@ -// Filename: cppEnumType.C +// Filename: cppEnumType.cxx // Created by: drose (25Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPEnumType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPEnumType:: CPPEnumType(CPPIdentifier *ident, CPPScope *current_scope, @@ -27,11 +40,11 @@ CPPEnumType(CPPIdentifier *ident, CPPScope *current_scope, //////////////////////////////////////////////////////////////////// // Function: CPPEnumType::add_element // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPEnumType:: add_element(const string &name, CPPScope *scope, CPPExpression *value) { - CPPType *type = + CPPType *type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned)); CPPIdentifier *ident = new CPPIdentifier(name); @@ -55,7 +68,7 @@ is_incomplete() const { //////////////////////////////////////////////////////////////////// // Function: CPPEnumType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPEnumType:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -67,7 +80,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, CPPEnumType *rep = new CPPEnumType(*this); if (_ident != NULL) { - rep->_ident = + rep->_ident = _ident->substitute_decl(subst, current_scope, global_scope); } @@ -84,7 +97,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPEnumType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPEnumType:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -104,7 +117,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { if (_ident != NULL) { out << " " << _ident->get_local_name(scope); } - + out << " {\n"; Elements::const_iterator ei; for (ei = _elements.begin(); ei != _elements.end(); ++ei) { @@ -121,7 +134,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { //////////////////////////////////////////////////////////////////// // Function: CPPEnumType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPEnumType:: get_subtype() const { @@ -131,7 +144,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPEnumType::as_enum_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPEnumType *CPPEnumType:: as_enum_type() { diff --git a/dtool/src/cppparser/cppEnumType.h b/dtool/src/cppparser/cppEnumType.h index 75dc17cb93..54c2412863 100644 --- a/dtool/src/cppparser/cppEnumType.h +++ b/dtool/src/cppparser/cppEnumType.h @@ -2,6 +2,19 @@ // Created by: drose (25Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPENUMTYPE_H #define CPPENUMTYPE_H @@ -40,7 +53,7 @@ public: virtual SubType get_subtype() const; virtual CPPEnumType *as_enum_type(); - + typedef vector Elements; Elements _elements; }; diff --git a/dtool/src/cppparser/cppExpression.cxx b/dtool/src/cppparser/cppExpression.cxx index 003e476e31..d15a32eac7 100644 --- a/dtool/src/cppparser/cppExpression.cxx +++ b/dtool/src/cppparser/cppExpression.cxx @@ -1,6 +1,19 @@ -// Filename: cppExpression.C +// Filename: cppExpression.cxx // Created by: drose (25Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -23,7 +36,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression::Result:: Result() { @@ -33,7 +46,7 @@ Result() { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression::Result:: Result(int value) { @@ -44,7 +57,7 @@ Result(int value) { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression::Result:: Result(double value) { @@ -55,7 +68,7 @@ Result(double value) { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression::Result:: Result(void *value) { @@ -67,7 +80,7 @@ Result(void *value) { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::as_integer // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPExpression::Result:: as_integer() const { @@ -91,7 +104,7 @@ as_integer() const { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::as_real // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// double CPPExpression::Result:: as_real() const { @@ -115,7 +128,7 @@ as_real() const { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::as_pointer // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void *CPPExpression::Result:: as_pointer() const { @@ -139,7 +152,7 @@ as_pointer() const { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Result::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPExpression::Result:: output(ostream &out) const { @@ -168,11 +181,11 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CPPExpresion::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: CPPExpression(int value) : - CPPDeclaration(CPPFile()) + CPPDeclaration(CPPFile()) { _type = T_integer; _u._integer = value; @@ -181,11 +194,11 @@ CPPExpression(int value) : //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: CPPExpression(double value) : - CPPDeclaration(CPPFile()) + CPPDeclaration(CPPFile()) { _type = T_real; _u._real = value; @@ -194,11 +207,11 @@ CPPExpression(double value) : //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: CPPExpression(const string &value) : - CPPDeclaration(CPPFile()) + CPPDeclaration(CPPFile()) { _type = T_string; _str = value; @@ -207,14 +220,14 @@ CPPExpression(const string &value) : //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: -CPPExpression(CPPIdentifier *ident, CPPScope *current_scope, +CPPExpression(CPPIdentifier *ident, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink) : - CPPDeclaration(CPPFile()) + CPPDeclaration(CPPFile()) { - CPPDeclaration *decl = + CPPDeclaration *decl = ident->find_symbol(current_scope, global_scope, error_sink); if (decl != NULL) { @@ -239,11 +252,11 @@ CPPExpression(CPPIdentifier *ident, CPPScope *current_scope, //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: CPPExpression(int unary_operator, CPPExpression *op1) : - CPPDeclaration(CPPFile()) + CPPDeclaration(CPPFile()) { _type = T_unary_operation; _u._op._operator = unary_operator; @@ -255,11 +268,11 @@ CPPExpression(int unary_operator, CPPExpression *op1) : //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: CPPExpression(int binary_operator, CPPExpression *op1, CPPExpression *op2) : - CPPDeclaration(CPPFile()) + CPPDeclaration(CPPFile()) { _type = T_binary_operation; _u._op._operator = binary_operator; @@ -271,12 +284,12 @@ CPPExpression(int binary_operator, CPPExpression *op1, CPPExpression *op2) : //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: -CPPExpression(int trinary_operator, CPPExpression *op1, CPPExpression *op2, +CPPExpression(int trinary_operator, CPPExpression *op1, CPPExpression *op2, CPPExpression *op3) : - CPPDeclaration(CPPFile()) + CPPDeclaration(CPPFile()) { _type = T_trinary_operation; _u._op._operator = trinary_operator; @@ -349,7 +362,7 @@ new_op(CPPType *type, CPPExpression *op1) { //////////////////////////////////////////////////////////////////// // Function: CPPExpression::named sizeof_func constructor // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression CPPExpression:: sizeof_func(CPPType *type) { @@ -363,7 +376,7 @@ sizeof_func(CPPType *type) { //////////////////////////////////////////////////////////////////// // Function: CPPExpression::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression:: ~CPPExpression() { @@ -372,7 +385,7 @@ CPPExpression:: //////////////////////////////////////////////////////////////////// // Function: CPPExpression::evaluate // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression::Result CPPExpression:: evaluate() const { @@ -432,7 +445,7 @@ evaluate() const { // In all other cases, both operands must be valid in order for // the operation to be valid. - if (r2._type == RT_error && + if (r2._type == RT_error && (_u._op._operator != OROR && _u._op._operator != ANDAND)) { return r2; } @@ -459,7 +472,7 @@ evaluate() const { case UNARY_NEGATE: return Result(~r1.as_integer()); - + case UNARY_MINUS: return (r1._type == RT_real) ? Result(-r1.as_real()) : Result(-r1.as_integer()); @@ -567,7 +580,7 @@ evaluate() const { return Result(r1.as_integer() >> r2.as_integer()); case '?': - return r1.as_integer() ? + return r1.as_integer() ? _u._op._op2->evaluate() : _u._op._op3->evaluate(); case '.': @@ -606,19 +619,19 @@ CPPType *CPPExpression:: determine_type() const { CPPType *t1, *t2; - CPPType *int_type = + CPPType *int_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); - CPPType *bool_type = + CPPType *bool_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); - CPPType *float_type = + CPPType *float_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); - CPPType *char_type = + CPPType *char_type = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); - CPPType *const_char_type = + CPPType *const_char_type = CPPType::new_type(new CPPConstType(char_type)); CPPType *char_star_type = @@ -678,7 +691,7 @@ determine_type() const { case UNARY_NEGATE: return int_type; - + case UNARY_MINUS: return t1; @@ -765,12 +778,12 @@ determine_type() const { //////////////////////////////////////////////////////////////////// // Function: CPPExpression::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPExpression:: substitute_decl(CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) { - CPPDeclaration *top = + CPPDeclaration *top = CPPDeclaration::substitute_decl(subst, current_scope, global_scope); if (top != this) { return top; @@ -800,7 +813,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, case T_typecast: case T_construct: case T_new: - rep->_u._typecast._op1 = + rep->_u._typecast._op1 = _u._typecast._op1->substitute_decl(subst, current_scope, global_scope) ->as_expression(); any_changed = any_changed || (rep->_u._typecast._op1 != _u._typecast._op1); @@ -809,21 +822,21 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, case T_default_construct: case T_default_new: case T_sizeof: - rep->_u._typecast._to = + rep->_u._typecast._to = _u._typecast._to->substitute_decl(subst, current_scope, global_scope) ->as_type(); any_changed = any_changed || (rep->_u._typecast._to != _u._typecast._to); break; case T_trinary_operation: - rep->_u._op._op3 = + rep->_u._op._op3 = _u._op._op3->substitute_decl(subst, current_scope, global_scope) ->as_expression(); any_changed = any_changed || (rep->_u._op._op3 != _u._op._op3); // fall through case T_binary_operation: - rep->_u._op._op2 = + rep->_u._op._op2 = _u._op._op2->substitute_decl(subst, current_scope, global_scope) ->as_expression(); any_changed = any_changed || (rep->_u._op._op2 != _u._op._op2); @@ -896,7 +909,7 @@ is_tbd() const { //////////////////////////////////////////////////////////////////// // Function: CPPExpression::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPExpression:: output(ostream &out, int indent_level, CPPScope *scope, bool) const { @@ -967,7 +980,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { break; case T_construct: - out << "(" << _u._typecast._to->get_typedef_name(scope) + out << "(" << _u._typecast._to->get_typedef_name(scope) << "(" << *_u._typecast._op1 << "))"; break; @@ -999,7 +1012,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { case UNARY_NEGATE: out << "(~ " << *_u._op._op1 << ")"; break; - + case UNARY_MINUS: out << "(- " << *_u._op._op1 << ")"; break; @@ -1027,31 +1040,31 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { case OROR: out << "(" << *_u._op._op1 << " || " << *_u._op._op2 << ")"; break; - + case ANDAND: out << "(" << *_u._op._op1 << " && " << *_u._op._op2 << ")"; break; - + case EQCOMPARE: out << "(" << *_u._op._op1 << " == " << *_u._op._op2 << ")"; break; - + case NECOMPARE: out << "(" << *_u._op._op1 << " != " << *_u._op._op2 << ")"; break; - + case LECOMPARE: out << "(" << *_u._op._op1 << " <= " << *_u._op._op2 << ")"; break; - + case GECOMPARE: out << "(" << *_u._op._op1 << " >= " << *_u._op._op2 << ")"; break; - + case LSHIFT: out << "(" << *_u._op._op1 << " << " << *_u._op._op2 << ")"; break; - + case RSHIFT: out << "(" << *_u._op._op1 << " >> " << *_u._op._op2 << ")"; break; @@ -1075,7 +1088,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { case ',': // Comma, no parens are used out << *_u._op._op1 << ", " << *_u._op._op2; break; - + default: out << "(" << *_u._op._op1 << " " << (char)_u._op._operator << " " << *_u._op._op2 << ")"; @@ -1095,7 +1108,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { //////////////////////////////////////////////////////////////////// // Function: CPPExpression::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPExpression:: get_subtype() const { @@ -1105,7 +1118,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPExpression::as_expression // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpression *CPPExpression:: as_expression() { diff --git a/dtool/src/cppparser/cppExpression.h b/dtool/src/cppparser/cppExpression.h index 6d899eb7d6..c4ced140d7 100644 --- a/dtool/src/cppparser/cppExpression.h +++ b/dtool/src/cppparser/cppExpression.h @@ -2,6 +2,19 @@ // Created by: drose (25Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPEXPRESSION_H #define CPPEXPRESSION_H @@ -79,7 +92,7 @@ public: virtual CPPExpression *as_expression(); - + enum Type { T_integer, T_real, @@ -97,7 +110,7 @@ public: T_binary_operation, T_trinary_operation, }; - + Type _type; string _str; union { @@ -136,4 +149,4 @@ operator << (ostream &out, const CPPExpression::Result &result) { #endif - + diff --git a/dtool/src/cppparser/cppExpressionParser.cxx b/dtool/src/cppparser/cppExpressionParser.cxx index 2d841404b4..9e62f6ce89 100644 --- a/dtool/src/cppparser/cppExpressionParser.cxx +++ b/dtool/src/cppparser/cppExpressionParser.cxx @@ -1,6 +1,19 @@ -// Filename: cppExpressionParser.C +// Filename: cppExpressionParser.cxx // Created by: drose (25Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPExpressionParser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpressionParser:: CPPExpressionParser(CPPScope *current_scope, CPPScope *global_scope) : @@ -23,7 +36,7 @@ CPPExpressionParser(CPPScope *current_scope, CPPScope *global_scope) : //////////////////////////////////////////////////////////////////// // Function: CPPExpressionParser::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExpressionParser:: ~CPPExpressionParser() { @@ -32,7 +45,7 @@ CPPExpressionParser:: //////////////////////////////////////////////////////////////////// // Function: CPPExpressionParser::parse_expr // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPExpressionParser:: parse_expr(const string &expr) { @@ -49,7 +62,7 @@ parse_expr(const string &expr) { //////////////////////////////////////////////////////////////////// // Function: CPPExpressionParser::parse_expr // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPExpressionParser:: parse_expr(const string &expr, const CPPPreprocessor &filepos) { @@ -68,7 +81,7 @@ parse_expr(const string &expr, const CPPPreprocessor &filepos) { //////////////////////////////////////////////////////////////////// // Function: CPPExpressionParser::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPExpressionParser:: output(ostream &out) const { diff --git a/dtool/src/cppparser/cppExpressionParser.h b/dtool/src/cppparser/cppExpressionParser.h index 186312b05b..069798c976 100644 --- a/dtool/src/cppparser/cppExpressionParser.h +++ b/dtool/src/cppparser/cppExpressionParser.h @@ -2,6 +2,19 @@ // Created by: drose (25Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPEXPRESSIONPARSER_H #define CPPEXPRESSIONPARSER_H @@ -40,4 +53,4 @@ operator << (ostream &out, const CPPExpressionParser &ep) { #endif - + diff --git a/dtool/src/cppparser/cppExtensionType.cxx b/dtool/src/cppparser/cppExtensionType.cxx index 4a35a226c0..de857ec6fb 100644 --- a/dtool/src/cppparser/cppExtensionType.cxx +++ b/dtool/src/cppparser/cppExtensionType.cxx @@ -1,6 +1,19 @@ -// Filename: cppExtensionType.C +// Filename: cppExtensionType.cxx // Created by: drose (21Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -13,10 +26,10 @@ //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::Conextensionor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExtensionType:: -CPPExtensionType(CPPExtensionType::Type type, +CPPExtensionType(CPPExtensionType::Type type, CPPIdentifier *ident, CPPScope *current_scope, const CPPFile &file) : CPPType(file), @@ -30,7 +43,7 @@ CPPExtensionType(CPPExtensionType::Type type, //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::get_simple_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPExtensionType:: get_simple_name() const { @@ -43,7 +56,7 @@ get_simple_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::get_local_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPExtensionType:: get_local_name(CPPScope *scope) const { @@ -56,7 +69,7 @@ get_local_name(CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::get_fully_scoped_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPExtensionType:: get_fully_scoped_name() const { @@ -96,7 +109,7 @@ is_tbd() const { //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPExtensionType:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -108,7 +121,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, CPPExtensionType *rep = new CPPExtensionType(*this); if (_ident != NULL) { - rep->_ident = + rep->_ident = _ident->substitute_decl(subst, current_scope, global_scope); } @@ -147,7 +160,7 @@ is_equivalent(const CPPType &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPExtensionType:: output(ostream &out, int, CPPScope *scope, bool) const { @@ -170,7 +183,7 @@ output(ostream &out, int, CPPScope *scope, bool) const { //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPExtensionType:: get_subtype() const { @@ -180,7 +193,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPExtensionType::as_extension_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExtensionType *CPPExtensionType:: as_extension_type() { diff --git a/dtool/src/cppparser/cppExtensionType.h b/dtool/src/cppparser/cppExtensionType.h index a28395ba9c..c081600a11 100644 --- a/dtool/src/cppparser/cppExtensionType.h +++ b/dtool/src/cppparser/cppExtensionType.h @@ -2,6 +2,19 @@ // Created by: drose (21Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPEXTENSIONTYPE_H #define CPPEXTENSIONTYPE_H diff --git a/dtool/src/cppparser/cppFile.cxx b/dtool/src/cppparser/cppFile.cxx index b405a9f6b3..f9f6baf61a 100644 --- a/dtool/src/cppparser/cppFile.cxx +++ b/dtool/src/cppparser/cppFile.cxx @@ -1,6 +1,19 @@ -// Filename: cppFile.C +// Filename: cppFile.cxx // Created by: drose (11Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -11,7 +24,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPFile::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFile:: CPPFile(const Filename &filename, const Filename &filename_as_referenced, @@ -27,12 +40,12 @@ CPPFile(const Filename &filename, const Filename &filename_as_referenced, //////////////////////////////////////////////////////////////////// // Function: CPPFile::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFile:: CPPFile(const CPPFile ©) : - _filename(copy._filename), - _filename_as_referenced(copy._filename_as_referenced), + _filename(copy._filename), + _filename_as_referenced(copy._filename_as_referenced), _source(copy._source) { } @@ -40,7 +53,7 @@ CPPFile(const CPPFile ©) : //////////////////////////////////////////////////////////////////// // Function: CPPFile::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPFile:: operator = (const CPPFile ©) { @@ -52,7 +65,7 @@ operator = (const CPPFile ©) { //////////////////////////////////////////////////////////////////// // Function: CPPFile::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFile:: ~CPPFile() { @@ -83,13 +96,13 @@ bool CPPFile:: is_c_or_i_file(const Filename &filename) { string extension = filename.get_extension(); // downcase the extension. - for (string::iterator ei = extension.begin(); + for (string::iterator ei = extension.begin(); ei != extension.end(); ++ei) { (*ei) = tolower(*ei); } - - return (extension == "c" || extension == "cc" || + + return (extension == "c" || extension == "cc" || extension == "cpp" || extension == "c++" || extension == "cxx" || extension == "i" || extension == "t"); } @@ -119,13 +132,13 @@ bool CPPFile:: is_c_file(const Filename &filename) { string extension = filename.get_extension(); // downcase the extension. - for (string::iterator ei = extension.begin(); + for (string::iterator ei = extension.begin(); ei != extension.end(); ++ei) { (*ei) = tolower(*ei); } - - return (extension == "c" || extension == "cc" || + + return (extension == "c" || extension == "cc" || extension == "cpp" || extension == "c++" || extension == "cxx"); } @@ -148,7 +161,7 @@ replace_nearer(const CPPFile &other) { //////////////////////////////////////////////////////////////////// // Function: CPPFile::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPFile:: operator < (const CPPFile &other) const { @@ -158,7 +171,7 @@ operator < (const CPPFile &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPFile::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPFile:: operator == (const CPPFile &other) const { @@ -168,7 +181,7 @@ operator == (const CPPFile &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPFile::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPFile:: operator != (const CPPFile &other) const { @@ -178,7 +191,7 @@ operator != (const CPPFile &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPFile::c_str // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// const char *CPPFile:: c_str() const { @@ -188,7 +201,7 @@ c_str() const { //////////////////////////////////////////////////////////////////// // Function: CPPFile::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPFile:: empty() const { diff --git a/dtool/src/cppparser/cppFile.h b/dtool/src/cppparser/cppFile.h index 386b86b16f..2d1e5e0537 100644 --- a/dtool/src/cppparser/cppFile.h +++ b/dtool/src/cppparser/cppFile.h @@ -2,6 +2,19 @@ // Created by: drose (11Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPFILE_H #define CPPFILE_H @@ -25,8 +38,8 @@ public: S_none, // File is internally generated }; - CPPFile(const Filename &filename = "", - const Filename &filename_as_referenced = "", + CPPFile(const Filename &filename = "", + const Filename &filename_as_referenced = "", Source source = S_none); CPPFile(const CPPFile ©); void operator = (const CPPFile ©); diff --git a/dtool/src/cppparser/cppFunctionGroup.cxx b/dtool/src/cppparser/cppFunctionGroup.cxx index d9deefed94..1feb8c04d8 100644 --- a/dtool/src/cppparser/cppFunctionGroup.cxx +++ b/dtool/src/cppparser/cppFunctionGroup.cxx @@ -1,6 +1,19 @@ -// Filename: cppFunctionGroup.C +// Filename: cppFunctionGroup.cxx // Created by: drose (11Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPFunctionGroup::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionGroup:: CPPFunctionGroup(const string &name) : @@ -24,7 +37,7 @@ CPPFunctionGroup(const string &name) : //////////////////////////////////////////////////////////////////// // Function: CPPFunctionGroup::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionGroup:: ~CPPFunctionGroup() { @@ -60,7 +73,7 @@ get_return_type() const { //////////////////////////////////////////////////////////////////// // Function: CPPFunctionGroup::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPFunctionGroup:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -80,7 +93,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { //////////////////////////////////////////////////////////////////// // Function: CPPFunctionGroup::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPFunctionGroup:: get_subtype() const { @@ -90,7 +103,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPFunctionGroup::as_function_group // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionGroup *CPPFunctionGroup:: as_function_group() { diff --git a/dtool/src/cppparser/cppFunctionGroup.h b/dtool/src/cppparser/cppFunctionGroup.h index 419fb47164..9bc2ee081c 100644 --- a/dtool/src/cppparser/cppFunctionGroup.h +++ b/dtool/src/cppparser/cppFunctionGroup.h @@ -2,6 +2,19 @@ // Created by: drose (11Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPFUNCTIONGROUP_H #define CPPFUNCTIONGROUP_H @@ -41,4 +54,4 @@ public: #endif - + diff --git a/dtool/src/cppparser/cppFunctionType.cxx b/dtool/src/cppparser/cppFunctionType.cxx index 1c1a8c0aeb..41032aecb0 100644 --- a/dtool/src/cppparser/cppFunctionType.cxx +++ b/dtool/src/cppparser/cppFunctionType.cxx @@ -1,6 +1,19 @@ -// Filename: cppFunctionType.C +// Filename: cppFunctionType.cxx // Created by: drose (21Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,13 +25,13 @@ //////////////////////////////////////////////////////////////////// // Function: CPPFunctionType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionType:: CPPFunctionType(CPPType *return_type, CPPParameterList *parameters, int flags) : CPPType(CPPFile()), - _return_type(return_type), + _return_type(return_type), _parameters(parameters), _flags(flags) { @@ -38,10 +51,10 @@ CPPFunctionType(CPPType *return_type, CPPParameterList *parameters, //////////////////////////////////////////////////////////////////// // Function: CPPFunctionType::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionType:: -CPPFunctionType(const CPPFunctionType ©) : +CPPFunctionType(const CPPFunctionType ©) : CPPType(copy), _return_type(copy._return_type), _parameters(copy._parameters), @@ -53,7 +66,7 @@ CPPFunctionType(const CPPFunctionType ©) : //////////////////////////////////////////////////////////////////// // Function: CPPFunctionType::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPFunctionType:: operator = (const CPPFunctionType ©) { @@ -74,7 +87,7 @@ operator = (const CPPFunctionType ©) { //////////////////////////////////////////////////////////////////// bool CPPFunctionType:: is_fully_specified() const { - return CPPType::is_fully_specified() && + return CPPType::is_fully_specified() && _return_type->is_fully_specified() && _parameters->is_fully_specified(); } @@ -82,7 +95,7 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPFunctionType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPFunctionType:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -93,11 +106,11 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, } CPPFunctionType *rep = new CPPFunctionType(*this); - rep->_return_type = + rep->_return_type = _return_type->substitute_decl(subst, current_scope, global_scope) ->as_type(); - rep->_parameters = + rep->_parameters = _parameters->substitute_decl(subst, current_scope, global_scope); if (rep->_return_type == _return_type && @@ -122,7 +135,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, CPPType *CPPFunctionType:: resolve_type(CPPScope *current_scope, CPPScope *global_scope) { CPPType *rtype = _return_type->resolve_type(current_scope, global_scope); - CPPParameterList *params = + CPPParameterList *params = _parameters->resolve_type(current_scope, global_scope); if (rtype != _return_type || params != _parameters) { @@ -153,7 +166,7 @@ is_tbd() const { //////////////////////////////////////////////////////////////////// // Function: CPPFunctionType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPFunctionType:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -223,10 +236,10 @@ output_instance(ostream &out, int indent_level, CPPScope *scope, } else { if (prename.empty()) { - _return_type->output_instance(out, indent_level, scope, complete, + _return_type->output_instance(out, indent_level, scope, complete, "", prename + name + str); } else { - _return_type->output_instance(out, indent_level, scope, complete, + _return_type->output_instance(out, indent_level, scope, complete, "", "(" + prename + name + ")" + str); } } @@ -251,8 +264,8 @@ get_num_default_parameters() const { const CPPParameterList::Parameters ¶ms = _parameters->_parameters; CPPParameterList::Parameters::const_reverse_iterator pi; int count = 0; - for (pi = params.rbegin(); - pi != params.rend() && (*pi)->_initializer != (CPPExpression *)NULL; + for (pi = params.rbegin(); + pi != params.rend() && (*pi)->_initializer != (CPPExpression *)NULL; ++pi) { count++; } @@ -263,7 +276,7 @@ get_num_default_parameters() const { //////////////////////////////////////////////////////////////////// // Function: CPPFunctionType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPFunctionType:: get_subtype() const { @@ -273,7 +286,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPFunctionType::as_function_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionType *CPPFunctionType:: as_function_type() { diff --git a/dtool/src/cppparser/cppFunctionType.h b/dtool/src/cppparser/cppFunctionType.h index 4b0a3d12d4..b86a7406bd 100644 --- a/dtool/src/cppparser/cppFunctionType.h +++ b/dtool/src/cppparser/cppFunctionType.h @@ -2,6 +2,19 @@ // Created by: drose (21Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPFUNCTIONTYPE_H #define CPPFUNCTIONTYPE_H diff --git a/dtool/src/cppparser/cppGlobals.cxx b/dtool/src/cppparser/cppGlobals.cxx index 3099235c3c..1d523a48e1 100644 --- a/dtool/src/cppparser/cppGlobals.cxx +++ b/dtool/src/cppparser/cppGlobals.cxx @@ -1,6 +1,19 @@ -// Filename: cppGlobals.C +// Filename: cppGlobals.cxx // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cppGlobals.h" diff --git a/dtool/src/cppparser/cppGlobals.h b/dtool/src/cppparser/cppGlobals.h index 6aafc64354..01f37b47f7 100644 --- a/dtool/src/cppparser/cppGlobals.h +++ b/dtool/src/cppparser/cppGlobals.h @@ -1,6 +1,19 @@ // Filename: cppGlobals.h // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CPPGLOBALS_H diff --git a/dtool/src/cppparser/cppIdentifier.cxx b/dtool/src/cppparser/cppIdentifier.cxx index 1837c404e6..72af3c4fab 100644 --- a/dtool/src/cppparser/cppIdentifier.cxx +++ b/dtool/src/cppparser/cppIdentifier.cxx @@ -1,6 +1,19 @@ -// Filename: cppIdentifier.C +// Filename: cppIdentifier.cxx // Created by: drose (26Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -16,7 +29,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPIdentifier:: CPPIdentifier(const string &name, const CPPFile &file) : _file(file) { @@ -27,7 +40,7 @@ CPPIdentifier(const string &name, const CPPFile &file) : _file(file) { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPIdentifier:: CPPIdentifier(const CPPNameComponent &name) { @@ -38,7 +51,7 @@ CPPIdentifier(const CPPNameComponent &name) { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::add_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPIdentifier:: add_name(const string &name) { @@ -48,7 +61,7 @@ add_name(const string &name) { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::add_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPIdentifier:: add_name(const CPPNameComponent &name) { @@ -58,7 +71,7 @@ add_name(const CPPNameComponent &name) { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::Equivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPIdentifier:: operator == (const CPPIdentifier &other) const { @@ -75,9 +88,9 @@ operator == (const CPPIdentifier &other) const { } //////////////////////////////////////////////////////////////////// -// Function: CPPIdentifier::Nonequivalence Operator +// Function: CPPIdentifier::Nonequivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPIdentifier:: operator != (const CPPIdentifier &other) const { @@ -87,7 +100,7 @@ operator != (const CPPIdentifier &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPIdentifier:: operator < (const CPPIdentifier &other) const { @@ -106,7 +119,7 @@ operator < (const CPPIdentifier &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::is_scoped // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPIdentifier:: is_scoped() const { @@ -117,7 +130,7 @@ is_scoped() const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::get_simple_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPIdentifier:: get_simple_name() const { @@ -127,7 +140,7 @@ get_simple_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::get_local_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPIdentifier:: get_local_name(CPPScope *scope) const { @@ -143,7 +156,7 @@ get_local_name(CPPScope *scope) const { // Determine the scope of everything up until but not including the // last name. CPPScope *my_scope = get_scope(scope, NULL); - + if (my_scope == NULL) { result = get_fully_scoped_name(); } else if (my_scope == scope) { @@ -162,7 +175,7 @@ get_local_name(CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::get_fully_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPIdentifier:: get_fully_scoped_name() const { @@ -219,7 +232,7 @@ is_tbd() const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::get_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPIdentifier:: get_scope(CPPScope *current_scope, CPPScope *global_scope, @@ -263,7 +276,7 @@ get_scope(CPPScope *current_scope, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::get_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPIdentifier:: get_scope(CPPScope *current_scope, CPPScope *global_scope, @@ -339,7 +352,7 @@ find_type(CPPScope *current_scope, CPPScope *global_scope, if (type != NULL) { if (!type->is_incomplete() || force_instantiate) { type = type->instantiate(_names.back().get_templ(), - current_scope, global_scope, + current_scope, global_scope, error_sink)->as_type(); // If we ended up with another template, instantiate later. @@ -380,9 +393,9 @@ find_type(CPPScope *current_scope, CPPScope *global_scope, if (is_fully_specified()) { // If our identifier fully specifies the instantiation, then // apply it. - CPPDeclaration *decl = + CPPDeclaration *decl = type->instantiate(_names.back().get_templ(), - current_scope, global_scope, + current_scope, global_scope, error_sink); assert(decl != NULL); CPPType *new_type = decl->as_type(); @@ -398,7 +411,7 @@ find_type(CPPScope *current_scope, CPPScope *global_scope, type = CPPType::new_type(new CPPTBDType((CPPIdentifier *)this)); } // type->_file.replace_nearer(_file); - } + } return type; } @@ -406,7 +419,7 @@ find_type(CPPScope *current_scope, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::find_symbol // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPIdentifier:: find_symbol(CPPScope *current_scope, CPPScope *global_scope, @@ -428,7 +441,7 @@ find_symbol(CPPScope *current_scope, CPPScope *global_scope, sym = CPPType::new_type(new CPPTBDType((CPPIdentifier *)this)); } else { // Instantiate the symbol. - sym = sym->instantiate(_names.back().get_templ(), current_scope, + sym = sym->instantiate(_names.back().get_templ(), current_scope, global_scope, error_sink); } } @@ -440,7 +453,7 @@ find_symbol(CPPScope *current_scope, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::find_template // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPIdentifier:: find_template(CPPScope *current_scope, CPPScope *global_scope, @@ -455,7 +468,7 @@ find_template(CPPScope *current_scope, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::find_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPIdentifier:: find_scope(CPPScope *current_scope, CPPScope *global_scope, @@ -471,7 +484,7 @@ find_scope(CPPScope *current_scope, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::substitute_decl // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPIdentifier *CPPIdentifier:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -500,7 +513,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPIdentifier:: output(ostream &out, CPPScope *scope) const { @@ -515,7 +528,7 @@ output(ostream &out, CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::output_local_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPIdentifier:: output_local_name(ostream &out, CPPScope *scope) const { @@ -529,7 +542,7 @@ output_local_name(ostream &out, CPPScope *scope) const { // Determine the scope of everything up until but not including the // last name. CPPScope *my_scope = get_scope(scope, NULL); - + if (my_scope == NULL) { output_fully_scoped_name(out); } else { @@ -541,7 +554,7 @@ output_local_name(ostream &out, CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPIdentifier::output_fully_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPIdentifier:: output_fully_scoped_name(ostream &out) const { diff --git a/dtool/src/cppparser/cppIdentifier.h b/dtool/src/cppparser/cppIdentifier.h index 0f26436e89..e692031f75 100644 --- a/dtool/src/cppparser/cppIdentifier.h +++ b/dtool/src/cppparser/cppIdentifier.h @@ -2,6 +2,19 @@ // Created by: drose (26Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPIDENTIFIER_H #define CPPIDENTIFIER_H diff --git a/dtool/src/cppparser/cppInstance.cxx b/dtool/src/cppparser/cppInstance.cxx index b379cc8b84..6be1dc33b6 100644 --- a/dtool/src/cppparser/cppInstance.cxx +++ b/dtool/src/cppparser/cppInstance.cxx @@ -1,6 +1,19 @@ -// Filename: cppInstance.C +// Filename: cppInstance.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -22,7 +35,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPInstance::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstance:: CPPInstance(CPPType *type, const string &name, int storage_class) : @@ -37,7 +50,7 @@ CPPInstance(CPPType *type, const string &name, int storage_class) : //////////////////////////////////////////////////////////////////// // Function: CPPInstance::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstance:: CPPInstance(CPPType *type, CPPIdentifier *ident, int storage_class) : @@ -73,7 +86,7 @@ CPPInstance(CPPType *type, CPPInstanceIdentifier *ii, int storage_class, //////////////////////////////////////////////////////////////////// // Function: CPPInstance::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstance:: CPPInstance(const CPPInstance ©) : @@ -89,7 +102,7 @@ CPPInstance(const CPPInstance ©) : //////////////////////////////////////////////////////////////////// // Function: CPPInstance::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstance:: ~CPPInstance() { @@ -110,10 +123,10 @@ make_typecast_function(CPPInstance *inst, CPPIdentifier *ident, CPPParameterList *parameters, int function_flags) { CPPType *type = CPPType::new_type(inst->_type); delete inst; - + function_flags |= (int)CPPFunctionType::F_operator_typecast; - CPPType *ft = + CPPType *ft = CPPType::new_type(new CPPFunctionType(type, parameters, function_flags)); return new CPPInstance(ft, ident); @@ -122,7 +135,7 @@ make_typecast_function(CPPInstance *inst, CPPIdentifier *ident, //////////////////////////////////////////////////////////////////// // Function: CPPInstance::Equivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPInstance:: operator == (const CPPInstance &other) const { @@ -138,7 +151,7 @@ operator == (const CPPInstance &other) const { // on the identifier. if ((_ident == NULL && other._ident != NULL) || (_ident != NULL && other._ident == NULL) || - (_ident != NULL && other._ident != NULL && *_ident != *other._ident)) + (_ident != NULL && other._ident != NULL && *_ident != *other._ident)) { return false; } @@ -147,7 +160,7 @@ operator == (const CPPInstance &other) const { if ((_initializer == NULL && other._initializer != NULL) || (_initializer != NULL && other._initializer == NULL) || (_initializer != NULL && other._initializer != NULL && - *_initializer != *other._initializer)) + *_initializer != *other._initializer)) { return false; } @@ -158,7 +171,7 @@ operator == (const CPPInstance &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::Nonequivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPInstance:: operator != (const CPPInstance &other) const { @@ -168,7 +181,7 @@ operator != (const CPPInstance &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPInstance:: operator < (const CPPInstance &other) const { @@ -184,7 +197,7 @@ operator < (const CPPInstance &other) const { // on the identifier. if ((_ident == NULL && other._ident != NULL) || (_ident != NULL && other._ident == NULL) || - (_ident != NULL && other._ident != NULL && *_ident != *other._ident)) + (_ident != NULL && other._ident != NULL && *_ident != *other._ident)) { if (_ident == NULL || other._ident == NULL) { return _ident < other._ident; @@ -196,7 +209,7 @@ operator < (const CPPInstance &other) const { if ((_initializer == NULL && other._initializer != NULL) || (_initializer != NULL && other._initializer == NULL) || (_initializer != NULL && other._initializer != NULL && - *_initializer != *other._initializer)) + *_initializer != *other._initializer)) { if (_initializer == NULL || other._initializer == NULL) { return _initializer < other._initializer; @@ -234,7 +247,7 @@ set_initializer(CPPExpression *initializer) { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::is_scoped // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPInstance:: is_scoped() const { @@ -248,7 +261,7 @@ is_scoped() const { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::get_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPInstance:: get_scope(CPPScope *current_scope, CPPScope *global_scope, @@ -263,7 +276,7 @@ get_scope(CPPScope *current_scope, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPInstance::get_simple_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPInstance:: get_simple_name() const { @@ -277,7 +290,7 @@ get_simple_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::get_local_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPInstance:: get_local_name(CPPScope *scope) const { @@ -291,7 +304,7 @@ get_local_name(CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::get_fully_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPInstance:: get_fully_scoped_name() const { @@ -327,7 +340,7 @@ check_for_constructor(CPPScope *current_scope, CPPScope *global_scope) { (new CPPSimpleType(CPPSimpleType::T_void)); _type = CPPType::new_type - (new CPPFunctionType(void_type, func->_parameters, + (new CPPFunctionType(void_type, func->_parameters, func->_flags | CPPFunctionType::F_constructor)); } else if (method_name == "~" + class_name) { @@ -335,7 +348,7 @@ check_for_constructor(CPPScope *current_scope, CPPScope *global_scope) { (new CPPSimpleType(CPPSimpleType::T_void)); _type = CPPType::new_type - (new CPPFunctionType(void_type, func->_parameters, + (new CPPFunctionType(void_type, func->_parameters, func->_flags | CPPFunctionType::F_destructor)); } } @@ -345,7 +358,7 @@ check_for_constructor(CPPScope *current_scope, CPPScope *global_scope) { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::instantiate // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPInstance:: instantiate(const CPPTemplateParameterList *actual_params, @@ -353,7 +366,7 @@ instantiate(const CPPTemplateParameterList *actual_params, CPPPreprocessor *error_sink) const { if (!is_template()) { if (error_sink != NULL) { - error_sink->warning("Ignoring template parameters for instance " + + error_sink->warning("Ignoring template parameters for instance " + _ident->get_local_name()); } return (CPPInstance *)this; @@ -374,7 +387,7 @@ instantiate(const CPPTemplateParameterList *actual_params, actual_params->build_subst_decl(tscope->_parameters, subst, current_scope, global_scope); - CPPInstance *inst = + CPPInstance *inst = ((CPPInstance *)this)->substitute_decl(subst, current_scope, global_scope) ->as_instance(); if (inst == this) { @@ -419,19 +432,19 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPInstance:: substitute_decl(CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) { - CPPDeclaration *top = + CPPDeclaration *top = CPPDeclaration::substitute_decl(subst, current_scope, global_scope); if (top != this) { return top; } CPPInstance *rep = new CPPInstance(*this); - CPPDeclaration *new_type = + CPPDeclaration *new_type = _type->substitute_decl(subst, current_scope, global_scope); rep->_type = new_type->as_type(); @@ -441,7 +454,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, } if (_initializer != NULL) { - rep->_initializer = + rep->_initializer = _initializer->substitute_decl(subst, current_scope, global_scope) ->as_expression(); } @@ -459,7 +472,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPInstance::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPInstance:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -534,7 +547,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete, //////////////////////////////////////////////////////////////////// // Function: CPPInstance::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPInstance:: get_subtype() const { @@ -544,7 +557,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPInstance::as_instance // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstance *CPPInstance:: as_instance() { diff --git a/dtool/src/cppparser/cppInstance.h b/dtool/src/cppparser/cppInstance.h index 9e55b09a2b..fde6962fd8 100644 --- a/dtool/src/cppparser/cppInstance.h +++ b/dtool/src/cppparser/cppInstance.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPINSTANCE_H #define CPPINSTANCE_H @@ -40,7 +53,7 @@ public: SC_mutable = 0x200, // This bit is only set by CPPStructType::check_virtual(). - SC_inherited_virtual = 0x400, + SC_inherited_virtual = 0x400, }; CPPInstance(CPPType *type, const string &name, int storage_class = 0); diff --git a/dtool/src/cppparser/cppInstanceIdentifier.cxx b/dtool/src/cppparser/cppInstanceIdentifier.cxx index 4d1f83dbbc..0cc7d4d6f5 100644 --- a/dtool/src/cppparser/cppInstanceIdentifier.cxx +++ b/dtool/src/cppparser/cppInstanceIdentifier.cxx @@ -1,6 +1,19 @@ -// Filename: cppInstanceIdentifier.C +// Filename: cppInstanceIdentifier.cxx // Created by: drose (21Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -16,7 +29,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::Modifier::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstanceIdentifier::Modifier:: Modifier(CPPInstanceIdentifierType type) : @@ -31,7 +44,7 @@ Modifier(CPPInstanceIdentifierType type) : //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::Modifier::named func_type constructor // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier:: func_type(CPPParameterList *params, int flags) { @@ -44,7 +57,7 @@ func_type(CPPParameterList *params, int flags) { //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::Modifier::named array_type constructor // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier:: array_type(CPPExpression *expr) { @@ -56,7 +69,7 @@ array_type(CPPExpression *expr) { //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::Modifier::named scoped_pointer_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier:: scoped_pointer_type(CPPIdentifier *scoping) { @@ -68,7 +81,7 @@ scoped_pointer_type(CPPIdentifier *scoping) { //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPInstanceIdentifier:: CPPInstanceIdentifier(CPPIdentifier *ident) : _ident(ident) { @@ -93,7 +106,7 @@ unroll_type(CPPType *start_type) { //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::add_modifier // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPInstanceIdentifier:: add_modifier(CPPInstanceIdentifierType type) { @@ -103,7 +116,7 @@ add_modifier(CPPInstanceIdentifierType type) { //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::add_modifier // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPInstanceIdentifier:: add_func_modifier(CPPParameterList *params, int flags) { @@ -118,7 +131,7 @@ add_scoped_pointer_modifier(CPPIdentifier *scoping) { //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::add_modifier // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPInstanceIdentifier:: add_array_modifier(CPPExpression *expr) { @@ -128,7 +141,7 @@ add_array_modifier(CPPExpression *expr) { //////////////////////////////////////////////////////////////////// // Function: CPPInstanceIdentifier::get_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPInstanceIdentifier:: get_scope(CPPScope *current_scope, CPPScope *global_scope, diff --git a/dtool/src/cppparser/cppInstanceIdentifier.h b/dtool/src/cppparser/cppInstanceIdentifier.h index 94b2f090f4..d7ddff7d19 100644 --- a/dtool/src/cppparser/cppInstanceIdentifier.h +++ b/dtool/src/cppparser/cppInstanceIdentifier.h @@ -2,6 +2,19 @@ // Created by: drose (21Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPINSTANCEIDENTIFIER_H #define CPPINSTANCEIDENTIFIER_H @@ -51,7 +64,7 @@ public: CPPScope *get_scope(CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink = NULL) const; - + CPPIdentifier *_ident; class Modifier { diff --git a/dtool/src/cppparser/cppManifest.cxx b/dtool/src/cppparser/cppManifest.cxx index a890efda0e..1f3fd014bc 100644 --- a/dtool/src/cppparser/cppManifest.cxx +++ b/dtool/src/cppparser/cppManifest.cxx @@ -1,6 +1,19 @@ -// Filename: cppManifest.C +// Filename: cppManifest.cxx // Created by: drose (22Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPManifest::ExpansionNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPManifest::ExpansionNode:: ExpansionNode(int parm_number) : @@ -23,7 +36,7 @@ ExpansionNode(int parm_number) : //////////////////////////////////////////////////////////////////// // Function: CPPManifest::ExpansionNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPManifest::ExpansionNode:: ExpansionNode(const string &str) : @@ -34,7 +47,7 @@ ExpansionNode(const string &str) : //////////////////////////////////////////////////////////////////// // Function: CPPManifest::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPManifest:: CPPManifest(const string &args, const CPPFile &file) : _file(file) { @@ -52,7 +65,7 @@ CPPManifest(const string &args, const CPPFile &file) : _file(file) { } _name = args.substr(0, p); - + vector_string parameter_names; if (args[p] == '(') { @@ -78,7 +91,7 @@ CPPManifest(const string &args, const CPPFile &file) : _file(file) { //////////////////////////////////////////////////////////////////// // Function: CPPManifest::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPManifest:: ~CPPManifest() { @@ -92,7 +105,7 @@ CPPManifest:: //////////////////////////////////////////////////////////////////// // Function: CPPManifest::expand // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPManifest:: expand(const vector_string &args) const { @@ -133,7 +146,7 @@ determine_type() const { //////////////////////////////////////////////////////////////////// // Function: CPPManifest::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPManifest:: output(ostream &out) const { @@ -168,10 +181,10 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CPPManifest::parse_parameters // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPManifest:: -parse_parameters(const string &args, size_t &p, +parse_parameters(const string &args, size_t &p, vector_string ¶meter_names) { assert(p < args.size()); assert(args[p] == '('); @@ -184,7 +197,7 @@ parse_parameters(const string &args, size_t &p, while (p < args.size() && args[p] != ')') { // Here's the beginning of a parm. size_t q = p; - while (p < args.size() && !isspace(args[p]) && + while (p < args.size() && !isspace(args[p]) && args[p] != ')' && args[p] != ',') { p++; } @@ -208,7 +221,7 @@ parse_parameters(const string &args, size_t &p, //////////////////////////////////////////////////////////////////// // Function: CPPManifest::save_expansion // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPManifest:: save_expansion(const string &exp, const vector_string ¶meter_names) { @@ -240,7 +253,7 @@ save_expansion(const string &exp, const vector_string ¶meter_names) { pnum = i; } } - + if (pnum != -1) { // Yep! if (last != q) { diff --git a/dtool/src/cppparser/cppManifest.h b/dtool/src/cppparser/cppManifest.h index 30ea437036..eba373bbcb 100644 --- a/dtool/src/cppparser/cppManifest.h +++ b/dtool/src/cppparser/cppManifest.h @@ -2,6 +2,19 @@ // Created by: drose (22Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPMANIFEST_H #define CPPMANIFEST_H diff --git a/dtool/src/cppparser/cppNameComponent.cxx b/dtool/src/cppparser/cppNameComponent.cxx index ee8f6a4f78..f0957c56cd 100644 --- a/dtool/src/cppparser/cppNameComponent.cxx +++ b/dtool/src/cppparser/cppNameComponent.cxx @@ -1,6 +1,19 @@ -// Filename: cppNameComponent.C +// Filename: cppNameComponent.cxx // Created by: drose (12Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,11 +23,11 @@ //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPNameComponent:: CPPNameComponent(const string &name) : - _name(name) + _name(name) { _templ = (CPPTemplateParameterList *)NULL; } @@ -22,7 +35,7 @@ CPPNameComponent(const string &name) : //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::Equivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPNameComponent:: operator == (const CPPNameComponent &other) const { @@ -45,7 +58,7 @@ operator == (const CPPNameComponent &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::Nonequivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPNameComponent:: operator != (const CPPNameComponent &other) const { @@ -55,7 +68,7 @@ operator != (const CPPNameComponent &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPNameComponent:: operator < (const CPPNameComponent &other) const { @@ -74,7 +87,7 @@ operator < (const CPPNameComponent &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPNameComponent:: get_name() const { @@ -84,7 +97,7 @@ get_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::get_name_with_templ // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPNameComponent:: get_name_with_templ(CPPScope *scope) const { @@ -101,7 +114,7 @@ get_name_with_templ(CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::get_templ // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTemplateParameterList *CPPNameComponent:: get_templ() const { @@ -111,7 +124,7 @@ get_templ() const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPNameComponent:: empty() const { @@ -121,7 +134,7 @@ empty() const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::has_templ // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPNameComponent:: has_templ() const { @@ -146,7 +159,7 @@ is_tbd() const { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::set_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPNameComponent:: set_name(const string &name) { @@ -156,7 +169,7 @@ set_name(const string &name) { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::append_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPNameComponent:: append_name(const string &name) { @@ -166,7 +179,7 @@ append_name(const string &name) { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::set_templ // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPNameComponent:: set_templ(CPPTemplateParameterList *templ) { @@ -176,7 +189,7 @@ set_templ(CPPTemplateParameterList *templ) { //////////////////////////////////////////////////////////////////// // Function: CPPNameComponent::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPNameComponent:: output(ostream &out) const { diff --git a/dtool/src/cppparser/cppNameComponent.h b/dtool/src/cppparser/cppNameComponent.h index ca6deeaaf0..b3f2c970e3 100644 --- a/dtool/src/cppparser/cppNameComponent.h +++ b/dtool/src/cppparser/cppNameComponent.h @@ -2,6 +2,19 @@ // Created by: drose (12Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPNAMECOMPONENT_H #define CPPNAMECOMPONENT_H diff --git a/dtool/src/cppparser/cppNamespace.cxx b/dtool/src/cppparser/cppNamespace.cxx index 7004309f34..70d0757433 100644 --- a/dtool/src/cppparser/cppNamespace.cxx +++ b/dtool/src/cppparser/cppNamespace.cxx @@ -1,6 +1,19 @@ -// Filename: cppNamespace.C +// Filename: cppNamespace.cxx // Created by: drose (16Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPNamespace:: CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file) : @@ -24,7 +37,7 @@ CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file) : //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::get_simple_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPNamespace:: get_simple_name() const { @@ -37,7 +50,7 @@ get_simple_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::get_local_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPNamespace:: get_local_name(CPPScope *scope) const { @@ -50,7 +63,7 @@ get_local_name(CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::get_fully_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPNamespace:: get_fully_scoped_name() const { @@ -63,7 +76,7 @@ get_fully_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::get_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPNamespace:: get_scope() const { @@ -73,7 +86,7 @@ get_scope() const { //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPNamespace:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -96,7 +109,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPNamespace:: get_subtype() const { @@ -106,7 +119,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPNamespace::as_namespace // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPNamespace *CPPNamespace:: as_namespace() { diff --git a/dtool/src/cppparser/cppNamespace.h b/dtool/src/cppparser/cppNamespace.h index 41fb7c931d..36133becdf 100644 --- a/dtool/src/cppparser/cppNamespace.h +++ b/dtool/src/cppparser/cppNamespace.h @@ -2,6 +2,19 @@ // Created by: drose (16Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPNAMESPACE_H #define CPPNAMESPACE_H diff --git a/dtool/src/cppparser/cppParameterList.cxx b/dtool/src/cppparser/cppParameterList.cxx index 59edaa3387..5ecc4f0ddd 100644 --- a/dtool/src/cppparser/cppParameterList.cxx +++ b/dtool/src/cppparser/cppParameterList.cxx @@ -1,15 +1,19 @@ -// Filename: cppParameterList.C +// Filename: cppParameterList.cxx // Created by: drose (21Oct99) -// +// //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97 Walt Disney Imagineering, Inc. -// -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -19,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPParameterList::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPParameterList:: CPPParameterList() { @@ -53,7 +57,7 @@ is_equivalent(const CPPParameterList &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPParameterList::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPParameterList:: operator == (const CPPParameterList &other) const { @@ -74,7 +78,7 @@ operator == (const CPPParameterList &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPParameterList::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPParameterList:: operator != (const CPPParameterList &other) const { @@ -84,7 +88,7 @@ operator != (const CPPParameterList &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPParameterList::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPParameterList:: operator < (const CPPParameterList &other) const { @@ -140,7 +144,7 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPParameterList::substitute_decl // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPParameterList *CPPParameterList:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -148,7 +152,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, CPPParameterList *rep = new CPPParameterList; bool any_changed = false; for (int i = 0; i < (int)_parameters.size(); i++) { - CPPInstance *inst = + CPPInstance *inst = _parameters[i]->substitute_decl(subst, current_scope, global_scope) ->as_instance(); if (inst != _parameters[i]) { diff --git a/dtool/src/cppparser/cppParameterList.h b/dtool/src/cppparser/cppParameterList.h index 3d3b76aded..b1bf367e01 100644 --- a/dtool/src/cppparser/cppParameterList.h +++ b/dtool/src/cppparser/cppParameterList.h @@ -2,6 +2,19 @@ // Created by: drose (21Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPPARAMETERLIST_H #define CPPPARAMETERLIST_H diff --git a/dtool/src/cppparser/cppParser.cxx b/dtool/src/cppparser/cppParser.cxx index cb271c889a..695a677ae2 100644 --- a/dtool/src/cppparser/cppParser.cxx +++ b/dtool/src/cppparser/cppParser.cxx @@ -1,6 +1,19 @@ -// Filename: cppParser.C +// Filename: cppParser.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -17,7 +30,7 @@ bool cppparser_output_class_keyword = true; //////////////////////////////////////////////////////////////////// // Function: CPPParser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPParser:: CPPParser() : CPPScope((CPPScope *)NULL, CPPNameComponent(""), V_public) { @@ -41,7 +54,7 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPParser::parse_file // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPParser:: parse_file(const string &filename) { @@ -53,7 +66,7 @@ parse_file(const string &filename) { return get_error_count() == 0; } - + //////////////////////////////////////////////////////////////////// // Function: CPPParser::parse_expr // Access: Public @@ -65,7 +78,7 @@ CPPExpression *CPPParser:: parse_expr(const string &expr) { return CPPPreprocessor::parse_expr(expr, this, this); } - + //////////////////////////////////////////////////////////////////// // Function: CPPParser::parse_type // Access: Public diff --git a/dtool/src/cppparser/cppParser.h b/dtool/src/cppparser/cppParser.h index b6f9d3aff4..5f3f9a7c55 100644 --- a/dtool/src/cppparser/cppParser.h +++ b/dtool/src/cppparser/cppParser.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPPARSER_H #define CPPPARSER_H @@ -42,4 +55,4 @@ extern bool cppparser_output_class_keyword; #endif - + diff --git a/dtool/src/cppparser/cppPointerType.cxx b/dtool/src/cppparser/cppPointerType.cxx index a96b0a9c1f..0339532f7b 100644 --- a/dtool/src/cppparser/cppPointerType.cxx +++ b/dtool/src/cppparser/cppPointerType.cxx @@ -1,6 +1,19 @@ -// Filename: cppPointerType.C +// Filename: cppPointerType.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -11,7 +24,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPPointerType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPPointerType:: CPPPointerType(CPPType *pointing_at) : @@ -30,14 +43,14 @@ CPPPointerType(CPPType *pointing_at) : //////////////////////////////////////////////////////////////////// bool CPPPointerType:: is_fully_specified() const { - return CPPType::is_fully_specified() && + return CPPType::is_fully_specified() && _pointing_at->is_fully_specified(); } //////////////////////////////////////////////////////////////////// // Function: CPPPointerType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPPointerType:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -48,7 +61,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, } CPPPointerType *rep = new CPPPointerType(*this); - rep->_pointing_at = + rep->_pointing_at = _pointing_at->substitute_decl(subst, current_scope, global_scope) ->as_type(); @@ -116,13 +129,13 @@ is_equivalent(const CPPType &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPPointerType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPointerType:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { _pointing_at->output(out, indent_level, scope, complete); CPPFunctionType *ftype = _pointing_at->as_function_type(); - if (ftype != NULL && + if (ftype != NULL && ((ftype->_flags & CPPFunctionType::F_method_pointer) != 0)) { // We have to output pointers-to-method with a scoping before the // '*'. @@ -147,21 +160,21 @@ output_instance(ostream &out, int indent_level, CPPScope *scope, string star = "*"; CPPFunctionType *ftype = _pointing_at->as_function_type(); - if (ftype != NULL && + if (ftype != NULL && ((ftype->_flags & CPPFunctionType::F_method_pointer) != 0)) { // We have to output pointers-to-method with a scoping before the // '*'. star = ftype->_class_owner->get_fully_scoped_name() + "::*"; } - _pointing_at->output_instance(out, indent_level, scope, complete, + _pointing_at->output_instance(out, indent_level, scope, complete, star + prename, name); } //////////////////////////////////////////////////////////////////// // Function: CPPPointerType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPPointerType:: get_subtype() const { @@ -171,7 +184,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPPointerType::as_pointer_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPPointerType *CPPPointerType:: as_pointer_type() { diff --git a/dtool/src/cppparser/cppPointerType.h b/dtool/src/cppparser/cppPointerType.h index 5936265938..e33401896f 100644 --- a/dtool/src/cppparser/cppPointerType.h +++ b/dtool/src/cppparser/cppPointerType.h @@ -2,14 +2,18 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97 Walt Disney Imagineering, Inc. // -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CPPPOINTERTYPE_H diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 859701e46a..26ba349019 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -1,6 +1,19 @@ -// Filename: cppPreprocessor.C +// Filename: cppPreprocessor.cxx // Created by: drose (22Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -66,7 +79,7 @@ trim_blanks(const string &str) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::InputFile::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPPreprocessor::InputFile:: InputFile() { @@ -80,7 +93,7 @@ InputFile() { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::InputFile::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPPreprocessor::InputFile:: ~InputFile() { @@ -92,7 +105,7 @@ CPPPreprocessor::InputFile:: //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::InputFile::open // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPPreprocessor::InputFile:: open(const CPPFile &file) { @@ -101,19 +114,19 @@ open(const CPPFile &file) { _file = file; ifstream *in = new ifstream; _in = in; - + return _file._filename.open_read(*in); } //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::InputFile::connect_input // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPPreprocessor::InputFile:: connect_input(const string &input) { assert(_in == NULL); - + _input = input; _in = new istringstream(_input); return !_in->fail(); @@ -122,13 +135,13 @@ connect_input(const string &input) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::InputFile::get // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor::InputFile:: get() { assert(_in != NULL); int c = _in->get(); - + // Quietly skip over embedded carriage-return characters. We // shouldn't see any of these unless there was some DOS-to-Unix file // conversion problem. @@ -146,7 +159,7 @@ get() { _col_number = 1; } break; - + default: if (!_lock_position) { _col_number++; @@ -159,7 +172,7 @@ get() { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPPreprocessor:: CPPPreprocessor() { @@ -207,7 +220,7 @@ get_verbose() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::copy_filepos // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: copy_filepos(const CPPPreprocessor &other) { @@ -220,7 +233,7 @@ copy_filepos(const CPPPreprocessor &other) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_file // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFile CPPPreprocessor:: get_file() const { @@ -233,7 +246,7 @@ get_file() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_line_number // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_line_number() const { @@ -246,7 +259,7 @@ get_line_number() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_col_number // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_col_number() const { @@ -259,7 +272,7 @@ get_col_number() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_next_token // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_next_token() { @@ -379,7 +392,7 @@ get_next_token0() { return token; } _saved_tokens.push_back(token); - return CPPToken(SCOPING, first_line, first_col, first_file, + return CPPToken(SCOPING, first_line, first_col, first_file, name, result); } @@ -394,7 +407,7 @@ get_next_token0() { // indentifier wants template instantiation, assume the angle // bracket begins the instantiation and call yacc recursively to // parse the template parameters. - CPPDeclaration *decl = + CPPDeclaration *decl = ident->find_template(current_scope, global_scope); if (decl != NULL) { ident->_names.back().set_templ @@ -409,12 +422,12 @@ get_next_token0() { int token_type = IDENTIFIER; CPPDeclaration *decl = ident->find_symbol(current_scope, global_scope); - if (decl != NULL && + if (decl != NULL && (decl->as_typedef() != NULL || decl->as_type() != NULL)) { token_type = TYPENAME_IDENTIFIER; } - return CPPToken(token_type, first_line, first_col, first_file, + return CPPToken(token_type, first_line, first_col, first_file, name, result); } @@ -425,7 +438,7 @@ get_next_token0() { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::warning // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: warning(const string &message, int line, int col, CPPFile file) { @@ -447,7 +460,7 @@ warning(const string &message, int line, int col, CPPFile file) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::error // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: error(const string &message, int line, int col, CPPFile file) { @@ -475,7 +488,7 @@ error(const string &message, int line, int col, CPPFile file) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_warning_count // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_warning_count() const { @@ -485,7 +498,7 @@ get_warning_count() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_error_count // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_error_count() const { @@ -532,7 +545,7 @@ get_comment_before(int line, CPPFile file) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::init_cpp // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPPreprocessor:: init_cpp(const CPPFile &file) { @@ -546,7 +559,7 @@ init_cpp(const CPPFile &file) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::init_const_expr // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPPreprocessor:: init_const_expr(const string &expr) { @@ -559,7 +572,7 @@ init_const_expr(const string &expr) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::init_type // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPPreprocessor:: init_type(const string &type) { @@ -572,7 +585,7 @@ init_type(const string &type) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::push_file // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPPreprocessor:: push_file(const CPPFile &file) { @@ -581,7 +594,7 @@ push_file(const CPPFile &file) { #endif _files.push_back(InputFile()); InputFile &infile = _files.back(); - + if (infile.open(file)) { // Record the fact that we opened the file for the benefit of user // code. @@ -602,12 +615,12 @@ push_file(const CPPFile &file) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::push_string // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPPreprocessor:: push_string(const string &input, bool lock_position) { #ifdef CPP_VERBOSE_LEX - cerr << "Pushing to string \"" << input + cerr << "Pushing to string \"" << input << "\"\nlock_position = " << lock_position << "\n"; #endif CPPFile first_file = get_file(); @@ -616,8 +629,8 @@ push_string(const string &input, bool lock_position) { _files.push_back(InputFile()); InputFile &infile = _files.back(); - - if (infile.connect_input(input)) { + + if (infile.connect_input(input)) { if (lock_position) { infile._file = first_file; infile._line_number = first_line; @@ -637,7 +650,7 @@ push_string(const string &input, bool lock_position) { _files.pop_back(); return false; } - + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::parse_expr // Access: Protected @@ -650,7 +663,7 @@ push_string(const string &input, bool lock_position) { // of this function defined for CPPParser. //////////////////////////////////////////////////////////////////// CPPExpression *CPPPreprocessor:: -parse_expr(const string &input_expr, CPPScope *current_scope, +parse_expr(const string &input_expr, CPPScope *current_scope, CPPScope *global_scope) { // Get a copy of the expression string we can modify. string expr = input_expr; @@ -710,7 +723,7 @@ parse_expr(const string &input_expr, CPPScope *current_scope, //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::internal_get_next_token // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: internal_get_next_token() { @@ -889,7 +902,7 @@ internal_get_next_token() { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::skip_whitespace // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: skip_whitespace(int c) { @@ -915,7 +928,7 @@ skip_whitespace(int c) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::skip_comment // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: skip_comment(int c) { @@ -941,14 +954,14 @@ skip_comment(int c) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::skip_c_comment // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: skip_c_comment(int c) { if (_save_comments) { CPPCommentBlock *comment = new CPPCommentBlock; _comments.push_back(comment); - + comment->_file = get_file(); comment->_line_number = get_line_number(); comment->_last_line = get_line_number(); @@ -970,16 +983,16 @@ skip_c_comment(int c) { c = get(); } } - - warning("Comment is unterminated", - comment->_line_number, comment->_col_number, + + warning("Comment is unterminated", + comment->_line_number, comment->_col_number, comment->_file); } else { CPPFile first_file = get_file(); int first_line_number = get_line_number(); int first_col_number = get_col_number() - 2; - + while (c != EOF) { if (c == '*') { c = get(); @@ -990,19 +1003,19 @@ skip_c_comment(int c) { c = get(); } } - - warning("Comment is unterminated", - first_line_number, first_col_number, + + warning("Comment is unterminated", + first_line_number, first_col_number, first_file); } - + return c; } //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::skip_cpp_comment // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: skip_cpp_comment(int c) { @@ -1021,7 +1034,7 @@ skip_cpp_comment(int c) { } else { // Otherwise, this begins a new comment block. comment = new CPPCommentBlock; - + comment->_file = get_file(); comment->_line_number = get_line_number(); comment->_last_line = get_line_number(); @@ -1031,12 +1044,12 @@ skip_cpp_comment(int c) { _comments.push_back(comment); } - + while (c != EOF && c != '\n') { comment->_comment += c; c = get(); } - + comment->_comment += '\n'; comment->_last_line = get_line_number(); @@ -1054,7 +1067,7 @@ skip_cpp_comment(int c) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::process_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: process_directive(int c) { @@ -1107,7 +1120,7 @@ process_directive(int c) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_preprocessor_command // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_preprocessor_command(int c, string &command) { @@ -1133,7 +1146,7 @@ get_preprocessor_command(int c, string &command) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_preprocessor_args // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get_preprocessor_args(int c, string &args) { @@ -1168,10 +1181,10 @@ get_preprocessor_args(int c, string &args) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::handle_define_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_define_directive(const string &args, int first_line, +handle_define_directive(const string &args, int first_line, int first_col, const CPPFile &first_file) { if (args.empty()) { warning("Ignoring empty #define directive", @@ -1192,10 +1205,10 @@ handle_define_directive(const string &args, int first_line, //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::handle_undef_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_undef_directive(const string &args, int first_line, +handle_undef_directive(const string &args, int first_line, int first_col, const CPPFile &first_file) { if (args.empty()) { warning("Ignoring empty #undef directive", @@ -1211,7 +1224,7 @@ handle_undef_directive(const string &args, int first_line, //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::handle_ifdef_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: handle_ifdef_directive(const string &args, int, int, const CPPFile &) { @@ -1220,15 +1233,15 @@ handle_ifdef_directive(const string &args, int, int, const CPPFile &) { // The macro is defined. We continue. return; } - + // The macro is undefined. Skip stuff. skip_false_if_block(true); } - + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::handle_ifndef_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: handle_ifndef_directive(const string &args, int, int, const CPPFile &) { @@ -1237,19 +1250,19 @@ handle_ifndef_directive(const string &args, int, int, const CPPFile &) { // The macro is undefined. We continue. return; } - + // The macro is defined. Skip stuff. skip_false_if_block(true); } - + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::handle_if_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_if_directive(const string &args, int first_line, +handle_if_directive(const string &args, int first_line, int first_col, const CPPFile &first_file) { CPPExpression *expr = parse_expr(args, global_scope, global_scope); @@ -1272,7 +1285,7 @@ handle_if_directive(const string &args, int first_line, // The expression result is true. We continue. return; } - + // The expression result is false. Skip stuff. skip_false_if_block(true); } @@ -1280,16 +1293,16 @@ handle_if_directive(const string &args, int first_line, //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::handle_include_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_include_directive(const string &args, int first_line, +handle_include_directive(const string &args, int first_line, int first_col, const CPPFile &first_file) { bool okflag = false; Filename filename; Filename filename_as_referenced; bool angle_quotes = false; - + if (!args.empty()) { if (args[0] == '"' && args[args.size() - 1] == '"') { filename = args.substr(1, args.size() - 2); @@ -1321,14 +1334,14 @@ handle_include_directive(const string &args, int first_line, // Now look for the filename. If we didn't use angle quotes, look // first in the current directory. bool found_file = false; - CPPFile::Source source = CPPFile::S_none; + CPPFile::Source source = CPPFile::S_none; if (okflag) { if (!angle_quotes) { found_file = filename.exists(); source = CPPFile::S_local; } - + // Now look for it on the include path. if (!found_file && filename.resolve_filename(_system_include_path)) { found_file = true; @@ -1339,7 +1352,7 @@ handle_include_directive(const string &args, int first_line, found_file = true; source = CPPFile::S_alternate; } - + if (!found_file) { warning("Cannot find " + filename.get_fullpath(), first_line, first_col, first_file); @@ -1355,14 +1368,14 @@ handle_include_directive(const string &args, int first_line, first_line, first_col, first_file); } } - + //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::handle_error_directive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -handle_error_directive(const string &args, int first_line, +handle_error_directive(const string &args, int first_line, int first_col, const CPPFile &first_file) { error(args, first_line, first_col, first_file); } @@ -1427,7 +1440,7 @@ skip_false_if_block(bool consider_elifs) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_quoted_char // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_quoted_char(int c) { @@ -1448,7 +1461,7 @@ get_quoted_char(int c) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_quoted_string // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_quoted_string(int c) { @@ -1462,7 +1475,7 @@ get_quoted_string(int c) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_identifier // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_identifier(int c) { @@ -1470,7 +1483,7 @@ get_identifier(int c) { int first_line = get_line_number(); int first_col = get_col_number(); string name(1, (char)c); - + c = get(); while (c != EOF && (isalnum(c) || c == '_')) { name += c; @@ -1512,12 +1525,12 @@ get_identifier(int c) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::expand_manifest // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: expand_manifest(const CPPManifest *manifest) { vector_string args; - + if (manifest->_has_parameters) { // Hmm, we're expecting arguments. extract_manifest_args(manifest->_name, manifest->_num_parameters, args); @@ -1542,10 +1555,10 @@ expand_manifest(const CPPManifest *manifest) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::extract_manifest_args // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -extract_manifest_args(const string &name, int num_args, +extract_manifest_args(const string &name, int num_args, vector_string &args) { CPPFile first_file = get_file(); int first_line = get_line_number(); @@ -1610,7 +1623,7 @@ extract_manifest_args(const string &name, int num_args, //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::expand_defined_function // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: expand_defined_function(string &expr, size_t q, size_t &p) { @@ -1637,7 +1650,7 @@ expand_defined_function(string &expr, size_t q, size_t &p) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::expand_manifest_inline // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: expand_manifest_inline(string &expr, size_t q, size_t &p, @@ -1656,10 +1669,10 @@ expand_manifest_inline(string &expr, size_t q, size_t &p, //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::extract_manifest_args_inline // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: -extract_manifest_args_inline(const string &name, int num_args, +extract_manifest_args_inline(const string &name, int num_args, vector_string &args, const string &expr, size_t &p) { // Skip whitespace till paren. @@ -1711,14 +1724,14 @@ extract_manifest_args_inline(const string &name, int num_args, //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get_number // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken CPPPreprocessor:: get_number(int c, int c2) { CPPFile first_file = get_file(); int first_line = get_line_number(); int first_col = get_col_number(); - + string num(1, (char)c); bool leading_zero = (c == '0'); bool decimal_point = (c == '.'); @@ -1820,7 +1833,7 @@ get_number(int c, int c2) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::check_keyword // Access: Private, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: check_keyword(const string &name) { @@ -1828,14 +1841,14 @@ check_keyword(const string &name) { if (name == "bool") return KW_BOOL; if (name == "catch") return KW_CATCH; if (name == "char") return KW_CHAR; - if (name == "class") return KW_CLASS; - if (name == "const") return KW_CONST; + if (name == "class") return KW_CLASS; + if (name == "const") return KW_CONST; if (name == "delete") return KW_DELETE; if (name == "double") return KW_DOUBLE; if (name == "dynamic_cast") return KW_DYNAMIC_CAST; if (name == "else") return KW_ELSE; if (name == "__end_publish") return KW_END_PUBLISH; - if (name == "enum") return KW_ENUM; + if (name == "enum") return KW_ENUM; if (name == "extern") return KW_EXTERN; if (name == "explicit") return KW_EXPLICIT; if (name == "__published") return KW_PUBLISHED; @@ -1862,16 +1875,16 @@ check_keyword(const string &name) { if (name == "sizeof") return KW_SIZEOF; if (name == "static") return KW_STATIC; if (name == "static_cast") return KW_STATIC_CAST; - if (name == "struct") return KW_STRUCT; + if (name == "struct") return KW_STRUCT; if (name == "template") return KW_TEMPLATE; if (name == "throw") return KW_THROW; if (name == "true") return KW_TRUE; if (name == "try") return KW_TRY; - if (name == "typedef") return KW_TYPEDEF; + if (name == "typedef") return KW_TYPEDEF; if (name == "typename") return KW_TYPENAME; - if (name == "union") return KW_UNION; + if (name == "union") return KW_UNION; if (name == "unsigned") return KW_UNSIGNED; - if (name == "using") return KW_USING; + if (name == "using") return KW_USING; if (name == "virtual") return KW_VIRTUAL; if (name == "void") return KW_VOID; if (name == "volatile") return KW_VOLATILE; @@ -1887,7 +1900,7 @@ check_keyword(const string &name) { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::scan_quoted // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPPreprocessor:: scan_quoted(int c) { @@ -2008,7 +2021,7 @@ should_ignore_preprocessor() const { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::get // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CPPPreprocessor:: get() { @@ -2023,7 +2036,7 @@ get() { } int c = _files.back().get(); - + while (c == EOF && !_files.empty()) { #ifdef CPP_VERBOSE_LEX cerr << "End of input stream, restoring to previous input\n"; @@ -2050,7 +2063,7 @@ get() { //////////////////////////////////////////////////////////////////// // Function: CPPPreprocessor::unget // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPPreprocessor:: unget(int c) { @@ -2090,7 +2103,7 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) { } CPPTemplateParameterList *actual_params = new CPPTemplateParameterList; - + for (pi = formal_params._parameters.begin(); pi != formal_params._parameters.end() && !_angle_bracket_found; ++pi) { diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index 705ea124cc..78b0d92b08 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -2,6 +2,19 @@ // Created by: drose (22Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPPREPROCESSOR_H #define CPPPREPROCESSOR_H @@ -144,7 +157,7 @@ private: bool should_ignore_manifest(const CPPManifest *manifest) const; bool should_ignore_preprocessor() const; - + int get(); void unget(int c); diff --git a/dtool/src/cppparser/cppReferenceType.cxx b/dtool/src/cppparser/cppReferenceType.cxx index 6b1fdee0ba..d93572d9e3 100644 --- a/dtool/src/cppparser/cppReferenceType.cxx +++ b/dtool/src/cppparser/cppReferenceType.cxx @@ -1,6 +1,19 @@ -// Filename: cppReferenceType.C +// Filename: cppReferenceType.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPReferenceType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPReferenceType:: CPPReferenceType(CPPType *pointing_at) : @@ -28,14 +41,14 @@ CPPReferenceType(CPPType *pointing_at) : //////////////////////////////////////////////////////////////////// bool CPPReferenceType:: is_fully_specified() const { - return CPPType::is_fully_specified() && + return CPPType::is_fully_specified() && _pointing_at->is_fully_specified(); } //////////////////////////////////////////////////////////////////// // Function: CPPReferenceType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPReferenceType:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -46,7 +59,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, } CPPReferenceType *rep = new CPPReferenceType(*this); - rep->_pointing_at = + rep->_pointing_at = _pointing_at->substitute_decl(subst, current_scope, global_scope) ->as_type(); @@ -114,7 +127,7 @@ is_equivalent(const CPPType &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPReferenceType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPReferenceType:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -134,14 +147,14 @@ void CPPReferenceType:: output_instance(ostream &out, int indent_level, CPPScope *scope, bool complete, const string &prename, const string &name) const { - _pointing_at->output_instance(out, indent_level, scope, complete, + _pointing_at->output_instance(out, indent_level, scope, complete, "&" + prename, name); } //////////////////////////////////////////////////////////////////// // Function: CPPReferenceType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPReferenceType:: get_subtype() const { @@ -151,7 +164,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPReferenceType::as_reference_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPReferenceType *CPPReferenceType:: as_reference_type() { diff --git a/dtool/src/cppparser/cppReferenceType.h b/dtool/src/cppparser/cppReferenceType.h index 0b6bc19b92..705d9010b1 100644 --- a/dtool/src/cppparser/cppReferenceType.h +++ b/dtool/src/cppparser/cppReferenceType.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPREFERENCETYPE_H #define CPPREFERENCETYPE_H diff --git a/dtool/src/cppparser/cppScope.cxx b/dtool/src/cppparser/cppScope.cxx index d624d39731..82dd7d65ff 100644 --- a/dtool/src/cppparser/cppScope.cxx +++ b/dtool/src/cppparser/cppScope.cxx @@ -1,6 +1,19 @@ -// Filename: cppScope.C +// Filename: cppScope.cxx // Created by: drose (21Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -26,7 +39,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPScope::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope:: CPPScope(CPPScope *parent_scope, @@ -45,7 +58,7 @@ CPPScope(CPPScope *parent_scope, //////////////////////////////////////////////////////////////////// // Function: CPPScope::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope:: ~CPPScope() { @@ -89,7 +102,7 @@ get_parent_scope() const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::set_current_vis // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: set_current_vis(CPPVisibility current_vis) { @@ -99,7 +112,7 @@ set_current_vis(CPPVisibility current_vis) { //////////////////////////////////////////////////////////////////// // Function: CPPScope::get_current_vis // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPVisibility CPPScope:: get_current_vis() const { @@ -109,7 +122,7 @@ get_current_vis() const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::add_declaration // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: add_declaration(CPPDeclaration *decl, CPPScope *global_scope, @@ -133,7 +146,7 @@ add_declaration(CPPDeclaration *decl, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPScope::add_enum_value // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: add_enum_value(CPPInstance *inst) { @@ -148,7 +161,7 @@ add_enum_value(CPPInstance *inst) { //////////////////////////////////////////////////////////////////// // Function: CPPScope::define_extension_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: define_extension_type(CPPExtensionType *type) { @@ -199,7 +212,7 @@ define_extension_type(CPPExtensionType *type) { //////////////////////////////////////////////////////////////////// // Function: CPPScope::define_namespace // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: define_namespace(CPPNamespace *scope) { @@ -211,13 +224,13 @@ define_namespace(CPPNamespace *scope) { //////////////////////////////////////////////////////////////////// // Function: CPPScope::add_using // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: add_using(CPPUsing *using_decl, CPPScope *global_scope, CPPPreprocessor *error_sink) { if (using_decl->_full_namespace) { - CPPScope *scope = + CPPScope *scope = using_decl->_ident->find_scope(this, global_scope); if (scope != NULL) { _using.insert(scope); @@ -265,8 +278,8 @@ is_fully_specified() const { } Declarations::const_iterator di; - for (di = _declarations.begin(); - di != _declarations.end() && specified; + for (di = _declarations.begin(); + di != _declarations.end() && specified; ++di) { if (!(*di)->is_fully_specified()) { specified = false; @@ -283,7 +296,7 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::instantiate // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPScope:: instantiate(const CPPTemplateParameterList *actual_params, @@ -291,10 +304,10 @@ instantiate(const CPPTemplateParameterList *actual_params, CPPPreprocessor *error_sink) const { CPPScope *this_scope = (CPPScope *)this; - if (_parent_scope == NULL || + if (_parent_scope == NULL || _parent_scope->as_template_scope() == NULL) { if (error_sink != NULL) { - error_sink->warning("Ignoring template parameters for scope " + + error_sink->warning("Ignoring template parameters for scope " + get_local_name()); } return this_scope; @@ -333,7 +346,7 @@ instantiate(const CPPTemplateParameterList *actual_params, // scope = new CPPScope(current_scope, name, V_public); scope = new CPPScope(_parent_scope, name, V_public); copy_substitute_decl(scope, subst, global_scope); - + // Also define any new template parameter types, in case we // "instantiated" this scope with another template parameter. CPPTemplateParameterList::Parameters::const_iterator pi; @@ -351,7 +364,7 @@ instantiate(const CPPTemplateParameterList *actual_params, } } } - + // Finally, record this particular instantiation for future // reference, so we don't have to do this again. ((CPPScope *)this)->_instantiations.insert(Instantiations::value_type(actual_params, scope)); @@ -362,7 +375,7 @@ instantiate(const CPPTemplateParameterList *actual_params, //////////////////////////////////////////////////////////////////// // Function: CPPScope::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPScope:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -388,7 +401,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, // scope has template parameters--then we must first remove any of // the template parameters from the subst list. These will later // get substituted properly during instantiation. - const CPPTemplateParameterList &p = + const CPPTemplateParameterList &p = _parent_scope->as_template_scope()->_parameters; CPPDeclaration::SubstDecl new_subst = subst; @@ -413,7 +426,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPScope::find_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPType *CPPScope:: find_type(const string &name, bool recurse) const { @@ -433,8 +446,8 @@ find_type(const string &name, bool recurse) const { if (_struct_type != NULL) { CPPStructType::Derivation::const_iterator di; - for (di = _struct_type->_derivation.begin(); - di != _struct_type->_derivation.end(); + for (di = _struct_type->_derivation.begin(); + di != _struct_type->_derivation.end(); ++di) { CPPStructType *st = (*di)._base->as_struct_type(); if (st != NULL) { @@ -456,7 +469,7 @@ find_type(const string &name, bool recurse) const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::find_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPType *CPPScope:: find_type(const string &name, CPPDeclaration::SubstDecl &subst, @@ -479,12 +492,12 @@ find_type(const string &name, CPPDeclaration::SubstDecl &subst, if (_struct_type != NULL) { CPPStructType::Derivation::const_iterator di; - for (di = _struct_type->_derivation.begin(); - di != _struct_type->_derivation.end(); + for (di = _struct_type->_derivation.begin(); + di != _struct_type->_derivation.end(); ++di) { CPPStructType *st = (*di)._base->as_struct_type(); if (st != NULL) { - CPPType *type = st->_scope->find_type(name, subst, global_scope, + CPPType *type = st->_scope->find_type(name, subst, global_scope, false); if (type != NULL) { return type; @@ -503,7 +516,7 @@ find_type(const string &name, CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPScope::find_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPScope:: find_scope(const string &name, bool recurse) const { @@ -521,8 +534,8 @@ find_scope(const string &name, bool recurse) const { } else if (_struct_type != NULL) { CPPStructType::Derivation::const_iterator di; - for (di = _struct_type->_derivation.begin(); - di != _struct_type->_derivation.end(); + for (di = _struct_type->_derivation.begin(); + di != _struct_type->_derivation.end(); ++di) { CPPStructType *st = (*di)._base->as_struct_type(); if (st != NULL) { @@ -556,7 +569,7 @@ find_scope(const string &name, bool recurse) const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::find_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPScope:: find_scope(const string &name, CPPDeclaration::SubstDecl &subst, @@ -575,7 +588,7 @@ find_scope(const string &name, CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPScope::find_symbol // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPScope:: find_symbol(const string &name, bool recurse) const { @@ -616,8 +629,8 @@ find_symbol(const string &name, bool recurse) const { if (_struct_type != NULL) { CPPStructType::Derivation::const_iterator di; - for (di = _struct_type->_derivation.begin(); - di != _struct_type->_derivation.end(); + for (di = _struct_type->_derivation.begin(); + di != _struct_type->_derivation.end(); ++di) { CPPStructType *st = (*di)._base->as_struct_type(); if (st != NULL) { @@ -639,7 +652,7 @@ find_symbol(const string &name, bool recurse) const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::find_template // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPScope:: find_template(const string &name, bool recurse) const { @@ -659,8 +672,8 @@ find_template(const string &name, bool recurse) const { if (_struct_type != NULL) { CPPStructType::Derivation::const_iterator di; - for (di = _struct_type->_derivation.begin(); - di != _struct_type->_derivation.end(); + for (di = _struct_type->_derivation.begin(); + di != _struct_type->_derivation.end(); ++di) { CPPStructType *st = (*di)._base->as_struct_type(); if (st != NULL) { @@ -682,7 +695,7 @@ find_template(const string &name, bool recurse) const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::get_simple_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPScope:: get_simple_name() const { @@ -697,7 +710,7 @@ get_simple_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::get_local_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPScope:: get_local_name(CPPScope *scope) const { @@ -708,7 +721,7 @@ get_local_name(CPPScope *scope) const { */ if (scope != NULL && _parent_scope != NULL && _parent_scope != scope) { - return _parent_scope->get_local_name(scope) + "::" + + return _parent_scope->get_local_name(scope) + "::" + _name.get_name_with_templ(); } else { return _name.get_name_with_templ(); @@ -718,7 +731,7 @@ get_local_name(CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::get_fully_scoped_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPScope:: get_fully_scoped_name() const { @@ -729,7 +742,7 @@ get_fully_scoped_name() const { */ if (_parent_scope != NULL) { - return _parent_scope->get_fully_scoped_name() + "::" + + return _parent_scope->get_fully_scoped_name() + "::" + _name.get_name_with_templ(); } else { return _name.get_name_with_templ(); @@ -739,7 +752,7 @@ get_fully_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: output(ostream &out, CPPScope *scope) const { @@ -754,7 +767,7 @@ output(ostream &out, CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPScope::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPScope:: write(ostream &out, int indent_level, CPPScope *scope) const { @@ -800,7 +813,7 @@ get_template_scope() { //////////////////////////////////////////////////////////////////// // Function: CPPScope::as_template_scope // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTemplateScope *CPPScope:: as_template_scope() { @@ -830,8 +843,8 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, if (_struct_type->_ident != (CPPIdentifier *)NULL) { native_scope = _struct_type->_ident->_native_scope; } - to_scope->_struct_type = - new CPPStructType(_struct_type->_type, + to_scope->_struct_type = + new CPPStructType(_struct_type->_type, new CPPIdentifier(to_scope->_name), native_scope, to_scope, _struct_type->_file); to_scope->_struct_type->_incomplete = false; @@ -842,7 +855,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, di != _struct_type->_derivation.end(); ++di) { CPPStructType::Base b = (*di); - b._base = + b._base = (*di)._base->substitute_decl(subst, to_scope, global_scope)->as_type(); to_scope->_struct_type->_derivation.push_back(b); if (b._base != (*di)._base) { @@ -850,10 +863,10 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, } } } - + Declarations::const_iterator di; for (di = _declarations.begin(); di != _declarations.end(); ++di) { - CPPDeclaration *decl = + CPPDeclaration *decl = (*di)->substitute_decl(subst, to_scope, global_scope); to_scope->_declarations.push_back(decl); if (decl != (*di)) { @@ -865,7 +878,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, for (ei = _structs.begin(); ei != _structs.end(); ++ei) { string name = (*ei).first; CPPType *source_type = (*ei).second; - CPPDeclaration *decl = + CPPDeclaration *decl = source_type->substitute_decl(subst, to_scope, global_scope); assert(decl != NULL); CPPType *new_type = decl->as_type(); @@ -878,7 +891,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, for (ei = _classes.begin(); ei != _classes.end(); ++ei) { string name = (*ei).first; CPPType *source_type = (*ei).second; - CPPDeclaration *decl = + CPPDeclaration *decl = source_type->substitute_decl(subst, to_scope, global_scope); assert(decl != NULL); CPPType *new_type = decl->as_type(); @@ -887,11 +900,11 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, if (new_type != source_type) { anything_changed = true; } - } + } for (ei = _unions.begin(); ei != _unions.end(); ++ei) { string name = (*ei).first; CPPType *source_type = (*ei).second; - CPPDeclaration *decl = + CPPDeclaration *decl = source_type->substitute_decl(subst, to_scope, global_scope); assert(decl != NULL); CPPType *new_type = decl->as_type(); @@ -904,7 +917,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, for (ei = _enums.begin(); ei != _enums.end(); ++ei) { string name = (*ei).first; CPPType *source_type = (*ei).second; - CPPDeclaration *decl = + CPPDeclaration *decl = source_type->substitute_decl(subst, to_scope, global_scope); assert(decl != NULL); CPPType *new_type = decl->as_type(); @@ -925,10 +938,10 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, } CPPFunctionGroup::Instances::const_iterator ii; - for (ii = fgroup->_instances.begin(); + for (ii = fgroup->_instances.begin(); ii != fgroup->_instances.end(); ++ii) { - CPPInstance *inst = + CPPInstance *inst = (*ii)->substitute_decl(subst, to_scope, global_scope)->as_instance(); to_fgroup->_instances.push_back(inst); if (inst != (*ii)) { @@ -936,10 +949,10 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, } } } - + Typedefs::const_iterator ti; for (ti = _typedefs.begin(); ti != _typedefs.end(); ++ti) { - CPPTypedef *td = + CPPTypedef *td = (*ti).second->substitute_decl(subst, to_scope, global_scope)->as_typedef(); to_scope->_typedefs.insert(Typedefs::value_type((*ti).first, td)); if (td != (*ti).second) { @@ -948,14 +961,14 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst, } Variables::const_iterator vi; for (vi = _variables.begin(); vi != _variables.end(); ++vi) { - CPPInstance *inst = + CPPInstance *inst = (*vi).second->substitute_decl(subst, to_scope, global_scope)->as_instance(); to_scope->_variables.insert(Variables::value_type((*vi).first, inst)); if (inst != (*vi).second) { anything_changed = true; } } - + Templates::const_iterator tmi; for (tmi = _templates.begin(); tmi != _templates.end(); ++tmi) { CPPDeclaration *decl = @@ -992,7 +1005,7 @@ handle_declaration(CPPDeclaration *decl, CPPScope *global_scope) { if (!name.empty() && def->get_scope(this, global_scope) == this) { // Don't add a new template definition if we already had one // by the same name in another scope. - + if (find_template(name) == NULL) { _templates.insert(Templates::value_type(name, def)); } @@ -1036,7 +1049,7 @@ handle_declaration(CPPDeclaration *decl, CPPScope *global_scope) { // to the _variables member. _variables[name] = inst; } - + if (inst->is_template()) { // Don't add a new template definition if we already had one // by the same name in another scope. @@ -1047,7 +1060,7 @@ handle_declaration(CPPDeclaration *decl, CPPScope *global_scope) { /* if (inst->_type->as_function_type() == NULL || - (inst->_type->as_function_type()->_flags & + (inst->_type->as_function_type()->_flags & CPPFunctionType::F_constructor) == 0) { _templates.insert(Templates::value_type(name, inst)); } diff --git a/dtool/src/cppparser/cppScope.h b/dtool/src/cppparser/cppScope.h index 707e08f15f..0e3c0e661e 100644 --- a/dtool/src/cppparser/cppScope.h +++ b/dtool/src/cppparser/cppScope.h @@ -2,6 +2,19 @@ // Created by: drose (21Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPSCOPE_H #define CPPSCOPE_H @@ -52,7 +65,7 @@ public: CPPScope *get_parent_scope() const; virtual void add_declaration(CPPDeclaration *decl, CPPScope *global_scope, - CPPPreprocessor *preprocessor, + CPPPreprocessor *preprocessor, const cppyyltype &pos); virtual void add_enum_value(CPPInstance *inst); virtual void define_extension_type(CPPExtensionType *type); diff --git a/dtool/src/cppparser/cppSimpleType.cxx b/dtool/src/cppparser/cppSimpleType.cxx index 7c191bc486..6a491a4f0c 100644 --- a/dtool/src/cppparser/cppSimpleType.cxx +++ b/dtool/src/cppparser/cppSimpleType.cxx @@ -1,6 +1,19 @@ -// Filename: cppSimpleType.C +// Filename: cppSimpleType.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cppSimpleType.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPSimpleType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPSimpleType:: CPPSimpleType(CPPSimpleType::Type type, int flags) : @@ -34,7 +47,7 @@ is_tbd() const { //////////////////////////////////////////////////////////////////// // Function: CPPSimpleType::get_preferred_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPSimpleType:: get_preferred_name() const { @@ -45,7 +58,7 @@ get_preferred_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPSimpleType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPSimpleType:: output(ostream &out, int, CPPScope *, bool) const { @@ -111,7 +124,7 @@ output(ostream &out, int, CPPScope *, bool) const { //////////////////////////////////////////////////////////////////// // Function: CPPSimpleType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPSimpleType:: get_subtype() const { @@ -121,7 +134,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPSimpleType::as_simple_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPSimpleType *CPPSimpleType:: as_simple_type() { diff --git a/dtool/src/cppparser/cppSimpleType.h b/dtool/src/cppparser/cppSimpleType.h index d8ad8af7c5..3fc79b79ae 100644 --- a/dtool/src/cppparser/cppSimpleType.h +++ b/dtool/src/cppparser/cppSimpleType.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPSIMPLETYPE_H #define CPPSIMPLETYPE_H diff --git a/dtool/src/cppparser/cppStructType.cxx b/dtool/src/cppparser/cppStructType.cxx index 496a3150f7..618fa66ae7 100644 --- a/dtool/src/cppparser/cppStructType.cxx +++ b/dtool/src/cppparser/cppStructType.cxx @@ -1,6 +1,19 @@ -// Filename: cppStructType.C +// Filename: cppStructType.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -18,7 +31,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPStructType::Base::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPStructType::Base:: output(ostream &out) const { @@ -31,11 +44,11 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CPPStructType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPStructType:: -CPPStructType(CPPStructType::Type type, CPPIdentifier *ident, - CPPScope *current_scope, CPPScope *scope, +CPPStructType(CPPStructType::Type type, CPPIdentifier *ident, + CPPScope *current_scope, CPPScope *scope, const CPPFile &file) : CPPExtensionType(type, ident, current_scope, file), _scope(scope) @@ -47,7 +60,7 @@ CPPStructType(CPPStructType::Type type, CPPIdentifier *ident, //////////////////////////////////////////////////////////////////// // Function: CPPStructType::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPStructType:: CPPStructType(const CPPStructType ©) : @@ -62,7 +75,7 @@ CPPStructType(const CPPStructType ©) : //////////////////////////////////////////////////////////////////// // Function: CPPStructType::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPStructType:: operator = (const CPPStructType ©) { @@ -86,7 +99,7 @@ append_derivation(CPPType *base, CPPVisibility vis, bool is_virtual) { b._base = base; b._vis = vis; b._is_virtual = is_virtual; - + _derivation.push_back(b); } } @@ -94,7 +107,7 @@ append_derivation(CPPType *base, CPPVisibility vis, bool is_virtual) { //////////////////////////////////////////////////////////////////// // Function: CPPStructType::get_scope // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPScope *CPPStructType:: get_scope() const { @@ -188,10 +201,10 @@ get_destructor() const { ++ii) { CPPInstance *inst = (*ii); assert(inst->_type != (CPPType *)NULL); - + CPPFunctionType *ftype = inst->_type->as_function_type(); assert(ftype != (CPPFunctionType *)NULL); - + if ((ftype->_flags & CPPFunctionType::F_destructor) != 0) { return inst; } @@ -205,7 +218,7 @@ get_destructor() const { //////////////////////////////////////////////////////////////////// // Function: CPPStructType::instantiate // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPStructType:: instantiate(const CPPTemplateParameterList *actual_params, @@ -217,13 +230,13 @@ instantiate(const CPPTemplateParameterList *actual_params, if (_scope == NULL) { if (error_sink != NULL) { - error_sink->warning("Ignoring template parameters for class " + + error_sink->warning("Ignoring template parameters for class " + get_local_name()); } return (CPPDeclaration *)this; } - CPPScope *scope = + CPPScope *scope = _scope->instantiate(actual_params, current_scope, global_scope, error_sink); if (scope->get_struct_type()->get_scope() != scope) { @@ -251,7 +264,7 @@ instantiate(const CPPTemplateParameterList *actual_params, //////////////////////////////////////////////////////////////////// // Function: CPPStructType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPStructType:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -280,7 +293,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, CPPStructType *rep = new CPPStructType(*this); if (_ident != NULL) { - rep->_ident = + rep->_ident = _ident->substitute_decl(subst, current_scope, global_scope); } @@ -294,7 +307,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, // parameters into our identifier. CPPScope *pscope = rep->_scope->get_parent_scope(); - if (pscope != (CPPScope *)NULL && + if (pscope != (CPPScope *)NULL && pscope->_name.has_templ()) { // If the struct name didn't have an explicit template @@ -311,11 +324,11 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, } } - bool unchanged = + bool unchanged = (rep->_ident == _ident && rep->_scope == _scope); for (int i = 0; i < (int)_derivation.size(); i++) { - rep->_derivation[i]._base = + rep->_derivation[i]._base = _derivation[i]._base->substitute_decl(subst, current_scope, global_scope)->as_type(); if (rep->_derivation[i]._base != _derivation[i]._base) { unchanged = false; @@ -350,7 +363,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPStructType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPStructType:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -382,7 +395,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { } else { out << _type; } - + // Show any derivation we may have if (!_derivation.empty()) { Derivation::const_iterator di = _derivation.begin(); @@ -403,7 +416,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { //////////////////////////////////////////////////////////////////// // Function: CPPStructType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPStructType:: get_subtype() const { @@ -413,7 +426,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPStructType::as_struct_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPStructType *CPPStructType:: as_struct_type() { @@ -466,7 +479,7 @@ get_virtual_funcs(VFunctions &funcs) const { if (destructor != (CPPInstance *)NULL) { // It's a match! This destructor is virtual. funcs.erase(vfi); - destructor->_storage_class |= + destructor->_storage_class |= (CPPInstance::SC_virtual | CPPInstance::SC_inherited_virtual); } @@ -501,7 +514,7 @@ get_virtual_funcs(VFunctions &funcs) const { // *inherited* virtual, which means only that the // interface is defined in some parent class. Sometimes // this is useful to know. - new_inst->_storage_class |= + new_inst->_storage_class |= (CPPInstance::SC_virtual | CPPInstance::SC_inherited_virtual); } } @@ -518,7 +531,7 @@ get_virtual_funcs(VFunctions &funcs) const { CPPFunctionGroup *fgroup = (*fi).second; CPPFunctionGroup::Instances::const_iterator ii; for (ii = fgroup->_instances.begin(); - ii != fgroup->_instances.end(); + ii != fgroup->_instances.end(); ++ii) { CPPInstance *inst = (*ii); if ((inst->_storage_class & CPPInstance::SC_virtual) != 0) { @@ -566,7 +579,7 @@ is_equal(const CPPDeclaration *other) const { const CPPStructType *ot = ((CPPDeclaration *)other)->as_struct_type(); assert(ot != NULL); - return this == ot || + return this == ot || (get_fully_scoped_name() == ot->get_fully_scoped_name()); */ } @@ -589,7 +602,7 @@ is_less(const CPPDeclaration *other) const { return false; } - return + return (get_fully_scoped_name() < ot->get_fully_scoped_name()); */ } diff --git a/dtool/src/cppparser/cppStructType.h b/dtool/src/cppparser/cppStructType.h index 91a2359ab4..525f5baa04 100644 --- a/dtool/src/cppparser/cppStructType.h +++ b/dtool/src/cppparser/cppStructType.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPSTRUCTTYPE_H #define CPPSTRUCTTYPE_H @@ -58,7 +71,7 @@ public: CPPScope *_scope; bool _incomplete; - + class Base { public: void output(ostream &out) const; diff --git a/dtool/src/cppparser/cppTBDType.cxx b/dtool/src/cppparser/cppTBDType.cxx index 550b646c52..510ed56d4d 100644 --- a/dtool/src/cppparser/cppTBDType.cxx +++ b/dtool/src/cppparser/cppTBDType.cxx @@ -1,6 +1,19 @@ -// Filename: cppTBDType.C +// Filename: cppTBDType.cxx // Created by: drose (05Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPTBDType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTBDType:: CPPTBDType(CPPIdentifier *ident) : @@ -91,12 +104,12 @@ get_fully_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPTBDType::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPTBDType:: substitute_decl(CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) { - CPPDeclaration *top = + CPPDeclaration *top = CPPDeclaration::substitute_decl(subst, current_scope, global_scope); if (top != this) { return top; @@ -138,7 +151,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPTBDType::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTBDType:: output(ostream &out, int, CPPScope *, bool) const { @@ -148,7 +161,7 @@ output(ostream &out, int, CPPScope *, bool) const { //////////////////////////////////////////////////////////////////// // Function: CPPTBDType::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPTBDType:: get_subtype() const { @@ -158,7 +171,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPTBDType::as_tbd_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTBDType *CPPTBDType:: as_tbd_type() { @@ -176,7 +189,7 @@ bool CPPTBDType:: is_equal(const CPPDeclaration *other) const { const CPPTBDType *ot = ((CPPDeclaration *)other)->as_tbd_type(); assert(ot != NULL); - + return (*_ident) == (*ot->_ident); } @@ -192,6 +205,6 @@ bool CPPTBDType:: is_less(const CPPDeclaration *other) const { const CPPTBDType *ot = ((CPPDeclaration *)other)->as_tbd_type(); assert(ot != NULL); - + return (*_ident) < (*ot->_ident); } diff --git a/dtool/src/cppparser/cppTBDType.h b/dtool/src/cppparser/cppTBDType.h index ca2a4a3053..d0db566825 100644 --- a/dtool/src/cppparser/cppTBDType.h +++ b/dtool/src/cppparser/cppTBDType.h @@ -2,6 +2,19 @@ // Created by: drose (05Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTBDTYPE_H #define CPPTBDTYPE_H diff --git a/dtool/src/cppparser/cppTemplateParameterList.cxx b/dtool/src/cppparser/cppTemplateParameterList.cxx index e55df519ba..3e311bbb68 100644 --- a/dtool/src/cppparser/cppTemplateParameterList.cxx +++ b/dtool/src/cppparser/cppTemplateParameterList.cxx @@ -1,6 +1,19 @@ -// Filename: cppTemplateParameterList.C +// Filename: cppTemplateParameterList.cxx // Created by: drose (28Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPTemplateParameterList::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTemplateParameterList:: CPPTemplateParameterList() { @@ -21,7 +34,7 @@ CPPTemplateParameterList() { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateParameterList::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPTemplateParameterList:: get_string() const { @@ -49,7 +62,7 @@ build_subst_decl(const CPPTemplateParameterList &formal_params, ++pfi, ++pai) { CPPDeclaration *formal = *pfi; CPPDeclaration *actual = *pai; - + if (actual->as_type()) { actual = actual->as_type()->resolve_type(current_scope, global_scope); } @@ -66,7 +79,7 @@ build_subst_decl(const CPPTemplateParameterList &formal_params, // A value template parameter. Its default is an expression. CPPInstance *inst = decl->as_instance(); if (inst->_initializer != NULL) { - CPPDeclaration *decl = + CPPDeclaration *decl = inst->_initializer->substitute_decl(subst, current_scope, global_scope); if (!(*decl == *inst)) { @@ -123,7 +136,7 @@ bool CPPTemplateParameterList:: is_tbd() const { for (int i = 0; i < (int)_parameters.size(); i++) { CPPType *type = _parameters[i]->as_type(); - if (type != (CPPType *)NULL && + if (type != (CPPType *)NULL && (type->is_tbd() || type->as_class_template_parameter() != NULL)) { return true; } @@ -138,7 +151,7 @@ is_tbd() const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateParameterList::Equivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPTemplateParameterList:: operator == (const CPPTemplateParameterList &other) const { @@ -156,7 +169,7 @@ operator == (const CPPTemplateParameterList &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateParameterList::Nonequivalence Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPTemplateParameterList:: operator != (const CPPTemplateParameterList &other) const { @@ -166,7 +179,7 @@ operator != (const CPPTemplateParameterList &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateParameterList::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPTemplateParameterList:: operator < (const CPPTemplateParameterList &other) const { @@ -184,7 +197,7 @@ operator < (const CPPTemplateParameterList &other) const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateParameterList::substitute_decl // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTemplateParameterList *CPPTemplateParameterList:: substitute_decl(CPPDeclaration::SubstDecl &subst, @@ -193,7 +206,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, bool anything_changed = false; for (int i = 0; i < (int)rep->_parameters.size(); i++) { - rep->_parameters[i] = + rep->_parameters[i] = _parameters[i]->substitute_decl(subst, current_scope, global_scope); if (rep->_parameters[i] != _parameters[i]) { anything_changed = true; @@ -211,7 +224,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPTemplateParameterList::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateParameterList:: output(ostream &out, CPPScope *scope) const { diff --git a/dtool/src/cppparser/cppTemplateParameterList.h b/dtool/src/cppparser/cppTemplateParameterList.h index cbc20644c2..0d2dd5e3af 100644 --- a/dtool/src/cppparser/cppTemplateParameterList.h +++ b/dtool/src/cppparser/cppTemplateParameterList.h @@ -2,6 +2,19 @@ // Created by: drose (28Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTEMPLATEPARAMETERLIST_H #define CPPTEMPLATEPARAMETERLIST_H diff --git a/dtool/src/cppparser/cppTemplateScope.cxx b/dtool/src/cppparser/cppTemplateScope.cxx index 6811331df6..8b178e61fa 100644 --- a/dtool/src/cppparser/cppTemplateScope.cxx +++ b/dtool/src/cppparser/cppTemplateScope.cxx @@ -1,6 +1,19 @@ -// Filename: cppTemplateScope.C +// Filename: cppTemplateScope.cxx // Created by: drose (28Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTemplateScope:: CPPTemplateScope(CPPScope *parent_scope) : @@ -25,7 +38,7 @@ CPPTemplateScope(CPPScope *parent_scope) : //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::add_declaration // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateScope:: add_declaration(CPPDeclaration *decl, CPPScope *global_scope, @@ -39,7 +52,7 @@ add_declaration(CPPDeclaration *decl, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::add_enum_value // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateScope:: add_enum_value(CPPInstance *inst) { @@ -51,7 +64,7 @@ add_enum_value(CPPInstance *inst) { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::define_extension_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateScope:: define_extension_type(CPPExtensionType *type) { @@ -63,7 +76,7 @@ define_extension_type(CPPExtensionType *type) { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::define_namespace // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateScope:: define_namespace(CPPNamespace *scope) { @@ -74,7 +87,7 @@ define_namespace(CPPNamespace *scope) { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::add_using // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateScope:: add_using(CPPUsing *using_decl, CPPScope *global_scope, @@ -86,7 +99,7 @@ add_using(CPPUsing *using_decl, CPPScope *global_scope, //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::add_template_parameter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateScope:: add_template_parameter(CPPDeclaration *param) { @@ -123,7 +136,7 @@ is_fully_specified() const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::get_simple_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPTemplateScope:: get_simple_name() const { @@ -134,7 +147,7 @@ get_simple_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::get_local_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPTemplateScope:: get_local_name(CPPScope *scope) const { @@ -145,7 +158,7 @@ get_local_name(CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::get_fully_scoped_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string CPPTemplateScope:: get_fully_scoped_name() const { @@ -156,7 +169,7 @@ get_fully_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTemplateScope:: output(ostream &out, CPPScope *scope) const { @@ -169,7 +182,7 @@ output(ostream &out, CPPScope *scope) const { //////////////////////////////////////////////////////////////////// // Function: CPPTemplateScope::as_template_scope // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTemplateScope *CPPTemplateScope:: as_template_scope() { diff --git a/dtool/src/cppparser/cppTemplateScope.h b/dtool/src/cppparser/cppTemplateScope.h index 3531228efd..8b115426f3 100644 --- a/dtool/src/cppparser/cppTemplateScope.h +++ b/dtool/src/cppparser/cppTemplateScope.h @@ -2,6 +2,19 @@ // Created by: drose (28Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTEMPLATESCOPE_H #define CPPTEMPLATESCOPE_H @@ -23,7 +36,7 @@ public: CPPTemplateScope(CPPScope *parent_scope); void add_template_parameter(CPPDeclaration *param); - + virtual void add_declaration(CPPDeclaration *decl, CPPScope *global_scope, CPPPreprocessor *preprocessor, const cppyyltype &pos); diff --git a/dtool/src/cppparser/cppToken.cxx b/dtool/src/cppparser/cppToken.cxx index 2fd42b90f8..44577fb1ef 100644 --- a/dtool/src/cppparser/cppToken.cxx +++ b/dtool/src/cppparser/cppToken.cxx @@ -1,6 +1,19 @@ -// Filename: cppToken.C +// Filename: cppToken.cxx // Created by: drose (22Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -13,13 +26,13 @@ //////////////////////////////////////////////////////////////////// // Function: CPPToken::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken:: CPPToken(int token, int line_number, int col_number, const CPPFile &file, const string &str, const YYSTYPE &lval) : - _token(token), _lval(lval) + _token(token), _lval(lval) { _lval.str = str; _lloc.timestamp = 0; @@ -34,11 +47,11 @@ CPPToken(int token, int line_number, int col_number, //////////////////////////////////////////////////////////////////// // Function: CPPToken::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPToken:: CPPToken(const CPPToken ©) : - _token(copy._token), + _token(copy._token), _lloc(copy._lloc) { _lval.str = copy._lval.str; @@ -48,7 +61,7 @@ CPPToken(const CPPToken ©) : //////////////////////////////////////////////////////////////////// // Function: CPPToken::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPToken:: operator = (const CPPToken ©) { @@ -83,7 +96,7 @@ is_eof() const { //////////////////////////////////////////////////////////////////// // Function: CPPToken::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPToken:: output(ostream &out) const { diff --git a/dtool/src/cppparser/cppToken.h b/dtool/src/cppparser/cppToken.h index 1e40a4a832..1d8c0309d7 100644 --- a/dtool/src/cppparser/cppToken.h +++ b/dtool/src/cppparser/cppToken.h @@ -2,6 +2,19 @@ // Created by: drose (22Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTOKEN_H #define CPPTOKEN_H diff --git a/dtool/src/cppparser/cppType.cxx b/dtool/src/cppparser/cppType.cxx index 1e08271d21..005d3e5e55 100644 --- a/dtool/src/cppparser/cppType.cxx +++ b/dtool/src/cppparser/cppType.cxx @@ -1,6 +1,19 @@ -// Filename: cppType.C +// Filename: cppType.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -18,7 +31,7 @@ operator () (CPPType *a, CPPType *b) const { //////////////////////////////////////////////////////////////////// // Function: CPPType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPType:: CPPType(const CPPFile &file) : @@ -202,7 +215,7 @@ output_instance(ostream &out, int indent_level, CPPScope *scope, //////////////////////////////////////////////////////////////////// // Function: CPPType::as_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPType *CPPType:: as_type() { diff --git a/dtool/src/cppparser/cppType.h b/dtool/src/cppparser/cppType.h index d511e13310..b33e4165fe 100644 --- a/dtool/src/cppparser/cppType.h +++ b/dtool/src/cppparser/cppType.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTYPE_H #define CPPTYPE_H @@ -51,7 +64,7 @@ public: virtual bool is_incomplete() const; virtual bool is_equivalent(const CPPType &other) const; - void output_instance(ostream &out, const string &name, + void output_instance(ostream &out, const string &name, CPPScope *scope) const; virtual void output_instance(ostream &out, int indent_level, CPPScope *scope, diff --git a/dtool/src/cppparser/cppTypeDeclaration.cxx b/dtool/src/cppparser/cppTypeDeclaration.cxx index 3994f7175d..0356620c12 100644 --- a/dtool/src/cppparser/cppTypeDeclaration.cxx +++ b/dtool/src/cppparser/cppTypeDeclaration.cxx @@ -1,6 +1,19 @@ -// Filename: cppTypeDeclaration.C +// Filename: cppTypeDeclaration.cxx // Created by: drose (14Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -25,12 +38,12 @@ CPPTypeDeclaration(CPPType *type) : //////////////////////////////////////////////////////////////////// // Function: CPPTypeDeclaration::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPTypeDeclaration:: substitute_decl(CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) { - CPPDeclaration *decl = + CPPDeclaration *decl = CPPInstance::substitute_decl(subst, current_scope, global_scope); assert(decl != NULL); if (decl->as_type_declaration()) { @@ -43,7 +56,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPTypeDeclaration::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTypeDeclaration:: output(ostream &out, int indent_level, CPPScope *scope, bool) const { @@ -53,7 +66,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { //////////////////////////////////////////////////////////////////// // Function: CPPTypeDeclaration::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPTypeDeclaration:: get_subtype() const { @@ -63,7 +76,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPTypeDeclaration::as_type_declaration // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypeDeclaration *CPPTypeDeclaration:: as_type_declaration() { diff --git a/dtool/src/cppparser/cppTypeDeclaration.h b/dtool/src/cppparser/cppTypeDeclaration.h index c78e0792fe..4bf420f392 100644 --- a/dtool/src/cppparser/cppTypeDeclaration.h +++ b/dtool/src/cppparser/cppTypeDeclaration.h @@ -1,6 +1,19 @@ // Filename: cppTypeDeclaration.h // Created by: drose (14Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CPPTYPEDECLARATION_H diff --git a/dtool/src/cppparser/cppTypeParser.cxx b/dtool/src/cppparser/cppTypeParser.cxx index d2829b068c..13f559feed 100644 --- a/dtool/src/cppparser/cppTypeParser.cxx +++ b/dtool/src/cppparser/cppTypeParser.cxx @@ -1,6 +1,19 @@ -// Filename: cppTypeParser.C +// Filename: cppTypeParser.cxx // Created by: drose (14Dec99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPTypeParser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypeParser:: CPPTypeParser(CPPScope *current_scope, CPPScope *global_scope) : @@ -23,7 +36,7 @@ CPPTypeParser(CPPScope *current_scope, CPPScope *global_scope) : //////////////////////////////////////////////////////////////////// // Function: CPPTypeParser::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypeParser:: ~CPPTypeParser() { @@ -32,7 +45,7 @@ CPPTypeParser:: //////////////////////////////////////////////////////////////////// // Function: CPPTypeParser::parse_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPTypeParser:: parse_type(const string &type) { @@ -49,7 +62,7 @@ parse_type(const string &type) { //////////////////////////////////////////////////////////////////// // Function: CPPTypeParser::parse_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CPPTypeParser:: parse_type(const string &type, const CPPPreprocessor &filepos) { @@ -68,7 +81,7 @@ parse_type(const string &type, const CPPPreprocessor &filepos) { //////////////////////////////////////////////////////////////////// // Function: CPPTypeParser::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTypeParser:: output(ostream &out) const { diff --git a/dtool/src/cppparser/cppTypeParser.h b/dtool/src/cppparser/cppTypeParser.h index 9cbfc33f02..3e1ef7addd 100644 --- a/dtool/src/cppparser/cppTypeParser.h +++ b/dtool/src/cppparser/cppTypeParser.h @@ -2,6 +2,19 @@ // Created by: drose (14Dec99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTYPEPARSER_H #define CPPTYPEPARSER_H @@ -40,4 +53,4 @@ operator << (ostream &out, const CPPTypeParser &ep) { #endif - + diff --git a/dtool/src/cppparser/cppTypeProxy.cxx b/dtool/src/cppparser/cppTypeProxy.cxx index 75c561251e..3d86299a59 100644 --- a/dtool/src/cppparser/cppTypeProxy.cxx +++ b/dtool/src/cppparser/cppTypeProxy.cxx @@ -1,6 +1,19 @@ -// Filename: cppTypeProxy.C +// Filename: cppTypeProxy.cxx // Created by: drose (07Dec99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypeProxy:: CPPTypeProxy() : @@ -183,7 +196,7 @@ output_instance(ostream &out, int indent_level, CPPScope *scope, //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTypeProxy:: output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { @@ -198,7 +211,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPTypeProxy:: get_subtype() const { @@ -208,7 +221,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPType *CPPTypeProxy:: as_type() { @@ -221,7 +234,7 @@ as_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_simple_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPSimpleType *CPPTypeProxy:: as_simple_type() { @@ -234,7 +247,7 @@ as_simple_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_pointer_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPPointerType *CPPTypeProxy:: as_pointer_type() { @@ -247,7 +260,7 @@ as_pointer_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_reference_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPReferenceType *CPPTypeProxy:: as_reference_type() { @@ -260,7 +273,7 @@ as_reference_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_array_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPArrayType *CPPTypeProxy:: as_array_type() { @@ -273,7 +286,7 @@ as_array_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_const_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPConstType *CPPTypeProxy:: as_const_type() { @@ -286,7 +299,7 @@ as_const_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_function_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPFunctionType *CPPTypeProxy:: as_function_type() { @@ -299,7 +312,7 @@ as_function_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_extension_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPExtensionType *CPPTypeProxy:: as_extension_type() { @@ -312,7 +325,7 @@ as_extension_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_struct_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPStructType *CPPTypeProxy:: as_struct_type() { @@ -325,7 +338,7 @@ as_struct_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_enum_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPEnumType *CPPTypeProxy:: as_enum_type() { @@ -338,7 +351,7 @@ as_enum_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_tbd_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTBDType *CPPTypeProxy:: as_tbd_type() { @@ -351,7 +364,7 @@ as_tbd_type() { //////////////////////////////////////////////////////////////////// // Function: CPPTypeProxy::as_type_proxy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypeProxy *CPPTypeProxy:: as_type_proxy() { diff --git a/dtool/src/cppparser/cppTypeProxy.h b/dtool/src/cppparser/cppTypeProxy.h index bf6baefe47..83f774bc0e 100644 --- a/dtool/src/cppparser/cppTypeProxy.h +++ b/dtool/src/cppparser/cppTypeProxy.h @@ -2,6 +2,19 @@ // Created by: drose (07Dec99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTYPEPROXY_H #define CPPTYPEPROXY_H diff --git a/dtool/src/cppparser/cppTypedef.cxx b/dtool/src/cppparser/cppTypedef.cxx index 27c549fbe5..562ef2b702 100644 --- a/dtool/src/cppparser/cppTypedef.cxx +++ b/dtool/src/cppparser/cppTypedef.cxx @@ -1,6 +1,19 @@ -// Filename: cppTypedef.C +// Filename: cppTypedef.cxx // Created by: drose (19Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -19,7 +32,7 @@ // typedef. //////////////////////////////////////////////////////////////////// CPPTypedef:: -CPPTypedef(CPPInstance *inst, bool global) : CPPInstance(*inst) +CPPTypedef(CPPInstance *inst, bool global) : CPPInstance(*inst) { // Actually, we'll avoid deleting this for now. It causes problems // for some reason to be determined later. @@ -35,12 +48,12 @@ CPPTypedef(CPPInstance *inst, bool global) : CPPInstance(*inst) //////////////////////////////////////////////////////////////////// // Function: CPPTypedef::substitute_decl // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration *CPPTypedef:: substitute_decl(CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) { - CPPDeclaration *decl = + CPPDeclaration *decl = CPPInstance::substitute_decl(subst, current_scope, global_scope); assert(decl != NULL); if (decl->as_typedef()) { @@ -53,7 +66,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, //////////////////////////////////////////////////////////////////// // Function: CPPTypedef::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPTypedef:: output(ostream &out, int indent_level, CPPScope *scope, bool) const { @@ -64,7 +77,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { //////////////////////////////////////////////////////////////////// // Function: CPPTypedef::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPTypedef:: get_subtype() const { @@ -74,7 +87,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPTypedef::as_typedef // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPTypedef *CPPTypedef:: as_typedef() { diff --git a/dtool/src/cppparser/cppTypedef.h b/dtool/src/cppparser/cppTypedef.h index 79ad492889..d2f9b644c0 100644 --- a/dtool/src/cppparser/cppTypedef.h +++ b/dtool/src/cppparser/cppTypedef.h @@ -2,6 +2,19 @@ // Created by: drose (19Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPTYPEDEF_H #define CPPTYPEDEF_H diff --git a/dtool/src/cppparser/cppUsing.cxx b/dtool/src/cppparser/cppUsing.cxx index 56f56084c7..909341386e 100644 --- a/dtool/src/cppparser/cppUsing.cxx +++ b/dtool/src/cppparser/cppUsing.cxx @@ -1,6 +1,19 @@ -// Filename: cppUsing.C +// Filename: cppUsing.cxx // Created by: drose (16Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CPPUsing::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPUsing:: CPPUsing(CPPIdentifier *ident, bool full_namespace, const CPPFile &file) : @@ -22,7 +35,7 @@ CPPUsing(CPPIdentifier *ident, bool full_namespace, const CPPFile &file) : //////////////////////////////////////////////////////////////////// // Function: CPPUsing::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CPPUsing:: output(ostream &out, int, CPPScope *, bool) const { @@ -36,7 +49,7 @@ output(ostream &out, int, CPPScope *, bool) const { //////////////////////////////////////////////////////////////////// // Function: CPPUsing::get_subtype // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPDeclaration::SubType CPPUsing:: get_subtype() const { @@ -46,7 +59,7 @@ get_subtype() const { //////////////////////////////////////////////////////////////////// // Function: CPPUsing::as_using // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPPUsing *CPPUsing:: as_using() { diff --git a/dtool/src/cppparser/cppUsing.h b/dtool/src/cppparser/cppUsing.h index e0570f2c54..dbff0deba8 100644 --- a/dtool/src/cppparser/cppUsing.h +++ b/dtool/src/cppparser/cppUsing.h @@ -2,6 +2,19 @@ // Created by: drose (16Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPUSING_H #define CPPUSING_H diff --git a/dtool/src/cppparser/cppVisibility.cxx b/dtool/src/cppparser/cppVisibility.cxx index 303b380348..689ee3cdd1 100644 --- a/dtool/src/cppparser/cppVisibility.cxx +++ b/dtool/src/cppparser/cppVisibility.cxx @@ -1,6 +1,19 @@ -// Filename: cppVisibility.C +// Filename: cppVisibility.cxx // Created by: drose (22Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -17,10 +30,10 @@ operator << (ostream &out, CPPVisibility vis) { case V_protected: return out << "protected"; - + case V_private: return out << "private"; - + case V_unknown: return out << "unknown"; } diff --git a/dtool/src/cppparser/cppVisibility.h b/dtool/src/cppparser/cppVisibility.h index d0d2dad78f..a3d0ce8dfc 100644 --- a/dtool/src/cppparser/cppVisibility.h +++ b/dtool/src/cppparser/cppVisibility.h @@ -2,6 +2,19 @@ // Created by: drose (22Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CPPVISIBILITY_H #define CPPVISIBILITY_H diff --git a/dtool/src/cppparser/indent.cxx b/dtool/src/cppparser/indent.cxx index 575ce5d523..e91c177860 100644 --- a/dtool/src/cppparser/indent.cxx +++ b/dtool/src/cppparser/indent.cxx @@ -1,6 +1,19 @@ -// Filename: indent.C +// Filename: indent.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/cppparser/indent.h b/dtool/src/cppparser/indent.h index 7de920556d..c0f4b7dafc 100644 --- a/dtool/src/cppparser/indent.h +++ b/dtool/src/cppparser/indent.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef INDENT_H #define INDENT_H @@ -21,4 +34,4 @@ indent(ostream &out, int indent_level); #endif - + diff --git a/dtool/src/dconfig/configTable.I b/dtool/src/dconfig/configTable.I index 7b2bda5a1a..cc0ce55c81 100644 --- a/dtool/src/dconfig/configTable.I +++ b/dtool/src/dconfig/configTable.I @@ -1,6 +1,19 @@ // Filename: configTable.I // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/dconfig/configTable.cxx b/dtool/src/dconfig/configTable.cxx index 4c6482afe4..56f95d0d51 100644 --- a/dtool/src/dconfig/configTable.cxx +++ b/dtool/src/dconfig/configTable.cxx @@ -1,6 +1,19 @@ -// Filename: configTable.C +// Filename: configTable.cxx // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dconfig.h" @@ -116,7 +129,7 @@ void ConfigTable::ReadConfigFile(void) { // this is currently done in makefile.config.so... // CSN. - + #ifndef CONFIG_PATH #define CONFIG_PATH "." #endif @@ -144,7 +157,7 @@ void ConfigTable::ReadConfigFile(void) { if (microconfig_cat->is_spam()) microconfig_cat->spam() << "evaluated value of configpath '" << configpath << "'" << endl; - + DSearchPath config_search(configpath); DSearchPath::Results config_files; diff --git a/dtool/src/dconfig/configTable.h b/dtool/src/dconfig/configTable.h index c2433e72ce..5e1c98ace9 100644 --- a/dtool/src/dconfig/configTable.h +++ b/dtool/src/dconfig/configTable.h @@ -1,6 +1,19 @@ // Filename: configTable.h // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIGTABLE_H diff --git a/dtool/src/dconfig/config_dconfig.cxx b/dtool/src/dconfig/config_dconfig.cxx index 11b08aaf36..3fa08d2c3d 100644 --- a/dtool/src/dconfig/config_dconfig.cxx +++ b/dtool/src/dconfig/config_dconfig.cxx @@ -1,6 +1,19 @@ -// Filename: config_dconfig.C +// Filename: config_dconfig.cxx // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_dconfig.h" diff --git a/dtool/src/dconfig/config_dconfig.h b/dtool/src/dconfig/config_dconfig.h index c331ee2285..c26860572b 100644 --- a/dtool/src/dconfig/config_dconfig.h +++ b/dtool/src/dconfig/config_dconfig.h @@ -1,6 +1,19 @@ // Filename: config_dconfig.h // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_DCONFIG_H diff --git a/dtool/src/dconfig/config_notify.cxx b/dtool/src/dconfig/config_notify.cxx index 78d4bee5f0..8eddf5c0f1 100644 --- a/dtool/src/dconfig/config_notify.cxx +++ b/dtool/src/dconfig/config_notify.cxx @@ -1,6 +1,19 @@ -// Filename: config_notify.C +// Filename: config_notify.cxx // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_notify.h" diff --git a/dtool/src/dconfig/config_notify.h b/dtool/src/dconfig/config_notify.h index 1dd6f562d0..788ed04ade 100644 --- a/dtool/src/dconfig/config_notify.h +++ b/dtool/src/dconfig/config_notify.h @@ -1,6 +1,19 @@ // Filename: config_notify.h // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_NOTIFY_H diff --git a/dtool/src/dconfig/config_setup.h b/dtool/src/dconfig/config_setup.h index ceb6e95db5..56eb2e6556 100644 --- a/dtool/src/dconfig/config_setup.h +++ b/dtool/src/dconfig/config_setup.h @@ -1,7 +1,20 @@ // Filename: config_setup.h // Created by: cary (20Mar00) // -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CONFIG_SETUP_H__ #define __CONFIG_SETUP_H__ diff --git a/dtool/src/dconfig/dconfig.I b/dtool/src/dconfig/dconfig.I index d5f06dc754..f99f083dc4 100644 --- a/dtool/src/dconfig/dconfig.I +++ b/dtool/src/dconfig/dconfig.I @@ -1,7 +1,20 @@ -// Filename: config.I +// Filename: dconfig.I // Created by: cary (20Mar00) // -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// INLINE double get_total_time_config_init() { diff --git a/dtool/src/dconfig/dconfig.cxx b/dtool/src/dconfig/dconfig.cxx index cc9bbf1053..16a0229045 100644 --- a/dtool/src/dconfig/dconfig.cxx +++ b/dtool/src/dconfig/dconfig.cxx @@ -1,6 +1,19 @@ -// Filename: dconfig.C +// Filename: dconfig.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dconfig.h" diff --git a/dtool/src/dconfig/dconfig.h b/dtool/src/dconfig/dconfig.h index 205889fdcf..fc2bbec8b1 100644 --- a/dtool/src/dconfig/dconfig.h +++ b/dtool/src/dconfig/dconfig.h @@ -1,7 +1,20 @@ // Filename: dconfig.h // Created by: cary (14Jul98) // -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DCONFIG_H #define DCONFIG_H diff --git a/dtool/src/dconfig/expand.I b/dtool/src/dconfig/expand.I index 70b96ea92a..d1b5855473 100644 --- a/dtool/src/dconfig/expand.I +++ b/dtool/src/dconfig/expand.I @@ -2,6 +2,19 @@ // Created by: cary (20Mar00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// INLINE bool Base_Expander::isEnv(ConfigString S) { return (getenv(S.c_str()) != (TYPENAME ConfigString::value_type *)0L); diff --git a/dtool/src/dconfig/expand.h b/dtool/src/dconfig/expand.h index c666540f39..b880711ac4 100644 --- a/dtool/src/dconfig/expand.h +++ b/dtool/src/dconfig/expand.h @@ -2,6 +2,19 @@ // Created by: cary (26Aug98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __EXPAND_H__ #define __EXPAND_H__ diff --git a/dtool/src/dconfig/notify.I b/dtool/src/dconfig/notify.I index 4c9752250c..4e51ae78a6 100644 --- a/dtool/src/dconfig/notify.I +++ b/dtool/src/dconfig/notify.I @@ -1,5 +1,18 @@ // Filename: notify.I // Created by: drose (28Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/dconfig/notify.cxx b/dtool/src/dconfig/notify.cxx index 4235f3ade5..06def19c41 100644 --- a/dtool/src/dconfig/notify.cxx +++ b/dtool/src/dconfig/notify.cxx @@ -1,6 +1,19 @@ -// Filename: notify.C +// Filename: notify.cxx // Created by: drose (28Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "notify.h" @@ -18,7 +31,7 @@ Notify *Notify::_global_ptr = (Notify *)NULL; //////////////////////////////////////////////////////////////////// // Function: Notify::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Notify:: Notify() { @@ -33,7 +46,7 @@ Notify() { //////////////////////////////////////////////////////////////////// // Function: Notify::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Notify:: ~Notify() { @@ -252,7 +265,7 @@ get_category(const string &basename, NotifyCategory *parent_category) { } } - NotifyCategory *category = + NotifyCategory *category = new NotifyCategory(fullname, basename, parent_category); _categories.insert(Categories::value_type(fullname, category)); return category; @@ -380,7 +393,7 @@ bool Notify:: assert_failure(const char *expression, int line, const char *source_file) { ostringstream message_str; - message_str + message_str << expression << " at line " << line << " of " << source_file; string message = message_str.str(); @@ -421,7 +434,7 @@ string_severity(const string &str) { // comparison. string lstring; for (string::const_iterator si = str.begin(); - si != str.end(); + si != str.end(); ++si) { lstring += tolower(*si); } diff --git a/dtool/src/dconfig/notify.h b/dtool/src/dconfig/notify.h index 01ce119d63..5192fc90fd 100644 --- a/dtool/src/dconfig/notify.h +++ b/dtool/src/dconfig/notify.h @@ -1,6 +1,19 @@ // Filename: notify.h // Created by: drose (28Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NOTIFY_H @@ -39,7 +52,7 @@ PUBLISHED: typedef bool AssertHandler(const char *expression, int line, const char *source_file); - + void set_assert_handler(AssertHandler *assert_handler); void clear_assert_handler(); bool has_assert_handler() const; @@ -50,9 +63,9 @@ PUBLISHED: void clear_assert_failed(); NotifyCategory *get_top_category(); - NotifyCategory *get_category(const string &basename, + NotifyCategory *get_category(const string &basename, NotifyCategory *parent_category); - NotifyCategory *get_category(const string &basename, + NotifyCategory *get_category(const string &basename, const string &parent_fullname); NotifyCategory *get_category(const string &fullname); @@ -119,7 +132,7 @@ private: #ifdef NDEBUG -#define nassertr(condition, return_value) +#define nassertr(condition, return_value) #define nassertv(condition) #define nassertd(condition) if (false) // We trust the compiler to optimize the above out. diff --git a/dtool/src/dconfig/notifyCategory.I b/dtool/src/dconfig/notifyCategory.I index 2c4c49756d..8f7f524f10 100644 --- a/dtool/src/dconfig/notifyCategory.I +++ b/dtool/src/dconfig/notifyCategory.I @@ -1,13 +1,26 @@ // Filename: notifyCategory.I // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NotifyCategory::get_fullname // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string NotifyCategory:: get_fullname() const { @@ -17,7 +30,7 @@ get_fullname() const { //////////////////////////////////////////////////////////////////// // Function: NotifyCategory::get_basename // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string NotifyCategory:: get_basename() const { @@ -27,7 +40,7 @@ get_basename() const { //////////////////////////////////////////////////////////////////// // Function: NotifyCategory::get_severity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE NotifySeverity NotifyCategory:: get_severity() const { diff --git a/dtool/src/dconfig/notifyCategory.cxx b/dtool/src/dconfig/notifyCategory.cxx index c8513a8629..b1e37e357c 100644 --- a/dtool/src/dconfig/notifyCategory.cxx +++ b/dtool/src/dconfig/notifyCategory.cxx @@ -1,6 +1,19 @@ -// Filename: notifyCategory.C +// Filename: notifyCategory.cxx // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "notifyCategory.h" @@ -12,13 +25,13 @@ //////////////////////////////////////////////////////////////////// // Function: NotifyCategory::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NotifyCategory:: -NotifyCategory(const string &fullname, const string &basename, - NotifyCategory *parent) : - _fullname(fullname), - _basename(basename), +NotifyCategory(const string &fullname, const string &basename, + NotifyCategory *parent) : + _fullname(fullname), + _basename(basename), _parent(parent) { if (_parent != (NotifyCategory *)NULL) { @@ -47,7 +60,7 @@ NotifyCategory(const string &fullname, const string &basename, // The user specified a particular severity for this category at // config time. Use it. _severity = Notify::string_severity(severity_name); - + if (_severity == NS_unspecified) { nout << "Invalid severity name for " << config_name << ": " << severity_name << "\n"; diff --git a/dtool/src/dconfig/notifyCategory.h b/dtool/src/dconfig/notifyCategory.h index a0dbc711d0..3eb3099835 100644 --- a/dtool/src/dconfig/notifyCategory.h +++ b/dtool/src/dconfig/notifyCategory.h @@ -1,6 +1,19 @@ // Filename: notifyCategory.h // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NOTIFYCATEGORY_H @@ -24,15 +37,15 @@ //////////////////////////////////////////////////////////////////// class EXPCL_DTOOLCONFIG NotifyCategory { private: - NotifyCategory(const string &fullname, const string &basename, + NotifyCategory(const string &fullname, const string &basename, NotifyCategory *parent); - + PUBLISHED: INLINE string get_fullname() const; INLINE string get_basename() const; INLINE NotifySeverity get_severity() const; INLINE void set_severity(NotifySeverity severity); - + INLINE bool is_on(NotifySeverity severity) const; // When NOTIFY_DEBUG is not defined, the categories will never be @@ -52,7 +65,7 @@ PUBLISHED: INLINE bool is_warning() const; INLINE bool is_error() const; INLINE bool is_fatal() const; - + ostream &out(NotifySeverity severity, bool prefix = true) const; INLINE ostream &spam(bool prefix = true) const; INLINE ostream &debug(bool prefix = true) const; @@ -60,10 +73,10 @@ PUBLISHED: INLINE ostream &warning(bool prefix = true) const; INLINE ostream &error(bool prefix = true) const; INLINE ostream &fatal(bool prefix = true) const; - + int get_num_children() const; NotifyCategory *get_child(int i) const; - + private: string _fullname; string _basename; @@ -71,7 +84,7 @@ private: NotifySeverity _severity; typedef vector Children; Children _children; - + friend class Notify; }; diff --git a/dtool/src/dconfig/notifyCategoryProxy.I b/dtool/src/dconfig/notifyCategoryProxy.I index 43fb6ba686..11ea724e35 100644 --- a/dtool/src/dconfig/notifyCategoryProxy.I +++ b/dtool/src/dconfig/notifyCategoryProxy.I @@ -1,6 +1,19 @@ // Filename: notifyCategoryProxy.I // Created by: drose (04Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -55,7 +68,7 @@ get_safe_ptr() { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::is_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool NotifyCategoryProxy:: @@ -66,7 +79,7 @@ is_on(NotifySeverity severity) { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::is_spam // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool NotifyCategoryProxy:: @@ -81,7 +94,7 @@ is_spam() { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::is_debug // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool NotifyCategoryProxy:: @@ -96,7 +109,7 @@ is_debug() { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::is_info // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool NotifyCategoryProxy:: @@ -107,7 +120,7 @@ is_info() { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::is_warning // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool NotifyCategoryProxy:: @@ -118,7 +131,7 @@ is_warning() { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::is_error // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool NotifyCategoryProxy:: @@ -129,7 +142,7 @@ is_error() { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::is_fatal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool NotifyCategoryProxy:: @@ -140,7 +153,7 @@ is_fatal() { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::out // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ostream &NotifyCategoryProxy:: @@ -151,7 +164,7 @@ out(NotifySeverity severity, bool prefix) { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::spam // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ostream &NotifyCategoryProxy:: @@ -162,7 +175,7 @@ spam(bool prefix) { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::debug // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ostream &NotifyCategoryProxy:: @@ -173,7 +186,7 @@ debug(bool prefix) { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::info // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ostream &NotifyCategoryProxy:: @@ -184,7 +197,7 @@ info(bool prefix) { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::warning // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ostream &NotifyCategoryProxy:: @@ -195,7 +208,7 @@ warning(bool prefix) { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::error // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ostream &NotifyCategoryProxy:: @@ -206,7 +219,7 @@ error(bool prefix) { //////////////////////////////////////////////////////////////////// // Function: NotifyCategoryProxy::fatal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ostream &NotifyCategoryProxy:: diff --git a/dtool/src/dconfig/notifyCategoryProxy.h b/dtool/src/dconfig/notifyCategoryProxy.h index f57c0fe8b3..0445dc1d97 100644 --- a/dtool/src/dconfig/notifyCategoryProxy.h +++ b/dtool/src/dconfig/notifyCategoryProxy.h @@ -1,6 +1,19 @@ // Filename: notifyCategoryProxy.h // Created by: drose (04Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NOTIFYCATEGORYPROXY_H @@ -78,7 +91,7 @@ public: INLINE bool is_warning(); INLINE bool is_error(); INLINE bool is_fatal(); - + INLINE ostream &out(NotifySeverity severity, bool prefix = true); INLINE ostream &spam(bool prefix = true); INLINE ostream &debug(bool prefix = true); diff --git a/dtool/src/dconfig/notifySeverity.cxx b/dtool/src/dconfig/notifySeverity.cxx index 05bb17d6c2..01f7d72a3e 100644 --- a/dtool/src/dconfig/notifySeverity.cxx +++ b/dtool/src/dconfig/notifySeverity.cxx @@ -1,16 +1,29 @@ -// Filename: notifySeverity.C +// Filename: notifySeverity.cxx // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "notifySeverity.h" ostream &operator << (ostream &out, NotifySeverity severity) { switch (severity) { - case NS_spam: + case NS_spam: return out << "spam"; - case NS_debug: + case NS_debug: return out << "debug"; case NS_info: @@ -18,7 +31,7 @@ ostream &operator << (ostream &out, NotifySeverity severity) { case NS_warning: return out << "warning"; - + case NS_error: return out << "error"; diff --git a/dtool/src/dconfig/notifySeverity.h b/dtool/src/dconfig/notifySeverity.h index 01e6035fdb..602a11d8bf 100644 --- a/dtool/src/dconfig/notifySeverity.h +++ b/dtool/src/dconfig/notifySeverity.h @@ -1,6 +1,19 @@ // Filename: notifySeverity.h // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NOTIFYSEVERITY_H @@ -11,8 +24,8 @@ BEGIN_PUBLISH enum NotifySeverity { NS_unspecified, // Never used, a special case internally. - NS_spam, - NS_debug, + NS_spam, + NS_debug, NS_info, NS_warning, NS_error, // Specifically, a recoverable error. diff --git a/dtool/src/dconfig/serialization.I b/dtool/src/dconfig/serialization.I index c777b3317a..c98e6c3478 100644 --- a/dtool/src/dconfig/serialization.I +++ b/dtool/src/dconfig/serialization.I @@ -2,6 +2,19 @@ // Created by: cary (20Mar00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// INLINE int Length(char) { return 1; diff --git a/dtool/src/dconfig/serialization.h b/dtool/src/dconfig/serialization.h index 47c2be235c..4e80456baa 100644 --- a/dtool/src/dconfig/serialization.h +++ b/dtool/src/dconfig/serialization.h @@ -2,6 +2,19 @@ // Created by: cary (26Aug98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __SERIALIZATION_H__ #define __SERIALIZATION_H__ diff --git a/dtool/src/dconfig/symbolEnt.I b/dtool/src/dconfig/symbolEnt.I index 2948b7668f..f0285d1c45 100644 --- a/dtool/src/dconfig/symbolEnt.I +++ b/dtool/src/dconfig/symbolEnt.I @@ -1,6 +1,19 @@ // Filename: symbolEnt.I // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/dconfig/symbolEnt.cxx b/dtool/src/dconfig/symbolEnt.cxx index 3e40e463ec..fba5cfae16 100644 --- a/dtool/src/dconfig/symbolEnt.cxx +++ b/dtool/src/dconfig/symbolEnt.cxx @@ -1,12 +1,25 @@ -// Filename: symbolEnt.C +// Filename: symbolEnt.cxx // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "symbolEnt.h" -#define EXPCL EXPCL_DTOOLCONFIG -#define EXPTP EXPTP_DTOOLCONFIG +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG #define TYPE Config::SymbolEnt #define NAME vector_SymbolEnt #include "vector_src.cxx" diff --git a/dtool/src/dconfig/symbolEnt.h b/dtool/src/dconfig/symbolEnt.h index 7bc06225b3..92263c2af0 100644 --- a/dtool/src/dconfig/symbolEnt.h +++ b/dtool/src/dconfig/symbolEnt.h @@ -1,6 +1,19 @@ // Filename: symbolEnt.h // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SYMBOLENT_H @@ -46,8 +59,8 @@ class EXPCL_DTOOLCONFIG SymbolEnt { } // close Config namespace -#define EXPCL EXPCL_DTOOLCONFIG -#define EXPTP EXPTP_DTOOLCONFIG +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG #define TYPE Config::SymbolEnt #define NAME vector_SymbolEnt #include "vector_src.h" diff --git a/dtool/src/dconfig/test_config.cxx b/dtool/src/dconfig/test_config.cxx index 5e68e82e35..de929c5706 100644 --- a/dtool/src/dconfig/test_config.cxx +++ b/dtool/src/dconfig/test_config.cxx @@ -1,6 +1,19 @@ -// Filename: test_config.C +// Filename: test_config.cxx // Created by: cary (10Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dconfig.h" diff --git a/dtool/src/dconfig/test_expand.cxx b/dtool/src/dconfig/test_expand.cxx index b8e7d943bd..53b7c1b257 100644 --- a/dtool/src/dconfig/test_expand.cxx +++ b/dtool/src/dconfig/test_expand.cxx @@ -1,6 +1,19 @@ -// Filename: test_expand.C +// Filename: test_expand.cxx // Created by: cary (31Aug98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "expand.h" diff --git a/dtool/src/dconfig/test_pfstream.cxx b/dtool/src/dconfig/test_pfstream.cxx index f5daa28dd7..66896047e6 100644 --- a/dtool/src/dconfig/test_pfstream.cxx +++ b/dtool/src/dconfig/test_pfstream.cxx @@ -1,6 +1,19 @@ -// Filename: test_pfstream.C +// Filename: test_pfstream.cxx // Created by: cary (31Aug98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/dtool/src/dconfig/test_searchpath.cxx b/dtool/src/dconfig/test_searchpath.cxx index 7314018c73..b0c1cf37bc 100644 --- a/dtool/src/dconfig/test_searchpath.cxx +++ b/dtool/src/dconfig/test_searchpath.cxx @@ -1,6 +1,19 @@ -// Filename: test_searchpath.C +// Filename: test_searchpath.cxx // Created by: cary (01Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/dtool/src/dconfig/test_serialization.cxx b/dtool/src/dconfig/test_serialization.cxx index 0fc955548e..4062fec5fe 100644 --- a/dtool/src/dconfig/test_serialization.cxx +++ b/dtool/src/dconfig/test_serialization.cxx @@ -1,6 +1,19 @@ -// Filename: test_serialization.C +// Filename: test_serialization.cxx // Created by: cary (31Aug98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/dtool/src/dtoolbase/dtoolbase.cxx b/dtool/src/dtoolbase/dtoolbase.cxx index 77c08f5580..0a011eba21 100644 --- a/dtool/src/dtoolbase/dtoolbase.cxx +++ b/dtool/src/dtoolbase/dtoolbase.cxx @@ -1,6 +1,19 @@ -// Filename: dtoolbase.cc +// Filename: dtoolbase.cxx // Created by: drose (12Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dtoolbase.h" diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index cbdcab609f..5eec235bf1 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -1,8 +1,20 @@ -/* - * Filename: dtoolbase.h +/* Filename: dtoolbase.h * Created by: drose (12Sep00) * - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file is included at the beginning of every header file and/or C or C++ file. It must be compilable for C as well as C++ files, diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index 795ffce393..64e1b95223 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -1,6 +1,19 @@ // Filename: dtoolbase_cc.h // Created by: drose (13Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PANDABASE_CC_H @@ -56,7 +69,7 @@ using namespace std; #if defined(WIN32_VC) && defined(FORCE_INLINING) // If FORCE_INLINING is defined, we use the keyword __forceinline, -// which tells MS VC++ to override its internal benefit heuristic +// which tells MS VC++ to override its internal benefit heuristic // and inline the fn if it is technically possible to do so. #define INLINE __forceinline #else diff --git a/dtool/src/dtoolbase/dtoolsymbols.h b/dtool/src/dtoolbase/dtoolsymbols.h index 15a35e0d4e..81037e90b2 100644 --- a/dtool/src/dtoolbase/dtoolsymbols.h +++ b/dtool/src/dtoolbase/dtoolsymbols.h @@ -1,9 +1,20 @@ -/* -// Filename: dtoolsymbols.h -// Created by: drose (18Feb00) -// -//////////////////////////////////////////////////////////////////// -*/ +/* Filename: dtoolsymbols.h + * Created by: drose (18Feb00) + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef DTOOLSYMBOLS_H #define DTOOLSYMBOLS_H @@ -14,21 +25,21 @@ only when compiling in the WIN32 environment. These symbols are prefixed to each class declaration, and each static data member within a class, that is to visible outside of a DLL. - + We need to specify a particular string for *exporting* the symbols when we are compiling a DLL, and for *importing* the symbols when we are accessing the DLL (that is, compiling some code that will link with the DLL, e.g. an executable program or a different DLL). The trick is that we have to be particular about whether we're exporting or importing the symbols for a specific DLL. - + We achieve this by defining a unique pair of symbols for each DLL. When we are building a particular DLL, we define the manifest BUILDING_libname on the command line. This file then discovers that manifest and toggles the flag to *export* only for the symbols that belong to that DLL; the symbols that belong in each other DLL are set to *import*. - + Of course, this whole thing only matters under WIN32. In the rest of the world we don't have to deal with this nonsense, and so we can define all of these stupid symbols to the empty string. diff --git a/dtool/src/dtoolbase/fakestringstream.h b/dtool/src/dtoolbase/fakestringstream.h index c8a738e103..211a9c327b 100644 --- a/dtool/src/dtoolbase/fakestringstream.h +++ b/dtool/src/dtoolbase/fakestringstream.h @@ -1,6 +1,19 @@ // Filename: fakestringstream.h // Created by: cary (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FAKESTRINGSTREAM_H @@ -41,7 +54,7 @@ public: class istringstream : public fake_istream_buffer, public istrstream { public: - istringstream(const string &input) : + istringstream(const string &input) : fake_istream_buffer(input), istrstream(_str, _len) { } }; @@ -60,12 +73,12 @@ public: class stringstream : public fake_istream_buffer, public strstream { public: - stringstream() : strstream() { + stringstream() : strstream() { _owns_str = true; } - stringstream(const string &input) : + stringstream(const string &input) : fake_istream_buffer(input), - strstream(_str, _len, ios::in) + strstream(_str, _len, ios::in) { _owns_str = false; } diff --git a/dtool/src/dtoolbase/version.h b/dtool/src/dtoolbase/version.h index 44c78df161..54e53b3b0a 100644 --- a/dtool/src/dtoolbase/version.h +++ b/dtool/src/dtoolbase/version.h @@ -1,3 +1,21 @@ +// Filename: version.h +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #define PANDA_VERSION_MAJOR 0 #define PANDA_VERSION_MINOR 0 #define PANDA_VERSION_BUILDSUBVERSION 0 diff --git a/dtool/src/dtoolutil/dSearchPath.I b/dtool/src/dtoolutil/dSearchPath.I index 61283d9206..a5735fd0f8 100644 --- a/dtool/src/dtoolutil/dSearchPath.I +++ b/dtool/src/dtoolutil/dSearchPath.I @@ -1,6 +1,19 @@ // Filename: dSearchPath.I // Created by: drose (01Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -14,7 +27,7 @@ // indicated path string, and searches that. //////////////////////////////////////////////////////////////////// INLINE Filename DSearchPath:: -search_path(const Filename &filename, const string &path, +search_path(const Filename &filename, const string &path, const string &delimiters) { DSearchPath search(path, delimiters); return search.find_file(filename); diff --git a/dtool/src/dtoolutil/dSearchPath.cxx b/dtool/src/dtoolutil/dSearchPath.cxx index a703e185f2..b5278d1261 100644 --- a/dtool/src/dtoolutil/dSearchPath.cxx +++ b/dtool/src/dtoolutil/dSearchPath.cxx @@ -1,6 +1,19 @@ -// Filename: dSearchPath.C +// Filename: dSearchPath.cxx // Created by: drose (01Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dSearchPath.h" @@ -11,7 +24,7 @@ //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Results::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DSearchPath::Results:: Results() { @@ -20,7 +33,7 @@ Results() { //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Results::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DSearchPath::Results:: Results(const DSearchPath::Results ©) : @@ -31,7 +44,7 @@ Results(const DSearchPath::Results ©) : //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Results::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DSearchPath::Results:: operator = (const DSearchPath::Results ©) { @@ -41,7 +54,7 @@ operator = (const DSearchPath::Results ©) { //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Results::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DSearchPath::Results:: ~Results() { @@ -90,7 +103,7 @@ DSearchPath() { //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DSearchPath:: DSearchPath(const string &path, const string &delimiters) { @@ -100,7 +113,7 @@ DSearchPath(const string &path, const string &delimiters) { //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DSearchPath:: DSearchPath(const DSearchPath ©) : @@ -111,7 +124,7 @@ DSearchPath(const DSearchPath ©) : //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DSearchPath:: operator = (const DSearchPath ©) { @@ -121,7 +134,7 @@ operator = (const DSearchPath ©) { //////////////////////////////////////////////////////////////////// // Function: DSearchPath::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DSearchPath:: ~DSearchPath() { @@ -269,7 +282,7 @@ find_file(const Filename &filename) const { // any. Returns the number of matches found. //////////////////////////////////////////////////////////////////// int DSearchPath:: -find_all_files(const Filename &filename, +find_all_files(const Filename &filename, DSearchPath::Results &results) const { results._files.clear(); @@ -287,7 +300,7 @@ find_all_files(const Filename &filename, //////////////////////////////////////////////////////////////////// // Function: DSearchPath::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DSearchPath:: output(ostream &out, const string &separator) const { @@ -305,7 +318,7 @@ output(ostream &out, const string &separator) const { //////////////////////////////////////////////////////////////////// // Function: DSearchPath::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DSearchPath:: write(ostream &out, int indent_level) const { diff --git a/dtool/src/dtoolutil/dSearchPath.h b/dtool/src/dtoolutil/dSearchPath.h index f651b26165..97e904a7b1 100644 --- a/dtool/src/dtoolutil/dSearchPath.h +++ b/dtool/src/dtoolutil/dSearchPath.h @@ -1,6 +1,19 @@ // Filename: dSearchPath.h // Created by: drose (01Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PANDASEARCHPATH_H @@ -62,7 +75,7 @@ PUBLISHED: Filename find_file(const Filename &filename) const; int find_all_files(const Filename &filename, Results &results) const; - INLINE static Filename + INLINE static Filename search_path(const Filename &filename, const string &path, const string &delimiters = ": \t\n"); diff --git a/dtool/src/dtoolutil/executionEnvironment.I b/dtool/src/dtoolutil/executionEnvironment.I index 992df26e48..d31122dd30 100644 --- a/dtool/src/dtoolutil/executionEnvironment.I +++ b/dtool/src/dtoolutil/executionEnvironment.I @@ -1,6 +1,19 @@ // Filename: executionEnvironment.I // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -50,7 +63,7 @@ INLINE string ExecutionEnvironment:: get_arg(int n) { return get_ptr()->ns_get_arg(n); } - + //////////////////////////////////////////////////////////////////// // Function: ExecutionEnvironment::get_binary_name // Access: Public, Static diff --git a/dtool/src/dtoolutil/executionEnvironment.cxx b/dtool/src/dtoolutil/executionEnvironment.cxx index 7744032935..6d6533f077 100644 --- a/dtool/src/dtoolutil/executionEnvironment.cxx +++ b/dtool/src/dtoolutil/executionEnvironment.cxx @@ -1,6 +1,19 @@ -// Filename: executionEnvironment.C +// Filename: executionEnvironment.cxx // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "executionEnvironment.h" @@ -76,7 +89,7 @@ expand_string(const string &str) { // A double dollar sign maps to a single dollar sign. result += str.substr(last, start - last); last = start + 1; - + } else { string varname; size_t end = start; @@ -98,7 +111,7 @@ expand_string(const string &str) { varname = str.substr(start, end - start); } - string subst = + string subst = result += str.substr(last, dollar - last); result += get_environment_variable(varname); last = end; @@ -208,7 +221,7 @@ ns_get_arg(int n) const { assert(n >= 0 && n < ns_get_num_args()); return _args[n]; } - + //////////////////////////////////////////////////////////////////// // Function: ExecutionEnvironment::ns_get_binary_name // Access: Private @@ -265,12 +278,12 @@ read_environment_variables() { while (!proc.eof() && !proc.fail()) { string variable; string value; - + while (!proc.eof() && !proc.fail() && ch != '=' && ch != '\0') { variable += (char)ch; ch = proc.get(); } - + if (ch == '=') { ch = proc.get(); while (!proc.eof() && !proc.fail() && ch != '\0') { diff --git a/dtool/src/dtoolutil/executionEnvironment.h b/dtool/src/dtoolutil/executionEnvironment.h index 34c8ea3afa..ac40ef0ab8 100644 --- a/dtool/src/dtoolutil/executionEnvironment.h +++ b/dtool/src/dtoolutil/executionEnvironment.h @@ -1,6 +1,19 @@ // Filename: executionEnvironment.h // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef EXECUTIONENVIRONMENT_H @@ -33,7 +46,7 @@ public: INLINE static int get_num_args(); INLINE static string get_arg(int n); - + INLINE static string get_binary_name(); static Filename get_cwd(); @@ -44,7 +57,7 @@ private: int ns_get_num_args() const; string ns_get_arg(int n) const; - + string ns_get_binary_name() const; static ExecutionEnvironment *get_ptr(); diff --git a/dtool/src/dtoolutil/filename.I b/dtool/src/dtoolutil/filename.I index 265b0407c9..3ab2f97eb0 100644 --- a/dtool/src/dtoolutil/filename.I +++ b/dtool/src/dtoolutil/filename.I @@ -1,21 +1,25 @@ // Filename: filename.I // Created by: drose (18Jan99) -// +// //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97 Walt Disney Imagineering, Inc. -// -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Filename::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename:: Filename(const string &filename) { @@ -26,7 +30,7 @@ Filename(const string &filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename:: Filename(const char *filename) { @@ -38,10 +42,10 @@ Filename(const char *filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename:: -Filename(const Filename ©) +Filename(const Filename ©) : _filename(copy._filename), _dirname_end(copy._dirname_end), _basename_start(copy._basename_start), @@ -54,7 +58,7 @@ Filename(const Filename ©) //////////////////////////////////////////////////////////////////// // Function: Filename::text_filename named constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename Filename:: text_filename(const string &filename) { @@ -66,7 +70,7 @@ text_filename(const string &filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::binary_filename named constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename Filename:: binary_filename(const string &filename) { @@ -78,7 +82,7 @@ binary_filename(const string &filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::dso_filename named constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename Filename:: dso_filename(const string &filename) { @@ -90,7 +94,7 @@ dso_filename(const string &filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::executable_filename named constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename Filename:: executable_filename(const string &filename) { @@ -102,7 +106,7 @@ executable_filename(const string &filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename:: ~Filename() { @@ -112,7 +116,7 @@ INLINE Filename:: //////////////////////////////////////////////////////////////////// // Function: Filename::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename &Filename:: operator = (const string &filename) { @@ -126,7 +130,7 @@ operator = (const string &filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename &Filename:: operator = (const char *filename) { @@ -137,7 +141,7 @@ operator = (const char *filename) { //////////////////////////////////////////////////////////////////// // Function: Filename::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename &Filename:: operator = (const Filename ©) { @@ -149,12 +153,12 @@ operator = (const Filename ©) { _flags = copy._flags; return *this; } - + //////////////////////////////////////////////////////////////////// // Function: Filename::string typecast operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Filename:: operator const string & () const { @@ -164,7 +168,7 @@ operator const string & () const { //////////////////////////////////////////////////////////////////// // Function: Filename::c_str // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const char *Filename:: c_str() const { @@ -174,7 +178,7 @@ c_str() const { //////////////////////////////////////////////////////////////////// // Function: Filename::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool Filename:: empty() const { @@ -184,7 +188,7 @@ empty() const { //////////////////////////////////////////////////////////////////// // Function: Filename::length // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE size_t Filename:: length() const { @@ -194,7 +198,7 @@ length() const { //////////////////////////////////////////////////////////////////// // Function: Filename::Indexing operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE char Filename:: operator [] (int n) const { @@ -401,7 +405,7 @@ is_local() const { //////////////////////////////////////////////////////////////////// INLINE bool Filename:: is_fully_qualified() const { - return + return (_filename.size() > 2 && _filename[0] == '.' && _filename[1] == '/') || (!_filename.empty() && _filename[0] == '/'); } @@ -409,7 +413,7 @@ is_fully_qualified() const { //////////////////////////////////////////////////////////////////// // Function: Filename::Equality operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool Filename:: operator == (const string &other) const { @@ -419,7 +423,7 @@ operator == (const string &other) const { //////////////////////////////////////////////////////////////////// // Function: Filename::Inequality operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool Filename:: operator != (const string &other) const { @@ -429,7 +433,7 @@ operator != (const string &other) const { //////////////////////////////////////////////////////////////////// // Function: Filename::Ordering operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool Filename:: operator < (const string &other) const { @@ -440,7 +444,7 @@ operator < (const string &other) const { //////////////////////////////////////////////////////////////////// // Function: Filename::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void Filename:: output(ostream &out) const { diff --git a/dtool/src/dtoolutil/filename.cxx b/dtool/src/dtoolutil/filename.cxx index 5fb16ab860..6e1fa018ee 100644 --- a/dtool/src/dtoolutil/filename.cxx +++ b/dtool/src/dtoolutil/filename.cxx @@ -1,15 +1,19 @@ -// Filename: filename.C +// Filename: filename.cxx // Created by: drose (18Jan99) -// +// //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97 Walt Disney Imagineering, Inc. -// -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "filename.h" @@ -65,25 +69,25 @@ back_to_front_slash(const string &str) { return result; } -static const string & +static const string & get_panda_root() { static string panda_root; static bool got_panda_root = false; - + if (!got_panda_root) { const char *envvar = getenv("PANDA_ROOT"); if (envvar == (const char *)NULL) { envvar = getenv("CYGWIN_ROOT"); } - + if (envvar != (const char *)NULL) { panda_root = front_to_back_slash(envvar); } - + if (!panda_root.empty() && panda_root[panda_root.length() - 1] != '\\') { panda_root += '\\'; } - + got_panda_root = true; } @@ -121,14 +125,14 @@ convert_pathname(const string &unix_style_pathname) { unix_style_pathname[2] == '/') { // This is a pathname that begins with a single letter. That must // be the drive letter. - windows_pathname = + windows_pathname = string(1, toupper(unix_style_pathname[1])) + ":" + front_to_back_slash(unix_style_pathname.substr(2)); } else { // It does not begin with a single letter, so prefix "PANDA_ROOT". - - windows_pathname = + + windows_pathname = get_panda_root() + front_to_back_slash(unix_style_pathname); } @@ -139,7 +143,7 @@ string convert_dso_pathname(const string &unix_style_pathname) { // If the extension is .so, change it to .dll. size_t dot = unix_style_pathname.rfind('.'); - if (dot == string::npos || + if (dot == string::npos || unix_style_pathname.find('/', dot) != string::npos) { // No filename extension. return convert_pathname(unix_style_pathname); @@ -173,7 +177,7 @@ string convert_executable_pathname(const string &unix_style_pathname) { // If the extension is not .exe, append .exe. size_t dot = unix_style_pathname.rfind('.'); - if (dot == string::npos || + if (dot == string::npos || unix_style_pathname.find('/', dot) != string::npos) { // No filename extension. return convert_pathname(unix_style_pathname + ".exe"); @@ -246,7 +250,7 @@ from_os_specific(const string &os_specific, Filename::Type type) { } matches = (c == tolower(result[p])); } - + if (matches) { // The initial prefix matches! Replace the initial bit with a // leading slash. @@ -369,9 +373,9 @@ set_dirname(const string &s) { } int length_change = ss.length() - _basename_start; - + _filename.replace(0, _basename_start, ss); - + _dirname_end = ss.length() - 1; // An exception: if the dirname string was the single slash, the @@ -499,7 +503,7 @@ standardize() { string component = _filename.substr(p, slash - p); if (component == ".") { // Ignore /./. - } else if (component == ".." && !components.empty() && + } else if (component == ".." && !components.empty() && !(components.back() == "..")) { // Back up. components.pop_back(); @@ -512,7 +516,7 @@ standardize() { p++; } } - + // Now reassemble the filename. string result; if (global) { @@ -601,7 +605,7 @@ make_canonical() { // Temporarily save the current working directory. Filename cwd = ExecutionEnvironment::get_cwd(); - + if (is_directory()) { // If the filename itself represents a directory and not a // filename, cd to the named directory, not the one above it. @@ -807,8 +811,8 @@ is_executable() const { // Similarly for other_missing_is_old. //////////////////////////////////////////////////////////////////// int Filename:: -compare_timestamps(const Filename &other, - bool this_missing_is_old, +compare_timestamps(const Filename &other, + bool this_missing_is_old, bool other_missing_is_old) const { string os_specific = to_os_specific(); string other_os_specific = other.to_os_specific(); @@ -882,7 +886,7 @@ compare_timestamps(const Filename &other, // false. //////////////////////////////////////////////////////////////////// bool Filename:: -resolve_filename(const DSearchPath &searchpath, +resolve_filename(const DSearchPath &searchpath, const string &default_extension) { string found; @@ -1065,7 +1069,7 @@ scan_directory(vector_string &contents) const { #else // Don't know how to scan directories! return false; -#endif +#endif } //////////////////////////////////////////////////////////////////// @@ -1273,7 +1277,7 @@ bool Filename:: rename_to(const Filename &other) const { string os_specific = to_os_specific(); string other_os_specific = other.to_os_specific(); - return (rename(os_specific.c_str(), + return (rename(os_specific.c_str(), other_os_specific.c_str()) == 0); } @@ -1333,26 +1337,26 @@ locate_basename() { _basename_start = 0; } else { - + string::size_type slash = _filename.rfind('/'); if (slash != string::npos) { _basename_start = slash + 1; _dirname_end = _basename_start; - + // One exception: in case there are multiple slashes in a row, // we want to treat them as a single slash. The directory // therefore actually ends at the first of these; back up a bit. while (_dirname_end > 0 && _filename[_dirname_end-1] == '/') { _dirname_end--; } - + // Another exception: if the dirname was nothing but slashes, it // was the root directory, or / itself. In this case the dirname // does include the terminal slash (of course). if (_dirname_end == 0) { _dirname_end = 1; } - + } else { _dirname_end = 0; _basename_start = 0; @@ -1391,7 +1395,7 @@ locate_extension() { while (dot+1 > _basename_start && _filename[dot] != '.') { --dot; } - + if (dot+1 > _basename_start) { _basename_end = dot; _extension_start = dot + 1; @@ -1404,7 +1408,7 @@ locate_extension() { // Now: // _basename_end is the last dot, or npos if there is no dot. - + // _extension_start is the character after the last dot, or npos if // there is no dot. } diff --git a/dtool/src/dtoolutil/filename.h b/dtool/src/dtoolutil/filename.h index 86f6136006..943491a6a9 100644 --- a/dtool/src/dtoolutil/filename.h +++ b/dtool/src/dtoolutil/filename.h @@ -2,14 +2,18 @@ // Created by: drose (18Jan99) // //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97 Walt Disney Imagineering, Inc. // -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FILENAME_H @@ -49,7 +53,7 @@ PUBLISHED: // Perhaps other types will be added later. }; -public: +public: enum Flags { F_type = 0x0f, F_binary = 0x10, @@ -71,7 +75,7 @@ PUBLISHED: INLINE static Filename dso_filename(const string &filename); INLINE static Filename executable_filename(const string &filename); - static Filename from_os_specific(const string &os_specific, + static Filename from_os_specific(const string &os_specific, Type type = T_general); static Filename temporary(const string &dirname, const string &prefix, Type type = T_general); @@ -188,5 +192,5 @@ INLINE ostream &operator << (ostream &out, const Filename &n) { #endif - + diff --git a/dtool/src/dtoolutil/load_dso.cxx b/dtool/src/dtoolutil/load_dso.cxx index 5c34cafb02..ba7161eea9 100644 --- a/dtool/src/dtoolutil/load_dso.cxx +++ b/dtool/src/dtoolutil/load_dso.cxx @@ -1,6 +1,19 @@ -// Filename: load_dso.C +// Filename: load_dso.cxx // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "load_dso.h" @@ -15,7 +28,7 @@ load_dso(const Filename &) return (void *) NULL; } -string +string load_dso_error() { ostringstream ps2errmsg; diff --git a/dtool/src/dtoolutil/load_dso.h b/dtool/src/dtoolutil/load_dso.h index 28d37849e3..830a99f686 100644 --- a/dtool/src/dtoolutil/load_dso.h +++ b/dtool/src/dtoolutil/load_dso.h @@ -1,6 +1,19 @@ // Filename: load_dso.h // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LOAD_DSO_H diff --git a/dtool/src/dtoolutil/pfstream.I b/dtool/src/dtoolutil/pfstream.I index 940f0486da..847b35aaa0 100644 --- a/dtool/src/dtoolutil/pfstream.I +++ b/dtool/src/dtoolutil/pfstream.I @@ -1,6 +1,19 @@ // Filename: pfstream.I // Created by: cary (12Dec00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE IPipeStream::IPipeStream(const std::string cmd) diff --git a/dtool/src/dtoolutil/pfstream.cxx b/dtool/src/dtoolutil/pfstream.cxx index dbc6e74712..b9137012b2 100644 --- a/dtool/src/dtoolutil/pfstream.cxx +++ b/dtool/src/dtoolutil/pfstream.cxx @@ -2,6 +2,19 @@ // Created by: cary (09Jan01) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "pfstream.h" diff --git a/dtool/src/dtoolutil/pfstream.h b/dtool/src/dtoolutil/pfstream.h index 971ba8a8b2..33d715f374 100644 --- a/dtool/src/dtoolutil/pfstream.h +++ b/dtool/src/dtoolutil/pfstream.h @@ -2,6 +2,19 @@ // Created by: cary (27Aug98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __PFSTREAM_H__ #define __PFSTREAM_H__ diff --git a/dtool/src/dtoolutil/pfstreamBuf.cxx b/dtool/src/dtoolutil/pfstreamBuf.cxx index 55a7e949f4..c15a2aecf6 100644 --- a/dtool/src/dtoolutil/pfstreamBuf.cxx +++ b/dtool/src/dtoolutil/pfstreamBuf.cxx @@ -1,6 +1,19 @@ // Filename: pfstreamBuf.cxx // Created by: cary (12Dec00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pfstreamBuf.h" diff --git a/dtool/src/dtoolutil/pfstreamBuf.h b/dtool/src/dtoolutil/pfstreamBuf.h index a0cfc490f6..e65d377820 100644 --- a/dtool/src/dtoolutil/pfstreamBuf.h +++ b/dtool/src/dtoolutil/pfstreamBuf.h @@ -1,6 +1,19 @@ // Filename: pfstreamBuf.h // Created by: cary (12Dec00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __PFSTREAMBUF_H__ diff --git a/dtool/src/dtoolutil/vector_src.cxx b/dtool/src/dtoolutil/vector_src.cxx index 644932f76f..23db5120ba 100644 --- a/dtool/src/dtoolutil/vector_src.cxx +++ b/dtool/src/dtoolutil/vector_src.cxx @@ -1,6 +1,19 @@ -// Filename: vector_something_src.cxx +// Filename: vector_src.cxx // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -33,7 +46,7 @@ // They will automatically be undefined at the end of the file. /* -void +void insert_into_vector(NAME &vec, NAME::iterator where, NAME::const_pointer begin, NAME::const_pointer end) { vec.insert(where, begin, end); diff --git a/dtool/src/dtoolutil/vector_src.h b/dtool/src/dtoolutil/vector_src.h index eccfc9d6eb..b61e0c0988 100644 --- a/dtool/src/dtoolutil/vector_src.h +++ b/dtool/src/dtoolutil/vector_src.h @@ -1,6 +1,19 @@ -// Filename: vector_something_src.h +// Filename: vector_src.h // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/dtoolutil/vector_string.cxx b/dtool/src/dtoolutil/vector_string.cxx index 30138938af..88f5c11562 100644 --- a/dtool/src/dtoolutil/vector_string.cxx +++ b/dtool/src/dtoolutil/vector_string.cxx @@ -1,12 +1,25 @@ -// Filename: vector_string.C +// Filename: vector_string.cxx // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_string.h" -#define EXPCL EXPCL_DTOOLCONFIG -#define EXPTP EXPTP_DTOOLCONFIG +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG #define TYPE std::string #define NAME vector_string diff --git a/dtool/src/dtoolutil/vector_string.h b/dtool/src/dtoolutil/vector_string.h index 1a71ede713..ac1498aae1 100644 --- a/dtool/src/dtoolutil/vector_string.h +++ b/dtool/src/dtoolutil/vector_string.h @@ -1,6 +1,19 @@ // Filename: vector_string.h // Created by: drose (15May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_STRING_H @@ -19,8 +32,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_DTOOL -#define EXPTP EXPTP_DTOOL +#define EXPCL EXPCL_DTOOL +#define EXPTP EXPTP_DTOOL #define TYPE std::string #define NAME vector_string diff --git a/dtool/src/interrogate/interrogate.cxx b/dtool/src/interrogate/interrogate.cxx index 842ac6761e..b986ad16da 100644 --- a/dtool/src/interrogate/interrogate.cxx +++ b/dtool/src/interrogate/interrogate.cxx @@ -1,6 +1,19 @@ -// Filename: interrogate.C +// Filename: interrogate.cxx // Created by: drose (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogate.h" @@ -161,7 +174,7 @@ void show_help() { << " Make void* pointers to the function wrappers directly available. A\n" << " scripting language will be able to call the interrogate functions\n" << " directly by pointer.\n\n" - + << " -fnames\n" << " Make the names of the function wrappers public symbols so that the\n" << " scripting language will be able to call the interrogate functions\n" @@ -188,7 +201,7 @@ void show_help() { << " simply delete.\n\n" << " Furthermore, parameters of type PointerTo or ConstPointerTo\n" << " will automatically be mapped to N * and const N *, respectively.\n\n" - + << " -assert\n" << " Generate code in each wrapper that will check the state of the assert\n" << " flag and trigger an exception in the scripting language when a\n" @@ -272,8 +285,8 @@ main(int argc, char *argv[]) { extern char *optarg; extern int optind; int flag; - - flag = getopt_long_only(argc, argv, short_options, long_options, NULL); + + flag = getopt_long_only(argc, argv, short_options, long_options, NULL); while (flag != EOF) { switch (flag) { case 'I': @@ -376,7 +389,7 @@ main(int argc, char *argv[]) { default: exit(1); } - flag = getopt_long_only(argc, argv, short_options, long_options, NULL); + flag = getopt_long_only(argc, argv, short_options, long_options, NULL); } argc -= (optind-1); @@ -443,7 +456,7 @@ main(int argc, char *argv[]) { ofstream output_code; output_code_filename.open_write(output_code); - output_code + output_code << "/*\n" << " * This file generated by:\n" << " * " << command_line << "\n" diff --git a/dtool/src/interrogate/interrogate.h b/dtool/src/interrogate/interrogate.h index 2034bf2d45..c42afbf6d3 100644 --- a/dtool/src/interrogate/interrogate.h +++ b/dtool/src/interrogate/interrogate.h @@ -1,6 +1,19 @@ // Filename: interrogate.h // Created by: drose (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATE_H diff --git a/dtool/src/interrogate/interrogateBuilder.cxx b/dtool/src/interrogate/interrogateBuilder.cxx index 9f540697db..0ebd2b2ae4 100644 --- a/dtool/src/interrogate/interrogateBuilder.cxx +++ b/dtool/src/interrogate/interrogateBuilder.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateBuilder.C +// Filename: interrogateBuilder.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateBuilder.h" @@ -91,7 +104,7 @@ read_command_file(istream &in) { while (p < line.length() && isspace(line[p])) { p++; } - + if (p < line.length()) { // Get the first word. size_t q = p; @@ -134,7 +147,7 @@ do_command(const string &command, const string ¶ms) { type = type->resolve_type(&parser, &parser); _forcetype.insert(type->get_local_name(&parser)); } - + } else if (command == "renametype") { // rename exports the type as the indicated name. We strip off // the last word as the new name; the new name may not contain @@ -239,7 +252,7 @@ build() { if (tdef->_type->get_subtype() == CPPDeclaration::ST_struct) { // A typedef counts as a declaration. This lets us pick up // most template instantiations. - CPPStructType *struct_type = + CPPStructType *struct_type = tdef->_type->resolve_type(&parser, &parser)->as_struct_type(); scan_struct_type(struct_type); } @@ -249,12 +262,12 @@ build() { type->_vis = (*di)->_vis; if (type->get_subtype() == CPPDeclaration::ST_struct) { - CPPStructType *struct_type = + CPPStructType *struct_type = type->as_type()->resolve_type(&parser, &parser)->as_struct_type(); scan_struct_type(struct_type); } else if (type->get_subtype() == CPPDeclaration::ST_enum) { - CPPEnumType *enum_type = + CPPEnumType *enum_type = type->as_type()->resolve_type(&parser, &parser)->as_enum_type(); scan_enum_type(enum_type); } @@ -349,8 +362,8 @@ write_code(ostream &out, InterrogateModuleDef *def) { // be easier to read. { map::iterator ii; - for (ii = wrappers_by_index.begin(); - ii != wrappers_by_index.end(); + for (ii = wrappers_by_index.begin(); + ii != wrappers_by_index.end(); ++ii) { WrapperBuilder *wbuilder = (*ii).second; @@ -388,8 +401,8 @@ write_code(ostream &out, InterrogateModuleDef *def) { out << "static void *_in_fptrs[" << num_wrappers << "] = {\n"; map::iterator ii; int next_index = 1; - for (ii = wrappers_by_index.begin(); - ii != wrappers_by_index.end(); + for (ii = wrappers_by_index.begin(); + ii != wrappers_by_index.end(); ++ii) { int this_index = (*ii).first; while (next_index < this_index) { @@ -426,13 +439,13 @@ write_code(ostream &out, InterrogateModuleDef *def) { } out << "};\n\n"; } - + if (output_module_specific) { // Output whatever stuff we should output if this were a module. // Presently, this is only the Python table. if (build_python_wrappers) { out << "static PyMethodDef python_methods[] = {\n"; - + for (hi = _wrappers_by_hash.begin(); hi != _wrappers_by_hash.end(); ++hi) { @@ -476,8 +489,8 @@ write_code(ostream &out, InterrogateModuleDef *def) { << "\", /* database_filename */\n"; } else { out << " (const char *)0, /* database_filename */\n"; - } - + } + if (save_unique_names) { out << " _in_unique_names,\n" << " " << num_wrappers << ", /* num_unique_names */\n"; @@ -493,12 +506,12 @@ write_code(ostream &out, InterrogateModuleDef *def) { out << " (void **)0, /* fptrs */\n" << " 0, /* num_fptrs */\n"; } - + out << " 1, /* first_index */\n" << " " << InterrogateDatabase::get_ptr()->get_next_index() << " /* next_index */\n" << "};\n\n"; - + // And now write the static-init code that tells the interrogate // database to load up this module. out << "Configure(_in_configure_" << library_name << ");\n" @@ -628,7 +641,7 @@ get_preferred_name(CPPType *type) { // given command parameter list. //////////////////////////////////////////////////////////////////// void InterrogateBuilder:: -insert_param_list(InterrogateBuilder::Commands &commands, +insert_param_list(InterrogateBuilder::Commands &commands, const string ¶ms) { size_t p = 0; while (p < params.length()) { @@ -735,7 +748,7 @@ in_ignoreinvolved(CPPType *type) const { if (in_ignoreinvolved(ftype->_return_type)) { return true; } - const CPPParameterList::Parameters ¶ms = + const CPPParameterList::Parameters ¶ms = ftype->_parameters->_parameters; CPPParameterList::Parameters::const_iterator pi; for (pi = params.begin(); pi != params.end(); ++pi) { @@ -835,8 +848,8 @@ remap_indices() { } FunctionsBySignature::iterator fi; - for (fi = _functions_by_signature.begin(); - fi != _functions_by_signature.end(); + for (fi = _functions_by_signature.begin(); + fi != _functions_by_signature.end(); ++fi) { (*fi).second = remap.map_from((*fi).second); } @@ -877,7 +890,7 @@ scan_function(CPPInstance *function) { assert(function != (CPPInstance *)NULL); assert(function->_type != (CPPType *)NULL && function->_type->as_function_type() != (CPPFunctionType *)NULL); - CPPFunctionType *ftype = + CPPFunctionType *ftype = function->_type->resolve_type(&parser, &parser)->as_function_type(); assert(ftype != (CPPFunctionType *)NULL); @@ -917,7 +930,7 @@ scan_function(CPPInstance *function) { // ignorable file. return; } - + if (function->_vis > min_vis) { // The function is not marked to be exported. return; @@ -933,7 +946,7 @@ scan_function(CPPInstance *function) { // types that are protected or private. return; } - + if (in_ignoreinvolved(ftype)) { // The function or its parameters involves something that the // user requested we ignore. @@ -941,7 +954,7 @@ scan_function(CPPInstance *function) { } get_function(function, "", - (CPPStructType *)NULL, scope, true, + (CPPStructType *)NULL, scope, true, WrapperBuilder::T_normal); } @@ -979,11 +992,11 @@ scan_struct_type(CPPStructType *type) { // and the type itself is not marked for export, then never mind. if (type->_vis > min_vis) { CPPScope *scope = type->_scope; - + bool any_exported = false; CPPScope::Declarations::const_iterator di; - for (di = scope->_declarations.begin(); - di != scope->_declarations.end() && !any_exported; + for (di = scope->_declarations.begin(); + di != scope->_declarations.end() && !any_exported; ++di) { if ((*di)->_vis <= min_vis) { any_exported = true; @@ -1113,7 +1126,7 @@ scan_manifest(CPPManifest *manifest) { // if warranted. //////////////////////////////////////////////////////////////////// ElementIndex InterrogateBuilder:: -scan_element(CPPInstance *element, CPPStructType *struct_type, +scan_element(CPPInstance *element, CPPStructType *struct_type, CPPScope *scope) { if (element == (CPPInstance *)NULL) { return 0; @@ -1183,10 +1196,10 @@ scan_element(CPPInstance *element, CPPStructType *struct_type, // Wrap the type in a const reference. parameter_type = TypeManager::wrap_const_reference(parameter_type); } - + // Generate a getter and setter function for the element. FunctionIndex getter = - get_getter(parameter_type, element->get_local_name(scope), + get_getter(parameter_type, element->get_local_name(scope), struct_type, scope, element); if (getter != 0) { ielement._flags |= InterrogateElement::F_has_getter; @@ -1195,7 +1208,7 @@ scan_element(CPPInstance *element, CPPStructType *struct_type, if (TypeManager::is_assignable(element_type)) { FunctionIndex setter = - get_setter(parameter_type, element->get_local_name(scope), + get_setter(parameter_type, element->get_local_name(scope), struct_type, scope, element); if (setter != 0) { ielement._flags |= InterrogateElement::F_has_setter; @@ -1235,7 +1248,7 @@ get_getter(CPPType *expr_type, string expression, expr_type = expr_type->as_const_type()->_wrapped_around; assert(expr_type != (CPPType *)NULL); } - + // Make up a CPPFunctionType. CPPParameterList *params = new CPPParameterList; CPPFunctionType *ftype = new CPPFunctionType(expr_type, params, 0); @@ -1289,7 +1302,7 @@ get_getter(CPPType *expr_type, string expression, // It's clear; make a getter. FunctionIndex index = get_function(function, description, - struct_type, scope, false, + struct_type, scope, false, WrapperBuilder::T_getter, expression); InterrogateDatabase::get_ptr()->update_function(index)._comment = description; @@ -1308,7 +1321,7 @@ get_setter(CPPType *expr_type, string expression, CPPInstance *element) { // Make up a name for the function. string function_name = clean_identifier("set_" + expression); - + // Make up a CPPFunctionType. CPPParameterList *params = new CPPParameterList; CPPInstance *param0 = new CPPInstance(expr_type, "value"); @@ -1362,7 +1375,7 @@ get_setter(CPPType *expr_type, string expression, // It's clear; make a setter. FunctionIndex index = get_function(function, description, - struct_type, scope, false, + struct_type, scope, false, WrapperBuilder::T_setter, expression); InterrogateDatabase::get_ptr()->update_function(index)._comment = description; @@ -1377,7 +1390,7 @@ get_setter(CPPType *expr_type, string expression, // the database. Returns the new function index. //////////////////////////////////////////////////////////////////// FunctionIndex InterrogateBuilder:: -get_cast_function(CPPType *to_type, CPPType *from_type, +get_cast_function(CPPType *to_type, CPPType *from_type, const string &prefix) { CPPInstance *function; CPPStructType *struct_type = from_type->as_struct_type(); @@ -1388,36 +1401,36 @@ get_cast_function(CPPType *to_type, CPPType *from_type, scope = struct_type->get_scope(); // Make up a name for the method. - string function_name = + string function_name = clean_identifier(prefix + "_to_" + get_preferred_name(to_type)); - + // Make up a CPPFunctionType. CPPType *to_ptr_type = CPPType::new_type(new CPPPointerType(to_type)); - + CPPParameterList *params = new CPPParameterList; CPPFunctionType *ftype = new CPPFunctionType(to_ptr_type, params, 0); - + // Now make up an instance for the function. function = new CPPInstance(ftype, function_name); } else { // The from type isn't a struct or a class, so this has to be an // external function. - + // Make up a name for the function. - string function_name = + string function_name = clean_identifier(prefix + "_" + get_preferred_name(from_type) + "_to_" + get_preferred_name(to_type)); - + // Make up a CPPFunctionType. CPPType *from_ptr_type = CPPType::new_type(new CPPPointerType(from_type)); CPPType *to_ptr_type = CPPType::new_type(new CPPPointerType(to_type)); - + CPPInstance *param0 = new CPPInstance(from_ptr_type, "this"); CPPParameterList *params = new CPPParameterList; params->_parameters.push_back(param0); CPPFunctionType *ftype = new CPPFunctionType(to_ptr_type, params, 0); - + // Now make up an instance for the function. function = new CPPInstance(ftype, function_name); } @@ -1425,10 +1438,10 @@ get_cast_function(CPPType *to_type, CPPType *from_type, ostringstream desc; desc << prefix << " from " << *from_type << " to " << *to_type; string description = desc.str(); - + FunctionIndex index = get_function(function, description, - struct_type, scope, false, + struct_type, scope, false, WrapperBuilder::T_typecast); InterrogateDatabase::get_ptr()->update_function(index)._comment = description; @@ -1444,7 +1457,7 @@ get_cast_function(CPPType *to_type, CPPType *from_type, //////////////////////////////////////////////////////////////////// FunctionIndex InterrogateBuilder:: get_function(CPPInstance *function, string description, - CPPStructType *struct_type, + CPPStructType *struct_type, CPPScope *scope, bool global, WrapperBuilder::Type wtype, const string &expression) { // Get a unique function signature. Make sure we tell the function @@ -1455,7 +1468,7 @@ get_function(CPPInstance *function, string description, function->_ident = new CPPIdentifier(*function->_ident); function->_ident->_native_scope = scope; } - CPPFunctionType *ftype = + CPPFunctionType *ftype = function->_type->resolve_type(scope, &parser)->as_function_type(); function->_type = ftype; @@ -1469,12 +1482,12 @@ get_function(CPPInstance *function, string description, string function_signature = TypeManager::get_function_signature(function); // First, check to see if it's already there. - FunctionsBySignature::const_iterator tni = + FunctionsBySignature::const_iterator tni = _functions_by_signature.find(function_signature); if (tni != _functions_by_signature.end()) { FunctionIndex index = (*tni).second; // It's already here, so update the global flag. - InterrogateFunction &ifunction = + InterrogateFunction &ifunction = InterrogateDatabase::get_ptr()->update_function(index); if (global) { @@ -1564,7 +1577,7 @@ make_wrappers() { const NewFunction &nf = (*ni); int num_default_parameters = nf._ftype->get_num_default_parameters(); - InterrogateFunction &ifunction = + InterrogateFunction &ifunction = InterrogateDatabase::get_ptr()->update_function(nf._function_index); if (build_c_wrappers) { @@ -1587,7 +1600,7 @@ make_wrappers() { FunctionWrapperIndex wrapper = get_wrapper(nf._function_index, new WrapperBuilderPython, nf._function, nf._description, - nf._struct_type, nf._scope, + nf._struct_type, nf._scope, nf._wtype, nf._expression, dp); if (wrapper != 0) { ifunction._python_wrappers.push_back(wrapper); @@ -1608,12 +1621,12 @@ make_wrappers() { FunctionWrapperIndex InterrogateBuilder:: get_wrapper(FunctionIndex function_index, WrapperBuilder *wbuilder, CPPInstance *function, string description, - CPPStructType *struct_type, + CPPStructType *struct_type, CPPScope *scope, WrapperBuilder::Type wtype, const string &expression, int num_default_parameters) { - string function_signature = + string function_signature = TypeManager::get_function_signature(function, num_default_parameters); if (description.empty()) { @@ -1624,7 +1637,7 @@ get_wrapper(FunctionIndex function_index, WrapperBuilder *wbuilder, description = desc.str(); } - if (!wbuilder->set_function(function, description, struct_type, scope, + if (!wbuilder->set_function(function, description, struct_type, scope, function_signature, wtype, expression, num_default_parameters)) { // This function can't be exported for some reason. @@ -1670,14 +1683,14 @@ get_wrapper(FunctionIndex function_index, WrapperBuilder *wbuilder, if (wbuilder->_has_this) { // If one of the parameters is "this", it must be the first one. assert(!iwrapper._parameters.empty()); - iwrapper._parameters.front()._parameter_flags |= + iwrapper._parameters.front()._parameter_flags |= InterrogateFunctionWrapper::PF_is_this; } if (wbuilder->_return_type->new_type_is_atomic_string()) { iwrapper._return_type = get_atomic_string_type(); } else { - iwrapper._return_type = + iwrapper._return_type = get_type(wbuilder->_return_type->get_new_type(), false); } @@ -1686,7 +1699,7 @@ get_wrapper(FunctionIndex function_index, WrapperBuilder *wbuilder, if (wbuilder->return_value_needs_management()) { iwrapper._flags |= InterrogateFunctionWrapper::F_caller_manages; - iwrapper._return_value_destructor = + iwrapper._return_value_destructor = wbuilder->get_return_value_destructor(); } } @@ -1720,7 +1733,7 @@ get_atomic_string_type() { TypeIndex index = InterrogateDatabase::get_ptr()->get_next_index(); _types_by_name[true_name] = index; - + InterrogateType itype; itype._flags |= InterrogateType::F_atomic; itype._atomic_token = AT_string; @@ -1811,7 +1824,7 @@ get_type(CPPType *type, bool global) { if (scope != &parser) { // We're scoped! - itype._scoped_name = + itype._scoped_name = descope(scope->get_local_name(&parser) + "::" + itype._name); CPPStructType *struct_type = scope->get_struct_type(); @@ -1825,30 +1838,30 @@ get_type(CPPType *type, bool global) { if (forced || !in_ignoretype(true_name)) { itype._flags |= InterrogateType::F_fully_defined; - + if (type->as_simple_type() != (CPPSimpleType *)NULL) { define_atomic_type(itype, type->as_simple_type()); - + } else if (type->as_pointer_type() != (CPPPointerType *)NULL) { define_wrapped_type(itype, type->as_pointer_type()); - + } else if (type->as_const_type() != (CPPConstType *)NULL) { define_wrapped_type(itype, type->as_const_type()); - + } else if (type->as_struct_type() != (CPPStructType *)NULL) { define_struct_type(itype, type->as_struct_type(), forced); - + } else if (type->as_enum_type() != (CPPEnumType *)NULL) { define_enum_type(itype, type->as_enum_type()); - + } else if (type->as_extension_type() != (CPPExtensionType *)NULL) { define_extension_type(itype, type->as_extension_type()); - + } else { // nout << "Attempt to define invalid type " << true_name << "\n"; // Remove the type from the database. - InterrogateDatabase::get_ptr()->remove_type(index); + InterrogateDatabase::get_ptr()->remove_type(index); _types_by_name[true_name] = 0; index = 0; } @@ -1942,7 +1955,7 @@ define_wrapped_type(InterrogateType &itype, CPPConstType *cpptype) { // Description: Builds up a definition for the indicated struct type. //////////////////////////////////////////////////////////////////// void InterrogateBuilder:: -define_struct_type(InterrogateType &itype, CPPStructType *cpptype, +define_struct_type(InterrogateType &itype, CPPStructType *cpptype, bool forced) { if (cpptype->get_simple_name().empty()) { // If the type has no name, forget it. We don't export anonymous @@ -1977,7 +1990,7 @@ define_struct_type(InterrogateType &itype, CPPStructType *cpptype, return; } - if (!forced && + if (!forced && (cpptype->_file._source != CPPFile::S_local || in_ignorefile(cpptype->_file._filename_as_referenced))) { // The struct type is defined in some other package or in an @@ -2006,7 +2019,7 @@ define_struct_type(InterrogateType &itype, CPPStructType *cpptype, CPPStructType::Derivation::const_iterator bi; for (bi = cpptype->_derivation.begin(); - bi != cpptype->_derivation.end(); + bi != cpptype->_derivation.end(); ++bi) { const CPPStructType::Base &base = (*bi); if (base._vis <= V_public) { @@ -2038,7 +2051,7 @@ define_struct_type(InterrogateType &itype, CPPStructType *cpptype, // not require a pointer change.) generate_casts = true; } - + if (generate_casts) { d._upcast = get_cast_function(base_type, cpptype, "upcast"); d._flags |= InterrogateType::DF_upcast; @@ -2115,18 +2128,18 @@ define_struct_type(InterrogateType &itype, CPPStructType *cpptype, // If we didn't get a destructor at all, we should make a wrapper // for one anyway. string function_name = "~" + cpptype->get_simple_name(); - + // Make up a CPPFunctionType. CPPType *void_type = TypeManager::get_void_type(); CPPParameterList *params = new CPPParameterList; CPPFunctionType *ftype = new CPPFunctionType(void_type, params, 0); ftype->_flags |= CPPFunctionType::F_destructor; - + // Now make up an instance for the destructor. CPPInstance *function = new CPPInstance(ftype, function_name); - + itype._destructor = get_function(function, "", - cpptype, cpptype->get_scope(), + cpptype, cpptype->get_scope(), false, WrapperBuilder::T_normal); itype._flags |= InterrogateType::F_implicit_destructor; } @@ -2156,20 +2169,20 @@ update_method_comment(CPPInstance *function, CPPStructType *struct_type, function->_ident = new CPPIdentifier(*function->_ident); function->_ident->_native_scope = scope; } - CPPFunctionType *ftype = + CPPFunctionType *ftype = function->_type->resolve_type(scope, &parser)->as_function_type(); function->_type = ftype; string function_signature = TypeManager::get_function_signature(function); // Now look it up. - FunctionsBySignature::const_iterator tni = + FunctionsBySignature::const_iterator tni = _functions_by_signature.find(function_signature); if (tni != _functions_by_signature.end()) { FunctionIndex index = (*tni).second; // Here it is! - InterrogateFunction &ifunction = + InterrogateFunction &ifunction = InterrogateDatabase::get_ptr()->update_function(index); // Update the comment. @@ -2208,12 +2221,12 @@ define_method(CPPFunctionGroup *fgroup, InterrogateType &itype, // Description: Adds the indicated member function to the struct type, //////////////////////////////////////////////////////////////////// void InterrogateBuilder:: -define_method(CPPInstance *function, InterrogateType &itype, +define_method(CPPInstance *function, InterrogateType &itype, CPPStructType *struct_type, CPPScope *scope) { assert(function != (CPPInstance *)NULL); assert(function->_type != (CPPType *)NULL && function->_type->as_function_type() != (CPPFunctionType *)NULL); - CPPFunctionType *ftype = + CPPFunctionType *ftype = function->_type->resolve_type(scope, &parser)->as_function_type(); if (function->is_template()) { @@ -2232,7 +2245,7 @@ define_method(CPPInstance *function, InterrogateType &itype, function->_vis <= V_public) { force_publish = true; } - + if ((ftype->_flags & CPPFunctionType::F_destructor) != 0) { // A destructor is a special case. If it's public, we export it // (even if it's not published), but if it's protected or private, @@ -2287,9 +2300,9 @@ define_method(CPPInstance *function, InterrogateType &itype, } return; } - - FunctionIndex index = get_function(function, "", struct_type, scope, + + FunctionIndex index = get_function(function, "", struct_type, scope, false, WrapperBuilder::T_normal); if (index != 0) { if ((ftype->_flags & CPPFunctionType::F_constructor) != 0) { @@ -2297,17 +2310,17 @@ define_method(CPPInstance *function, InterrogateType &itype, index) == itype._constructors.end()) { itype._constructors.push_back(index); } - + } else if ((ftype->_flags & CPPFunctionType::F_destructor) != 0) { itype._flags |= InterrogateType::F_true_destructor; itype._destructor = index; - + } else if ((ftype->_flags & CPPFunctionType::F_operator_typecast) != 0) { if (find(itype._casts.begin(), itype._casts.end(), index) == itype._casts.end()) { itype._casts.push_back(index); } - + } else { if (find(itype._methods.begin(), itype._methods.end(), index) == itype._methods.end()) { @@ -2341,9 +2354,9 @@ define_enum_type(InterrogateType &itype, CPPEnumType *cpptype) { } int next_value = 0; - + CPPEnumType::Elements::const_iterator ei; - for (ei = cpptype->_elements.begin(); + for (ei = cpptype->_elements.begin(); ei != cpptype->_elements.end(); ++ei) { CPPInstance *element = (*ei); @@ -2413,7 +2426,7 @@ define_extension_type(InterrogateType &itype, CPPExtensionType *cpptype) { //////////////////////////////////////////////////////////////////// void InterrogateBuilder:: hash_function_signature(WrapperBuilder *wbuilder) { - string hash = hash_string(wbuilder->_function_signature, + string hash = hash_string(wbuilder->_function_signature, wbuilder->get_calling_convention()); // Now make sure we don't have another function with the same hash. @@ -2430,13 +2443,13 @@ hash_function_signature(WrapperBuilder *wbuilder) { (*hi).second->_function_signature == wbuilder->_function_signature) { // The same function signature has already appeared. This // shouldn't happen. - nout << "Internal error! Function signature " + nout << "Internal error! Function signature " << wbuilder->_function_signature << " repeated!\n"; wbuilder->_hash = hash; return; } - cerr << "hash conflict: " << wbuilder->_function_signature + cerr << "hash conflict: " << wbuilder->_function_signature << " maps to " << hash << "\n"; // We have a conflict. Extend both strings to resolve the @@ -2445,8 +2458,8 @@ hash_function_signature(WrapperBuilder *wbuilder) { WrapperBuilder *other_wbuilder = (*hi).second; cerr << "(already taken by " << other_wbuilder->_function_signature << ")\n"; (*hi).second = (WrapperBuilder *)NULL; - other_wbuilder->_hash += - hash_string(other_wbuilder->_function_signature, + other_wbuilder->_hash += + hash_string(other_wbuilder->_function_signature, other_wbuilder->get_calling_convention(), 11); bool inserted = _wrappers_by_hash.insert @@ -2465,7 +2478,7 @@ hash_function_signature(WrapperBuilder *wbuilder) { (WrappersByHash::value_type(hash, wbuilder)).second; cerr << "second to " << hash << "\n"; - + if (!inserted) { // Huh. We still have a conflict. This should be extremely rare. // Well, just tack on a letter until it's resolved. @@ -2477,7 +2490,7 @@ hash_function_signature(WrapperBuilder *wbuilder) { } cerr << "New hash is " << hash << "\n"; if (!inserted) { - nout << "Internal error! Too many conflicts with hash " + nout << "Internal error! Too many conflicts with hash " << hash << "\n"; } } @@ -2495,7 +2508,7 @@ hash_function_signature(WrapperBuilder *wbuilder) { string InterrogateBuilder:: hash_string(const string &name, int additional_number, int shift_offset) { int hash = 0; - + int shift = 0; string::const_iterator ni; for (ni = name.begin(); ni != name.end(); ++ni) { @@ -2535,13 +2548,13 @@ hash_string(const string &name, int additional_number, int shift_offset) { extract_h >>= 6; if (value < 26) { result += (char)('A' + value); - + } else if (value < 52) { result += (char)('a' + value - 26); - + } else if (value < 62) { result += (char)('0' + value - 52); - + } else { result += '_'; } @@ -2553,7 +2566,7 @@ hash_string(const string &name, int additional_number, int shift_offset) { //////////////////////////////////////////////////////////////////// // Function: InterrogateBuilder::trim_blanks // Access: Private, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// string InterrogateBuilder:: trim_blanks(const string &str) { diff --git a/dtool/src/interrogate/interrogateBuilder.h b/dtool/src/interrogate/interrogateBuilder.h index 17fe645c3c..26d44feae3 100644 --- a/dtool/src/interrogate/interrogateBuilder.h +++ b/dtool/src/interrogate/interrogateBuilder.h @@ -1,6 +1,19 @@ // Filename: interrogateBuilder.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATEBUILDER_H @@ -56,7 +69,7 @@ public: private: typedef set Commands; typedef map CommandParams; - void insert_param_list(InterrogateBuilder::Commands &commands, + void insert_param_list(InterrogateBuilder::Commands &commands, const string ¶ms); bool in_forcetype(const string &name) const; @@ -75,7 +88,7 @@ private: void scan_struct_type(CPPStructType *type); void scan_enum_type(CPPEnumType *type); void scan_manifest(CPPManifest *manifest); - ElementIndex scan_element(CPPInstance *element, CPPStructType *struct_type, + ElementIndex scan_element(CPPInstance *element, CPPStructType *struct_type, CPPScope *scope); FunctionIndex get_getter(CPPType *expr_type, string expression, @@ -93,9 +106,9 @@ private: const string &expression = string()); void make_wrappers(); - FunctionWrapperIndex - get_wrapper(FunctionIndex function_index, - WrapperBuilder *wbuilder, CPPInstance *function, + FunctionWrapperIndex + get_wrapper(FunctionIndex function_index, + WrapperBuilder *wbuilder, CPPInstance *function, string description, CPPStructType *struct_type, CPPScope *scope, WrapperBuilder::Type wtype, const string &expression, int num_default_parameters); @@ -112,14 +125,14 @@ private: CPPScope *scope); void define_method(CPPFunctionGroup *fgroup, InterrogateType &itype, CPPStructType *struct_type, CPPScope *scope); - void define_method(CPPInstance *function, InterrogateType &itype, + void define_method(CPPInstance *function, InterrogateType &itype, CPPStructType *struct_type, CPPScope *scope); void define_enum_type(InterrogateType &itype, CPPEnumType *cpptype); - void define_extension_type(InterrogateType &itype, + void define_extension_type(InterrogateType &itype, CPPExtensionType *cpptype); void hash_function_signature(WrapperBuilder *wbuilder); - string hash_string(const string &name, + string hash_string(const string &name, int additional_number = 0, int shift_offset = 5); diff --git a/dtool/src/interrogate/interrogate_module.cxx b/dtool/src/interrogate/interrogate_module.cxx index 04580fe25b..7332ead3cb 100644 --- a/dtool/src/interrogate/interrogate_module.cxx +++ b/dtool/src/interrogate/interrogate_module.cxx @@ -1,6 +1,19 @@ -// Filename: interrogate_module.C +// Filename: interrogate_module.cxx // Created by: drose (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This program generates a module-level file for interrogate. This @@ -85,16 +98,16 @@ write_python_table(ostream &out) { module_name == interrogate_function_module_name(function_index)) { // For each function, get all of the python wrappers. - int num_wrappers = + int num_wrappers = interrogate_function_number_of_python_wrappers(function_index); for (int wi = 0; wi < num_wrappers; wi++) { - FunctionWrapperIndex wrapper_index = + FunctionWrapperIndex wrapper_index = interrogate_function_python_wrapper(function_index, wi); if (interrogate_wrapper_is_callable_by_name(wrapper_index)) { count++; - const char *wrapper_name = + const char *wrapper_name = interrogate_wrapper_name(wrapper_index); out << " PyObject *" << wrapper_name << "(PyObject *self, PyObject *args);\n"; @@ -117,14 +130,14 @@ write_python_table(ostream &out) { module_name == interrogate_function_module_name(function_index)) { // For each function, get all of the python wrappers. - int num_wrappers = + int num_wrappers = interrogate_function_number_of_python_wrappers(function_index); for (int wi = 0; wi < num_wrappers; wi++) { - FunctionWrapperIndex wrapper_index = + FunctionWrapperIndex wrapper_index = interrogate_function_python_wrapper(function_index, wi); if (interrogate_wrapper_is_callable_by_name(wrapper_index)) { - const char *wrapper_name = + const char *wrapper_name = interrogate_wrapper_name(wrapper_index); out << " { \"" << wrapper_name << "\", &" @@ -159,8 +172,8 @@ main(int argc, char *argv[]) { extern char *optarg; extern int optind; int flag; - - flag = getopt_long_only(argc, argv, short_options, long_options, NULL); + + flag = getopt_long_only(argc, argv, short_options, long_options, NULL); while (flag != EOF) { switch (flag) { case CO_oc: @@ -186,7 +199,7 @@ main(int argc, char *argv[]) { default: exit(1); } - flag = getopt_long_only(argc, argv, short_options, long_options, NULL); + flag = getopt_long_only(argc, argv, short_options, long_options, NULL); } argc -= (optind-1); diff --git a/dtool/src/interrogate/parameterRemap.I b/dtool/src/interrogate/parameterRemap.I index 6840a5a279..f57e40b2e4 100644 --- a/dtool/src/interrogate/parameterRemap.I +++ b/dtool/src/interrogate/parameterRemap.I @@ -1,13 +1,26 @@ // Filename: parameterRemap.I // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ParameterRemap::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ParameterRemap:: ParameterRemap(CPPType *orig_type) : @@ -22,7 +35,7 @@ ParameterRemap(CPPType *orig_type) : //////////////////////////////////////////////////////////////////// // Function: ParameterRemap::is_valid // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ParameterRemap:: is_valid() const { diff --git a/dtool/src/interrogate/parameterRemap.cxx b/dtool/src/interrogate/parameterRemap.cxx index c7ed417068..9ec8efc7a8 100644 --- a/dtool/src/interrogate/parameterRemap.cxx +++ b/dtool/src/interrogate/parameterRemap.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemap.C +// Filename: parameterRemap.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemap.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemap::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemap:: ~ParameterRemap() { diff --git a/dtool/src/interrogate/parameterRemap.h b/dtool/src/interrogate/parameterRemap.h index ea2b11b448..2b697b5d01 100644 --- a/dtool/src/interrogate/parameterRemap.h +++ b/dtool/src/interrogate/parameterRemap.h @@ -1,6 +1,19 @@ // Filename: parameterRemap.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAP_H @@ -45,7 +58,7 @@ public: INLINE void set_default_value(CPPExpression *expr); virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string prepare_return_expr(ostream &out, int indent_level, + virtual string prepare_return_expr(ostream &out, int indent_level, const string &expression); virtual string get_return_expr(const string &expression); virtual string temporary_to_return(const string &temporary); diff --git a/dtool/src/interrogate/parameterRemapBasicStringRefToString.cxx b/dtool/src/interrogate/parameterRemapBasicStringRefToString.cxx index 90304ecbe0..c7c8a51da7 100644 --- a/dtool/src/interrogate/parameterRemapBasicStringRefToString.cxx +++ b/dtool/src/interrogate/parameterRemapBasicStringRefToString.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapBasicStringRefToString.C +// Filename: parameterRemapBasicStringRefToString.cxx // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapBasicStringRefToString.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapBasicStringRefToString::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapBasicStringRefToString:: ParameterRemapBasicStringRefToString(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapBasicStringRefToString.h b/dtool/src/interrogate/parameterRemapBasicStringRefToString.h index 961eb594c8..91f4025df5 100644 --- a/dtool/src/interrogate/parameterRemapBasicStringRefToString.h +++ b/dtool/src/interrogate/parameterRemapBasicStringRefToString.h @@ -1,6 +1,19 @@ // Filename: parameterRemapBasicStringRefToString.h // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPBASICSTRINGREFTOSTRING_H diff --git a/dtool/src/interrogate/parameterRemapBasicStringToString.cxx b/dtool/src/interrogate/parameterRemapBasicStringToString.cxx index 50cedfe869..3e9eba579f 100644 --- a/dtool/src/interrogate/parameterRemapBasicStringToString.cxx +++ b/dtool/src/interrogate/parameterRemapBasicStringToString.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapBasicStringToString.C +// Filename: parameterRemapBasicStringToString.cxx // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapBasicStringToString.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapBasicStringToString::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapBasicStringToString:: ParameterRemapBasicStringToString(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapBasicStringToString.h b/dtool/src/interrogate/parameterRemapBasicStringToString.h index d4edcbfb60..c066208a89 100644 --- a/dtool/src/interrogate/parameterRemapBasicStringToString.h +++ b/dtool/src/interrogate/parameterRemapBasicStringToString.h @@ -1,6 +1,19 @@ // Filename: parameterRemapBasicStringToString.h // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPBASICSTRINGTOSTRING_H @@ -20,7 +33,7 @@ public: ParameterRemapBasicStringToString(CPPType *orig_type); virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string prepare_return_expr(ostream &out, int indent_level, + virtual string prepare_return_expr(ostream &out, int indent_level, const string &expression); virtual string get_return_expr(const string &expression); }; diff --git a/dtool/src/interrogate/parameterRemapCharStarToString.cxx b/dtool/src/interrogate/parameterRemapCharStarToString.cxx index 94467222a5..e4bf39ada4 100644 --- a/dtool/src/interrogate/parameterRemapCharStarToString.cxx +++ b/dtool/src/interrogate/parameterRemapCharStarToString.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapCharStarToString.C +// Filename: parameterRemapCharStarToString.cxx // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapCharStarToString.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapCharStarToString::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapCharStarToString:: ParameterRemapCharStarToString(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapCharStarToString.h b/dtool/src/interrogate/parameterRemapCharStarToString.h index 348deff740..7b2876c7ca 100644 --- a/dtool/src/interrogate/parameterRemapCharStarToString.h +++ b/dtool/src/interrogate/parameterRemapCharStarToString.h @@ -1,6 +1,19 @@ // Filename: parameterRemapCharStarToString.h // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPCHARSTARTOSTRING_H diff --git a/dtool/src/interrogate/parameterRemapConcreteToPointer.cxx b/dtool/src/interrogate/parameterRemapConcreteToPointer.cxx index 03cdcbb729..7421c8ea8a 100644 --- a/dtool/src/interrogate/parameterRemapConcreteToPointer.cxx +++ b/dtool/src/interrogate/parameterRemapConcreteToPointer.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapConcreteToPointer.C +// Filename: parameterRemapConcreteToPointer.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapConcreteToPointer.h" @@ -16,7 +29,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapConcreteToPointer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapConcreteToPointer:: ParameterRemapConcreteToPointer(CPPType *orig_type) : @@ -46,7 +59,7 @@ pass_parameter(ostream &out, const string &variable_name) { //////////////////////////////////////////////////////////////////// string ParameterRemapConcreteToPointer:: get_return_expr(const string &expression) { - return + return "new " + _orig_type->get_local_name(&parser) + "(" + expression + ")"; } diff --git a/dtool/src/interrogate/parameterRemapConcreteToPointer.h b/dtool/src/interrogate/parameterRemapConcreteToPointer.h index 8d6dea0a22..c2f6b4fd65 100644 --- a/dtool/src/interrogate/parameterRemapConcreteToPointer.h +++ b/dtool/src/interrogate/parameterRemapConcreteToPointer.h @@ -1,6 +1,19 @@ // Filename: parameterRemapConcreteToPointer.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPCONCRETETOPOINTER_H diff --git a/dtool/src/interrogate/parameterRemapConstToNonConst.cxx b/dtool/src/interrogate/parameterRemapConstToNonConst.cxx index 645c502109..3022f4d10c 100644 --- a/dtool/src/interrogate/parameterRemapConstToNonConst.cxx +++ b/dtool/src/interrogate/parameterRemapConstToNonConst.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapConstToNonConst.C +// Filename: parameterRemapConstToNonConst.cxx // Created by: drose (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapConstToNonConst.h" @@ -11,7 +24,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapConstToNonConst::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapConstToNonConst:: ParameterRemapConstToNonConst(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapConstToNonConst.h b/dtool/src/interrogate/parameterRemapConstToNonConst.h index be71874cea..066ea4d76a 100644 --- a/dtool/src/interrogate/parameterRemapConstToNonConst.h +++ b/dtool/src/interrogate/parameterRemapConstToNonConst.h @@ -1,6 +1,19 @@ // Filename: parameterRemapConstToNonConst.h // Created by: drose (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPCONSTTONONCONST_H diff --git a/dtool/src/interrogate/parameterRemapEnumToInt.cxx b/dtool/src/interrogate/parameterRemapEnumToInt.cxx index 6c0e48d02b..f405666c45 100644 --- a/dtool/src/interrogate/parameterRemapEnumToInt.cxx +++ b/dtool/src/interrogate/parameterRemapEnumToInt.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapEnumToInt.C +// Filename: parameterRemapEnumToInt.cxx // Created by: drose (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapEnumToInt.h" @@ -14,7 +27,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapEnumToInt::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapEnumToInt:: ParameterRemapEnumToInt(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapEnumToInt.h b/dtool/src/interrogate/parameterRemapEnumToInt.h index 7f7cff5e31..756b3204c2 100644 --- a/dtool/src/interrogate/parameterRemapEnumToInt.h +++ b/dtool/src/interrogate/parameterRemapEnumToInt.h @@ -1,6 +1,19 @@ // Filename: parameterRemapEnumToInt.h // Created by: drose (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPENUMTOINT_H diff --git a/dtool/src/interrogate/parameterRemapPTToPointer.cxx b/dtool/src/interrogate/parameterRemapPTToPointer.cxx index 930980570d..fd60dcaff6 100644 --- a/dtool/src/interrogate/parameterRemapPTToPointer.cxx +++ b/dtool/src/interrogate/parameterRemapPTToPointer.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapPTToPointer.C +// Filename: parameterRemapPTToPointer.cxx // Created by: drose (10Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapPTToPointer.h" @@ -16,7 +29,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapPTToPointer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapPTToPointer:: ParameterRemapPTToPointer(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapPTToPointer.h b/dtool/src/interrogate/parameterRemapPTToPointer.h index c43382e69a..b98fb656e5 100644 --- a/dtool/src/interrogate/parameterRemapPTToPointer.h +++ b/dtool/src/interrogate/parameterRemapPTToPointer.h @@ -1,6 +1,19 @@ // Filename: parameterRemapPTToPointer.h // Created by: drose (10Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPPTTOPOINTER_H diff --git a/dtool/src/interrogate/parameterRemapReferenceToConcrete.cxx b/dtool/src/interrogate/parameterRemapReferenceToConcrete.cxx index 179dae795b..6573e7c207 100644 --- a/dtool/src/interrogate/parameterRemapReferenceToConcrete.cxx +++ b/dtool/src/interrogate/parameterRemapReferenceToConcrete.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapReferenceToConcrete.C +// Filename: parameterRemapReferenceToConcrete.cxx // Created by: drose (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapReferenceToConcrete.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapReferenceToConcrete::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapReferenceToConcrete:: ParameterRemapReferenceToConcrete(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapReferenceToConcrete.h b/dtool/src/interrogate/parameterRemapReferenceToConcrete.h index ce0593d792..50d710c36b 100644 --- a/dtool/src/interrogate/parameterRemapReferenceToConcrete.h +++ b/dtool/src/interrogate/parameterRemapReferenceToConcrete.h @@ -1,6 +1,19 @@ // Filename: parameterRemapReferenceToConcrete.h // Created by: drose (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPREFERENCETOCONCRETE_H diff --git a/dtool/src/interrogate/parameterRemapReferenceToPointer.cxx b/dtool/src/interrogate/parameterRemapReferenceToPointer.cxx index aa5d19bba9..8ce467ba57 100644 --- a/dtool/src/interrogate/parameterRemapReferenceToPointer.cxx +++ b/dtool/src/interrogate/parameterRemapReferenceToPointer.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapReferenceToPointer.C +// Filename: parameterRemapReferenceToPointer.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapReferenceToPointer.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapReferenceToPointer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapReferenceToPointer:: ParameterRemapReferenceToPointer(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapReferenceToPointer.h b/dtool/src/interrogate/parameterRemapReferenceToPointer.h index 38407a00ab..2316028a4f 100644 --- a/dtool/src/interrogate/parameterRemapReferenceToPointer.h +++ b/dtool/src/interrogate/parameterRemapReferenceToPointer.h @@ -1,6 +1,19 @@ // Filename: parameterRemapReferenceToPointer.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPREFERENCETOPOINTER_H diff --git a/dtool/src/interrogate/parameterRemapThis.cxx b/dtool/src/interrogate/parameterRemapThis.cxx index e170b10683..b89201ed33 100644 --- a/dtool/src/interrogate/parameterRemapThis.cxx +++ b/dtool/src/interrogate/parameterRemapThis.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapThis.C +// Filename: parameterRemapThis.cxx // Created by: drose (02Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapThis.h" @@ -14,7 +27,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapThis::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapThis:: ParameterRemapThis(CPPStructType *type, bool is_const) : diff --git a/dtool/src/interrogate/parameterRemapThis.h b/dtool/src/interrogate/parameterRemapThis.h index 2df7d29e51..d994956e4a 100644 --- a/dtool/src/interrogate/parameterRemapThis.h +++ b/dtool/src/interrogate/parameterRemapThis.h @@ -1,6 +1,19 @@ // Filename: parameterRemapThis.h // Created by: drose (02Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPTHIS_H diff --git a/dtool/src/interrogate/parameterRemapToString.cxx b/dtool/src/interrogate/parameterRemapToString.cxx index 606fcd3f4c..ead564588a 100644 --- a/dtool/src/interrogate/parameterRemapToString.cxx +++ b/dtool/src/interrogate/parameterRemapToString.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapToString.C +// Filename: parameterRemapToString.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapToString.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapToString::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapToString:: ParameterRemapToString(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapToString.h b/dtool/src/interrogate/parameterRemapToString.h index cd1ea97e02..2fd8691d06 100644 --- a/dtool/src/interrogate/parameterRemapToString.h +++ b/dtool/src/interrogate/parameterRemapToString.h @@ -1,6 +1,19 @@ // Filename: parameterRemapToString.h // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPTOSTRING_H diff --git a/dtool/src/interrogate/parameterRemapUnchanged.cxx b/dtool/src/interrogate/parameterRemapUnchanged.cxx index cb68edbdc0..1b40e9cca6 100644 --- a/dtool/src/interrogate/parameterRemapUnchanged.cxx +++ b/dtool/src/interrogate/parameterRemapUnchanged.cxx @@ -1,6 +1,19 @@ -// Filename: parameterRemapUnchanged.C +// Filename: parameterRemapUnchanged.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parameterRemapUnchanged.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParameterRemapUnchanged::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParameterRemapUnchanged:: ParameterRemapUnchanged(CPPType *orig_type) : diff --git a/dtool/src/interrogate/parameterRemapUnchanged.h b/dtool/src/interrogate/parameterRemapUnchanged.h index 0c2ccc4630..9a2ff15efb 100644 --- a/dtool/src/interrogate/parameterRemapUnchanged.h +++ b/dtool/src/interrogate/parameterRemapUnchanged.h @@ -1,6 +1,19 @@ // Filename: parameterRemapUnchanged.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETERREMAPUNCHANGED_H diff --git a/dtool/src/interrogate/parse_file.cxx b/dtool/src/interrogate/parse_file.cxx index 65f23b9e5f..f7ab66a154 100644 --- a/dtool/src/interrogate/parse_file.cxx +++ b/dtool/src/interrogate/parse_file.cxx @@ -1,6 +1,19 @@ -// Filename: parse_file.C +// Filename: parse_file.cxx // Created by: drose (20Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -53,7 +66,7 @@ show_type_or_expression(const string &str) { cout << "type is " << *type << "\n"; } cout << "value is " << expr->evaluate() << "\n\n"; - + } else { CPPType *type = parser.parse_type(str); if (type != NULL) { @@ -78,7 +91,7 @@ show_type_or_expression(const string &str) { << "get_fully_scoped_name = " << type->get_fully_scoped_name() << "\n" << "get_preferred_name = " << type->get_preferred_name() << "\n" << "is_incomplete = " << type->is_incomplete() << "\n"; - + if (stype != (CPPStructType *)NULL) { cout << "scope = " << stype->get_scope()->get_fully_scoped_name() << "\n"; bool is_abstract = stype->is_abstract(); @@ -185,7 +198,7 @@ show_typedefs(const string &str) { cerr << " " << *td << "\n"; } } - + int main(int argc, char *argv[]) { @@ -241,14 +254,14 @@ main(int argc, char *argv[]) { if (argc < 2) { cerr << "parse-file [opts] file1.h [file2.h ... ]\n" << "\nOptions:\n\n" - << " -I include_path\n" - << " -S system_include_path\n" - << " -D manifest_name\n" + << " -I include_path\n" + << " -S system_include_path\n" + << " -D manifest_name\n" << " -D manifest_name=manifest_definition\n" << " -o output_file (ignored)\n" << " -v (increase verbosity)\n" << " -p (prompt for expression instead of dumping output)\n"; - + exit(1); } @@ -295,7 +308,7 @@ main(int argc, char *argv[]) { /* cout << "Opened the following files:\n"; CPPParser::ParsedFiles::const_iterator fi; - for (fi = parser._parsed_files.begin(); + for (fi = parser._parsed_files.begin(); fi != parser._parsed_files.end(); ++fi) { cout << " "; @@ -345,4 +358,4 @@ main(int argc, char *argv[]) { } - + diff --git a/dtool/src/interrogate/typeManager.cxx b/dtool/src/interrogate/typeManager.cxx index e7d9422059..3f2b2ced7c 100644 --- a/dtool/src/interrogate/typeManager.cxx +++ b/dtool/src/interrogate/typeManager.cxx @@ -1,6 +1,19 @@ -// Filename: typeManager.C +// Filename: typeManager.cxx // Created by: drose (14Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "typeManager.h" @@ -74,7 +87,7 @@ is_assignable(CPPType *type) { // it. Concrete structure objects are not assignable, and so they // don't get setters synthesized for them. If you want a setter, // write it yourself. - + // We'll make an exception for basic_string, however, since // this is nearly an atomic type. if (is_basic_string_char(type)) { @@ -364,7 +377,7 @@ is_char(CPPType *type) { { CPPSimpleType *simple_type = type->as_simple_type(); if (simple_type != (CPPSimpleType *)NULL) { - return + return simple_type->_type == CPPSimpleType::T_char && simple_type->_flags == 0; } @@ -421,7 +434,7 @@ is_basic_string_char(CPPType *type) { return false; } - + //////////////////////////////////////////////////////////////////// // Function: TypeManager::is_const_basic_string_char // Access: Public, Static @@ -472,7 +485,7 @@ is_bool(CPPType *type) { { CPPSimpleType *simple_type = type->as_simple_type(); if (simple_type != (CPPSimpleType *)NULL) { - return + return simple_type->_type == CPPSimpleType::T_bool; } } @@ -504,7 +517,7 @@ is_integer(CPPType *type) { { CPPSimpleType *simple_type = type->as_simple_type(); if (simple_type != (CPPSimpleType *)NULL) { - return + return (simple_type->_type == CPPSimpleType::T_bool || simple_type->_type == CPPSimpleType::T_char || simple_type->_type == CPPSimpleType::T_int); @@ -535,7 +548,7 @@ is_float(CPPType *type) { { CPPSimpleType *simple_type = type->as_simple_type(); if (simple_type != (CPPSimpleType *)NULL) { - return + return (simple_type->_type == CPPSimpleType::T_float || simple_type->_type == CPPSimpleType::T_double); } @@ -558,7 +571,7 @@ bool TypeManager:: is_void(CPPType *type) { CPPSimpleType *simple_type = type->as_simple_type(); if (simple_type != (CPPSimpleType *)NULL) { - return + return simple_type->_type == CPPSimpleType::T_void && simple_type->_flags == 0; } @@ -733,11 +746,11 @@ involves_unpublished(CPPType *type) { } { CPPScope *scope = type->as_struct_type()->_scope; - + bool any_exported = false; CPPScope::Declarations::const_iterator di; - for (di = scope->_declarations.begin(); - di != scope->_declarations.end() && !any_exported; + for (di = scope->_declarations.begin(); + di != scope->_declarations.end() && !any_exported; ++di) { if ((*di)->_vis <= min_vis) { any_exported = true; @@ -760,7 +773,7 @@ involves_unpublished(CPPType *type) { if (involves_unpublished(ftype->_return_type)) { return true; } - const CPPParameterList::Parameters ¶ms = + const CPPParameterList::Parameters ¶ms = ftype->_parameters->_parameters; CPPParameterList::Parameters::const_iterator pi; for (pi = params.begin(); pi != params.end(); ++pi) { @@ -807,7 +820,7 @@ involves_protected(CPPType *type) { if (involves_protected(ftype->_return_type)) { return true; } - const CPPParameterList::Parameters ¶ms = + const CPPParameterList::Parameters ¶ms = ftype->_parameters->_parameters; CPPParameterList::Parameters::const_iterator pi; for (pi = params.begin(); pi != params.end(); ++pi) { @@ -1109,7 +1122,7 @@ get_function_signature(CPPInstance *function, out << function->get_local_name(&parser) << "("; - const CPPParameterList::Parameters ¶ms = + const CPPParameterList::Parameters ¶ms = ftype->_parameters->_parameters; CPPParameterList::Parameters::const_iterator pi; @@ -1159,7 +1172,7 @@ has_protected_destructor(CPPType *type) { } CPPScope *scope = struct_type->get_scope(); - + // Look for the destructor. CPPScope::Declarations::const_iterator di; for (di = scope->_declarations.begin(); diff --git a/dtool/src/interrogate/typeManager.h b/dtool/src/interrogate/typeManager.h index 6d4bc0b211..fe420fd0aa 100644 --- a/dtool/src/interrogate/typeManager.h +++ b/dtool/src/interrogate/typeManager.h @@ -1,6 +1,19 @@ // Filename: typeManager.h // Created by: drose (14Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TYPEMANAGER_H diff --git a/dtool/src/interrogate/wrapperBuilder.cxx b/dtool/src/interrogate/wrapperBuilder.cxx index cf1f8418f0..7c50b4e722 100644 --- a/dtool/src/interrogate/wrapperBuilder.cxx +++ b/dtool/src/interrogate/wrapperBuilder.cxx @@ -1,6 +1,19 @@ -// Filename: wrapperBuilder.C +// Filename: wrapperBuilder.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "wrapperBuilder.h" @@ -31,7 +44,7 @@ //////////////////////////////////////////////////////////////////// // Function: WrapperBuilder::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// WrapperBuilder:: WrapperBuilder() { @@ -46,17 +59,17 @@ WrapperBuilder() { _ftype = (CPPFunctionType *)NULL; _num_default_parameters = 0; _wrapper_index = 0; - + _is_valid = false; _return_value_needs_management = false; _return_value_destructor = 0; _manage_reference_count = false; } - + //////////////////////////////////////////////////////////////////// // Function: WrapperBuilder::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// WrapperBuilder:: ~WrapperBuilder() { @@ -99,7 +112,7 @@ bool WrapperBuilder:: set_function(CPPInstance *function, const string &description, CPPStructType *struct_type, CPPScope *scope, const string &function_signature, - WrapperBuilder::Type type, + WrapperBuilder::Type type, const string &expression, int num_default_parameters) { clear(); @@ -115,7 +128,7 @@ set_function(CPPInstance *function, const string &description, _ftype = _function->_type->resolve_type(scope, &parser)->as_function_type(); assert(_ftype != (CPPFunctionType *)NULL); - + _is_valid = true; _has_this = false; _type = type; @@ -164,7 +177,7 @@ set_function(CPPInstance *function, const string &description, } } - const CPPParameterList::Parameters ¶ms = + const CPPParameterList::Parameters ¶ms = _ftype->_parameters->_parameters; for (int i = 0; i < (int)params.size() - num_default_parameters; i++) { CPPType *type = params[i]->_type->resolve_type(&parser, _scope); @@ -237,7 +250,7 @@ set_function(CPPInstance *function, const string &description, CPPType *return_type = _return_type->get_new_type(); CPPType *return_meat_type = TypeManager::unwrap_pointer(return_type); - if (manage_reference_counts && + if (manage_reference_counts && TypeManager::is_reference_count_pointer(return_type) && !TypeManager::has_protected_destructor(return_meat_type)) { // Yes! @@ -252,7 +265,7 @@ set_function(CPPInstance *function, const string &description, return _is_valid; } - + //////////////////////////////////////////////////////////////////// // Function: WrapperBuilder::is_valid // Access: Public @@ -305,7 +318,7 @@ make_remap(CPPType *orig_type) { if (TypeManager::is_char_pointer(orig_type)) { return new ParameterRemapCharStarToString(orig_type); } - + // If we're exporting a method of basic_string itself, don't // convert basic_string's to atomic strings. @@ -321,7 +334,7 @@ make_remap(CPPType *orig_type) { } if (manage_reference_counts) { - if (TypeManager::is_pointer_to_base(orig_type) || + if (TypeManager::is_pointer_to_base(orig_type) || TypeManager::is_const_ref_to_pointer_to_base(orig_type)) { CPPType *pt_type = TypeManager::unwrap_reference(orig_type); @@ -432,7 +445,7 @@ output_ref(ostream &out, int indent_level, const string &varname) const { << "}\n"; } } - + //////////////////////////////////////////////////////////////////// // Function: WrapperBuilder::get_parameter_name // Access: Protected @@ -514,15 +527,15 @@ get_call_str(const vector_string &pexprs) const { call << "(" << get_parameter_expr(pn, pexprs) << ")->" << _function->get_local_name(); pn++; - + } else if (_type == T_constructor) { // Constructors are called differently too. call << _struct_type->get_local_name(&parser); - + } else { call << _function->get_local_name(&parser); } - + call << "("; if (pn < (int)_parameters.size()) { _parameters[pn]._remap->pass_parameter(call, get_parameter_expr(pn, pexprs)); @@ -535,7 +548,7 @@ get_call_str(const vector_string &pexprs) const { } call << ")"; } - + return call.str(); } @@ -577,8 +590,8 @@ call_function(ostream &out, int indent_level, bool convert_result, } else if (_type == T_typecast_method) { // A typecast method can be invoked implicitly. assert(_parameters.size() == 1); - string cast_expr = - "(" + _return_type->get_orig_type()->get_local_name(&parser) + + string cast_expr = + "(" + _return_type->get_orig_type()->get_local_name(&parser) + ")(*" + get_parameter_expr(0, pexprs) + ")"; if (!convert_result) { @@ -595,8 +608,8 @@ call_function(ostream &out, int indent_level, bool convert_result, // above, which converts from the concrete type to some other // type.) assert(_parameters.size() == 1); - string cast_expr = - "(" + _return_type->get_orig_type()->get_local_name(&parser) + + string cast_expr = + "(" + _return_type->get_orig_type()->get_local_name(&parser) + ")" + get_parameter_expr(0, pexprs); if (!convert_result) { @@ -631,18 +644,18 @@ call_function(ostream &out, int indent_level, bool convert_result, // this case, we might inadventent generate code like "return // &(*this)", when "return this" would do. We check for this here // and undo it as a special case. - + // There's no real good reason to do this, other than that it // feels more satisfying to a casual perusal of the generated // code. It *is* conceivable that some broken compilers wouldn't // like "&(*this)", though. - + if (return_expr == "&(" + ref_expr + ")" || return_expr == "&" + ref_expr) { return_expr = this_expr; } } - + } else if (_void_return) { indent(out, indent_level) << get_call_str(pexprs) << ";\n"; @@ -652,7 +665,7 @@ call_function(ostream &out, int indent_level, bool convert_result, if (!convert_result) { return_expr = get_call_str(pexprs); - + } else { if (_return_type->return_value_should_be_simple()) { // We have to assign the result to a temporary first; this makes @@ -668,7 +681,7 @@ call_function(ostream &out, int indent_level, bool convert_result, } else { // This should be simple enough that we can return it directly. - string new_str = + string new_str = _return_type->prepare_return_expr(out, indent_level, call); return_expr = _return_type->get_return_expr(new_str); } @@ -735,7 +748,7 @@ write_quoted_string(ostream &out, const string &str) const { //////////////////////////////////////////////////////////////////// // Function: WrapperBuilder::indent // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &WrapperBuilder:: indent(ostream &out, int indent_level) { diff --git a/dtool/src/interrogate/wrapperBuilder.h b/dtool/src/interrogate/wrapperBuilder.h index 3555dcb130..86e836ce4e 100644 --- a/dtool/src/interrogate/wrapperBuilder.h +++ b/dtool/src/interrogate/wrapperBuilder.h @@ -1,6 +1,19 @@ // Filename: wrapperBuilder.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef WRAPPERBUILDER_H @@ -110,7 +123,7 @@ protected: string get_parameter_expr(int n, const vector_string &pexprs) const; string get_call_str(const vector_string &pexprs = vector_string()) const; - string call_function(ostream &out, int indent_level, + string call_function(ostream &out, int indent_level, bool convert_result = true, const vector_string &pexprs = vector_string()) const; diff --git a/dtool/src/interrogate/wrapperBuilderC.cxx b/dtool/src/interrogate/wrapperBuilderC.cxx index 28884c495e..63829af7ae 100644 --- a/dtool/src/interrogate/wrapperBuilderC.cxx +++ b/dtool/src/interrogate/wrapperBuilderC.cxx @@ -1,6 +1,19 @@ -// Filename: wrapperBuilderC.C +// Filename: wrapperBuilderC.cxx // Created by: drose (06Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "wrapperBuilderC.h" @@ -21,12 +34,12 @@ //////////////////////////////////////////////////////////////////// // Function: WrapperBuilderC::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// WrapperBuilderC:: WrapperBuilderC() { } - + //////////////////////////////////////////////////////////////////// // Function: WrapperBuilderC::write_wrapper // Access: Public, Virtual diff --git a/dtool/src/interrogate/wrapperBuilderC.h b/dtool/src/interrogate/wrapperBuilderC.h index ee0dc2d5bd..6ce33c33f5 100644 --- a/dtool/src/interrogate/wrapperBuilderC.h +++ b/dtool/src/interrogate/wrapperBuilderC.h @@ -1,6 +1,19 @@ // Filename: wrapperBuilderC.h // Created by: drose (06Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef WRAPPERBUILDERC_H diff --git a/dtool/src/interrogate/wrapperBuilderPython.cxx b/dtool/src/interrogate/wrapperBuilderPython.cxx index 8414a6a0d2..5cb3a9ab99 100644 --- a/dtool/src/interrogate/wrapperBuilderPython.cxx +++ b/dtool/src/interrogate/wrapperBuilderPython.cxx @@ -1,6 +1,19 @@ -// Filename: wrapperBuilderPython.C +// Filename: wrapperBuilderPython.cxx // Created by: drose (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "wrapperBuilderPython.h" @@ -23,12 +36,12 @@ //////////////////////////////////////////////////////////////////// // Function: WrapperBuilderPython::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// WrapperBuilderPython:: WrapperBuilderPython() { } - + //////////////////////////////////////////////////////////////////// // Function: WrapperBuilderPython::write_wrapper // Access: Public, Virtual @@ -71,7 +84,7 @@ write_wrapper(ostream &out, const string &wrapper_name) const { // This is the string to convert our local variable to the // appropriate C++ type. Normally this is just a cast. - string pexpr_string = + string pexpr_string = "(" + type->get_local_name(&parser) + ")" + get_parameter_name(pn); if (_parameters[pn]._remap->new_type_is_atomic_string()) { @@ -87,10 +100,10 @@ write_wrapper(ostream &out, const string &wrapper_name) const { parameter_list += ", &" + get_parameter_name(pn) + "_str, &" + get_parameter_name(pn) + "_len"; pexpr_string = "basic_string(" + - get_parameter_name(pn) + "_str, " + + get_parameter_name(pn) + "_str, " + get_parameter_name(pn) + "_len)"; } - + } else if (TypeManager::is_bool(type)) { out << "PyObject *" << get_parameter_name(pn); format_specifiers += "O"; @@ -128,7 +141,7 @@ write_wrapper(ostream &out, const string &wrapper_name) const { pexprs.push_back(pexpr_string); } - out << " if (PyArg_ParseTuple(args, \"" << format_specifiers + out << " if (PyArg_ParseTuple(args, \"" << format_specifiers << "\"" << parameter_list << ")) {\n"; if (_return_type->new_type_is_atomic_string()) { @@ -149,7 +162,7 @@ write_wrapper(ostream &out, const string &wrapper_name) const { if (return_expr.empty()) { test_assert(out, 4); out << " return Py_BuildValue(\"\");\n"; - + } else { CPPType *type = _return_type->get_temporary_type(); out << " "; @@ -244,24 +257,24 @@ pack_return_value(ostream &out, string return_expr) const { if (_return_type->new_type_is_atomic_string()) { if (TypeManager::is_char_pointer(orig_type)) { out << "\"s\", " << return_expr; - + } else { - out << "\"s#\", " << return_expr << ".data(), " + out << "\"s#\", " << return_expr << ".data(), " << return_expr << ".length()"; } } else if (TypeManager::is_integer(type)) { out << "\"i\", (int)(" << return_expr << ")"; - + } else if (TypeManager::is_float(type)) { out << "\"d\", (double)(" << return_expr << ")"; - + } else if (TypeManager::is_char_pointer(type)) { out << "\"s\", " << return_expr; - + } else if (TypeManager::is_pointer(type)) { out << "\"i\", (int)" << return_expr; - + } else { // Return None. out << "\"\""; diff --git a/dtool/src/interrogate/wrapperBuilderPython.h b/dtool/src/interrogate/wrapperBuilderPython.h index d43392e1f0..bfffbdd13f 100644 --- a/dtool/src/interrogate/wrapperBuilderPython.h +++ b/dtool/src/interrogate/wrapperBuilderPython.h @@ -1,6 +1,19 @@ // Filename: wrapperBuilderPython.h // Created by: drose (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef WRAPPERBUILDERPYTHON_H diff --git a/dtool/src/interrogatedb/config_interrogatedb.cxx b/dtool/src/interrogatedb/config_interrogatedb.cxx index f692d3be29..8f8d83cea9 100644 --- a/dtool/src/interrogatedb/config_interrogatedb.cxx +++ b/dtool/src/interrogatedb/config_interrogatedb.cxx @@ -1,6 +1,19 @@ -// Filename: config_interrogatedb.C +// Filename: config_interrogatedb.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_interrogatedb.h" diff --git a/dtool/src/interrogatedb/config_interrogatedb.h b/dtool/src/interrogatedb/config_interrogatedb.h index f13d9f400c..8f276c5623 100644 --- a/dtool/src/interrogatedb/config_interrogatedb.h +++ b/dtool/src/interrogatedb/config_interrogatedb.h @@ -1,6 +1,19 @@ // Filename: config_interrogatedb.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_INTERROGATEDB_H diff --git a/dtool/src/interrogatedb/indexRemapper.cxx b/dtool/src/interrogatedb/indexRemapper.cxx index 375a155671..22469dd678 100644 --- a/dtool/src/interrogatedb/indexRemapper.cxx +++ b/dtool/src/interrogatedb/indexRemapper.cxx @@ -1,6 +1,19 @@ -// Filename: indexRemapper.C +// Filename: indexRemapper.cxx // Created by: drose (05Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "indexRemapper.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: IndexRemapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// IndexRemapper:: IndexRemapper() { @@ -18,7 +31,7 @@ IndexRemapper() { //////////////////////////////////////////////////////////////////// // Function: IndexRemapper::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// IndexRemapper:: ~IndexRemapper() { diff --git a/dtool/src/interrogatedb/indexRemapper.h b/dtool/src/interrogatedb/indexRemapper.h index 7bd4ce18de..33f296ffec 100644 --- a/dtool/src/interrogatedb/indexRemapper.h +++ b/dtool/src/interrogatedb/indexRemapper.h @@ -1,6 +1,19 @@ // Filename: indexRemapper.h // Created by: drose (05Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INDEXREMAPPER_H diff --git a/dtool/src/interrogatedb/interrogateComponent.I b/dtool/src/interrogatedb/interrogateComponent.I index 4578b4cfc9..b86ac0989c 100644 --- a/dtool/src/interrogatedb/interrogateComponent.I +++ b/dtool/src/interrogatedb/interrogateComponent.I @@ -1,13 +1,26 @@ // Filename: interrogateComponent.I // Created by: drose (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: InterrogateComponent::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateComponent:: InterrogateComponent(InterrogateModuleDef *def) : @@ -18,7 +31,7 @@ InterrogateComponent(InterrogateModuleDef *def) : //////////////////////////////////////////////////////////////////// // Function: InterrogateComponent::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateComponent:: InterrogateComponent(const InterrogateComponent ©) : @@ -30,7 +43,7 @@ InterrogateComponent(const InterrogateComponent ©) : //////////////////////////////////////////////////////////////////// // Function: InterrogateComponent::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void InterrogateComponent:: operator = (const InterrogateComponent ©) { @@ -100,7 +113,7 @@ get_module_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateComponent::has_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateComponent:: has_name() const { @@ -110,7 +123,7 @@ has_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateComponent::get_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateComponent:: get_name() const { diff --git a/dtool/src/interrogatedb/interrogateComponent.cxx b/dtool/src/interrogatedb/interrogateComponent.cxx index f7a46a0bc7..5d656142ab 100644 --- a/dtool/src/interrogatedb/interrogateComponent.cxx +++ b/dtool/src/interrogatedb/interrogateComponent.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateComponent.C +// Filename: interrogateComponent.cxx // Created by: drose (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateComponent.h" diff --git a/dtool/src/interrogatedb/interrogateComponent.h b/dtool/src/interrogatedb/interrogateComponent.h index 2878828372..19d9f3b18e 100644 --- a/dtool/src/interrogatedb/interrogateComponent.h +++ b/dtool/src/interrogatedb/interrogateComponent.h @@ -1,6 +1,19 @@ // Filename: interrogateComponent.h // Created by: drose (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATECOMPONENT_H diff --git a/dtool/src/interrogatedb/interrogateDatabase.I b/dtool/src/interrogatedb/interrogateDatabase.I index 6c1a4dec8d..df76b7dc04 100644 --- a/dtool/src/interrogatedb/interrogateDatabase.I +++ b/dtool/src/interrogatedb/interrogateDatabase.I @@ -1,6 +1,19 @@ // Filename: interrogateDatabase.I // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -27,7 +40,7 @@ check_latest() { INLINE TypeIndex InterrogateDatabase:: lookup_type_by_name(const string &name) { check_latest(); - return lookup(name, _types_by_name, LT_type_name, + return lookup(name, _types_by_name, LT_type_name, &InterrogateDatabase::freshen_types_by_name); } @@ -41,7 +54,7 @@ lookup_type_by_name(const string &name) { INLINE TypeIndex InterrogateDatabase:: lookup_type_by_scoped_name(const string &name) { check_latest(); - return lookup(name, _types_by_scoped_name, LT_type_scoped_name, + return lookup(name, _types_by_scoped_name, LT_type_scoped_name, &InterrogateDatabase::freshen_types_by_scoped_name); } @@ -55,7 +68,7 @@ lookup_type_by_scoped_name(const string &name) { INLINE TypeIndex InterrogateDatabase:: lookup_type_by_true_name(const string &name) { check_latest(); - return lookup(name, _types_by_true_name, LT_type_true_name, + return lookup(name, _types_by_true_name, LT_type_true_name, &InterrogateDatabase::freshen_types_by_true_name); } @@ -69,7 +82,7 @@ lookup_type_by_true_name(const string &name) { INLINE ManifestIndex InterrogateDatabase:: lookup_manifest_by_name(const string &name) { check_latest(); - return lookup(name, _manifests_by_name, LT_manifest_name, + return lookup(name, _manifests_by_name, LT_manifest_name, &InterrogateDatabase::freshen_manifests_by_name); } @@ -83,7 +96,7 @@ lookup_manifest_by_name(const string &name) { INLINE ElementIndex InterrogateDatabase:: lookup_element_by_name(const string &name) { check_latest(); - return lookup(name, _elements_by_name, LT_element_name, + return lookup(name, _elements_by_name, LT_element_name, &InterrogateDatabase::freshen_elements_by_name); } @@ -97,6 +110,6 @@ lookup_element_by_name(const string &name) { INLINE ElementIndex InterrogateDatabase:: lookup_element_by_scoped_name(const string &name) { check_latest(); - return lookup(name, _elements_by_scoped_name, LT_element_scoped_name, + return lookup(name, _elements_by_scoped_name, LT_element_scoped_name, &InterrogateDatabase::freshen_elements_by_scoped_name); } diff --git a/dtool/src/interrogatedb/interrogateDatabase.cxx b/dtool/src/interrogatedb/interrogateDatabase.cxx index c168ceac8c..b9b6a7bd47 100644 --- a/dtool/src/interrogatedb/interrogateDatabase.cxx +++ b/dtool/src/interrogatedb/interrogateDatabase.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateDatabase.C +// Filename: interrogateDatabase.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateDatabase.h" @@ -17,7 +30,7 @@ int InterrogateDatabase::_current_minor_version = 2; //////////////////////////////////////////////////////////////////// // Function: InterrogateDatabase::Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// InterrogateDatabase:: InterrogateDatabase() { @@ -42,7 +55,7 @@ get_ptr() { } return _global_ptr; } - + //////////////////////////////////////////////////////////////////// // Function: InterrogateDatabase::request_module // Access: Public @@ -77,7 +90,7 @@ request_module(InterrogateModuleDef *def) { // to use this. _modules.push_back(def); } - + if (def->num_unique_names > 0 && def->library_name != (const char *)NULL) { // Define a lookup by hash for this module, mainly so we can look // up functions by their unique names. @@ -488,7 +501,7 @@ get_next_index() { //////////////////////////////////////////////////////////////////// void InterrogateDatabase:: add_type(TypeIndex index, const InterrogateType &type) { - bool inserted = + bool inserted = _type_map.insert(TypeMap::value_type(index, type)).second; if (!inserted) { @@ -516,7 +529,7 @@ add_type(TypeIndex index, const InterrogateType &type) { //////////////////////////////////////////////////////////////////// void InterrogateDatabase:: add_function(FunctionIndex index, const InterrogateFunction &function) { - bool inserted = + bool inserted = _function_map.insert(FunctionMap::value_type(index, function)).second; assert(inserted); @@ -533,9 +546,9 @@ add_function(FunctionIndex index, const InterrogateFunction &function) { // the given index number. //////////////////////////////////////////////////////////////////// void InterrogateDatabase:: -add_wrapper(FunctionWrapperIndex index, +add_wrapper(FunctionWrapperIndex index, const InterrogateFunctionWrapper &wrapper) { - bool inserted = + bool inserted = _wrapper_map.insert(FunctionWrapperMap::value_type(index, wrapper)).second; assert(inserted); } @@ -548,7 +561,7 @@ add_wrapper(FunctionWrapperIndex index, //////////////////////////////////////////////////////////////////// void InterrogateDatabase:: add_manifest(ManifestIndex index, const InterrogateManifest &manifest) { - bool inserted = + bool inserted = _manifest_map.insert(ManifestMap::value_type(index, manifest)).second; assert(inserted); @@ -563,7 +576,7 @@ add_manifest(ManifestIndex index, const InterrogateManifest &manifest) { //////////////////////////////////////////////////////////////////// void InterrogateDatabase:: add_element(ElementIndex index, const InterrogateElement &element) { - bool inserted = + bool inserted = _element_map.insert(ElementMap::value_type(index, element)).second; assert(inserted); @@ -766,7 +779,7 @@ write(ostream &out, InterrogateModuleDef *def) const { // Write out the file header. out << def->file_identifier << "\n" << _current_major_version << " " << _current_minor_version << "\n"; - + // Write out the module definition. idf_output_string(out, def->library_name); idf_output_string(out, def->library_hash_name); @@ -774,7 +787,7 @@ write(ostream &out, InterrogateModuleDef *def) const { out << "\n"; // Now write out the components. - + out << _function_map.size() << "\n"; FunctionMap::const_iterator fi; for (fi = _function_map.begin(); fi != _function_map.end(); ++fi) { @@ -815,7 +828,7 @@ write(ostream &out, InterrogateModuleDef *def) const { // according to the expected index numbers specified in // the module def. The header information has already // been read. -// +// // Returns true if the file is read successfully, false // if there is an error. //////////////////////////////////////////////////////////////////// @@ -833,7 +846,7 @@ read(istream &in, InterrogateModuleDef *def) { int next = temp.remap_indices(def->first_index); if (next != def->next_index) { interrogatedb_cat->error() - << "Module database file " << def->database_filename + << "Module database file " << def->database_filename << " is out of date.\n"; return false; } @@ -867,7 +880,7 @@ load_latest() { } if (pathname.empty()) { - interrogatedb_cat->error() + interrogatedb_cat->error() << "Unable to find " << filename << " on " << searchpath << "\n"; } else { @@ -890,7 +903,7 @@ load_latest() { if (_file_major_version != _current_major_version || _file_minor_version > _current_minor_version) { interrogatedb_cat->error() - << "Cannot read interrogate data in " << pathname + << "Cannot read interrogate data in " << pathname << "; database is version " << _file_major_version << "." << _file_minor_version << " while we are expecting " << _current_major_version << "." << _current_minor_version @@ -930,13 +943,13 @@ read_new(istream &in, InterrogateModuleDef *def) { // Now read all of the components. - { // Functions. + { // Functions. int num_functions; in >> num_functions; if (in.fail()) { return false; } - + while (num_functions > 0) { FunctionIndex index; InterrogateFunction function(def); @@ -944,7 +957,7 @@ read_new(istream &in, InterrogateModuleDef *def) { if (in.fail()) { return false; } - + add_function(index, function); num_functions--; } @@ -956,7 +969,7 @@ read_new(istream &in, InterrogateModuleDef *def) { if (in.fail()) { return false; } - + while (num_wrappers > 0) { FunctionWrapperIndex index; InterrogateFunctionWrapper wrapper(def); @@ -964,7 +977,7 @@ read_new(istream &in, InterrogateModuleDef *def) { if (in.fail()) { return false; } - + add_wrapper(index, wrapper); num_wrappers--; } @@ -976,7 +989,7 @@ read_new(istream &in, InterrogateModuleDef *def) { if (in.fail()) { return false; } - + while (num_types > 0) { TypeIndex index; InterrogateType type(def); @@ -984,19 +997,19 @@ read_new(istream &in, InterrogateModuleDef *def) { if (in.fail()) { return false; } - + add_type(index, type); num_types--; } } - { // Manifests. + { // Manifests. int num_manifests; in >> num_manifests; if (in.fail()) { return false; } - + while (num_manifests > 0) { ManifestIndex index; InterrogateManifest manifest(def); @@ -1004,19 +1017,19 @@ read_new(istream &in, InterrogateModuleDef *def) { if (in.fail()) { return false; } - + add_manifest(index, manifest); num_manifests--; } } - { // Elements. + { // Elements. int num_elements; in >> num_elements; if (in.fail()) { return false; } - + while (num_elements > 0) { ElementIndex index; InterrogateElement element(def); @@ -1024,7 +1037,7 @@ read_new(istream &in, InterrogateModuleDef *def) { if (in.fail()) { return false; } - + add_element(index, element); num_elements--; } @@ -1042,7 +1055,7 @@ read_new(istream &in, InterrogateModuleDef *def) { //////////////////////////////////////////////////////////////////// void InterrogateDatabase:: merge_from(const InterrogateDatabase &other) { - // We want to collapse shared types together. + // We want to collapse shared types together. IndexRemapper remap; // First, we need to build a set of types by name, so we know what @@ -1307,7 +1320,7 @@ freshen_elements_by_scoped_name() { _elements_by_scoped_name[(*ti).second.get_scoped_name()] = (*ti).first; } } - + //////////////////////////////////////////////////////////////////// // Function: InterrogateDatabase::lookup // Access: Private diff --git a/dtool/src/interrogatedb/interrogateDatabase.h b/dtool/src/interrogatedb/interrogateDatabase.h index 579077b47f..0d21855370 100644 --- a/dtool/src/interrogatedb/interrogateDatabase.h +++ b/dtool/src/interrogatedb/interrogateDatabase.h @@ -1,6 +1,19 @@ // Filename: interrogateDatabase.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATEDATABASE_H @@ -71,13 +84,13 @@ public: static int get_file_minor_version(); static int get_current_major_version(); static int get_current_minor_version(); - + public: // Functions to build the database. int get_next_index(); void add_type(TypeIndex index, const InterrogateType &type); void add_function(FunctionIndex index, const InterrogateFunction &function); - void add_wrapper(FunctionWrapperIndex index, + void add_wrapper(FunctionWrapperIndex index, const InterrogateFunctionWrapper &wrapper); void add_manifest(ManifestIndex index, const InterrogateManifest &manifest); void add_element(ElementIndex index, const InterrogateElement &element); diff --git a/dtool/src/interrogatedb/interrogateElement.I b/dtool/src/interrogatedb/interrogateElement.I index 63eb724c2b..ef316a7cc1 100644 --- a/dtool/src/interrogatedb/interrogateElement.I +++ b/dtool/src/interrogatedb/interrogateElement.I @@ -1,13 +1,26 @@ // Filename: interrogateElement.I // Created by: drose (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateElement:: InterrogateElement(InterrogateModuleDef *def) : @@ -22,7 +35,7 @@ InterrogateElement(InterrogateModuleDef *def) : //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateElement:: InterrogateElement(const InterrogateElement ©) { @@ -32,7 +45,7 @@ InterrogateElement(const InterrogateElement ©) { //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void InterrogateElement:: operator = (const InterrogateElement ©) { @@ -59,7 +72,7 @@ is_global() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateElement::has_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateElement:: has_scoped_name() const { @@ -69,7 +82,7 @@ has_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateElement::get_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateElement:: get_scoped_name() const { @@ -79,7 +92,7 @@ get_scoped_name() const { //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::get_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateElement:: get_type() const { @@ -89,7 +102,7 @@ get_type() const { //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::has_getter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateElement:: has_getter() const { @@ -99,7 +112,7 @@ has_getter() const { //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::get_getter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateElement:: get_getter() const { @@ -109,7 +122,7 @@ get_getter() const { //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::has_setter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateElement:: has_setter() const { @@ -119,7 +132,7 @@ has_setter() const { //////////////////////////////////////////////////////////////////// // Element: InterrogateElement::get_setter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateElement:: get_setter() const { diff --git a/dtool/src/interrogatedb/interrogateElement.cxx b/dtool/src/interrogatedb/interrogateElement.cxx index 5a90c37795..d42148a9e0 100644 --- a/dtool/src/interrogatedb/interrogateElement.cxx +++ b/dtool/src/interrogatedb/interrogateElement.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateElement.C +// Filename: interrogateElement.cxx // Created by: drose (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateElement.h" diff --git a/dtool/src/interrogatedb/interrogateElement.h b/dtool/src/interrogatedb/interrogateElement.h index d45b23ad1b..54a8f60ea0 100644 --- a/dtool/src/interrogatedb/interrogateElement.h +++ b/dtool/src/interrogatedb/interrogateElement.h @@ -1,6 +1,19 @@ // Filename: interrogateElement.h // Created by: drose (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATEELEMENT_H diff --git a/dtool/src/interrogatedb/interrogateFunction.I b/dtool/src/interrogatedb/interrogateFunction.I index b45b29646e..23da02e0f7 100644 --- a/dtool/src/interrogatedb/interrogateFunction.I +++ b/dtool/src/interrogatedb/interrogateFunction.I @@ -1,13 +1,26 @@ // Filename: interrogateFunction.I // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateFunction:: InterrogateFunction(InterrogateModuleDef *def) : @@ -20,7 +33,7 @@ InterrogateFunction(InterrogateModuleDef *def) : //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateFunction:: InterrogateFunction(const InterrogateFunction ©) { @@ -30,7 +43,7 @@ InterrogateFunction(const InterrogateFunction ©) { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void InterrogateFunction:: operator = (const InterrogateFunction ©) { @@ -91,7 +104,7 @@ get_class() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::has_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunction:: has_scoped_name() const { @@ -101,7 +114,7 @@ has_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::get_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateFunction:: get_scoped_name() const { @@ -111,7 +124,7 @@ get_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::has_comment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunction:: has_comment() const { @@ -121,7 +134,7 @@ has_comment() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::get_comment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateFunction:: get_comment() const { @@ -131,7 +144,7 @@ get_comment() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::has_prototype // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunction:: has_prototype() const { @@ -141,7 +154,7 @@ has_prototype() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::get_prototype // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateFunction:: get_prototype() const { @@ -151,7 +164,7 @@ get_prototype() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::number_of_c_wrappers // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateFunction:: number_of_c_wrappers() const { @@ -161,7 +174,7 @@ number_of_c_wrappers() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::get_c_wrapper // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionWrapperIndex InterrogateFunction:: get_c_wrapper(int n) const { @@ -174,7 +187,7 @@ get_c_wrapper(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::number_of_python_wrappers // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateFunction:: number_of_python_wrappers() const { @@ -184,7 +197,7 @@ number_of_python_wrappers() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunction::get_python_wrapper // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionWrapperIndex InterrogateFunction:: get_python_wrapper(int n) const { diff --git a/dtool/src/interrogatedb/interrogateFunction.cxx b/dtool/src/interrogatedb/interrogateFunction.cxx index 6ca4ac2458..214287eba9 100644 --- a/dtool/src/interrogatedb/interrogateFunction.cxx +++ b/dtool/src/interrogatedb/interrogateFunction.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateFunction.C +// Filename: interrogateFunction.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateFunction.h" diff --git a/dtool/src/interrogatedb/interrogateFunction.h b/dtool/src/interrogatedb/interrogateFunction.h index 6d970ebfa9..78679a8d38 100644 --- a/dtool/src/interrogatedb/interrogateFunction.h +++ b/dtool/src/interrogatedb/interrogateFunction.h @@ -1,6 +1,19 @@ // Filename: interrogateFunction.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATEFUNCTION_H diff --git a/dtool/src/interrogatedb/interrogateFunctionWrapper.I b/dtool/src/interrogatedb/interrogateFunctionWrapper.I index 80115ae22b..cfbeeae62a 100644 --- a/dtool/src/interrogatedb/interrogateFunctionWrapper.I +++ b/dtool/src/interrogatedb/interrogateFunctionWrapper.I @@ -1,13 +1,26 @@ // Filename: interrogateFunctionWrapper.I // Created by: drose (06Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateFunctionWrapper:: InterrogateFunctionWrapper(InterrogateModuleDef *def) : @@ -22,7 +35,7 @@ InterrogateFunctionWrapper(InterrogateModuleDef *def) : //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateFunctionWrapper:: InterrogateFunctionWrapper(const InterrogateFunctionWrapper ©) { @@ -32,7 +45,7 @@ InterrogateFunctionWrapper(const InterrogateFunctionWrapper ©) { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void InterrogateFunctionWrapper:: operator = (const InterrogateFunctionWrapper ©) { @@ -59,7 +72,7 @@ get_function() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::is_callable_by_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunctionWrapper:: is_callable_by_name() const { @@ -69,7 +82,7 @@ is_callable_by_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::has_return_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunctionWrapper:: has_return_value() const { @@ -79,7 +92,7 @@ has_return_value() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::get_return_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateFunctionWrapper:: get_return_type() const { @@ -89,7 +102,7 @@ get_return_type() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::caller_manages_return_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunctionWrapper:: caller_manages_return_value() const { @@ -99,7 +112,7 @@ caller_manages_return_value() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::get_return_value_destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateFunctionWrapper:: get_return_value_destructor() const { @@ -109,7 +122,7 @@ get_return_value_destructor() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::number_of_parameters // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateFunctionWrapper:: number_of_parameters() const { @@ -119,7 +132,7 @@ number_of_parameters() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::parameter_get_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateFunctionWrapper:: parameter_get_type(int n) const { @@ -132,7 +145,7 @@ parameter_get_type(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::parameter_has_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunctionWrapper:: parameter_has_name(int n) const { @@ -145,7 +158,7 @@ parameter_has_name(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::parameter_get_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateFunctionWrapper:: parameter_get_name(int n) const { @@ -159,7 +172,7 @@ parameter_get_name(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::parameter_is_this // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateFunctionWrapper:: parameter_is_this(int n) const { @@ -172,7 +185,7 @@ parameter_is_this(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::get_unique_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateFunctionWrapper:: get_unique_name() const { diff --git a/dtool/src/interrogatedb/interrogateFunctionWrapper.cxx b/dtool/src/interrogatedb/interrogateFunctionWrapper.cxx index 9221583029..6191a43f76 100644 --- a/dtool/src/interrogatedb/interrogateFunctionWrapper.cxx +++ b/dtool/src/interrogatedb/interrogateFunctionWrapper.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateFunctionWrapper.C +// Filename: interrogateFunctionWrapper.cxx // Created by: drose (06Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateFunctionWrapper.h" @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::Parameter::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void InterrogateFunctionWrapper::Parameter:: output(ostream &out) const { @@ -23,7 +36,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateFunctionWrapper::Parameter::input // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void InterrogateFunctionWrapper::Parameter:: input(istream &in) { diff --git a/dtool/src/interrogatedb/interrogateFunctionWrapper.h b/dtool/src/interrogatedb/interrogateFunctionWrapper.h index c93a63edf2..1c51a01134 100644 --- a/dtool/src/interrogatedb/interrogateFunctionWrapper.h +++ b/dtool/src/interrogatedb/interrogateFunctionWrapper.h @@ -1,6 +1,19 @@ // Filename: interrogateFunctionWrapper.h // Created by: drose (06Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATEFUNCTIONWRAPPER_H diff --git a/dtool/src/interrogatedb/interrogateManifest.I b/dtool/src/interrogatedb/interrogateManifest.I index 9b664bf465..e28e4517b3 100644 --- a/dtool/src/interrogatedb/interrogateManifest.I +++ b/dtool/src/interrogatedb/interrogateManifest.I @@ -1,13 +1,26 @@ // Filename: interrogateManifest.I // Created by: drose (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateManifest:: InterrogateManifest(InterrogateModuleDef *def) : @@ -22,7 +35,7 @@ InterrogateManifest(InterrogateModuleDef *def) : //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateManifest:: InterrogateManifest(const InterrogateManifest ©) { @@ -32,7 +45,7 @@ InterrogateManifest(const InterrogateManifest ©) { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void InterrogateManifest:: operator = (const InterrogateManifest ©) { @@ -48,7 +61,7 @@ operator = (const InterrogateManifest ©) { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::get_definition // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateManifest:: get_definition() const { @@ -58,7 +71,7 @@ get_definition() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::has_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateManifest:: has_type() const { @@ -68,7 +81,7 @@ has_type() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::get_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateManifest:: get_type() const { @@ -78,7 +91,7 @@ get_type() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::has_getter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateManifest:: has_getter() const { @@ -88,7 +101,7 @@ has_getter() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::get_getter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateManifest:: get_getter() const { @@ -98,7 +111,7 @@ get_getter() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::has_int_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateManifest:: has_int_value() const { @@ -108,7 +121,7 @@ has_int_value() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateManifest::get_int_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateManifest:: get_int_value() const { diff --git a/dtool/src/interrogatedb/interrogateManifest.cxx b/dtool/src/interrogatedb/interrogateManifest.cxx index 1b30eb851a..9bc3c01e43 100644 --- a/dtool/src/interrogatedb/interrogateManifest.cxx +++ b/dtool/src/interrogatedb/interrogateManifest.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateManifest.C +// Filename: interrogateManifest.cxx // Created by: drose (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateManifest.h" diff --git a/dtool/src/interrogatedb/interrogateManifest.h b/dtool/src/interrogatedb/interrogateManifest.h index aca8cca1bf..4c0eb4e88e 100644 --- a/dtool/src/interrogatedb/interrogateManifest.h +++ b/dtool/src/interrogatedb/interrogateManifest.h @@ -1,6 +1,19 @@ // Filename: interrogateManifest.h // Created by: drose (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATEMANIFEST_H diff --git a/dtool/src/interrogatedb/interrogateType.I b/dtool/src/interrogatedb/interrogateType.I index b3f7ea158e..2fd38a6804 100644 --- a/dtool/src/interrogatedb/interrogateType.I +++ b/dtool/src/interrogatedb/interrogateType.I @@ -1,13 +1,26 @@ // Filename: interrogateType.I // Created by: drose (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: InterrogateType::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateType:: InterrogateType(InterrogateModuleDef *def) : @@ -23,7 +36,7 @@ InterrogateType(InterrogateModuleDef *def) : //////////////////////////////////////////////////////////////////// // Function: InterrogateType::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE InterrogateType:: InterrogateType(const InterrogateType ©) { @@ -45,7 +58,7 @@ is_global() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::has_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: has_scoped_name() const { @@ -55,7 +68,7 @@ has_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateType:: get_scoped_name() const { @@ -65,7 +78,7 @@ get_scoped_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::has_true_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: has_true_name() const { @@ -75,7 +88,7 @@ has_true_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_true_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateType:: get_true_name() const { @@ -85,7 +98,7 @@ get_true_name() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::has_comment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: has_comment() const { @@ -95,7 +108,7 @@ has_comment() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_comment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateType:: get_comment() const { @@ -127,7 +140,7 @@ get_outer_class() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_atomic // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_atomic() const { @@ -137,7 +150,7 @@ is_atomic() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_atomic_token // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AtomicToken InterrogateType:: get_atomic_token() const { @@ -147,7 +160,7 @@ get_atomic_token() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_unsigned // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_unsigned() const { @@ -157,7 +170,7 @@ is_unsigned() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_signed // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_signed() const { @@ -167,7 +180,7 @@ is_signed() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_long // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_long() const { @@ -177,7 +190,7 @@ is_long() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_longlong // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_longlong() const { @@ -187,7 +200,7 @@ is_longlong() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_short // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_short() const { @@ -197,7 +210,7 @@ is_short() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_wrapped // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_wrapped() const { @@ -207,7 +220,7 @@ is_wrapped() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_pointer // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_pointer() const { @@ -217,7 +230,7 @@ is_pointer() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_const // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_const() const { @@ -227,7 +240,7 @@ is_const() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_wrapped_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateType:: get_wrapped_type() const { @@ -237,7 +250,7 @@ get_wrapped_type() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_enum // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_enum() const { @@ -247,7 +260,7 @@ is_enum() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::number_of_enum_values // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: number_of_enum_values() const { @@ -257,7 +270,7 @@ number_of_enum_values() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_enum_value_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateType:: get_enum_value_name(int n) const { @@ -270,7 +283,7 @@ get_enum_value_name(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_enum_value_scoped_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &InterrogateType:: get_enum_value_scoped_name(int n) const { @@ -283,7 +296,7 @@ get_enum_value_scoped_name(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_enum_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: get_enum_value(int n) const { @@ -296,7 +309,7 @@ get_enum_value(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_struct // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_struct() const { @@ -306,7 +319,7 @@ is_struct() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_class // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_class() const { @@ -316,7 +329,7 @@ is_class() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_union // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_union() const { @@ -326,7 +339,7 @@ is_union() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::is_fully_defined // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: is_fully_defined() const { @@ -349,7 +362,7 @@ is_unpublished() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::number_of_constructors // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: number_of_constructors() const { @@ -359,7 +372,7 @@ number_of_constructors() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateType:: get_constructor(int n) const { @@ -373,7 +386,7 @@ get_constructor(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::has_destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: has_destructor() const { @@ -383,7 +396,7 @@ has_destructor() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::destructor_is_inherited // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: destructor_is_inherited() const { @@ -393,7 +406,7 @@ destructor_is_inherited() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateType:: get_destructor() const { @@ -403,7 +416,7 @@ get_destructor() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::number_of_elements // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: number_of_elements() const { @@ -413,7 +426,7 @@ number_of_elements() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_element // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ElementIndex InterrogateType:: get_element(int n) const { @@ -427,7 +440,7 @@ get_element(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::number_of_methods // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: number_of_methods() const { @@ -437,7 +450,7 @@ number_of_methods() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_method // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateType:: get_method(int n) const { @@ -451,7 +464,7 @@ get_method(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::number_of_casts // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: number_of_casts() const { @@ -461,7 +474,7 @@ number_of_casts() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_cast // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FunctionIndex InterrogateType:: get_cast(int n) const { @@ -475,7 +488,7 @@ get_cast(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::number_of_derivations // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: number_of_derivations() const { @@ -485,7 +498,7 @@ number_of_derivations() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_derivation // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateType:: get_derivation(int n) const { @@ -499,7 +512,7 @@ get_derivation(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::derivation_has_upcast // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: derivation_has_upcast(int n) const { @@ -513,7 +526,7 @@ derivation_has_upcast(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::derivation_get_upcast // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateType:: derivation_get_upcast(int n) const { @@ -527,7 +540,7 @@ derivation_get_upcast(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::derivation_downcast_is_impossible // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: derivation_downcast_is_impossible(int n) const { @@ -541,7 +554,7 @@ derivation_downcast_is_impossible(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::derivation_has_downcast // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool InterrogateType:: derivation_has_downcast(int n) const { @@ -555,7 +568,7 @@ derivation_has_downcast(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::derivation_get_downcast // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateType:: derivation_get_downcast(int n) const { @@ -569,7 +582,7 @@ derivation_get_downcast(int n) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::number_of_nested_types // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int InterrogateType:: number_of_nested_types() const { @@ -579,7 +592,7 @@ number_of_nested_types() const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::get_nested_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeIndex InterrogateType:: get_nested_type(int n) const { diff --git a/dtool/src/interrogatedb/interrogateType.cxx b/dtool/src/interrogatedb/interrogateType.cxx index cf02705f7c..f8e8d9cc34 100644 --- a/dtool/src/interrogatedb/interrogateType.cxx +++ b/dtool/src/interrogatedb/interrogateType.cxx @@ -1,6 +1,19 @@ -// Filename: interrogateType.C +// Filename: interrogateType.cxx // Created by: drose (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogateType.h" @@ -16,7 +29,7 @@ string InterrogateType::_empty_string; //////////////////////////////////////////////////////////////////// // Function: InterrogateType::Derivation::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void InterrogateType::Derivation:: output(ostream &out) const { @@ -26,7 +39,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::Derivation::input // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void InterrogateType::Derivation:: input(istream &in) { @@ -36,7 +49,7 @@ input(istream &in) { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::EnumValue::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void InterrogateType::EnumValue:: output(ostream &out) const { @@ -48,7 +61,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::EnumValue::input // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void InterrogateType::EnumValue:: input(istream &in) { @@ -60,7 +73,7 @@ input(istream &in) { //////////////////////////////////////////////////////////////////// // Function: InterrogateType::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void InterrogateType:: operator = (const InterrogateType ©) { diff --git a/dtool/src/interrogatedb/interrogateType.h b/dtool/src/interrogatedb/interrogateType.h index b1618c28f6..540611bbef 100644 --- a/dtool/src/interrogatedb/interrogateType.h +++ b/dtool/src/interrogatedb/interrogateType.h @@ -1,6 +1,19 @@ // Filename: interrogateType.h // Created by: drose (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATETYPE_H @@ -127,7 +140,7 @@ private: TypeIndex _outer_class; AtomicToken _atomic_token; TypeIndex _wrapped_type; - + typedef vector Functions; Functions _constructors; FunctionIndex _destructor; diff --git a/dtool/src/interrogatedb/interrogate_datafile.I b/dtool/src/interrogatedb/interrogate_datafile.I index 42bcb15f5a..7e959903e5 100644 --- a/dtool/src/interrogatedb/interrogate_datafile.I +++ b/dtool/src/interrogatedb/interrogate_datafile.I @@ -1,6 +1,19 @@ // Filename: interrogate_datafile.I // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/dtool/src/interrogatedb/interrogate_datafile.cxx b/dtool/src/interrogatedb/interrogate_datafile.cxx index 0d58c059ae..ef5a712da7 100644 --- a/dtool/src/interrogatedb/interrogate_datafile.cxx +++ b/dtool/src/interrogatedb/interrogate_datafile.cxx @@ -1,6 +1,19 @@ -// Filename: interrogate_datafile.C +// Filename: interrogate_datafile.cxx // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogate_datafile.h" @@ -32,7 +45,7 @@ idf_input_string(istream &in, string &str) { if (in.fail()) { return; } - + // Skip one character of whitespace, and then read the string. in.get(); str = ""; @@ -77,7 +90,7 @@ idf_input_string(istream &in, const char *&str) { // Don't change the string if the input length is zero. return; } - + // Skip one character of whitespace, and then read the string. in.get(); char *readstr = new char[length + 1]; diff --git a/dtool/src/interrogatedb/interrogate_datafile.h b/dtool/src/interrogatedb/interrogate_datafile.h index 3446a4dc70..f515ad6190 100644 --- a/dtool/src/interrogatedb/interrogate_datafile.h +++ b/dtool/src/interrogatedb/interrogate_datafile.h @@ -1,6 +1,19 @@ // Filename: interrogate_datafile.h // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATE_DATAFILE_H diff --git a/dtool/src/interrogatedb/interrogate_interface.cxx b/dtool/src/interrogatedb/interrogate_interface.cxx index 2e8c633977..41f5ed0cc0 100644 --- a/dtool/src/interrogatedb/interrogate_interface.cxx +++ b/dtool/src/interrogatedb/interrogate_interface.cxx @@ -1,6 +1,19 @@ -// Filename: interrogate_interface.C +// Filename: interrogate_interface.cxx // Created by: drose (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogate_interface.h" @@ -74,7 +87,7 @@ interrogate_element_scoped_name(ElementIndex element) { } ElementIndex -interrogate_get_element_by_name(const char *element_name) { +interrogate_get_element_by_name(const char *element_name) { return InterrogateDatabase::get_ptr()->lookup_element_by_name(element_name); } diff --git a/dtool/src/interrogatedb/interrogate_interface.h b/dtool/src/interrogatedb/interrogate_interface.h index 7350035c5a..cd71c81b3c 100644 --- a/dtool/src/interrogatedb/interrogate_interface.h +++ b/dtool/src/interrogatedb/interrogate_interface.h @@ -2,6 +2,19 @@ // Created by: frang (09Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef INTERROGATE_INTERFACE_H #define INTERROGATE_INTERFACE_H @@ -488,7 +501,7 @@ EXPCL_DTOOLCONFIG FunctionIndex interrogate_type_get_upcast(TypeIndex type, int // Although it is always possible to upcast a pointer to a base class, // it is not always possible to downcast from a base class to the // derived class (particularly in the presence of virtual -// inheritance). If interrogate_type_derivation_downcast_is_impossible() +// inheritance). If interrogate_type_derivation_downcast_is_impossible() // returns true, forget it. Otherwise, downcasting works the same // way as upcasting. (Of course, it is the caller's responsibility to // guarantee that the pointer actually represents an object of the diff --git a/dtool/src/interrogatedb/interrogate_request.cxx b/dtool/src/interrogatedb/interrogate_request.cxx index ac66192d0d..5acc871eaf 100644 --- a/dtool/src/interrogatedb/interrogate_request.cxx +++ b/dtool/src/interrogatedb/interrogate_request.cxx @@ -1,6 +1,19 @@ -// Filename: interrogate_request.C +// Filename: interrogate_request.cxx // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interrogate_request.h" @@ -8,7 +21,7 @@ #include // for strdup -void +void interrogate_request_database(const char *database_filename) { InterrogateModuleDef *def = new InterrogateModuleDef; memset(def, 0, sizeof(InterrogateModuleDef)); diff --git a/dtool/src/interrogatedb/interrogate_request.h b/dtool/src/interrogatedb/interrogate_request.h index 6fb62126ff..d771fa36b8 100644 --- a/dtool/src/interrogatedb/interrogate_request.h +++ b/dtool/src/interrogatedb/interrogate_request.h @@ -1,6 +1,19 @@ // Filename: interrogate_request.h // Created by: drose (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTERROGATE_REQUEST diff --git a/dtool/src/interrogatedb/vector_int.cxx b/dtool/src/interrogatedb/vector_int.cxx index 94e4b23e19..34a5ca01b4 100644 --- a/dtool/src/interrogatedb/vector_int.cxx +++ b/dtool/src/interrogatedb/vector_int.cxx @@ -1,12 +1,25 @@ -// Filename: vector_int.C +// Filename: vector_int.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_int.h" -#define EXPCL EXPCL_DTOOLCONFIG -#define EXPTP EXPTP_DTOOLCONFIG +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG #define TYPE int #define NAME vector_int diff --git a/dtool/src/interrogatedb/vector_int.h b/dtool/src/interrogatedb/vector_int.h index ec6a17a76b..1600cf55fc 100644 --- a/dtool/src/interrogatedb/vector_int.h +++ b/dtool/src/interrogatedb/vector_int.h @@ -1,6 +1,19 @@ // Filename: vector_int.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_INT_H @@ -19,8 +32,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_DTOOLCONFIG -#define EXPTP EXPTP_DTOOLCONFIG +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG #define TYPE int #define NAME vector_int diff --git a/dtool/src/parser-inc/algorithm b/dtool/src/parser-inc/algorithm index c9328a14e7..1494d9518f 100644 --- a/dtool/src/parser-inc/algorithm +++ b/dtool/src/parser-inc/algorithm @@ -1,15 +1,28 @@ -// Filename: algorithm -// Created by: drose (12May00) -// -//////////////////////////////////////////////////////////////////// - -// This file, and all the other files in this directory, aren't -// intended to be compiled--they're just parsed by CPPParser (and -// interrogate) in lieu of the actual system headers, to generate the -// interrogate database. - -#ifndef ALGORITHM_H -#define ALGORITHM_H - -#endif - +// Filename: algorithm +// Created by: drose (12May00) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +#ifndef ALGORITHM_H +#define ALGORITHM_H + +#endif + diff --git a/dtool/src/parser-inc/deque b/dtool/src/parser-inc/deque index 3d2074e0c7..ebd175f373 100644 --- a/dtool/src/parser-inc/deque +++ b/dtool/src/parser-inc/deque @@ -1,6 +1,19 @@ // Filename: deque // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/files.h b/dtool/src/parser-inc/files.h index 81777c54d8..c96bee59b2 100644 --- a/dtool/src/parser-inc/files.h +++ b/dtool/src/parser-inc/files.h @@ -1,6 +1,19 @@ // Filename: files.h // Created by: drose (07Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/hex.h b/dtool/src/parser-inc/hex.h index 04f4b74b6d..1700874e3f 100644 --- a/dtool/src/parser-inc/hex.h +++ b/dtool/src/parser-inc/hex.h @@ -1,6 +1,19 @@ // Filename: hex.h // Created by: drose (17Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other hex in this directory, aren't diff --git a/dtool/src/parser-inc/iostream b/dtool/src/parser-inc/iostream index 067675a2df..17e8a1fe6e 100644 --- a/dtool/src/parser-inc/iostream +++ b/dtool/src/parser-inc/iostream @@ -1,6 +1,19 @@ // Filename: iostream // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/list b/dtool/src/parser-inc/list index cf89db637c..e4945449e3 100644 --- a/dtool/src/parser-inc/list +++ b/dtool/src/parser-inc/list @@ -1,6 +1,19 @@ // Filename: list // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/map b/dtool/src/parser-inc/map index 533e39b78f..829cd70b93 100644 --- a/dtool/src/parser-inc/map +++ b/dtool/src/parser-inc/map @@ -1,6 +1,19 @@ // Filename: map // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/md5.h b/dtool/src/parser-inc/md5.h index f30d9f23e9..993a177b12 100644 --- a/dtool/src/parser-inc/md5.h +++ b/dtool/src/parser-inc/md5.h @@ -1,6 +1,19 @@ // Filename: md5.h // Created by: drose (07Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/nurbs.hh b/dtool/src/parser-inc/nurbs.hh index 934fa9ebff..7db7aa3abd 100644 --- a/dtool/src/parser-inc/nurbs.hh +++ b/dtool/src/parser-inc/nurbs.hh @@ -1,6 +1,19 @@ // Filename: nurbs.hh // Created by: drose (02Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/pair b/dtool/src/parser-inc/pair index 719abbdae3..3ee6efe2e3 100644 --- a/dtool/src/parser-inc/pair +++ b/dtool/src/parser-inc/pair @@ -1,6 +1,19 @@ // Filename: pair // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/queue b/dtool/src/parser-inc/queue index 331737d4a0..5d9f1dd63b 100644 --- a/dtool/src/parser-inc/queue +++ b/dtool/src/parser-inc/queue @@ -1,6 +1,19 @@ // Filename: queue // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/set b/dtool/src/parser-inc/set index c49bfaa5c3..773593abba 100644 --- a/dtool/src/parser-inc/set +++ b/dtool/src/parser-inc/set @@ -1,6 +1,19 @@ // Filename: set // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/stack b/dtool/src/parser-inc/stack index bd9e73ebe3..7ac35d7028 100644 --- a/dtool/src/parser-inc/stack +++ b/dtool/src/parser-inc/stack @@ -1,6 +1,19 @@ // Filename: stack // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index f9017397d2..5058fc512c 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -1,6 +1,19 @@ // Filename: stdtypedefs.h // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/string b/dtool/src/parser-inc/string index 149d7434f1..51c8431458 100644 --- a/dtool/src/parser-inc/string +++ b/dtool/src/parser-inc/string @@ -1,6 +1,19 @@ // Filename: string // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/vector b/dtool/src/parser-inc/vector index 7f41c83e51..d615139291 100644 --- a/dtool/src/parser-inc/vector +++ b/dtool/src/parser-inc/vector @@ -1,6 +1,19 @@ // Filename: vector // Created by: drose (12May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/parser-inc/windows.h b/dtool/src/parser-inc/windows.h index d27aea42df..0723cbd568 100644 --- a/dtool/src/parser-inc/windows.h +++ b/dtool/src/parser-inc/windows.h @@ -1,6 +1,19 @@ // Filename: windows.h // Created by: drose (17Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't @@ -15,4 +28,4 @@ typedef bool BOOL; union LARGE_INTEGER { __int64 QuadPart; -}; +}; diff --git a/dtool/src/parser-inc/zlib.h b/dtool/src/parser-inc/zlib.h index 2290823b67..63b9683cf7 100644 --- a/dtool/src/parser-inc/zlib.h +++ b/dtool/src/parser-inc/zlib.h @@ -1,6 +1,19 @@ // Filename: zlib.h // Created by: drose (14Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file, and all the other files in this directory, aren't diff --git a/dtool/src/pystub/pystub.cxx b/dtool/src/pystub/pystub.cxx index 67b2d16ee6..c97737d04a 100644 --- a/dtool/src/pystub/pystub.cxx +++ b/dtool/src/pystub/pystub.cxx @@ -1,6 +1,19 @@ -// Filename: pystub.C +// Filename: pystub.cxx // Created by: drose (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pystub.h" diff --git a/dtool/src/pystub/pystub.h b/dtool/src/pystub/pystub.h index 3de0794b41..7213b33125 100644 --- a/dtool/src/pystub/pystub.h +++ b/dtool/src/pystub/pystub.h @@ -1,6 +1,19 @@ // Filename: pystub.h // Created by: drose (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PYSTUB_H diff --git a/dtool/src/test_interrogate/test_interrogate.cxx b/dtool/src/test_interrogate/test_interrogate.cxx index 827b5b6894..6c4b4bad84 100644 --- a/dtool/src/test_interrogate/test_interrogate.cxx +++ b/dtool/src/test_interrogate/test_interrogate.cxx @@ -1,6 +1,19 @@ -// Filename: test_interrogate.C +// Filename: test_interrogate.cxx // Created by: drose (09Dec99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -117,8 +130,8 @@ describe_wrapper(int wrapper, int indent_level) { void describe_function(int function, int indent_level) { - indent(cout, indent_level) - << "Function " << interrogate_function_scoped_name(function) + indent(cout, indent_level) + << "Function " << interrogate_function_scoped_name(function) << " (" << function << ")\n"; indent(cout, indent_level + 2) @@ -131,7 +144,7 @@ describe_function(int function, int indent_level) { cout << "\n"; } - if (interrogate_function_is_virtual(function)) { + if (interrogate_function_is_virtual(function)) { indent(cout, indent_level + 2) << "is virtual.\n"; } @@ -147,11 +160,11 @@ describe_function(int function, int indent_level) { << num_c_wrappers << " C-style wrappers:\n"; } for (w = 0; w < num_c_wrappers; w++) { - describe_wrapper(interrogate_function_c_wrapper(function, w), + describe_wrapper(interrogate_function_c_wrapper(function, w), indent_level + 4); } - int num_python_wrappers = + int num_python_wrappers = interrogate_function_number_of_python_wrappers(function); if (num_python_wrappers == 0) { } else if (num_python_wrappers == 1) { @@ -162,7 +175,7 @@ describe_function(int function, int indent_level) { << num_python_wrappers << " Python-style wrappers:\n"; } for (w = 0; w < num_python_wrappers; w++) { - describe_wrapper(interrogate_function_python_wrapper(function, w), + describe_wrapper(interrogate_function_python_wrapper(function, w), indent_level + 4); } @@ -183,7 +196,7 @@ report_manifests() { } else { cout << " of unknown type\n"; } - cout << " definition is \"" + cout << " definition is \"" << interrogate_manifest_definition(manifest) << "\"\n"; if (interrogate_manifest_has_getter(manifest)) { @@ -202,7 +215,7 @@ report_manifests() { void describe_element(int element, int indent_level) { - indent(cout, indent_level) + indent(cout, indent_level) << "Element " << interrogate_element_scoped_name(element) << " of type "; show_type(interrogate_element_type(element)); @@ -434,7 +447,7 @@ report_all_functions() { void usage() { - cerr << + cerr << "\n" "test_interrogate [opts] libfile.so [libfile.so ...]\n\n" @@ -528,7 +541,7 @@ main(int argc, char *argv[]) { if (all_functions) { report_all_functions(); } - + if (!all_types && !all_functions) { report_manifests(); report_globals(); @@ -536,6 +549,6 @@ main(int argc, char *argv[]) { report_global_functions(); } } - + return (return_status); } diff --git a/dtool/src/test_interrogate/test_lib.cxx b/dtool/src/test_interrogate/test_lib.cxx index c6fff15ff3..24fb131cd9 100644 --- a/dtool/src/test_interrogate/test_lib.cxx +++ b/dtool/src/test_interrogate/test_lib.cxx @@ -1,7 +1,20 @@ -// Filename: test_lib.C +// Filename: test_lib.cxx // Created by: frang (15Jun00) // -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "test_lib.h" diff --git a/dtool/src/test_interrogate/test_lib.h b/dtool/src/test_interrogate/test_lib.h index 304237ef39..deef79db82 100644 --- a/dtool/src/test_interrogate/test_lib.h +++ b/dtool/src/test_interrogate/test_lib.h @@ -1,7 +1,20 @@ // Filename: test_lib.h // Created by: frang (15Jun00) // -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __TEST_LIB_H__ #define __TEST_LIB_H__ diff --git a/panda/src/audio/audio.h b/panda/src/audio/audio.h index 67722449e7..a4c1ceb83e 100644 --- a/panda/src/audio/audio.h +++ b/panda/src/audio/audio.h @@ -1,6 +1,19 @@ // Filename: audio.h // Created by: frang (06Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_H__ diff --git a/panda/src/audio/audio_gui_functor.cxx b/panda/src/audio/audio_gui_functor.cxx index 592da6c2df..f8f1c5f35a 100644 --- a/panda/src/audio/audio_gui_functor.cxx +++ b/panda/src/audio/audio_gui_functor.cxx @@ -1,6 +1,19 @@ // Filename: audio_gui_functor.cxx // Created by: cary (19Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_gui_functor.h" diff --git a/panda/src/audio/audio_gui_functor.h b/panda/src/audio/audio_gui_functor.h index a3a9417634..f7083c1aa8 100644 --- a/panda/src/audio/audio_gui_functor.h +++ b/panda/src/audio/audio_gui_functor.h @@ -1,6 +1,19 @@ // Filename: audio_gui_functor.h // Created by: cary (19Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_GUI_FUNCTOR_H__ diff --git a/panda/src/audio/audio_linux_traits.I b/panda/src/audio/audio_linux_traits.I index 0b1b1338de..11b8564638 100644 --- a/panda/src/audio/audio_linux_traits.I +++ b/panda/src/audio/audio_linux_traits.I @@ -1,6 +1,19 @@ // Filename: audio_linux_traits.I // Created by: cary (02Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE LinuxSample::LinuxSample(byte* b, unsigned long s) diff --git a/panda/src/audio/audio_linux_traits.cxx b/panda/src/audio/audio_linux_traits.cxx index 4f23b0afe4..97f1d4464b 100644 --- a/panda/src/audio/audio_linux_traits.cxx +++ b/panda/src/audio/audio_linux_traits.cxx @@ -1,6 +1,19 @@ -// Filename: audio_linux_traits.C +// Filename: audio_linux_traits.cxx // Created by: cary (02Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_linux_traits.h" diff --git a/panda/src/audio/audio_linux_traits.h b/panda/src/audio/audio_linux_traits.h index 68f8bf483d..4a6b912810 100644 --- a/panda/src/audio/audio_linux_traits.h +++ b/panda/src/audio/audio_linux_traits.h @@ -1,6 +1,19 @@ // Filename: audio_linux_traits.h // Created by: cary (02Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // yes, this needs to be outside the ifdef protection diff --git a/panda/src/audio/audio_manager.I b/panda/src/audio/audio_manager.I index ef7ae6258c..fa0674cd2b 100644 --- a/panda/src/audio/audio_manager.I +++ b/panda/src/audio/audio_manager.I @@ -1,6 +1,19 @@ // Filename: audio_manager.I // Created by: cary (24Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/audio/audio_manager.cxx b/panda/src/audio/audio_manager.cxx index 5dc876d2dc..759b4370cb 100644 --- a/panda/src/audio/audio_manager.cxx +++ b/panda/src/audio/audio_manager.cxx @@ -1,6 +1,19 @@ // Filename: audio_manager.cxx // Created by: cary (24Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_manager.h" diff --git a/panda/src/audio/audio_manager.h b/panda/src/audio/audio_manager.h index 36cee339ea..8e62b6036a 100644 --- a/panda/src/audio/audio_manager.h +++ b/panda/src/audio/audio_manager.h @@ -1,6 +1,19 @@ // Filename: audio_manager.h // Created by: cary (22Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_MANAGER_H__ diff --git a/panda/src/audio/audio_midi.cxx b/panda/src/audio/audio_midi.cxx index bdfb9edb58..90c8848104 100644 --- a/panda/src/audio/audio_midi.cxx +++ b/panda/src/audio/audio_midi.cxx @@ -1,6 +1,19 @@ // Filename: audio_midi.cxx // Created by: cary (26Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_midi.h" diff --git a/panda/src/audio/audio_midi.h b/panda/src/audio/audio_midi.h index afa0582e31..85c3fcd31b 100644 --- a/panda/src/audio/audio_midi.h +++ b/panda/src/audio/audio_midi.h @@ -1,6 +1,19 @@ // Filename: audio_midi.h // Created by: cary (26Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_MIDI_H__ diff --git a/panda/src/audio/audio_mikmod_traits.cxx b/panda/src/audio/audio_mikmod_traits.cxx index 0c3922f4df..f93c534d7e 100644 --- a/panda/src/audio/audio_mikmod_traits.cxx +++ b/panda/src/audio/audio_mikmod_traits.cxx @@ -1,6 +1,19 @@ // Filename: audio_mikmod_traits.cxx // Created by: cary (23Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_mikmod_traits.h" diff --git a/panda/src/audio/audio_mikmod_traits.h b/panda/src/audio/audio_mikmod_traits.h index 4064c07d66..87fa0bf321 100644 --- a/panda/src/audio/audio_mikmod_traits.h +++ b/panda/src/audio/audio_mikmod_traits.h @@ -1,6 +1,19 @@ // Filename: audio_mikmod_traits.h // Created by: frang (06Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // yes, this should be outside diff --git a/panda/src/audio/audio_null_traits.I b/panda/src/audio/audio_null_traits.I index 0c9a618d86..337dce648c 100644 --- a/panda/src/audio/audio_null_traits.I +++ b/panda/src/audio/audio_null_traits.I @@ -1,6 +1,19 @@ // Filename: audio_null_traits.I // Created by: cary (25Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE NullSound::NullSound(void) : AudioTraits::SoundClass() { diff --git a/panda/src/audio/audio_null_traits.cxx b/panda/src/audio/audio_null_traits.cxx index ffdd892436..fe3d368e08 100644 --- a/panda/src/audio/audio_null_traits.cxx +++ b/panda/src/audio/audio_null_traits.cxx @@ -1,6 +1,19 @@ // Filename: audio_null_traits.cxx // Created by: cary (25Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_null_traits.h" diff --git a/panda/src/audio/audio_null_traits.h b/panda/src/audio/audio_null_traits.h index 152678ba91..091f121441 100644 --- a/panda/src/audio/audio_null_traits.h +++ b/panda/src/audio/audio_null_traits.h @@ -1,6 +1,19 @@ // Filename: audio_null_traits.h // Created by: cary (25Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // yes, this needs to be outside the ifdef protection diff --git a/panda/src/audio/audio_pool.I b/panda/src/audio/audio_pool.I index ba00cf557e..dc68be8823 100644 --- a/panda/src/audio/audio_pool.I +++ b/panda/src/audio/audio_pool.I @@ -1,6 +1,19 @@ // Filename: audio_pool.I // Created by: cary (22Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/audio/audio_pool.cxx b/panda/src/audio/audio_pool.cxx index 7c198e3840..decabb17a7 100644 --- a/panda/src/audio/audio_pool.cxx +++ b/panda/src/audio/audio_pool.cxx @@ -1,6 +1,19 @@ // Filename: audio_pool.cxx // Created by: cary (22Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_pool.h" diff --git a/panda/src/audio/audio_pool.h b/panda/src/audio/audio_pool.h index f8d83dedd3..98b76b3b75 100644 --- a/panda/src/audio/audio_pool.h +++ b/panda/src/audio/audio_pool.h @@ -1,6 +1,19 @@ // Filename: audio_pool.h // Created by: cary (22Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_POOL_H__ diff --git a/panda/src/audio/audio_sound.I b/panda/src/audio/audio_sound.I index d5c6b6239e..1fe0b2c131 100644 --- a/panda/src/audio/audio_sound.I +++ b/panda/src/audio/audio_sound.I @@ -1,6 +1,19 @@ // Filename: audio_sound.I // Created by: cary (17Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/audio/audio_sound.cxx b/panda/src/audio/audio_sound.cxx index 561229874e..8d2a82d3cd 100644 --- a/panda/src/audio/audio_sound.cxx +++ b/panda/src/audio/audio_sound.cxx @@ -2,6 +2,19 @@ // Created by: cary (17Oct00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "audio_sound.h" #include "config_audio.h" diff --git a/panda/src/audio/audio_sound.h b/panda/src/audio/audio_sound.h index bddd2549ec..2939b40cf6 100644 --- a/panda/src/audio/audio_sound.h +++ b/panda/src/audio/audio_sound.h @@ -1,6 +1,19 @@ // Filename: audio_sound.h // Created by: cary (17Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_SOUND_H__ diff --git a/panda/src/audio/audio_trait.cxx b/panda/src/audio/audio_trait.cxx index 5b2ff7f449..c2c2ccbece 100644 --- a/panda/src/audio/audio_trait.cxx +++ b/panda/src/audio/audio_trait.cxx @@ -1,6 +1,19 @@ // Filename: audio_trait.cxx // Created by: cary (23Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_trait.h" diff --git a/panda/src/audio/audio_trait.h b/panda/src/audio/audio_trait.h index 66f8f8f944..675f148ca8 100644 --- a/panda/src/audio/audio_trait.h +++ b/panda/src/audio/audio_trait.h @@ -1,6 +1,19 @@ // Filename: audio_trait.h // Created by: frang (06Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_TRAIT_H__ diff --git a/panda/src/audio/audio_win_traits.I b/panda/src/audio/audio_win_traits.I index e95c4b12b3..73496f7496 100644 --- a/panda/src/audio/audio_win_traits.I +++ b/panda/src/audio/audio_win_traits.I @@ -1,6 +1,19 @@ // Filename: audio_win_traits.I // Created by: cary (27Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE WinSample::WinSample(void) : AudioTraits::SoundClass(), _data(NULL), diff --git a/panda/src/audio/audio_win_traits.cxx b/panda/src/audio/audio_win_traits.cxx index cb7c46608c..ef4aa40c59 100644 --- a/panda/src/audio/audio_win_traits.cxx +++ b/panda/src/audio/audio_win_traits.cxx @@ -1,6 +1,19 @@ // Filename: audio_win_traits.cxx // Created by: cary (27Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "audio_win_traits.h" diff --git a/panda/src/audio/audio_win_traits.h b/panda/src/audio/audio_win_traits.h index 74b82a0c22..03bbcae754 100644 --- a/panda/src/audio/audio_win_traits.h +++ b/panda/src/audio/audio_win_traits.h @@ -1,6 +1,19 @@ // Filename: audio_win_traits.h // Created by: cary (27Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // yes, this needs to be outside the ifdef protection diff --git a/panda/src/audio/config_audio.cxx b/panda/src/audio/config_audio.cxx index 5b4f55461f..2037ee418b 100644 --- a/panda/src/audio/config_audio.cxx +++ b/panda/src/audio/config_audio.cxx @@ -1,6 +1,19 @@ // Filename: config_audio.cxx // Created by: cary (22Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_audio.h" diff --git a/panda/src/audio/config_audio.h b/panda/src/audio/config_audio.h index afb47e3975..45bfdebe24 100644 --- a/panda/src/audio/config_audio.h +++ b/panda/src/audio/config_audio.h @@ -1,6 +1,19 @@ // Filename: config_audio.h // Created by: cary (22Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __CONFIG_AUDIO_H__ diff --git a/panda/src/audio/test_audio.cxx b/panda/src/audio/test_audio.cxx index 60836f5d24..73614bad20 100644 --- a/panda/src/audio/test_audio.cxx +++ b/panda/src/audio/test_audio.cxx @@ -1,6 +1,19 @@ // Filename: test_audio.cxx // Created by: cary (24Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/audiotraits/audio_load_midi.cxx b/panda/src/audiotraits/audio_load_midi.cxx index e639ebeea2..9a80ca2590 100644 --- a/panda/src/audiotraits/audio_load_midi.cxx +++ b/panda/src/audiotraits/audio_load_midi.cxx @@ -1,6 +1,19 @@ // Filename: audio_load_midi.cxx // Created by: cary (26Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/audiotraits/audio_load_mp3.cxx b/panda/src/audiotraits/audio_load_mp3.cxx index b620088815..a83fd0d7d8 100644 --- a/panda/src/audiotraits/audio_load_mp3.cxx +++ b/panda/src/audiotraits/audio_load_mp3.cxx @@ -1,6 +1,19 @@ // Filename: audio_load_mp3.cxx // Created by: cary (11Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/audiotraits/audio_load_st.cxx b/panda/src/audiotraits/audio_load_st.cxx index 27678cdd30..2b56db32c9 100644 --- a/panda/src/audiotraits/audio_load_st.cxx +++ b/panda/src/audiotraits/audio_load_st.cxx @@ -1,6 +1,19 @@ -// Filename: audio_load_st.C +// Filename: audio_load_st.cxx // Created by: cary (03Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/audiotraits/audio_load_wav.cxx b/panda/src/audiotraits/audio_load_wav.cxx index 77049dcca6..fd0d61b25b 100644 --- a/panda/src/audiotraits/audio_load_wav.cxx +++ b/panda/src/audiotraits/audio_load_wav.cxx @@ -1,6 +1,19 @@ // Filename: audio_load_wav.cxx // Created by: cary (23Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/builder/builder.I b/panda/src/builder/builder.I index cf3f4a1a61..207c18163a 100644 --- a/panda/src/builder/builder.I +++ b/panda/src/builder/builder.I @@ -1,9 +1,22 @@ // Filename: builder.I // Created by: drose (09Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// - + //////////////////////////////////////////////////////////////////// // Function: Builder::add_prim @@ -18,12 +31,12 @@ // instance, a polygon with two vertices). //////////////////////////////////////////////////////////////////// INLINE bool Builder:: -add_prim(const BuilderBucket &bucket, +add_prim(const BuilderBucket &bucket, const BuilderPrim &prim) { add_bucket(bucket); return ((BuilderBucketNode &)(*_bi)).add_prim(prim); } - + //////////////////////////////////////////////////////////////////// // Function: Builder::add_prim @@ -38,12 +51,12 @@ add_prim(const BuilderBucket &bucket, // instance, a polygon with two vertices). //////////////////////////////////////////////////////////////////// INLINE bool Builder:: -add_prim(const BuilderBucket &bucket, +add_prim(const BuilderBucket &bucket, const BuilderPrimI &prim) { add_bucket(bucket); return ((BuilderBucketNode &)(*_bi)).add_prim(prim); } - + //////////////////////////////////////////////////////////////////// // Function: Builder::add_prim_nonindexed @@ -62,7 +75,7 @@ add_prim(const BuilderBucket &bucket, // the user's selection. //////////////////////////////////////////////////////////////////// INLINE bool Builder:: -add_prim_nonindexed(const BuilderBucket &bucket, +add_prim_nonindexed(const BuilderBucket &bucket, const BuilderPrimI &prim) { add_bucket(bucket); return ((BuilderBucketNode &)(*_bi)).add_prim_nonindexed(prim); diff --git a/panda/src/builder/builder.cxx b/panda/src/builder/builder.cxx index 0ffaae958c..d0b2ddbd6f 100644 --- a/panda/src/builder/builder.cxx +++ b/panda/src/builder/builder.cxx @@ -1,6 +1,19 @@ // Filename: builder.cxx // Created by: drose (09Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builder.h" @@ -18,7 +31,7 @@ //////////////////////////////////////////////////////////////////// // Function: Builder::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Builder:: Builder() { @@ -28,7 +41,7 @@ Builder() { //////////////////////////////////////////////////////////////////// // Function: Builder::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Builder:: ~Builder() { @@ -58,9 +71,9 @@ Builder:: class NodeMap : public Namable { public: - NodeMap(NamedNode *node, const BuilderBucket *bucket) + NodeMap(NamedNode *node, const BuilderBucket *bucket) : _node(node), _bucket(bucket) { } - + bool operator < (const NodeMap &other) const { if (_node != other._node) { return _node < other._node; @@ -129,7 +142,7 @@ build(const string &default_name) { // Since the caller already created this GeomNode and passed it // in, we'll leave it up to the caller to name the node and set // up the state transitions leading into it. - + } else { // The node is not a GeomNode, so look it up in the map. GeomNodeMap::iterator f = geom_nodes.find(NodeMap(node, bucket)); @@ -179,7 +192,7 @@ build(const string &default_name) { } // Only reparent the geom_node if it has no parent already. - int num_parents = + int num_parents = geom_node->get_num_parents(RenderRelation::get_class_type()); if (num_parents == 0) { if (geom_node->get_num_geoms() == 0) { diff --git a/panda/src/builder/builder.h b/panda/src/builder/builder.h index 5c310b3412..80d27a0bc9 100644 --- a/panda/src/builder/builder.h +++ b/panda/src/builder/builder.h @@ -2,6 +2,19 @@ // Created by: drose (09Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDER_H #define BUILDER_H @@ -188,7 +201,7 @@ protected: void add_bucket(const BuilderBucket &bucket); typedef set > Buckets; - + Buckets _buckets; Buckets::iterator _bi; }; diff --git a/panda/src/builder/builderAttrib.I b/panda/src/builder/builderAttrib.I index 8c3668ee24..8f1bdd28dc 100644 --- a/panda/src/builder/builderAttrib.I +++ b/panda/src/builder/builderAttrib.I @@ -1,6 +1,19 @@ // Filename: builderAttrib.I // Created by: drose (22Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/builder/builderAttrib.cxx b/panda/src/builder/builderAttrib.cxx index c5b8768409..9fc34e4aee 100644 --- a/panda/src/builder/builderAttrib.cxx +++ b/panda/src/builder/builderAttrib.cxx @@ -1,6 +1,19 @@ // Filename: builderAttrib.cxx // Created by: drose (11May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderAttrib.h" diff --git a/panda/src/builder/builderAttrib.h b/panda/src/builder/builderAttrib.h index 372bd83d32..5713148c10 100644 --- a/panda/src/builder/builderAttrib.h +++ b/panda/src/builder/builderAttrib.h @@ -2,6 +2,19 @@ // Created by: drose (22Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERATTRIB_H #define BUILDERATTRIB_H diff --git a/panda/src/builder/builderAttribTempl.I b/panda/src/builder/builderAttribTempl.I index 7b6328bd3d..3f71a8d9ab 100644 --- a/panda/src/builder/builderAttribTempl.I +++ b/panda/src/builder/builderAttribTempl.I @@ -1,13 +1,26 @@ // Filename: builderAttribTempl.I // Created by: drose (17Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: BuilderAttribTempl::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderAttribTempl:: @@ -19,7 +32,7 @@ BuilderAttribTempl() { //////////////////////////////////////////////////////////////////// // Function: BuilderAttribTempl::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderAttribTempl:: @@ -31,7 +44,7 @@ BuilderAttribTempl(const BuilderAttribTempl ©) { //////////////////////////////////////////////////////////////////// // Function: BuilderAttribTempl::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderAttribTempl &BuilderAttribTempl:: @@ -286,7 +299,7 @@ output(ostream &out) const { if (has_normal()) { out << " normal " << get_normal(); } - + if (has_color()) { out << " color " << get_color(); } diff --git a/panda/src/builder/builderAttribTempl.h b/panda/src/builder/builderAttribTempl.h index cae0ccba62..130de5c2e8 100644 --- a/panda/src/builder/builderAttribTempl.h +++ b/panda/src/builder/builderAttribTempl.h @@ -2,6 +2,19 @@ // Created by: drose (17Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERATTRIBTEMPL_H #define BUILDERATTRIBTEMPL_H diff --git a/panda/src/builder/builderBucket.I b/panda/src/builder/builderBucket.I index d3128ec7b3..6b9e46cdff 100644 --- a/panda/src/builder/builderBucket.I +++ b/panda/src/builder/builderBucket.I @@ -1,6 +1,19 @@ // Filename: builderBucket.I // Created by: drose (09Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -20,7 +33,7 @@ set_coords(const PTA_Vertexf &coords) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::get_coords // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PTA_Vertexf BuilderBucket:: get_coords() const { @@ -44,7 +57,7 @@ set_normals(const PTA_Normalf &normals) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::get_normals // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PTA_Normalf BuilderBucket:: get_normals() const { @@ -68,7 +81,7 @@ set_texcoords(const PTA_TexCoordf &texcoords) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::get_texcoords // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PTA_TexCoordf BuilderBucket:: get_texcoords() const { @@ -92,7 +105,7 @@ set_colors(const PTA_Colorf &colors) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::get_colors // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PTA_Colorf BuilderBucket:: get_colors() const { diff --git a/panda/src/builder/builderBucket.cxx b/panda/src/builder/builderBucket.cxx index e7e4497455..210fe87e9c 100644 --- a/panda/src/builder/builderBucket.cxx +++ b/panda/src/builder/builderBucket.cxx @@ -1,6 +1,19 @@ // Filename: builderBucket.cxx // Created by: drose (10Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderAttrib.h" @@ -17,7 +30,7 @@ BuilderBucket *BuilderBucket::_default_bucket = NULL; //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BuilderBucket:: BuilderBucket() { @@ -29,7 +42,7 @@ BuilderBucket() { //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BuilderBucket:: BuilderBucket(const BuilderBucket ©) { @@ -41,7 +54,7 @@ BuilderBucket(const BuilderBucket ©) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BuilderBucket &BuilderBucket:: operator = (const BuilderBucket ©) { @@ -67,7 +80,7 @@ operator = (const BuilderBucket ©) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucket::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// BuilderBucket:: ~BuilderBucket() { @@ -140,16 +153,16 @@ operator < (const BuilderBucket &other) const { if (_node != other._node) return _node < other._node; - - if (_coords != other._coords) + + if (_coords != other._coords) return _coords < other._coords; - if (_normals != other._normals) + if (_normals != other._normals) return _normals < other._normals; if (_texcoords != other._texcoords) return _texcoords < other._texcoords; if (_colors != other._colors) return _colors < other._colors; - + if (_drawBin != other._drawBin) return _drawBin < other._drawBin; if (_drawOrder != other._drawOrder) @@ -197,11 +210,11 @@ output(ostream &out) const { if (_drawBin != -1) { out << "_drawBin = " << _drawBin << "\n"; } - + if (_drawOrder != 0) { out << "_drawOrder = " << _drawOrder << "\n"; } - + BuilderProperties::output(out); } diff --git a/panda/src/builder/builderBucket.h b/panda/src/builder/builderBucket.h index e929e7301d..f0bb9511a1 100644 --- a/panda/src/builder/builderBucket.h +++ b/panda/src/builder/builderBucket.h @@ -2,6 +2,19 @@ // Created by: drose (09Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERBUCKET_H #define BUILDERBUCKET_H diff --git a/panda/src/builder/builderBucketNode.I b/panda/src/builder/builderBucketNode.I index 087c927b96..2fb565fd5a 100644 --- a/panda/src/builder/builderBucketNode.I +++ b/panda/src/builder/builderBucketNode.I @@ -1,6 +1,19 @@ // Filename: builderBucketNode.I // Created by: drose (10Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: BuilderBucketNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderBucketNode:: BuilderBucketNode(BuilderBucket *bucket) : _bucket(bucket) { @@ -18,7 +31,7 @@ BuilderBucketNode(BuilderBucket *bucket) : _bucket(bucket) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucketNode::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderBucketNode:: BuilderBucketNode(const BuilderBucketNode ©) { @@ -29,7 +42,7 @@ BuilderBucketNode(const BuilderBucketNode ©) { //////////////////////////////////////////////////////////////////// // Function: BuilderBucketNode::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void BuilderBucketNode:: operator = (const BuilderBucketNode ©) { @@ -64,7 +77,7 @@ INLINE BuilderBucket *BuilderBucketNode:: get_bucket() const { return _bucket; } - + //////////////////////////////////////////////////////////////////// // Function: BuilderBucketNode::Ordering operator // Access: Public @@ -77,8 +90,8 @@ INLINE bool BuilderBucketNode:: operator < (const BuilderBucketNode &other) const { return (*_bucket) < (*other._bucket); } - - + + //////////////////////////////////////////////////////////////////// // Function: BuilderBucketNode::Equivalence operator // Access: Public @@ -87,14 +100,14 @@ operator < (const BuilderBucketNode &other) const { //////////////////////////////////////////////////////////////////// INLINE bool BuilderBucketNode:: operator == (const BuilderBucketNode &other) const { - return !((*_bucket) < (*other._bucket) || + return !((*_bucket) < (*other._bucket) || (*other._bucket) < (*_bucket)); } - + //////////////////////////////////////////////////////////////////// // Function: BuilderBucketNode::Nonequivalence operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool BuilderBucketNode:: operator != (const BuilderBucketNode &other) const { diff --git a/panda/src/builder/builderBucketNode.cxx b/panda/src/builder/builderBucketNode.cxx index 7a4d452d12..9ee93c10da 100644 --- a/panda/src/builder/builderBucketNode.cxx +++ b/panda/src/builder/builderBucketNode.cxx @@ -1,6 +1,19 @@ // Filename: builderBucketNode.cxx // Created by: drose (10Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderFuncs.h" @@ -51,12 +64,12 @@ build(GeomNode *geom_node) const { // First, the nonindexed. Prims::const_iterator pi, last_pi; last_pi = _prims.begin(); - + for (pi = _prims.begin(); pi != _prims.end(); ++pi) { if ((*last_pi) < (*pi)) { - count += mesh_and_build(last_pi, pi, *_bucket, geom_node, + count += mesh_and_build(last_pi, pi, *_bucket, geom_node, (BuilderPrim *)0); last_pi = pi; } @@ -69,7 +82,7 @@ build(GeomNode *geom_node) const { // Then, the indexed. IPrims::const_iterator pi, last_pi; last_pi = _iprims.begin(); - + for (pi = _iprims.begin(); pi != _iprims.end(); ++pi) { diff --git a/panda/src/builder/builderBucketNode.h b/panda/src/builder/builderBucketNode.h index b8cdfcdea6..ea0b4cf76f 100644 --- a/panda/src/builder/builderBucketNode.h +++ b/panda/src/builder/builderBucketNode.h @@ -2,6 +2,19 @@ // Created by: drose (10Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERBUCKETNODE_H #define BUILDERBUCKETNODE_H @@ -38,13 +51,13 @@ public: INLINE bool add_prim_nonindexed(const BuilderPrimI &prim); INLINE BuilderBucket *get_bucket() const; - + INLINE bool operator < (const BuilderBucketNode &other) const; INLINE bool operator == (const BuilderBucketNode &other) const; INLINE bool operator != (const BuilderBucketNode &other) const; int build(GeomNode *geom_node) const; - + protected: typedef multiset > Prims; typedef multiset > IPrims; diff --git a/panda/src/builder/builderFuncs.I b/panda/src/builder/builderFuncs.I index 1d0d4f2363..7c7e1a5b3a 100644 --- a/panda/src/builder/builderFuncs.I +++ b/panda/src/builder/builderFuncs.I @@ -1,6 +1,19 @@ -// Filename: builderFuncs.cxx +// Filename: builderFuncs.I // Created by: drose (09Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderPrim.h" @@ -28,7 +41,7 @@ struct DecompVtx { //////////////////////////////////////////////////////////////////// template static bool -decomp_concave(const PrimType &prim, BuilderBucket &bucket, +decomp_concave(const PrimType &prim, BuilderBucket &bucket, OutputIterator result, int asum, int x, int y) { #define VX(p, c) p->coord[c] @@ -43,7 +56,7 @@ decomp_concave(const PrimType &prim, BuilderBucket &bucket, int num_verts = prim.get_num_verts(); nassertr(num_verts >= 3, false); - + /* Make linked list of verts */ vert = (DecompVtx *) alloca(sizeof(DecompVtx)); vert->index = 0; @@ -73,9 +86,9 @@ decomp_concave(const PrimType &prim, BuilderBucket &bucket, while (p0 != p2->next) { /* Polygon is self-intersecting so punt */ - if (chek && - m[0] == p0 && - m[1] == p1 && + if (chek && + m[0] == p0 && + m[1] == p1 && m[2] == p2) { // builder_cat.info() << "Could not decompose concave polygon!"; @@ -88,9 +101,9 @@ decomp_concave(const PrimType &prim, BuilderBucket &bucket, b[0] = VX(p2, x) - VX(p1, x); a[2] = VX(p0, y) - VX(p1, y); b[2] = VX(p1, x) - VX(p0, x); - + csum = ((b[0] * a[2] - b[2] * a[0] >= 0.0) ? 1 : 0); - + if (csum ^ asum) { /* current angle is concave */ p0 = p1; @@ -102,19 +115,19 @@ decomp_concave(const PrimType &prim, BuilderBucket &bucket, xmin = (VX(p0, x) < VX(p1, x)) ? VX(p0, x) : VX(p1, x); if (xmin > VX(p2, x)) xmin = VX(p2, x); - + xmax = (VX(p0, x) > VX(p1, x)) ? VX(p0, x) : VX(p1, x); if (xmax < VX(p2, x)) xmax = VX(p2, x); - + ymin = (VX(p0, y) < VX(p1, y)) ? VX(p0, y) : VX(p1, y); if (ymin > VX(p2, y)) ymin = VX(p2, y); - + ymax = (VX(p0, y) > VX(p1, y)) ? VX(p0, y) : VX(p1, y); if (ymax < VX(p2, y)) ymax = VX(p2, y); - + for (init = 1, t0 = p2->next; t0 != p0; t0 = t0->next) { if (VX(t0, x) >= xmin && VX(t0, x) <= xmax && VX(t0, y) >= ymin && VX(t0, y) <= ymax) { @@ -140,7 +153,7 @@ decomp_concave(const PrimType &prim, BuilderBucket &bucket, } } } - + if (t0 != p0) { p0 = p1; p1 = p2; @@ -186,12 +199,12 @@ decomp_concave(const PrimType &prim, BuilderBucket &bucket, //////////////////////////////////////////////////////////////////// template static bool -triangulate_poly(const PrimType &prim, BuilderBucket &bucket, +triangulate_poly(const PrimType &prim, BuilderBucket &bucket, OutputIterator result) { BuilderV p0, p1, as; float dx1, dy1, dx2, dy2, max; int i, flag, asum, csum, index, x, y, v0, v1, v, even; - + // First see if the polygon is just a triangle int num_verts = prim.get_num_verts(); if (num_verts == 3) { @@ -245,12 +258,12 @@ triangulate_poly(const PrimType &prim, BuilderBucket &bucket, x = 0; y = 1; break; - + case 1: x = 0; y = 2; break; - + case 2: x = 1; y = 2; @@ -258,7 +271,7 @@ triangulate_poly(const PrimType &prim, BuilderBucket &bucket, } /* concave check */ - p0 = prim.get_vertex(0).get_coord_value(bucket); + p0 = prim.get_vertex(0).get_coord_value(bucket); p1 = prim.get_vertex(1).get_coord_value(bucket); dx1 = p1[x] - p0[x]; dy1 = p1[y] - p0[y]; @@ -287,10 +300,10 @@ triangulate_poly(const PrimType &prim, BuilderBucket &bucket, v0 = 0; v1 = 1; v = num_verts - 1; - + even = 1; - - /* + + /* * Convert to triangles only. Do not fan out from a single vertex * but zigzag into triangle strip. */ @@ -318,10 +331,10 @@ triangulate_poly(const PrimType &prim, BuilderBucket &bucket, v1 = v; v = v0 - 1; } - + even = !even; } - + return true; } @@ -334,7 +347,7 @@ triangulate_poly(const PrimType &prim, BuilderBucket &bucket, //////////////////////////////////////////////////////////////////// template static bool -expand_polys(PrimType &prim, BuilderBucket &, +expand_polys(PrimType &prim, BuilderBucket &, OutputIterator result) { switch (prim.get_num_verts()) { case 0: @@ -353,7 +366,7 @@ expand_polys(PrimType &prim, BuilderBucket &, default: prim.set_type(BPT_poly); } - + *result++ = prim; return true; } @@ -366,7 +379,7 @@ expand_polys(PrimType &prim, BuilderBucket &, //////////////////////////////////////////////////////////////////// template static bool -expand_points(const PrimType &prim, BuilderBucket &, +expand_points(const PrimType &prim, BuilderBucket &, OutputIterator result) { // Each vertex goes in its own primitive. @@ -388,7 +401,7 @@ expand_points(const PrimType &prim, BuilderBucket &, //////////////////////////////////////////////////////////////////// template static bool -expand_lines(const PrimType &prim, BuilderBucket &, +expand_lines(const PrimType &prim, BuilderBucket &, OutputIterator result) { // Each line segment goes in its own primitive. This breaks up the // linestrips already defined; we'll re-strip them later if the @@ -606,12 +619,12 @@ build_geoms(InputIterator first, InputIterator last, geom = new GeomPolygon; want_lengths = true; break; - + case BPT_tristrip: geom = new GeomTristrip; want_lengths = true; break; - + case BPT_trifan: geom = new GeomTrifan; want_lengths = true; @@ -650,12 +663,12 @@ build_geoms(InputIterator first, InputIterator last, num_prims++; } } - + if (num_prims==0) { builder_cat.error() << "All primitives were invalid!\n"; return 0; } - + if (want_lengths) { lengths = PTA_int(num_prims); j = 0; @@ -706,7 +719,7 @@ build_geoms(InputIterator first, InputIterator last, colors.push_back((*i).get_component(c).get_color()); } } - + if (bind_normals == G_PER_PRIM) { normals.push_back((*i).get_normal()); } @@ -726,11 +739,11 @@ build_geoms(InputIterator first, InputIterator last, // Now add all the stuff to our Geom. geom->set_num_prims(num_prims); - + if (lengths != (int *)NULL) { geom->set_lengths(lengths); } - + PrimType::fill_geom(geom, coords, bind_normals, normals, bind_texcoords, texcoords, @@ -756,7 +769,7 @@ build_geoms(InputIterator first, InputIterator last, if (new_geom != (Geom *)NULL) { geom_node->add_geom(new_geom); } - + return 1; } diff --git a/panda/src/builder/builderFuncs.h b/panda/src/builder/builderFuncs.h index 5981a68070..44396c3046 100644 --- a/panda/src/builder/builderFuncs.h +++ b/panda/src/builder/builderFuncs.h @@ -2,6 +2,19 @@ // Created by: drose (09Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERFUNCS_H #define BUILDERFUNCS_H diff --git a/panda/src/builder/builderMisc.cxx b/panda/src/builder/builderMisc.cxx index 8f9d9d0675..395ef1b4f4 100644 --- a/panda/src/builder/builderMisc.cxx +++ b/panda/src/builder/builderMisc.cxx @@ -1,6 +1,19 @@ // Filename: builderMisc.cxx // Created by: drose (18Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderMisc.h" @@ -27,10 +40,10 @@ make_random_color(Colorf &color) { } while (len < .1 || len > 1.5); #ifdef WIN32_VC - color.set(rgb[0], rgb[1], rgb[2], + color.set(rgb[0], rgb[1], rgb[2], 0.25 + 0.75 * (double)rand() / (double)RAND_MAX); #else - color.set(rgb[0], rgb[1], rgb[2], + color.set(rgb[0], rgb[1], rgb[2], 0.25 + 0.75 * (double)random() / (double)RAND_MAX); #endif } diff --git a/panda/src/builder/builderMisc.h b/panda/src/builder/builderMisc.h index 5cb31aeff6..4486bd2db1 100644 --- a/panda/src/builder/builderMisc.h +++ b/panda/src/builder/builderMisc.h @@ -2,6 +2,19 @@ // Created by: drose (18Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERMISC_H #define BUILDERMISC_H diff --git a/panda/src/builder/builderNormalVisualizer.I b/panda/src/builder/builderNormalVisualizer.I index d1434f14dd..976319fce4 100644 --- a/panda/src/builder/builderNormalVisualizer.I +++ b/panda/src/builder/builderNormalVisualizer.I @@ -1,6 +1,19 @@ // Filename: builderNormalVisualizer.I // Created by: drose (08Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE BuilderNormalVisualizer:: diff --git a/panda/src/builder/builderNormalVisualizer.cxx b/panda/src/builder/builderNormalVisualizer.cxx index 897dca9b5e..d4f05fd9e4 100644 --- a/panda/src/builder/builderNormalVisualizer.cxx +++ b/panda/src/builder/builderNormalVisualizer.cxx @@ -1,6 +1,19 @@ // Filename: builderNormalVisualizer.cxx // Created by: drose (08Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderNormalVisualizer.h" @@ -51,13 +64,13 @@ show_normals(GeomNode *node) { void BuilderNormalVisualizer:: add_normal(const BuilderV ¢er, const BuilderN &normal) { BuilderV to = center + normal * _bucket._normal_scale; - + BuilderPrim line; line.set_type(BPT_line); line.set_color(_bucket._normal_color); line.add_vertex(BuilderVertex(center)); line.add_vertex(BuilderVertex(to)); - + _lines.push_back(line); } diff --git a/panda/src/builder/builderNormalVisualizer.h b/panda/src/builder/builderNormalVisualizer.h index d5d40ce543..65b8c63de1 100644 --- a/panda/src/builder/builderNormalVisualizer.h +++ b/panda/src/builder/builderNormalVisualizer.h @@ -2,6 +2,19 @@ // Created by: drose (08Sep99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERNORMALVISUALIZER_H #define BUILDERNORMALVISUALIZER_H diff --git a/panda/src/builder/builderPrim.I b/panda/src/builder/builderPrim.I index 7410bfcfcd..291e63cb21 100644 --- a/panda/src/builder/builderPrim.I +++ b/panda/src/builder/builderPrim.I @@ -1,13 +1,26 @@ // Filename: builderPrim.I // Created by: drose (11Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: BuilderPrim::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderPrim:: BuilderPrim() { @@ -16,7 +29,7 @@ BuilderPrim() { //////////////////////////////////////////////////////////////////// // Function: BuilderPrim::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderPrim:: BuilderPrim(const BuilderPrim ©) : @@ -26,18 +39,18 @@ BuilderPrim(const BuilderPrim ©) : //////////////////////////////////////////////////////////////////// // Function: BuilderPrim::Copy Assignment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderPrim &BuilderPrim:: operator = (const BuilderPrim ©) { - BuilderPrimTempl::operator = (copy); + BuilderPrimTempl::operator = (copy); return *this; } //////////////////////////////////////////////////////////////////// // Function: BuilderPrimI::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderPrimI:: BuilderPrimI() { @@ -46,7 +59,7 @@ BuilderPrimI() { //////////////////////////////////////////////////////////////////// // Function: BuilderPrimI::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderPrimI:: BuilderPrimI(const BuilderPrimI ©) : @@ -56,10 +69,10 @@ BuilderPrimI(const BuilderPrimI ©) : //////////////////////////////////////////////////////////////////// // Function: BuilderPrimI::Copy Assignment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BuilderPrimI &BuilderPrimI:: operator = (const BuilderPrimI ©) { - BuilderPrimTempl::operator = (copy); + BuilderPrimTempl::operator = (copy); return *this; } diff --git a/panda/src/builder/builderPrim.cxx b/panda/src/builder/builderPrim.cxx index 83885d76c4..faad6662aa 100644 --- a/panda/src/builder/builderPrim.cxx +++ b/panda/src/builder/builderPrim.cxx @@ -1,6 +1,19 @@ // Filename: builderPrim.cxx // Created by: drose (10Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderPrim.h" @@ -21,7 +34,7 @@ // coordinates in the given bucket. //////////////////////////////////////////////////////////////////// BuilderPrim &BuilderPrim:: -nonindexed_copy(const BuilderPrimTempl ©, +nonindexed_copy(const BuilderPrimTempl ©, const BuilderBucket &bucket) { clear(); @@ -191,8 +204,8 @@ fill_geom(Geom *geom, const PTA_ushort &v_array, c_data = NULL; c_array = NULL; } - - int n_len = + + int n_len = (n_attr==G_PER_VERTEX) ? num_verts : (n_attr==G_PER_COMPONENT) ? num_components : (n_attr==G_PER_PRIM) ? num_prims : @@ -202,12 +215,12 @@ fill_geom(Geom *geom, const PTA_ushort &v_array, (t_attr==G_PER_COMPONENT) ? num_components : (t_attr==G_PER_PRIM) ? num_prims : (t_attr==G_OVERALL) ? 1 : 0; - int c_len = + int c_len = (c_attr==G_PER_VERTEX) ? num_verts : (c_attr==G_PER_COMPONENT) ? num_components : (c_attr==G_PER_PRIM) ? num_prims : (c_attr==G_OVERALL) ? 1 : 0; - + // See if we can share some of the index lists. if (n_attr != G_OFF && memcmp(v_array, n_array, sizeof(ushort) * n_len)==0) { diff --git a/panda/src/builder/builderPrim.h b/panda/src/builder/builderPrim.h index 9d86fc39c5..c425ff7659 100644 --- a/panda/src/builder/builderPrim.h +++ b/panda/src/builder/builderPrim.h @@ -2,6 +2,19 @@ // Created by: drose (09Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERPRIM_H #define BUILDERPRIM_H @@ -76,7 +89,7 @@ public: INLINE BuilderPrim(); INLINE BuilderPrim(const BuilderPrim ©); INLINE BuilderPrim &operator = (const BuilderPrim ©); - + BuilderPrim &nonindexed_copy(const BuilderPrimTempl ©, const BuilderBucket &bucket); diff --git a/panda/src/builder/builderPrimTempl.I b/panda/src/builder/builderPrimTempl.I index 9188b214b5..e7cdd2394f 100644 --- a/panda/src/builder/builderPrimTempl.I +++ b/panda/src/builder/builderPrimTempl.I @@ -1,6 +1,19 @@ // Filename: builderPrimTempl.I // Created by: drose (11Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: BuilderPrimTempl::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderPrimTempl:: @@ -22,7 +35,7 @@ BuilderPrimTempl() { //////////////////////////////////////////////////////////////////// // Function: BuilderPrimTempl::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderPrimTempl:: @@ -34,7 +47,7 @@ BuilderPrimTempl(const BuilderPrimTempl ©) { //////////////////////////////////////////////////////////////////// // Function: BuilderPrimTempl::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderPrimTempl &BuilderPrimTempl:: @@ -576,7 +589,7 @@ get_vertex(int n) const { return _verts[n]; } - + //////////////////////////////////////////////////////////////////// // Function: BuilderPrimTempl::add_component // Access: Public @@ -771,7 +784,7 @@ is_valid() const { switch (get_type()) { case BPT_poly: return num_verts >= 3; - + case BPT_point: return num_verts >= 1; @@ -784,7 +797,7 @@ is_valid() const { case BPT_tristrip: case BPT_trifan: return num_verts >= 3; - + case BPT_quad: return num_verts == 4; @@ -838,7 +851,7 @@ void BuilderPrimTempl:: update_overall_attrib() { int num_verts = get_num_verts(); int num_components = get_num_components(); - + NType common_normal; CType common_color; float common_pixel_size; @@ -870,7 +883,7 @@ update_overall_attrib() { for (i = 1; i < num_verts; i++) { Vertex &vertex = get_vertex(i); - has_vertex_normal = + has_vertex_normal = (has_vertex_normal && vertex.has_normal()); if (!vertex.has_normal() || !(vertex.get_normal() == common_normal)) { @@ -885,7 +898,7 @@ update_overall_attrib() { for (i = 1; i < num_verts; i++) { Vertex &vertex = get_vertex(i); - has_vertex_color = + has_vertex_color = (has_vertex_color && vertex.has_color()); if (!vertex.has_color() || !(vertex.get_color() == common_color)) { @@ -900,9 +913,9 @@ update_overall_attrib() { for (i = 1; i < num_verts; i++) { Vertex &vertex = get_vertex(i); - has_vertex_pixel_size = + has_vertex_pixel_size = (has_vertex_pixel_size && vertex.has_pixel_size()); - if (!vertex.has_pixel_size() || + if (!vertex.has_pixel_size() || !(vertex.get_pixel_size() == common_pixel_size)) { has_common_pixel_size = false; } @@ -918,7 +931,7 @@ update_overall_attrib() { for (i = 1; i < num_components; i++) { DAttrib &component = get_component(i); - has_component_normal = + has_component_normal = (has_component_normal && component.has_normal()); if (!component.has_normal() || !(component.get_normal() == common_normal)) { @@ -933,7 +946,7 @@ update_overall_attrib() { for (i = 1; i < num_components; i++) { DAttrib &component = get_component(i); - has_component_color = + has_component_color = (has_component_color && component.has_color()); if (!component.has_color() || !(component.get_color() == common_color)) { @@ -948,7 +961,7 @@ update_overall_attrib() { for (i = 1; i < num_components; i++) { DAttrib &component = get_component(i); - has_component_pixel_size = + has_component_pixel_size = (has_component_pixel_size && component.has_pixel_size()); if (!component.has_pixel_size() || !(component.get_pixel_size() == common_pixel_size)) { @@ -959,7 +972,7 @@ update_overall_attrib() { } _overall = BAF_overall_updated; - + if (has_common_normal) { // The primitive has one overall normal, or each of the vertices // has the same normal. @@ -978,8 +991,8 @@ update_overall_attrib() { // Well, none of the above, but the prim itself has a normal. _overall |= BAF_overall_normal; } - - + + if (has_common_color) { // The primitive has one overall color, or each of the vertices // has the same color. @@ -1003,7 +1016,7 @@ update_overall_attrib() { // Each vertex has a texture coordinate. _overall |= BAF_vertex_texcoord; } - + if (has_common_pixel_size) { // The primitive has one overall pixel size, or each of the vertices // has the same pixel size. diff --git a/panda/src/builder/builderPrimTempl.h b/panda/src/builder/builderPrimTempl.h index b7c039a550..d4dea4bde7 100644 --- a/panda/src/builder/builderPrimTempl.h +++ b/panda/src/builder/builderPrimTempl.h @@ -2,6 +2,19 @@ // Created by: drose (11Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERPRIMTEMPL_H #define BUILDERPRIMTEMPL_H diff --git a/panda/src/builder/builderProperties.cxx b/panda/src/builder/builderProperties.cxx index a1d5639eb2..d17c58189e 100644 --- a/panda/src/builder/builderProperties.cxx +++ b/panda/src/builder/builderProperties.cxx @@ -1,6 +1,19 @@ // Filename: builderProperties.cxx // Created by: drose (17Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderProperties.h" @@ -76,7 +89,7 @@ output(ostream &out) const { out << "Subdivide polygons into tris.\n"; } if (_consider_fans) { - out << "Look for possible triangle fans with max per-triangle angle of " + out << "Look for possible triangle fans with max per-triangle angle of " << _max_tfan_angle << " degrees.\n"; if (_min_tfan_tris==0) { out << "Do not create tfans"; @@ -90,7 +103,7 @@ output(ostream &out) const { } } } - + //////////////////////////////////////////////////////////////////// diff --git a/panda/src/builder/builderProperties.h b/panda/src/builder/builderProperties.h index 0e7d7f6fbc..353844a165 100644 --- a/panda/src/builder/builderProperties.h +++ b/panda/src/builder/builderProperties.h @@ -2,6 +2,19 @@ // Created by: drose (17Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERPROPERTIES_H #define BUILDERPROPERTIES_H diff --git a/panda/src/builder/builderTypes.cxx b/panda/src/builder/builderTypes.cxx index d732bf9d58..fcbe3fc456 100644 --- a/panda/src/builder/builderTypes.cxx +++ b/panda/src/builder/builderTypes.cxx @@ -1,6 +1,19 @@ // Filename: builderTypes.cxx // Created by: drose (11Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderTypes.h" diff --git a/panda/src/builder/builderTypes.h b/panda/src/builder/builderTypes.h index cebc644778..715a246e63 100644 --- a/panda/src/builder/builderTypes.h +++ b/panda/src/builder/builderTypes.h @@ -2,6 +2,19 @@ // Created by: drose (11Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERTYPES_H #define BUILDERTYPES_H diff --git a/panda/src/builder/builderVertex.I b/panda/src/builder/builderVertex.I index 155a72ef74..110b3b9d92 100644 --- a/panda/src/builder/builderVertex.I +++ b/panda/src/builder/builderVertex.I @@ -1,6 +1,19 @@ // Filename: builderVertex.I // Created by: drose (18Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/builder/builderVertex.cxx b/panda/src/builder/builderVertex.cxx index 502fb5e768..e79a03f16a 100644 --- a/panda/src/builder/builderVertex.cxx +++ b/panda/src/builder/builderVertex.cxx @@ -1,6 +1,19 @@ // Filename: builderVertex.cxx // Created by: drose (11May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderAttrib.h" diff --git a/panda/src/builder/builderVertex.h b/panda/src/builder/builderVertex.h index 8912d5958c..16c12c946a 100644 --- a/panda/src/builder/builderVertex.h +++ b/panda/src/builder/builderVertex.h @@ -2,6 +2,19 @@ // Created by: drose (18Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERVERTEX_H #define BUILDERVERTEX_H diff --git a/panda/src/builder/builderVertexTempl.I b/panda/src/builder/builderVertexTempl.I index a12c97c3ca..4e49ee88a1 100644 --- a/panda/src/builder/builderVertexTempl.I +++ b/panda/src/builder/builderVertexTempl.I @@ -1,6 +1,19 @@ // Filename: builderVertexTempl.I // Created by: drose (11Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: BuilderVertexTempl::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderVertexTempl:: @@ -30,7 +43,7 @@ BuilderVertexTempl(const VType &c) { //////////////////////////////////////////////////////////////////// // Function: BuilderVertexTempl::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderVertexTempl:: @@ -41,7 +54,7 @@ BuilderVertexTempl(const BuilderVertexTempl ©) { //////////////////////////////////////////////////////////////////// // Function: BuilderVertexTempl::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BuilderVertexTempl &BuilderVertexTempl:: @@ -64,7 +77,7 @@ operator = (const BuilderVertexTempl ©) { template INLINE bool BuilderVertexTempl:: is_valid() const { - return has_coord(); + return has_coord(); } @@ -336,15 +349,15 @@ output(ostream &out) const { if (has_normal()) { out << " normal " << get_normal(); } - + if (has_texcoord()) { out << " texcoord " << get_texcoord(); } - + if (has_color()) { out << " color " << get_color(); } - + if (has_pixel_size()) { out << " pixel_size " << get_pixel_size(); } diff --git a/panda/src/builder/builderVertexTempl.h b/panda/src/builder/builderVertexTempl.h index 1224e4d9c2..da3534dd99 100644 --- a/panda/src/builder/builderVertexTempl.h +++ b/panda/src/builder/builderVertexTempl.h @@ -2,6 +2,19 @@ // Created by: drose (09Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUILDERVERTEXTEMPL_H #define BUILDERVERTEXTEMPL_H diff --git a/panda/src/builder/config_builder.cxx b/panda/src/builder/config_builder.cxx index 44d615c061..4dd87f3cdc 100644 --- a/panda/src/builder/config_builder.cxx +++ b/panda/src/builder/config_builder.cxx @@ -1,6 +1,19 @@ // Filename: config_builder.cxx // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_builder.h" diff --git a/panda/src/builder/config_builder.h b/panda/src/builder/config_builder.h index 76fed3f2a0..7e0aa48097 100644 --- a/panda/src/builder/config_builder.h +++ b/panda/src/builder/config_builder.h @@ -1,6 +1,19 @@ // Filename: config_builder.h // Created by: drose (29Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_BUILDER_H diff --git a/panda/src/builder/mesher.cxx b/panda/src/builder/mesher.cxx index dff48b2edc..c6dce7d821 100644 --- a/panda/src/builder/mesher.cxx +++ b/panda/src/builder/mesher.cxx @@ -1,6 +1,19 @@ // Filename: mesher.cxx // Created by: drose (11May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "mesher.h" diff --git a/panda/src/builder/mesher.h b/panda/src/builder/mesher.h index 441b7f0397..32a7155b36 100644 --- a/panda/src/builder/mesher.h +++ b/panda/src/builder/mesher.h @@ -2,6 +2,19 @@ // Created by: drose (17Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MESHER_H #define MESHER_H diff --git a/panda/src/builder/mesherConfig.h b/panda/src/builder/mesherConfig.h index 7111366019..25b63e54f2 100644 --- a/panda/src/builder/mesherConfig.h +++ b/panda/src/builder/mesherConfig.h @@ -1,6 +1,19 @@ // Filename: mesherConfig.h // Created by: drose (27Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MESHERCONFIG_H #define MESHERCONFIG_H diff --git a/panda/src/builder/mesherEdge.I b/panda/src/builder/mesherEdge.I index 739c1d98c3..f27a7ed4bd 100644 --- a/panda/src/builder/mesherEdge.I +++ b/panda/src/builder/mesherEdge.I @@ -1,6 +1,19 @@ // Filename: mesherEdge.I // Created by: drose (15Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -13,68 +26,68 @@ MesherEdge(const Vertex *a, const Vertex *b) : _a(a), _b(b) { template INLINE MesherEdge:: -MesherEdge(const MesherEdge ©) : +MesherEdge(const MesherEdge ©) : _a(copy._a), _b(copy._b), _strips(copy._strips), _opposite(copy._opposite) { } - + template INLINE bool MesherEdge:: contains_vertex(const Vertex *v) const { return (_a==v || _b==v); } - + template INLINE bool MesherEdge:: matches(const MesherEdge &other) const { return (_a == other._a && _b == other._b) || (_b == other._a && _a == other._b); } - + template INLINE MesherEdge *MesherEdge:: common_ptr() { return min(this, _opposite); } - + template INLINE bool MesherEdge:: operator == (const MesherEdge &other) const { return _a == other._a && _b == other._b; } - + template INLINE bool MesherEdge:: operator != (const MesherEdge &other) const { return !operator == (other); } - + template INLINE bool MesherEdge:: operator < (const MesherEdge &other) const { return _a < other._a || (_a == other._a && _b < other._b); } - + template INLINE float MesherEdge:: compute_length(const BuilderBucket &bucket) const { - LVector3f v = ((const Vertexf &)_a->get_coord_value(bucket) - + LVector3f v = ((const Vertexf &)_a->get_coord_value(bucket) - (const Vertexf &)_b->get_coord_value(bucket)); return length(v); } - + template INLINE Vertexf MesherEdge:: compute_box(const BuilderBucket &bucket) const { - LVector3f v = ((const Vertexf &)_a->get_coord_value(bucket) - + LVector3f v = ((const Vertexf &)_a->get_coord_value(bucket) - (const Vertexf &)_b->get_coord_value(bucket)); return Vertexf(fabs(v[0]), fabs(v[1]), fabs(v[2])); } - + //////////////////////////////////////////////////////////////////// // Function: MesherEdge::remove @@ -91,7 +104,7 @@ remove(Strip *strip) { _opposite->_strips.remove(strip); } - + //////////////////////////////////////////////////////////////////// // Function: MesherEdge::change_strip @@ -109,7 +122,7 @@ change_strip(Strip *from, Strip *to) { } } - for (si = _opposite->_strips.begin(); + for (si = _opposite->_strips.begin(); si != _opposite->_strips.end(); ++si) { if (*si == from) { @@ -137,9 +150,9 @@ output(ostream &out) const { if (_opposite!=NULL) { out << " opposite " << _opposite->_strips.size() << " strips:"; - - for (si = _opposite->_strips.begin(); - si != _opposite->_strips.end(); + + for (si = _opposite->_strips.begin(); + si != _opposite->_strips.end(); ++si) { out << " " << (*si)->_index; } diff --git a/panda/src/builder/mesherEdge.h b/panda/src/builder/mesherEdge.h index 6a6719e174..ee3afc3b3d 100644 --- a/panda/src/builder/mesherEdge.h +++ b/panda/src/builder/mesherEdge.h @@ -2,6 +2,19 @@ // Created by: drose (15Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MESHEREDGE_H #define MESHEREDGE_H diff --git a/panda/src/builder/mesherFanMaker.I b/panda/src/builder/mesherFanMaker.I index 7f84f06799..87918ff2ed 100644 --- a/panda/src/builder/mesherFanMaker.I +++ b/panda/src/builder/mesherFanMaker.I @@ -1,6 +1,19 @@ // Filename: mesherFanMaker.I // Created by: drose (21Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -125,7 +138,7 @@ compute_angle() const { for (ei = _edges.begin(); ei != _edges.end(); ++ei) { Normalf v1 = (*ei)->_a->get_coord_value(*_bucket) - v0; Normalf v2 = (*ei)->_b->get_coord_value(*_bucket) - v0; - + v1 = normalize(v1); v2 = normalize(v2); angle += acos(dot(v1, v2)); @@ -168,7 +181,7 @@ build() { Strips::iterator si, last_si; Edges::iterator ei, last_ei; - + // First, rotate the fan so it begins at a seam. We do this so we // won't be left out with part of one piece at the beginning and // also at the end. @@ -215,13 +228,13 @@ build() { Strip new_fan; new_fan._type = BPT_trifan; new_fan._verts.push_back(_vertex); - + new_fan._verts.push_back(_edges.front()->_a); Edges::iterator ei; for (ei = _edges.begin(); ei != _edges.end(); ++ei) { new_fan._verts.push_back((*ei)->_b); } - + Strips::iterator si; for (si = _strips.begin(); si != _strips.end(); ++si) { new_fan._prims.splice(new_fan._prims.end(), (*si)->_prims); @@ -229,7 +242,7 @@ build() { (*si)->_verts.clear(); (*si)->_status = MS_dead; } - + // If we'd built our list of edges and strips right, this sum should // come out so that there are two more vertices than triangles in // the new fan. @@ -251,7 +264,7 @@ unroll(Strips::iterator strip_begin, Strips::iterator strip_end, Edges::iterator edge_begin, Edges::iterator edge_end) { Edges::iterator ei; Strips::iterator si; - + int num_tris = 0; for (ei = edge_begin; ei != edge_end; ++ei) { num_tris++; @@ -263,7 +276,7 @@ unroll(Strips::iterator strip_begin, Strips::iterator strip_end, } Prim poly; - + // Now we build an n-sided polygon. We'll decompose it into tris // in a second. poly.set_type(BPT_poly); @@ -278,11 +291,11 @@ unroll(Strips::iterator strip_begin, Strips::iterator strip_end, poly.add_vertex(*_vertex); poly.add_vertex(*(*edge_begin)->_a); } - + for (ei = edge_begin; ei != edge_end; ++ei) { poly.add_vertex(*(*ei)->_b); } - + int result = true; if (_bucket->_show_quads) { @@ -297,7 +310,7 @@ unroll(Strips::iterator strip_begin, Strips::iterator strip_end, if (result) { // Now add each triangle back into the mesher. vector::iterator ti; - + for (ti = tris.begin(); ti != tris.end(); ++ti) { _mesher->add_prim(*ti); } @@ -331,7 +344,7 @@ output(ostream &out) const { out << " " << *_edges.back()->_b; } out << " ]"; - + if (_planar) { out << " (planar)"; } diff --git a/panda/src/builder/mesherFanMaker.h b/panda/src/builder/mesherFanMaker.h index d556e670cd..ec6bd35149 100644 --- a/panda/src/builder/mesherFanMaker.h +++ b/panda/src/builder/mesherFanMaker.h @@ -2,6 +2,19 @@ // Created by: drose (21Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MESHERFANMAKER_H #define MESHERFANMAKER_H @@ -55,7 +68,7 @@ public: Edges::iterator edge_begin, Edges::iterator edge_end); ostream &output(ostream &out) const; - + const Vertex *_vertex; Edges _edges; diff --git a/panda/src/builder/mesherStrip.I b/panda/src/builder/mesherStrip.I index a90e521f1e..09701e59ca 100644 --- a/panda/src/builder/mesherStrip.I +++ b/panda/src/builder/mesherStrip.I @@ -1,13 +1,26 @@ // Filename: mesherStrip.I // Created by: drose (16Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_builder.h" template INLINE MesherStrip:: -MesherStrip(const MesherStrip ©) : +MesherStrip(const MesherStrip ©) : _prims(copy._prims), _edges(copy._edges), _verts(copy._verts), @@ -152,7 +165,7 @@ operator == (const MesherStrip &other) const { //////////////////////////////////////////////////////////////////// // Function: MesherStrip::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool MesherStrip:: @@ -163,7 +176,7 @@ operator != (const MesherStrip &other) const { //////////////////////////////////////////////////////////////////// // Function: MesherStrip::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template MesherStrip:: @@ -174,7 +187,7 @@ MesherStrip(const PrimType &prim, int index, const BuilderBucket &bucket) { _origin = MO_unknown; prim.has_overall_normal(); // Force the prim to update its overall flags. _type = prim.get_type(); - + // We save only the prim's overall properties in the _prims // array. The vertices get re-added later by Mesher::add_prim(). _prims.push_back(prim); @@ -212,7 +225,7 @@ MesherStrip(const PrimType &prim, int index, const BuilderBucket &bucket) { _planar = true; _plane_offset = -dot(_plane_normal, p1); } - } + } } @@ -275,7 +288,7 @@ make_prim(const BuilderBucket &bucket) { ++vi) { const Vertex *v = *vi; nassertr(v != (Vertex *)NULL, p); - + if (++count >= 3) { // Beginning with the third vertex, we increment pi. Thus, the // first two vertices stand alone, then each vertex beginning @@ -285,7 +298,7 @@ make_prim(const BuilderBucket &bucket) { } p.add_vertex(*v); } - + p.set_type(type); // If either of these fail, there weren't num_prims + 2 vertices in @@ -300,7 +313,7 @@ make_prim(const BuilderBucket &bucket) { //////////////////////////////////////////////////////////////////// // Function: MesherStrip::measure_sheet // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MesherStrip:: @@ -364,7 +377,7 @@ measure_sheet(const Edge *edge, int new_row, int &num_prims, int &num_rows, for (int secondary = 0; secondary <= 1; secondary++) { // How many common vertices are we looking for this pass (see // above)? - + int want_count; if (secondary) { want_count = new_row ? 0 : 1; @@ -392,8 +405,8 @@ measure_sheet(const Edge *edge, int new_row, int &num_prims, int &num_rows, } } if (mate!=NULL) { - mate->measure_sheet(*ei, secondary, num_prims, num_rows, - first_row_id, this_row_id, + mate->measure_sheet(*ei, secondary, num_prims, num_rows, + first_row_id, this_row_id, this_row_distance + secondary); } } @@ -425,7 +438,7 @@ measure_sheet(const Edge *edge, int new_row, int &num_prims, int &num_rows, } } if (mate!=NULL) { - mate->measure_sheet(*ei, false, num_prims, num_rows, + mate->measure_sheet(*ei, false, num_prims, num_rows, first_row_id, this_row_id, this_row_distance); } } @@ -437,7 +450,7 @@ measure_sheet(const Edge *edge, int new_row, int &num_prims, int &num_rows, //////////////////////////////////////////////////////////////////// // Function: MesherStrip::cut_sheet // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MesherStrip:: @@ -482,7 +495,7 @@ cut_sheet(int first_row_id, int do_mate, const BuilderBucket &bucket) { int not_any; do { not_any = true; - + ei = _edges.begin(); while (ei != _edges.end() && not_any) { Edge::Strips &strips = (*ei)->_strips; @@ -525,7 +538,7 @@ cut_sheet(int first_row_id, int do_mate, const BuilderBucket &bucket) { } - + //////////////////////////////////////////////////////////////////// // Function: MesherStrip::mate @@ -571,7 +584,7 @@ mate(const BuilderBucket &bucket) { //////////////////////////////////////////////////////////////////// template bool MesherStrip:: -find_ideal_mate(MesherStrip *&mate, Edge *&common_edge, +find_ideal_mate(MesherStrip *&mate, Edge *&common_edge, const BuilderBucket &bucket) { Edges::iterator ei; @@ -595,8 +608,8 @@ find_ideal_mate(MesherStrip *&mate, Edge *&common_edge, return (mate!=NULL); } - - + + //////////////////////////////////////////////////////////////////// // Function: MesherStrip::mate_pieces @@ -624,22 +637,22 @@ mate_pieces(Edge *common_edge, MesherStrip &front, MesherStrip &back, if (is_coplanar && bucket._retesselate_coplanar && front._prims.front() == back._prims.front() && convex_quad(common_edge, front, back, bucket)) { - + // If we're joining two equivalent coplanar triangles, call it a // quad. front._type = BPT_quad; - + // We add one additional vertex for the new triangle, the one // vertex we didn't already share. const Vertex *new_vert = back.find_uncommon_vertex(common_edge); - + // Now we just need to find the right place to insert it. It // belongs in the middle of the common edge, i.e. after the first // vertex that is on the common edge and before the second vertex. Verts::iterator a = front._verts.begin(); Verts::iterator b = a; ++b; - + if (common_edge->contains_vertex(*a)) { if (common_edge->contains_vertex(*b)) { // It goes between a and b. @@ -653,7 +666,7 @@ mate_pieces(Edge *common_edge, MesherStrip &front, MesherStrip &back, ++b; front._verts.insert(b, new_vert); } - + front._prims.splice(front._prims.end(), back._prims); back._verts.clear(); @@ -672,8 +685,8 @@ mate_pieces(Edge *common_edge, MesherStrip &front, MesherStrip &back, front._prims.splice(front._prims.end(), back._prims); back._verts.clear(); } - - } else if ((front._type==BPT_quad || front._type==BPT_quadstrip) && + + } else if ((front._type==BPT_quad || front._type==BPT_quadstrip) && (back._type==BPT_quad || back._type==BPT_quadstrip)) { // Joining two quads, two quadstrips, or a quad and a quadstrip. // This makes another quadstrip. @@ -769,7 +782,7 @@ mate_strips(Edge *common_edge, MesherStrip &front, MesherStrip &back, if (back._type==BPT_tri || back._type==BPT_quad) { back.rotate_to_front(common_edge); } - + bool reverse_front = common_edge->matches(front.get_head_edge()); bool reverse_back = !common_edge->matches(back.get_head_edge()); @@ -809,7 +822,7 @@ mate_strips(Edge *common_edge, MesherStrip &front, MesherStrip &back, } bool will_reverse = front.would_reverse_tail(type); - bool is_headtotail = (front.get_tail_edge() == back.get_head_edge()); + bool is_headtotail = (front.get_tail_edge() == back.get_head_edge()); if (will_reverse == is_headtotail) { // Instead of crapping out, for now we'll just recover and carry on. // builder_cat.info() << "Recovering from attempt to join backfacing strips.\n"; @@ -892,7 +905,7 @@ must_invert(const MesherStrip &front, const MesherStrip &back, // Otherwise, we have to flip if the tail edge is odd. invert = !invert; } - + if (will_reverse_back) { // With the back strip, we don't care about what will happen to // its tail edge when we convert it, but we do care what happens @@ -905,7 +918,7 @@ must_invert(const MesherStrip &front, const MesherStrip &back, } return invert; -} +} //////////////////////////////////////////////////////////////////// // Function: MesherStrip::convex_quad @@ -935,7 +948,7 @@ convex_quad(Edge *common_edge, MesherStrip &front, MesherStrip &back, // Project both edges into the 2-d axis plane most nearly // perpendicular to the normal. We're assuming both tris have the // same normal. - + nassertr(front._planar, false); LVector3f &n = front._plane_normal; @@ -965,7 +978,7 @@ convex_quad(Edge *common_edge, MesherStrip &front, MesherStrip &back, b2.set(b3[xi], b3[yi]); c2.set(c3[xi], c3[yi]); d2.set(d3[xi], d3[yi]); - + // Now (c2-d2) is the common edge, and (a2-b2) is the new edge. The // quad is convex iff (c2-d2) intersects (a2-b2). We actually only // need to test whether (c2-d2) intersects the infinite line passing @@ -1215,7 +1228,7 @@ template bool MesherStrip:: can_invert() const { return (_type==BPT_quadstrip || _type==BPT_quad); -} +} //////////////////////////////////////////////////////////////////// // Function: MesherStrip::invert @@ -1236,12 +1249,12 @@ invert() { vi2 = vi; ++vi2; nassertr(vi2 != _verts.end(), false); - + // Exchange vi and vi2 const Vertex *t = *vi2; *vi2 = *vi; *vi = t; - + // Increment vi = vi2; ++vi; @@ -1295,7 +1308,7 @@ would_reverse_tail(BuilderPrimType wantType) const { // tail edge if we have a multiple of four verts. reverse = (_verts.size()%4==0); break; - + default: builder_cat.fatal() << "Invalid conversion!\n"; abort(); @@ -1311,7 +1324,7 @@ would_reverse_tail(BuilderPrimType wantType) const { case BPT_tri: case BPT_tristrip: // We don't convert tristrips to quadstrips; fall through. - + default: builder_cat.fatal() << "Invalid conversion!\n"; abort(); @@ -1370,7 +1383,7 @@ convert_to_type(BuilderPrimType wantType) { even = !even; } break; - + default: builder_cat.fatal() << "Invalid conversion!\n"; abort(); @@ -1385,7 +1398,7 @@ convert_to_type(BuilderPrimType wantType) { case BPT_tri: case BPT_tristrip: // We don't convert tristrips to quadstrips; fall through. - + default: builder_cat.fatal() << "Invalid conversion!\n"; abort(); @@ -1447,7 +1460,7 @@ combine_edges(MesherStrip &other, int removeSides) { (*ei)->remove(this); } } -} +} //////////////////////////////////////////////////////////////////// @@ -1464,7 +1477,7 @@ remove_all_edges() { // list without it changing on us. Edges junk_edges; junk_edges.splice(junk_edges.end(), _edges); - + // Now we can safely remove all the to-be-junked edges. Edges::iterator ei; for (ei = junk_edges.begin(); ei != junk_edges.end(); ++ei) { @@ -1623,9 +1636,9 @@ output(ostream &out) const { for (vi = _verts.begin(); vi != _verts.end(); vi++) { out << " " << **vi; } - out << " ]: " << _prims.size() + out << " ]: " << _prims.size() << " prims, " << count_neighbors() << " neighbors"; - + show_neighbors(out); out << " edges"; diff --git a/panda/src/builder/mesherStrip.h b/panda/src/builder/mesherStrip.h index ef7d8de3e4..82d2eec44b 100644 --- a/panda/src/builder/mesherStrip.h +++ b/panda/src/builder/mesherStrip.h @@ -2,6 +2,19 @@ // Created by: drose (16Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MESHERSTRIP_H #define MESHERSTRIP_H @@ -62,7 +75,7 @@ public: bool will_reverse_back, BuilderPrimType type); static bool convex_quad(Edge *common_edge, MesherStrip &front, MesherStrip &back, const BuilderBucket &bucket); - + int count_neighbors() const; ostream &show_neighbors(ostream &out) const; diff --git a/panda/src/builder/mesherTempl.I b/panda/src/builder/mesherTempl.I index c71f7c8fc3..8057de923a 100644 --- a/panda/src/builder/mesherTempl.I +++ b/panda/src/builder/mesherTempl.I @@ -1,6 +1,19 @@ // Filename: mesherTempl.I // Created by: drose (15Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderMisc.h" @@ -31,7 +44,7 @@ add_prim(const Prim &prim, MesherStripOrigin origin) { list.push_back(temp_strip); Strip &strip = list.back(); strip._origin = origin; - + int i; int num_verts = prim.get_num_verts(); @@ -40,7 +53,7 @@ add_prim(const Prim &prim, MesherStripOrigin origin) { // Get the common vertex pointers for the primitive's vertices. for (i = 0; i < num_verts; i++) { - Verts::iterator n = + Verts::iterator n = _verts.insert(Verts::value_type(prim.get_vertex(i), EdgePtrs())).first; vptrs[i] = &(*n).first; eptrs[i] = &(*n).second; @@ -62,7 +75,7 @@ add_prim(const Prim &prim, MesherStripOrigin origin) { // outer edge (and vice-versa). Edge inner(vptrs[i], vptrs[(i+1) % num_verts]); Edge outer(vptrs[(i+1) % num_verts], vptrs[i]); - + // Add it to the list and get its common pointer. Edge &inner_ref = (Edge &)*_edges.insert(inner).first; Edge &outer_ref = (Edge &)*_edges.insert(outer).first; @@ -70,13 +83,13 @@ add_prim(const Prim &prim, MesherStripOrigin origin) { // Tell the edges about each other. inner_ref._opposite = &outer_ref; outer_ref._opposite = &inner_ref; - + // Associate the common edge to the strip. strip._edges.push_back(&inner_ref); - + // Associate the strip, as well as the original prim, to the edge. outer_ref._strips.push_back(&strip); - + // Associate the common edge with the vertices that share it. // Edge *edge_ptr = inner_ref.common_ptr(); eptrs[i]->insert(&outer_ref); @@ -206,7 +219,7 @@ getPrim() { if (strip._row_id < 0) { // Yep! Assign a new color, if it doesn't already have one. ColorSheetMap::iterator ci = _color_sheets.find(strip._row_id); - + if (ci == _color_sheets.end()) { Colorf color1; make_random_color(color1); @@ -217,7 +230,7 @@ getPrim() { i1 = (*ci).second; } } - + // Now i1 is the color we want to assign to the whole primitive. // Just set all vertices to the same color. int num_verts = prim.get_num_verts(); @@ -263,7 +276,7 @@ getPrim() { case BPT_quadstrip: i1 = 3; break; - + case BPT_tristrip: make_random_color(color1); // Make it a shade of red. @@ -294,7 +307,7 @@ getPrim() { i1 = 0; } } - + // Now i1 is the color we want to assign to the whole primitive. // Just set all vertices to the same color. int num_verts = prim.get_num_verts(); @@ -323,7 +336,7 @@ finalize() { } } - + template void MesherTempl:: @@ -384,14 +397,14 @@ choose_strip_list(const Strip &strip) { switch (strip._type) { case BPT_tri: return _tris; - + case BPT_quad: return _quads; - + default: return _strips; } - + default: builder_cat.fatal() << "Invalid strip status!\n"; abort(); @@ -427,21 +440,21 @@ build_sheets() { const Edge *edge_a = (*best)._edges.front(); const Edge *edge_b = (*best).find_adjacent_edge(edge_a); - + int num_prims_a = 0; int num_rows_a = 0; int first_row_id_a = first_row_id; - (*best).measure_sheet(edge_a, true, num_prims_a, num_rows_a, + (*best).measure_sheet(edge_a, true, num_prims_a, num_rows_a, first_row_id_a, 0, 0); first_row_id += num_rows_a; double avg_length_a = (double)num_prims_a / (double)num_rows_a; - + int num_prims_b = 0; int num_rows_b = 0; int first_row_id_b = first_row_id; double avg_length_b; if (edge_b != NULL) { - (*best).measure_sheet(edge_b, true, num_prims_b, num_rows_b, + (*best).measure_sheet(edge_b, true, num_prims_b, num_rows_b, first_row_id_b, 0, 0); first_row_id += num_rows_b; avg_length_b = (double)num_prims_b / (double)num_rows_b; @@ -457,11 +470,11 @@ build_sheets() { // because we've unfortunately wiped out the information we // stored when we measured sheet a. We'll have to do it // again. - + num_prims_a = 0; num_rows_a = 0; first_row_id_a = first_row_id; - (*best).measure_sheet(edge_a, true, num_prims_a, num_rows_a, + (*best).measure_sheet(edge_a, true, num_prims_a, num_rows_a, first_row_id_a, 0, 0); first_row_id += num_rows_a; @@ -501,13 +514,13 @@ find_fans() { // Build up a list of far fan edges. typedef vector FanMakers; - + FanMakers fans; EdgePtrs::iterator ei; Edge::Strips::iterator si; for (ei = edges.begin(); ei != edges.end(); ++ei) { - for (si = (*ei)->_strips.begin(); + for (si = (*ei)->_strips.begin(); si != (*ei)->_strips.end(); ++si) { Strip *strip = *si; @@ -516,14 +529,14 @@ find_fans() { } } } - + // Sort the fans list by edge pointers, and remove duplicates. sort(fans.begin(), fans.end()); fans.erase(unique(fans.begin(), fans.end()), fans.end()); - + FanMakers::iterator fi, fi2; - + // Now pull out connected edges. int joined_any; do { @@ -539,7 +552,7 @@ find_fans() { } } } while (joined_any); - + for (fi = fans.begin(); fi != fans.end(); ++fi) { if ((*fi).is_valid()) { (*fi).build(); @@ -646,11 +659,11 @@ meshList(Strips &strips) { if ((*best)._status == MS_alive) { (*best).mate(*_bucket); } - + // Put the strip back on the end of whichever list it wants. This // might be the same list, if the strip is still alive, or it // might be _done or _dead. Strips &list = choose_strip_list(*best); list.splice(list.end(), strips, best); } -} +} diff --git a/panda/src/builder/mesherTempl.h b/panda/src/builder/mesherTempl.h index aa2756560a..7fc75863f0 100644 --- a/panda/src/builder/mesherTempl.h +++ b/panda/src/builder/mesherTempl.h @@ -1,7 +1,20 @@ -// Filename: mesher.h +// Filename: mesherTempl.h // Created by: drose (15Sep97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MESHERTEMPL_H #define MESHERTEMPL_H @@ -29,7 +42,7 @@ public: typedef MesherEdge Edge; typedef MesherStrip Strip; typedef MesherFanMaker FanMaker; - + MesherTempl(BuilderBucket *bucket); int add_prim(const Prim &prim, MesherStripOrigin origin = MO_user); diff --git a/panda/src/builder/test_builder.cxx b/panda/src/builder/test_builder.cxx index deed368049..72431e34a4 100644 --- a/panda/src/builder/test_builder.cxx +++ b/panda/src/builder/test_builder.cxx @@ -1,6 +1,19 @@ -// Filename: tb.cxx +// Filename: test_builder.cxx // Created by: drose (09Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builder.h" @@ -32,7 +45,7 @@ extern polygon polys[]; extern int num_polys; -class ReportGeoms : +class ReportGeoms : public TraverserVisitor { public: bool reached_node(Node *node, const NullAttributeWrapper &, NullLevelState &); @@ -42,7 +55,7 @@ bool ReportGeoms:: reached_node(Node *node, const NullAttributeWrapper &, NullLevelState &) { if (node->is_of_type(GeomNode::get_class_type())) { GeomNode *geomNode = (GeomNode *)node; - nout << "\n" << *geomNode << ", " << geomNode->get_num_geoms() + nout << "\n" << *geomNode << ", " << geomNode->get_num_geoms() << " geoms:\n"; int num_geoms = geomNode->get_num_geoms(); for (int i = 0; i < num_geoms; i++) { @@ -87,7 +100,7 @@ main(void) { // nout << "Adding polygon " << i << ": " << polys[i] << "\n"; builder.add_prim_nonindexed(bucket, polys[i]); } - + ReportGeoms rg; GeomNode *gn = builder.build(); diff --git a/panda/src/builder/test_builder_data.cxx b/panda/src/builder/test_builder_data.cxx index 358eb2507c..c70963f76d 100644 --- a/panda/src/builder/test_builder_data.cxx +++ b/panda/src/builder/test_builder_data.cxx @@ -1,6 +1,19 @@ -// Filename: tbData.cxx +// Filename: test_builder_data.cxx // Created by: drose (11Sep97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "builderPrim.h" diff --git a/panda/src/chan/animBundle.I b/panda/src/chan/animBundle.I index 53ba089501..aeb7b00d12 100644 --- a/panda/src/chan/animBundle.I +++ b/panda/src/chan/animBundle.I @@ -1,12 +1,25 @@ // Filename: animBundle.I // Created by: drose (21Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AnimBundle::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AnimBundle:: AnimBundle(const string &name, float fps, int num_frames) : AnimGroup(name) { @@ -18,7 +31,7 @@ AnimBundle(const string &name, float fps, int num_frames) : AnimGroup(name) { //////////////////////////////////////////////////////////////////// // Function: AnimBundle::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AnimBundle:: AnimBundle(void) { diff --git a/panda/src/chan/animBundle.cxx b/panda/src/chan/animBundle.cxx index 2ed720c304..abb73caba3 100644 --- a/panda/src/chan/animBundle.cxx +++ b/panda/src/chan/animBundle.cxx @@ -1,6 +1,19 @@ // Filename: animBundle.cxx // Created by: drose (21Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animBundle.h" @@ -20,7 +33,7 @@ TypeHandle AnimBundle::_type_handle; //////////////////////////////////////////////////////////////////// void AnimBundle:: output(ostream &out) const { - out << get_type() << " " << get_name() << ", " << get_num_frames() + out << get_type() << " " << get_name() << ", " << get_num_frames() << " frames at " << get_base_frame_rate() << " fps"; } diff --git a/panda/src/chan/animBundle.h b/panda/src/chan/animBundle.h index 367e59101c..bbdf4a1d67 100644 --- a/panda/src/chan/animBundle.h +++ b/panda/src/chan/animBundle.h @@ -2,6 +2,19 @@ // Created by: drose (21Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMBUNDLE_H #define ANIMBUNDLE_H @@ -29,13 +42,13 @@ PUBLISHED: protected: INLINE AnimBundle(void); - + float _fps; int _num_frames; public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_AnimBundle(const FactoryParams ¶ms); diff --git a/panda/src/chan/animBundleNode.I b/panda/src/chan/animBundleNode.I index a2a426bcba..ef76ecb335 100644 --- a/panda/src/chan/animBundleNode.I +++ b/panda/src/chan/animBundleNode.I @@ -1,25 +1,38 @@ // Filename: animBundleNode.I // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AnimBundleNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AnimBundleNode:: -AnimBundleNode(AnimBundle *bundle) : +AnimBundleNode(AnimBundle *bundle) : NamedNode(bundle->get_name()), - _bundle(bundle) + _bundle(bundle) { } //////////////////////////////////////////////////////////////////// // Function: AnimBundleNode::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AnimBundleNode:: AnimBundleNode(void) @@ -29,19 +42,19 @@ AnimBundleNode(void) //////////////////////////////////////////////////////////////////// // Function: AnimBundleNode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AnimBundleNode:: -AnimBundleNode(const AnimBundleNode ©) : +AnimBundleNode(const AnimBundleNode ©) : NamedNode(copy), - _bundle(copy._bundle) + _bundle(copy._bundle) { } //////////////////////////////////////////////////////////////////// // Function: AnimBundleNode::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void AnimBundleNode:: operator = (const AnimBundleNode ©) { @@ -52,7 +65,7 @@ operator = (const AnimBundleNode ©) { //////////////////////////////////////////////////////////////////// // Function: AnimBundleNode::get_bundle // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AnimBundle *AnimBundleNode:: get_bundle() const { diff --git a/panda/src/chan/animBundleNode.cxx b/panda/src/chan/animBundleNode.cxx index 2dead879bb..9afa26087e 100644 --- a/panda/src/chan/animBundleNode.cxx +++ b/panda/src/chan/animBundleNode.cxx @@ -1,6 +1,19 @@ // Filename: animBundleNode.cxx // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animBundleNode.h" @@ -57,7 +70,7 @@ fillin(DatagramIterator& scan, BamReader* manager) // Function: AnimBundleNode::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int AnimBundleNode:: diff --git a/panda/src/chan/animBundleNode.h b/panda/src/chan/animBundleNode.h index 84247a3526..8fd0634ccc 100644 --- a/panda/src/chan/animBundleNode.h +++ b/panda/src/chan/animBundleNode.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMBUNDLENODE_H #define ANIMBUNDLENODE_H @@ -34,8 +47,8 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_AnimBundleNode(const FactoryParams ¶ms); diff --git a/panda/src/chan/animChannel.I b/panda/src/chan/animChannel.I index b0226b9c6d..dc0649914a 100644 --- a/panda/src/chan/animChannel.I +++ b/panda/src/chan/animChannel.I @@ -1,6 +1,19 @@ // Filename: animChannel.I // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// template @@ -21,7 +34,7 @@ TypeHandle AnimChannel::_type_handle; //////////////////////////////////////////////////////////////////// template INLINE AnimChannel:: -AnimChannel(const string &name) +AnimChannel(const string &name) : AnimChannelBase(name) { } @@ -35,7 +48,7 @@ AnimChannel(const string &name) //////////////////////////////////////////////////////////////////// template INLINE AnimChannel:: -AnimChannel(AnimGroup *parent, const string &name) +AnimChannel(AnimGroup *parent, const string &name) : AnimChannelBase(parent, name) { } diff --git a/panda/src/chan/animChannel.cxx b/panda/src/chan/animChannel.cxx index 1d9259ee3c..c5ca40ee90 100644 --- a/panda/src/chan/animChannel.cxx +++ b/panda/src/chan/animChannel.cxx @@ -1,6 +1,19 @@ // Filename: animChannel.cxx // Created by: drose (11May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animChannel.h" diff --git a/panda/src/chan/animChannel.h b/panda/src/chan/animChannel.h index 9f84aa91bd..0c0674dc85 100644 --- a/panda/src/chan/animChannel.h +++ b/panda/src/chan/animChannel.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMCHANNEL_H #define ANIMCHANNEL_H @@ -73,7 +86,7 @@ public: static const char *get_fixed_channel_type_name() { return "AnimChannelMatrixFixed"; } static const char *get_part_type_name() { return "MovingPart"; } static void output_value(ostream &out, const ValueType &value); - + static void write_datagram(Datagram &dest, ValueType& me) { me.write_datagram(dest); @@ -99,7 +112,7 @@ public: } static void write_datagram(Datagram &dest, ValueType& me) { - dest.add_float32(me); + dest.add_float32(me); } static void read_datagram(DatagramIterator &source, ValueType& me) { diff --git a/panda/src/chan/animChannelBase.I b/panda/src/chan/animChannelBase.I index 7f2f588c2d..8f16a2ef3e 100644 --- a/panda/src/chan/animChannelBase.I +++ b/panda/src/chan/animChannelBase.I @@ -1,6 +1,19 @@ // Filename: animChannelBase.I // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/animChannelBase.cxx b/panda/src/chan/animChannelBase.cxx index cd10169e9f..7dc71f917f 100644 --- a/panda/src/chan/animChannelBase.cxx +++ b/panda/src/chan/animChannelBase.cxx @@ -1,6 +1,19 @@ // Filename: animChannelBase.cxx // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animChannelBase.h" diff --git a/panda/src/chan/animChannelBase.h b/panda/src/chan/animChannelBase.h index 0842222b03..ea8421cd27 100644 --- a/panda/src/chan/animChannelBase.h +++ b/panda/src/chan/animChannelBase.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMCHANNELBASE_H #define ANIMCHANNELBASE_H @@ -36,13 +49,13 @@ public: virtual TypeHandle get_value_type() const=0; virtual void output(ostream &out) const; - + protected: - + int _last_frame; public: - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); protected: void fillin(DatagramIterator& scan, BamReader* manager); diff --git a/panda/src/chan/animChannelFixed.I b/panda/src/chan/animChannelFixed.I index 421132310a..c06f0c2cfb 100644 --- a/panda/src/chan/animChannelFixed.I +++ b/panda/src/chan/animChannelFixed.I @@ -1,6 +1,19 @@ // Filename: animChannelFixed.I // Created by: drose (24Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// template @@ -15,7 +28,7 @@ TypeHandle AnimChannelFixed::_type_handle; template INLINE AnimChannelFixed:: AnimChannelFixed(AnimGroup *parent, const string &name, - const ValueType &value) + const ValueType &value) : AnimChannel(parent, name), _value(value) { } @@ -29,7 +42,7 @@ AnimChannelFixed(AnimGroup *parent, const string &name, //////////////////////////////////////////////////////////////////// template INLINE AnimChannelFixed:: -AnimChannelFixed(const string &name, const ValueType &value) +AnimChannelFixed(const string &name, const ValueType &value) : AnimChannel(name), _value(value) { } @@ -38,7 +51,7 @@ AnimChannelFixed(const string &name, const ValueType &value) //////////////////////////////////////////////////////////////////// // Function: AnimChannelFixed::has_changed // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template bool AnimChannelFixed:: @@ -50,7 +63,7 @@ has_changed(int, int) { //////////////////////////////////////////////////////////////////// // Function: AnimChannelFixed::get_value // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void AnimChannelFixed:: @@ -62,7 +75,7 @@ get_value(int, ValueType &value) { //////////////////////////////////////////////////////////////////// // Function: AnimChannelFixed::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void AnimChannelFixed:: diff --git a/panda/src/chan/animChannelFixed.h b/panda/src/chan/animChannelFixed.h index 7cf69e5f7e..563b4c9dd0 100644 --- a/panda/src/chan/animChannelFixed.h +++ b/panda/src/chan/animChannelFixed.h @@ -2,6 +2,19 @@ // Created by: drose (24Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMCHANNELFIXED_H #define ANIMCHANNELFIXED_H diff --git a/panda/src/chan/animChannelMatrixXfmTable.I b/panda/src/chan/animChannelMatrixXfmTable.I index 8facb2212b..4c789b6933 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.I +++ b/panda/src/chan/animChannelMatrixXfmTable.I @@ -1,6 +1,19 @@ // Filename: animChannelMatrixXfmTable.I // Created by: drose (21Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/animChannelMatrixXfmTable.cxx b/panda/src/chan/animChannelMatrixXfmTable.cxx index 123dd45b53..b50d64758a 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.cxx +++ b/panda/src/chan/animChannelMatrixXfmTable.cxx @@ -1,6 +1,19 @@ // Filename: animChannelMatrixXfmTable.cxx // Created by: drose (20Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animChannelMatrixXfmTable.h" @@ -17,21 +30,21 @@ TypeHandle AnimChannelMatrixXfmTable::_type_handle; -const char +const char AnimChannelMatrixXfmTable::_table_ids[AnimChannelMatrixXfmTable::num_tables] = { 'i', 'j', 'k', 'h', 'p', 'r', 'x', 'y', 'z' }; -const float +const float AnimChannelMatrixXfmTable::_default_values[AnimChannelMatrixXfmTable::num_tables] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; //////////////////////////////////////////////////////////////////// // Function: AnimChannelMatrixXfmTable::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// AnimChannelMatrixXfmTable:: -AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name) +AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name) : AnimChannelMatrix(parent, name) { } @@ -259,7 +272,7 @@ write_datagram(BamWriter *manager, Datagram &me) // Now, write out the joint angles. For these we need to build up // a HPR array. vector_LVecBase3f hprs; - int hprs_length = + int hprs_length = max(max(_tables[3].size(), _tables[4].size()), _tables[5].size()); hprs.reserve(hprs_length); for (i = 0; i < hprs_length; i++) { diff --git a/panda/src/chan/animChannelMatrixXfmTable.h b/panda/src/chan/animChannelMatrixXfmTable.h index ff0cd74249..fd5ef87aea 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.h +++ b/panda/src/chan/animChannelMatrixXfmTable.h @@ -2,6 +2,19 @@ // Created by: drose (20Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMCHANNELMATRIXXFMTABLE_H #define ANIMCHANNELMATRIXXFMTABLE_H @@ -56,7 +69,7 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_AnimChannelMatrixXfmTable(const FactoryParams ¶ms); diff --git a/panda/src/chan/animChannelScalarTable.I b/panda/src/chan/animChannelScalarTable.I index 8466f50a78..df69a4d3a7 100644 --- a/panda/src/chan/animChannelScalarTable.I +++ b/panda/src/chan/animChannelScalarTable.I @@ -1,6 +1,19 @@ // Filename: animChannelScalarTable.I // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/animChannelScalarTable.cxx b/panda/src/chan/animChannelScalarTable.cxx index 96e212145e..6c6a60cf4d 100644 --- a/panda/src/chan/animChannelScalarTable.cxx +++ b/panda/src/chan/animChannelScalarTable.cxx @@ -1,6 +1,19 @@ // Filename: animChannelScalarTable.cxx // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animChannelScalarTable.h" @@ -19,17 +32,17 @@ TypeHandle AnimChannelScalarTable::_type_handle; //////////////////////////////////////////////////////////////////// // Function: AnimChannelScalarTable::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// AnimChannelScalarTable:: -AnimChannelScalarTable(AnimGroup *parent, const string &name) +AnimChannelScalarTable(AnimGroup *parent, const string &name) : AnimChannelScalar(parent, name) { } //////////////////////////////////////////////////////////////////// // Function: AnimChannelScalarTable::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// AnimChannelScalarTable:: AnimChannelScalarTable(void){ @@ -146,7 +159,7 @@ write_datagram(BamWriter *manager, Datagram &me) map index; int i; - for (i = 0; + for (i = 0; i < (int)_table.size() && (int)index.size() <= max_values; i++) { int value = (int)floor(_table[i] * scale + 0.5); diff --git a/panda/src/chan/animChannelScalarTable.h b/panda/src/chan/animChannelScalarTable.h index b250802ee4..6ccc371533 100644 --- a/panda/src/chan/animChannelScalarTable.h +++ b/panda/src/chan/animChannelScalarTable.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMCHANNELSCALARTABLE_H #define ANIMCHANNELSCALARTABLE_H @@ -38,7 +51,7 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_AnimChannelScalarTable(const FactoryParams ¶ms); diff --git a/panda/src/chan/animControl.I b/panda/src/chan/animControl.I index 0a531b2602..896994f050 100644 --- a/panda/src/chan/animControl.I +++ b/panda/src/chan/animControl.I @@ -1,6 +1,19 @@ // Filename: animControl.I // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -101,7 +114,7 @@ get_anim() const { //////////////////////////////////////////////////////////////////// // Function: AnimControl::get_channel_index // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int AnimControl:: get_channel_index() const { diff --git a/panda/src/chan/animControl.cxx b/panda/src/chan/animControl.cxx index 2f5002dca6..b3c6b4dbfd 100644 --- a/panda/src/chan/animControl.cxx +++ b/panda/src/chan/animControl.cxx @@ -1,6 +1,19 @@ // Filename: animControl.cxx // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animControl.h" @@ -15,7 +28,7 @@ TypeHandle AnimControl::_type_handle; //////////////////////////////////////////////////////////////////// -// Function: AnimControl::Constructor +// Function: AnimControl::Constructor // Access: Public, Scheme // Description: //////////////////////////////////////////////////////////////////// @@ -135,11 +148,11 @@ loop(bool restart, int from, int to) { if ((to == 0 && from == get_num_frames()-1) || (to == from-1)) { - + // In this case, the user has specified to loop over the whole // range of animation. We don't need a special jump action to // handle this. - + } else { // Otherwise, set up a jump action to effect the loop. This isn't // completely accurate, since it will always jump exactly to the @@ -147,18 +160,18 @@ loop(bool restart, int from, int to) { // we'd gotten to, but it should be reasonably close, especially // if the number of frames in the loop is large enough and/or the // frame rate is high enough. - insert_jump_action(_actions, (to-1+get_num_frames())%get_num_frames(), + insert_jump_action(_actions, (to-1+get_num_frames())%get_num_frames(), from); } } else { if ((from == 0 && to == get_num_frames()-1) || (from == to-1)) { - + // In this case, the user has specified to loop over the whole // range of animation. We don't need a special jump action to // handle this. - + } else { // Otherwise, set up a jump action to effect the loop. This isn't // completely accurate, since it will always jump exactly to the @@ -260,7 +273,7 @@ remove_event(const string &event_name) { int p_removed = 0; for (ai = _actions.begin(); ai != _actions.end(); ++ai) { const Action &action = (*ai).second; - if (action._type == AT_event && + if (action._type == AT_event && action._event->get_name() == event_name) { // Remove this event by not copying it to new_actions. p_removed++; @@ -318,7 +331,7 @@ advance_time(double time) { double elapsed_time = time - _as_of_time; double elapsed_frames = elapsed_time * get_frame_rate(); _as_of_time = time; - + if (_playing && elapsed_frames != 0.0) { int orig_frame = get_frame(); @@ -343,7 +356,7 @@ advance_time(double time) { } } else { // Normally, we'll be playing the animation forward. - + if (new_frame < get_num_frames()) { do_actions_forward(orig_frame+1, new_frame); } else { @@ -368,7 +381,7 @@ bool AnimControl:: channel_has_changed(AnimChannelBase *channel) const { if (_marked_frame < 0) { return true; - } + } int this_frame = get_frame(); @@ -394,11 +407,11 @@ mark_channels() { //////////////////////////////////////////////////////////////////// // Function: AnimControl::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AnimControl:: output(ostream &out) const { - out << "AnimControl(" << get_part()->get_name() + out << "AnimControl(" << get_part()->get_name() << ", " << get_anim()->get_name() << ")"; } @@ -482,15 +495,15 @@ do_actions_forward(int from, int to) { if (to >= from) { Actions::const_iterator lower = _actions.lower_bound(from); Actions::const_iterator upper = _actions.lower_bound(to+1); - + int sequence_frame = -1; const Action *sequence_action; - + Actions::const_iterator ai; for (ai = lower; ai != upper; ++ai) { int frame = (*ai).first; const Action &action = (*ai).second; - + if (sequence_frame != -1 && frame > sequence_frame) { // We encountered an action that resequenced our frame numbers. // Now that we've finished evaluating all the other actions that @@ -499,10 +512,10 @@ do_actions_forward(int from, int to) { do_sequence_action(sequence_frame, *sequence_action); return false; } - + do_action(frame, action, sequence_frame, sequence_action); } - + if (sequence_frame != -1) { do_sequence_action(sequence_frame, *sequence_action); return false; @@ -534,15 +547,15 @@ do_actions_backward(int from, int to) { #endif Action_reverse_iterator lower(_actions.upper_bound(from)); Action_reverse_iterator upper(_actions.upper_bound(to-1)); - + int sequence_frame = -1; const Action *sequence_action; - + Action_reverse_iterator ai; for (ai = lower; ai != upper; ++ai) { int frame = (*ai).first; const Action &action = (*ai).second; - + if (sequence_frame != -1 && frame < sequence_frame) { // We encountered an action that resequenced our frame numbers. // Now that we've finished evaluating all the other actions that @@ -551,10 +564,10 @@ do_actions_backward(int from, int to) { do_sequence_action(sequence_frame, *sequence_action); return false; } - + do_action(frame, action, sequence_frame, sequence_action); } - + if (sequence_frame != -1) { do_sequence_action(sequence_frame, *sequence_action); return false; @@ -577,7 +590,7 @@ do_actions_backward(int from, int to) { // other actions this frame have been executed). //////////////////////////////////////////////////////////////////// void AnimControl:: -do_action(int frame, const Action &action, +do_action(int frame, const Action &action, int &sequence_frame, const Action *&sequence_action) { switch (action._type) { case AT_stop: @@ -626,7 +639,7 @@ do_sequence_action(int, const Action &action) { //////////////////////////////////////////////////////////////////// // Function: AnimControl::Action::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AnimControl::Action:: output(ostream &out) const { diff --git a/panda/src/chan/animControl.h b/panda/src/chan/animControl.h index ee684ff381..07ed36777d 100644 --- a/panda/src/chan/animControl.h +++ b/panda/src/chan/animControl.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMCONTROL_H #define ANIMCONTROL_H diff --git a/panda/src/chan/animControlCollection.I b/panda/src/chan/animControlCollection.I index 3e64e36488..245d7dd6c4 100644 --- a/panda/src/chan/animControlCollection.I +++ b/panda/src/chan/animControlCollection.I @@ -1,6 +1,19 @@ // Filename: animControlCollection.I // Created by: drose (22Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/animControlCollection.cxx b/panda/src/chan/animControlCollection.cxx index 549bed7d62..49c4a3f1c5 100644 --- a/panda/src/chan/animControlCollection.cxx +++ b/panda/src/chan/animControlCollection.cxx @@ -1,6 +1,19 @@ // Filename: animControlCollection.cxx // Created by: drose (22Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animControlCollection.h" @@ -20,7 +33,7 @@ AnimControlCollection() { //////////////////////////////////////////////////////////////////// // Function: AnimControlCollection::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// AnimControlCollection:: ~AnimControlCollection() { @@ -90,7 +103,7 @@ unbind_anim(const string &name) { // Description: Returns the number of AnimControls associated with // this collection. //////////////////////////////////////////////////////////////////// -int AnimControlCollection:: +int AnimControlCollection:: get_num_anims() const { return _controls.size(); } @@ -100,7 +113,7 @@ get_num_anims() const { // Access: Public // Description: Disassociates all anims from this collection. //////////////////////////////////////////////////////////////////// -void AnimControlCollection:: +void AnimControlCollection:: clear_anims() { _controls.clear(); } diff --git a/panda/src/chan/animControlCollection.h b/panda/src/chan/animControlCollection.h index 57d66bd3e2..53cbc53665 100644 --- a/panda/src/chan/animControlCollection.h +++ b/panda/src/chan/animControlCollection.h @@ -1,6 +1,19 @@ // Filename: animControlCollection.h // Created by: drose (22Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ANIMCONTROLCOLLECTION_H diff --git a/panda/src/chan/animGroup.I b/panda/src/chan/animGroup.I index ea0191100e..114e1225a9 100644 --- a/panda/src/chan/animGroup.I +++ b/panda/src/chan/animGroup.I @@ -1,4 +1,17 @@ // Filename: animGroup.I // Created by: drose (21Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/animGroup.cxx b/panda/src/chan/animGroup.cxx index c87879b267..df269c1c58 100644 --- a/panda/src/chan/animGroup.cxx +++ b/panda/src/chan/animGroup.cxx @@ -1,6 +1,19 @@ // Filename: animGroup.cxx // Created by: drose (21Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animGroup.h" @@ -202,7 +215,7 @@ fillin(DatagramIterator& scan, BamReader* manager) // Function: AnimGroup::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int AnimGroup:: @@ -214,7 +227,7 @@ complete_pointers(vector_typedWritable &plist, BamReader*) { if (plist[i] == TypedWritable::Null) { - chan_cat->warning() << get_type().get_name() + chan_cat->warning() << get_type().get_name() << " Ignoring null child" << endl; } else diff --git a/panda/src/chan/animGroup.h b/panda/src/chan/animGroup.h index ce5b69262c..8f9b9000ed 100644 --- a/panda/src/chan/animGroup.h +++ b/panda/src/chan/animGroup.h @@ -2,6 +2,19 @@ // Created by: drose (21Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMGROUP_H #define ANIMGROUP_H @@ -41,7 +54,7 @@ public: virtual TypeHandle get_value_type() const; void sort_descendants(); - + virtual void output(ostream &out) const; virtual void write(ostream &out, int indent_level) const; @@ -55,8 +68,8 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_AnimGroup(const FactoryParams ¶ms); diff --git a/panda/src/chan/auto_bind.cxx b/panda/src/chan/auto_bind.cxx index 8c462e526c..095e5595da 100644 --- a/panda/src/chan/auto_bind.cxx +++ b/panda/src/chan/auto_bind.cxx @@ -1,6 +1,19 @@ // Filename: auto_bind.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "auto_bind.h" @@ -29,7 +42,7 @@ typedef map Parts; // Description : This is a traverser visitor that locates bundle nodes // and adds them to their respective maps. //////////////////////////////////////////////////////////////////// -class CollectNodes : +class CollectNodes : public TraverserVisitor { public: bool reached_node(Node *node, const NullAttributeWrapper &, @@ -60,7 +73,7 @@ public: //////////////////////////////////////////////////////////////////// static void bind_anims(const PartNodes &parts, const AnimNodes &anims, - AnimControlCollection &controls, + AnimControlCollection &controls, int hierarchy_match_flags) { PartNodes::const_iterator pni; @@ -77,7 +90,7 @@ bind_anims(const PartNodes &parts, const AnimNodes &anims, << "Attempting to bind " << *part << " to " << *anim << "\n"; } - PT(AnimControl) control = + PT(AnimControl) control = part->bind_anim(anim, hierarchy_match_flags); string name = anim->get_name(); if (control != (AnimControl *)NULL) { @@ -102,7 +115,7 @@ bind_anims(const PartNodes &parts, const AnimNodes &anims, } else { chan_cat.info() << "Bind succeeded, index " - << control->get_channel_index() << "; accessible as " + << control->get_channel_index() << "; accessible as " << name << "\n"; } } @@ -144,7 +157,7 @@ void auto_bind(Node *root_node, AnimControlCollection &controls, } else { // But here we have (at least one) match! - bind_anims((*pi).second, (*ai).second, controls, + bind_anims((*pi).second, (*ai).second, controls, hierarchy_match_flags); ++pi; diff --git a/panda/src/chan/auto_bind.h b/panda/src/chan/auto_bind.h index 998d02239c..d8c50c149e 100644 --- a/panda/src/chan/auto_bind.h +++ b/panda/src/chan/auto_bind.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef AUTO_BIND_H #define AUTO_BIND_H diff --git a/panda/src/chan/config_chan.cxx b/panda/src/chan/config_chan.cxx index fe275af3bb..8356e9fb83 100644 --- a/panda/src/chan/config_chan.cxx +++ b/panda/src/chan/config_chan.cxx @@ -1,6 +1,19 @@ // Filename: config_chan.cxx // Created by: drose (28Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_chan.h" diff --git a/panda/src/chan/config_chan.h b/panda/src/chan/config_chan.h index 841e9a1f30..282d1f1451 100644 --- a/panda/src/chan/config_chan.h +++ b/panda/src/chan/config_chan.h @@ -1,6 +1,19 @@ // Filename: config_chan.h // Created by: drose (28Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_CHAN_H diff --git a/panda/src/chan/movingPart.I b/panda/src/chan/movingPart.I index f8edbcd606..9854e6bd0b 100644 --- a/panda/src/chan/movingPart.I +++ b/panda/src/chan/movingPart.I @@ -1,6 +1,19 @@ // Filename: movingPart.I // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animChannelFixed.h" @@ -36,11 +49,11 @@ MovingPart(const MovingPart ©) : //////////////////////////////////////////////////////////////////// // Function: MovingPart::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE MovingPart:: -MovingPart(PartGroup *parent, const string &name, +MovingPart(PartGroup *parent, const string &name, const ValueType &initial_value) : MovingPartBase(parent, name), _value(initial_value), @@ -51,7 +64,7 @@ MovingPart(PartGroup *parent, const string &name, //////////////////////////////////////////////////////////////////// // Function: MovingPart::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE MovingPart:: diff --git a/panda/src/chan/movingPart.h b/panda/src/chan/movingPart.h index 9acbea4c9c..bd20342f45 100644 --- a/panda/src/chan/movingPart.h +++ b/panda/src/chan/movingPart.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MOVINGPART_H #define MOVINGPART_H @@ -38,7 +51,7 @@ public: ValueType _initial_value; public: - INLINE virtual void write_datagram(BamWriter* manager, Datagram &me); + INLINE virtual void write_datagram(BamWriter* manager, Datagram &me); protected: INLINE MovingPart(void); @@ -69,4 +82,4 @@ private: #endif - + diff --git a/panda/src/chan/movingPartBase.I b/panda/src/chan/movingPartBase.I index 7e2ac4be7b..22ef591ff8 100644 --- a/panda/src/chan/movingPartBase.I +++ b/panda/src/chan/movingPartBase.I @@ -1,6 +1,19 @@ // Filename: movingPartBase.I // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/movingPartBase.cxx b/panda/src/chan/movingPartBase.cxx index 3851ce004d..d86c7e13e0 100644 --- a/panda/src/chan/movingPartBase.cxx +++ b/panda/src/chan/movingPartBase.cxx @@ -1,6 +1,19 @@ // Filename: movingPartBase.cxx // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "movingPartBase.h" @@ -15,7 +28,7 @@ TypeHandle MovingPartBase::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MovingPartBase::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// MovingPartBase:: MovingPartBase(PartGroup *parent, const string &name) @@ -25,7 +38,7 @@ MovingPartBase(PartGroup *parent, const string &name) //////////////////////////////////////////////////////////////////// // Function: MovingPartBase::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// MovingPartBase:: MovingPartBase(void){ @@ -73,7 +86,7 @@ write_with_value(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: MovingPartBase::do_update // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void MovingPartBase:: do_update(PartBundle *root, PartGroup *parent, @@ -145,7 +158,7 @@ pick_channel_index(list &holes, int &next) const { int hole = (*ii); nassertv(hole >= 0 && hole < next); - if (hole < (int)_channels.size() || + if (hole < (int)_channels.size() || _channels[hole] != (AnimChannelBase *)NULL) { // We can't accept this hole; we're using it! holes.erase(ii); diff --git a/panda/src/chan/movingPartBase.h b/panda/src/chan/movingPartBase.h index bc39cc76fe..7846d162fa 100644 --- a/panda/src/chan/movingPartBase.h +++ b/panda/src/chan/movingPartBase.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MOVINGPARTBASE_H #define MOVINGPARTBASE_H @@ -77,5 +90,5 @@ private: #endif - + diff --git a/panda/src/chan/movingPartMatrix.I b/panda/src/chan/movingPartMatrix.I index ab243661ac..f5679d2ab4 100644 --- a/panda/src/chan/movingPartMatrix.I +++ b/panda/src/chan/movingPartMatrix.I @@ -1,6 +1,19 @@ // Filename: movingPartMatrix.I // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -19,18 +32,18 @@ MovingPartMatrix(const MovingPartMatrix ©) : //////////////////////////////////////////////////////////////////// // Function: MovingPartMatrix::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MovingPartMatrix:: MovingPartMatrix(PartGroup *parent, const string &name, - const LMatrix4f &initial_value) + const LMatrix4f &initial_value) : MovingPart(parent, name, initial_value) { } //////////////////////////////////////////////////////////////////// // Function: MovingPartMatrix::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MovingPartMatrix:: MovingPartMatrix(void) { diff --git a/panda/src/chan/movingPartMatrix.cxx b/panda/src/chan/movingPartMatrix.cxx index b3d1c1c8f0..a3df0ad090 100644 --- a/panda/src/chan/movingPartMatrix.cxx +++ b/panda/src/chan/movingPartMatrix.cxx @@ -1,6 +1,19 @@ // Filename: movingPartMatrix.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "movingPartMatrix.h" @@ -41,7 +54,7 @@ get_blend_value(const PartBundle *root) { nassertv(channel_index >= 0 && channel_index < (int)_channels.size()); ChannelType *channel = DCAST(ChannelType, _channels[channel_index]); nassertv(channel != NULL); - + channel->get_value(control->get_frame(), _value); } else { @@ -51,7 +64,7 @@ get_blend_value(const PartBundle *root) { // An ordinary, linear blend. _value = 0.0; float net = 0.0; - + PartBundle::ChannelBlend::const_iterator cbi; for (cbi = blend.begin(); cbi != blend.end(); ++cbi) { AnimControl *control = (*cbi).first; @@ -69,7 +82,7 @@ get_blend_value(const PartBundle *root) { _value += v * effect; net += effect; } - + nassertv(net != 0.0); _value /= net; @@ -82,7 +95,7 @@ get_blend_value(const PartBundle *root) { _value = 0.0; LVector3f scale(0.0, 0.0, 0.0); float net = 0.0; - + PartBundle::ChannelBlend::const_iterator cbi; for (cbi = blend.begin(); cbi != blend.end(); ++cbi) { AnimControl *control = (*cbi).first; @@ -103,7 +116,7 @@ get_blend_value(const PartBundle *root) { scale += s * effect; net += effect; } - + nassertv(net != 0.0); _value /= net; scale /= net; diff --git a/panda/src/chan/movingPartMatrix.h b/panda/src/chan/movingPartMatrix.h index 4737dc5155..edacd41add 100644 --- a/panda/src/chan/movingPartMatrix.h +++ b/panda/src/chan/movingPartMatrix.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MOVINGPARTMATRIX_H #define MOVINGPARTMATRIX_H diff --git a/panda/src/chan/movingPartScalar.I b/panda/src/chan/movingPartScalar.I index 4199033ffc..f723309952 100644 --- a/panda/src/chan/movingPartScalar.I +++ b/panda/src/chan/movingPartScalar.I @@ -1,6 +1,19 @@ // Filename: movingPartScalar.I // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -19,18 +32,18 @@ MovingPartScalar(const MovingPartScalar ©) : //////////////////////////////////////////////////////////////////// // Function: MovingPartScalar::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MovingPartScalar:: MovingPartScalar(PartGroup *parent, const string &name, - const float &initial_value) + const float &initial_value) : MovingPart(parent, name, initial_value) { } //////////////////////////////////////////////////////////////////// // Function: MovingPartScalar::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MovingPartScalar:: MovingPartScalar(void){ diff --git a/panda/src/chan/movingPartScalar.cxx b/panda/src/chan/movingPartScalar.cxx index 0288d08911..9e77377e9e 100644 --- a/panda/src/chan/movingPartScalar.cxx +++ b/panda/src/chan/movingPartScalar.cxx @@ -1,6 +1,19 @@ // Filename: movingPartScalar.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "movingPartScalar.h" @@ -39,7 +52,7 @@ get_blend_value(const PartBundle *root) { nassertv(channel_index >= 0 && channel_index < (int)_channels.size()); ChannelType *channel = DCAST(ChannelType, _channels[channel_index]); nassertv(channel != NULL); - + channel->get_value(control->get_frame(), _value); } else { diff --git a/panda/src/chan/movingPartScalar.h b/panda/src/chan/movingPartScalar.h index 991f0580d8..29a900705e 100644 --- a/panda/src/chan/movingPartScalar.h +++ b/panda/src/chan/movingPartScalar.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MOVINGPARTSCALAR_H #define MOVINGPARTSCALAR_H diff --git a/panda/src/chan/partBundle.I b/panda/src/chan/partBundle.I index 5e76d8b904..f6264abe82 100644 --- a/panda/src/chan/partBundle.I +++ b/panda/src/chan/partBundle.I @@ -1,6 +1,19 @@ // Filename: partBundle.I // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/partBundle.cxx b/panda/src/chan/partBundle.cxx index 23484d2146..6a6e2d4f53 100644 --- a/panda/src/chan/partBundle.cxx +++ b/panda/src/chan/partBundle.cxx @@ -1,6 +1,19 @@ // Filename: partBundle.cxx // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "partBundle.h" @@ -215,7 +228,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// void PartBundle:: write(ostream &out, int indent_level) const { - indent(out, indent_level) + indent(out, indent_level) << get_type() << " " << get_name() << " {\n"; write_descendants(out, indent_level + 2); indent(out, indent_level) << "}\n"; @@ -251,7 +264,7 @@ bind_anim(AnimBundle *anim, int hierarchy_match_flags) { if (get_name() != anim->get_name()) { if (chan_cat.is_error()) { chan_cat.error() - << "Root name of part (" << get_name() + << "Root name of part (" << get_name() << ") does not match that of anim (" << anim->get_name() << ")\n"; } @@ -330,7 +343,7 @@ advance_time(double time) { //////////////////////////////////////////////////////////////////// // Function: PartBundle::update // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void PartBundle:: update() { diff --git a/panda/src/chan/partBundle.h b/panda/src/chan/partBundle.h index cf5d059253..228def0d37 100644 --- a/panda/src/chan/partBundle.h +++ b/panda/src/chan/partBundle.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PARTBUNDLE_H #define PARTBUNDLE_H @@ -92,14 +105,14 @@ public: INLINE control_iterator control_begin() const; INLINE control_iterator control_end() const; INLINE control_size_type control_size() const; - + INLINE const ChannelBlend &get_blend_map() const; PUBLISHED: virtual void output(ostream &out) const; virtual void write(ostream &out, int indent_level) const; - PT(AnimControl) bind_anim(AnimBundle *anim, + PT(AnimControl) bind_anim(AnimBundle *anim, int hierarchy_match_flags = 0); bool bind_anim(AnimBundle *anim, const string &name, diff --git a/panda/src/chan/partBundleNode.I b/panda/src/chan/partBundleNode.I index fd14edacaf..c19e7967cd 100644 --- a/panda/src/chan/partBundleNode.I +++ b/panda/src/chan/partBundleNode.I @@ -1,6 +1,19 @@ // Filename: partBundleNode.I // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -15,8 +28,8 @@ //////////////////////////////////////////////////////////////////// INLINE PartBundleNode:: PartBundleNode(const string &name, PartBundle *bundle) : - NamedNode(name), - _bundle(bundle) + NamedNode(name), + _bundle(bundle) { _bundle->_node = this; } @@ -49,7 +62,7 @@ PartBundleNode(const PartBundleNode ©) : //////////////////////////////////////////////////////////////////// // Function: PartBundleNode::get_bundle // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PartBundle *PartBundleNode:: get_bundle() const { diff --git a/panda/src/chan/partBundleNode.cxx b/panda/src/chan/partBundleNode.cxx index 94632a1f6f..a1e8bdfa8b 100644 --- a/panda/src/chan/partBundleNode.cxx +++ b/panda/src/chan/partBundleNode.cxx @@ -1,6 +1,19 @@ // Filename: partBundleNode.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "partBundleNode.h" @@ -58,7 +71,7 @@ fillin(DatagramIterator& scan, BamReader* manager) // Function: PartBundleNode::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int PartBundleNode:: diff --git a/panda/src/chan/partBundleNode.h b/panda/src/chan/partBundleNode.h index eb6d4b1421..2738611411 100644 --- a/panda/src/chan/partBundleNode.h +++ b/panda/src/chan/partBundleNode.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PARTBUNDLENODE_H #define PARTBUNDLENODE_H @@ -36,8 +49,8 @@ private: PT(PartBundle) _bundle; public: - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); protected: diff --git a/panda/src/chan/partGroup.I b/panda/src/chan/partGroup.I index a1166bbc09..1a9732823a 100644 --- a/panda/src/chan/partGroup.I +++ b/panda/src/chan/partGroup.I @@ -1,6 +1,19 @@ // Filename: partGroup.I // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,9 +25,9 @@ // non-default constructor, below. //////////////////////////////////////////////////////////////////// INLINE PartGroup:: -PartGroup(const string &name) : - Namable(name) -{ +PartGroup(const string &name) : + Namable(name) +{ } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/partGroup.cxx b/panda/src/chan/partGroup.cxx index f8bd78a9d4..e1dbea874a 100644 --- a/panda/src/chan/partGroup.cxx +++ b/panda/src/chan/partGroup.cxx @@ -1,6 +1,19 @@ // Filename: partGroup.cxx // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "partGroup.h" @@ -34,7 +47,7 @@ PartGroup(PartGroup *parent, const string &name) : Namable(name) { //////////////////////////////////////////////////////////////////// // Function: PartGroup::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PartGroup:: ~PartGroup() { @@ -60,7 +73,7 @@ make_copy() const { PartGroup *PartGroup:: copy_subgraph() const { PartGroup *root = make_copy(); - + if (root->get_type() != get_type()) { chan_cat.warning() << "Don't know how to copy " << get_type() << "\n"; @@ -167,7 +180,7 @@ sort_descendants() { // Access: Public // Description: Walks the part hierarchy in tandem with the indicated // anim hierarchy, and returns true if the hierarchies -// match, false otherwise. +// match, false otherwise. // // If hierarchy_match_flags is 0, only an exact match is // accepted; otherwise, it may contain a union of @@ -200,7 +213,7 @@ check_hierarchy(const AnimGroup *anim, const PartGroup *, if (anim->get_num_children() != get_num_children()) { chan_cat.info() << "Part " << get_name() << " has " << get_num_children() - << " children, while matching anim node has " + << " children, while matching anim node has " << anim->get_num_children() << ":\n"; match = false; @@ -240,7 +253,7 @@ check_hierarchy(const AnimGroup *anim, const PartGroup *, j++; } } - + while (i < get_num_children()) { PartGroup *pc = get_child(i); chan_cat.info() @@ -248,7 +261,7 @@ check_hierarchy(const AnimGroup *anim, const PartGroup *, << ", not in anim.\n"; i++; } - + while (j < anim->get_num_children()) { AnimGroup *ac = anim->get_child(j); chan_cat.info() @@ -293,7 +306,7 @@ check_hierarchy(const AnimGroup *anim, const PartGroup *, return false; } } - + if (j < anim->get_num_children()) { // There's at least one extra anim channel. if ((hierarchy_match_flags & HMF_ok_anim_extra) == 0) { @@ -336,7 +349,7 @@ write_with_value(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: PartGroup::do_update // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void PartGroup:: do_update(PartBundle *root, PartGroup *, @@ -478,7 +491,7 @@ fillin(DatagramIterator& scan, BamReader* manager) // Function: PartGroup::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int PartGroup:: diff --git a/panda/src/chan/partGroup.h b/panda/src/chan/partGroup.h index c4c2c6bcdb..270c21a259 100644 --- a/panda/src/chan/partGroup.h +++ b/panda/src/chan/partGroup.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PARTGROUP_H #define PARTGROUP_H @@ -84,8 +97,8 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_PartGroup(const FactoryParams ¶ms); diff --git a/panda/src/chan/vector_PartGroupStar.cxx b/panda/src/chan/vector_PartGroupStar.cxx index 5be372cba7..41ae946837 100644 --- a/panda/src/chan/vector_PartGroupStar.cxx +++ b/panda/src/chan/vector_PartGroupStar.cxx @@ -1,12 +1,25 @@ -// Filename: vector_PartGroup.cxx +// Filename: vector_PartGroupStar.cxx // Created by: drose (06Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_PartGroupStar.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE PartGroup * #define NAME vector_PartGroupStar diff --git a/panda/src/chan/vector_PartGroupStar.h b/panda/src/chan/vector_PartGroupStar.h index 7a0ee84db0..be82b711b2 100644 --- a/panda/src/chan/vector_PartGroupStar.h +++ b/panda/src/chan/vector_PartGroupStar.h @@ -1,6 +1,19 @@ // Filename: vector_PartGroupStar.h // Created by: drose (06Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_PARTGROUPSTAR_H @@ -22,8 +35,8 @@ // vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE PartGroup * #define NAME vector_PartGroupStar diff --git a/panda/src/chancfg/chancfg.I b/panda/src/chancfg/chancfg.I index fbc05b51f4..ee2d119d25 100644 --- a/panda/src/chancfg/chancfg.I +++ b/panda/src/chancfg/chancfg.I @@ -1,4 +1,17 @@ // Filename: chancfg.I // Created by: cary (07Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chancfg/chancfg.cxx b/panda/src/chancfg/chancfg.cxx index a257130fd4..ed5215aa41 100644 --- a/panda/src/chancfg/chancfg.cxx +++ b/panda/src/chancfg/chancfg.cxx @@ -1,6 +1,19 @@ // Filename: chancfg.cxx // Created by: cary (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chancfg.h" @@ -229,7 +242,7 @@ void ChanEval(GraphicsWindow* win, WindowItem& W, LayoutItem& L, SVec& S, } ChanViewport v2(ChanScaleViewport(v, (*k).getViewport())); PT(GraphicsLayer) layer = chan->make_layer(); - PT(DisplayRegion) dr = + PT(DisplayRegion) dr = layer->make_display_region(v2.left(), v2.right(), v2.bottom(), v2.top()); if (want_cameras && camera_node != (Node *)NULL) { @@ -258,7 +271,7 @@ void ChanEval(GraphicsWindow* win, WindowItem& W, LayoutItem& L, SVec& S, // take care of the orientation PT(TransformTransition) orient; - + switch ((*k).getOrientation()) { case SetupItem::Up: break; @@ -379,7 +392,7 @@ PT(GraphicsWindow) ChanConfig(GraphicsPipe* pipe, std::string cfg, // make channels and display regions ChanViewport V(0., 1., 0., 1.); - ChanEval(win, W, L, S, V, W.getChanOffset()+1, sizeX, sizeY, + ChanEval(win, W, L, S, V, W.getChanOffset()+1, sizeX, sizeY, camera_node, render, want_cameras); // sanity check @@ -433,7 +446,7 @@ PT(GraphicsWindow) ChanConfig(GraphicsPipe* pipe, std::string cfg, } } } - + return win; } diff --git a/panda/src/chancfg/chancfg.h b/panda/src/chancfg/chancfg.h index 092fecba91..c05a5a53c3 100644 --- a/panda/src/chancfg/chancfg.h +++ b/panda/src/chancfg/chancfg.h @@ -2,6 +2,19 @@ // Created by: cary (04Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CHANCFG_H__ #define __CHANCFG_H__ @@ -88,7 +101,7 @@ public: extern ChanCfgOverrides ChanOverrideNone; -PT(GraphicsWindow) EXPCL_PANDA +PT(GraphicsWindow) EXPCL_PANDA ChanConfig(GraphicsPipe*, std::string, Node *camera_node, Node *render, ChanCfgOverrides& = ChanOverrideNone); diff --git a/panda/src/chancfg/chanlayout.I b/panda/src/chancfg/chanlayout.I index 1d1b031847..3ac9fcb8ec 100644 --- a/panda/src/chancfg/chanlayout.I +++ b/panda/src/chancfg/chanlayout.I @@ -1,6 +1,19 @@ // Filename: chanlayout.I // Created by: cary (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE LayoutItem::LayoutItem(void) {} diff --git a/panda/src/chancfg/chanlayout.cxx b/panda/src/chancfg/chanlayout.cxx index aae8759178..d6345ce734 100644 --- a/panda/src/chancfg/chanlayout.cxx +++ b/panda/src/chancfg/chanlayout.cxx @@ -1,6 +1,19 @@ // Filename: chanlayout.cxx // Created by: cary (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chanlayout.h" diff --git a/panda/src/chancfg/chanlayout.h b/panda/src/chancfg/chanlayout.h index fb9389ef67..94a71c7762 100644 --- a/panda/src/chancfg/chanlayout.h +++ b/panda/src/chancfg/chanlayout.h @@ -2,6 +2,19 @@ // Created by: cary (04Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CHANLAYOUT_H__ #define __CHANLAYOUT_H__ diff --git a/panda/src/chancfg/chanparse.I b/panda/src/chancfg/chanparse.I index a2a8b2cf39..561db7d308 100644 --- a/panda/src/chancfg/chanparse.I +++ b/panda/src/chancfg/chanparse.I @@ -1,6 +1,19 @@ // Filename: chanparse.I // Created by: cary (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/chancfg/chanparse.cxx b/panda/src/chancfg/chanparse.cxx index 2c54bc22e3..4d03b19724 100644 --- a/panda/src/chancfg/chanparse.cxx +++ b/panda/src/chancfg/chanparse.cxx @@ -1,6 +1,19 @@ // Filename: chanparse.cxx // Created by: cary (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chanparse.h" diff --git a/panda/src/chancfg/chanparse.h b/panda/src/chancfg/chanparse.h index 5c54de28b4..e7739e3a0b 100644 --- a/panda/src/chancfg/chanparse.h +++ b/panda/src/chancfg/chanparse.h @@ -2,6 +2,19 @@ // Created by: cary (02Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CHANPARSE_H__ #define __CHANPARSE_H__ diff --git a/panda/src/chancfg/chansetup.I b/panda/src/chancfg/chansetup.I index 3494c25acd..79021a391e 100644 --- a/panda/src/chancfg/chansetup.I +++ b/panda/src/chancfg/chansetup.I @@ -1,6 +1,19 @@ // Filename: chansetup.I // Created by: cary (05Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE SetupFOV::SetupFOV(void) : _type(Invalid) {} diff --git a/panda/src/chancfg/chansetup.cxx b/panda/src/chancfg/chansetup.cxx index 32cccd784a..5f1c6f0518 100644 --- a/panda/src/chancfg/chansetup.cxx +++ b/panda/src/chancfg/chansetup.cxx @@ -1,6 +1,19 @@ // Filename: chansetup.cxx // Created by: cary (05Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chansetup.h" diff --git a/panda/src/chancfg/chansetup.h b/panda/src/chancfg/chansetup.h index 9e2e50697b..c780d78bd1 100644 --- a/panda/src/chancfg/chansetup.h +++ b/panda/src/chancfg/chansetup.h @@ -2,6 +2,19 @@ // Created by: cary (05Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CHANSETUP_H__ #define __CHANSETUP_H__ diff --git a/panda/src/chancfg/chanshare.h b/panda/src/chancfg/chanshare.h index ee83d3e847..004c37809f 100644 --- a/panda/src/chancfg/chanshare.h +++ b/panda/src/chancfg/chanshare.h @@ -1,6 +1,19 @@ // Filename: chanshare.h // Created by: frang (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __CHANSHARE_H__ diff --git a/panda/src/chancfg/chanviewport.I b/panda/src/chancfg/chanviewport.I index 8360dc048b..ce549c3aeb 100644 --- a/panda/src/chancfg/chanviewport.I +++ b/panda/src/chancfg/chanviewport.I @@ -1,6 +1,19 @@ // Filename: chanviewport.I // Created by: cary (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/chancfg/chanviewport.h b/panda/src/chancfg/chanviewport.h index 5db1c5d17a..bef114d25c 100644 --- a/panda/src/chancfg/chanviewport.h +++ b/panda/src/chancfg/chanviewport.h @@ -2,6 +2,19 @@ // Created by: cary (06Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CHANVIEWPORT_H__ #define __CHANVIEWPORT_H__ diff --git a/panda/src/chancfg/chanwindow.I b/panda/src/chancfg/chanwindow.I index 54203b90ac..328b8f99fb 100644 --- a/panda/src/chancfg/chanwindow.I +++ b/panda/src/chancfg/chanwindow.I @@ -1,6 +1,19 @@ // Filename: chanwindow.I // Created by: cary (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE WindowItem::WindowItem(void) {} diff --git a/panda/src/chancfg/chanwindow.cxx b/panda/src/chancfg/chanwindow.cxx index ab193b37b5..630f613c00 100644 --- a/panda/src/chancfg/chanwindow.cxx +++ b/panda/src/chancfg/chanwindow.cxx @@ -1,6 +1,19 @@ // Filename: chanwindow.cxx // Created by: cary (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chanwindow.h" diff --git a/panda/src/chancfg/chanwindow.h b/panda/src/chancfg/chanwindow.h index 228f792d95..eb89cf8d79 100644 --- a/panda/src/chancfg/chanwindow.h +++ b/panda/src/chancfg/chanwindow.h @@ -2,6 +2,19 @@ // Created by: cary (06Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CHANWINDOW_H__ #define __CHANWINDOW_H__ diff --git a/panda/src/chancfg/test_chancfg.cxx b/panda/src/chancfg/test_chancfg.cxx index 436393fd50..ca85eb221b 100644 --- a/panda/src/chancfg/test_chancfg.cxx +++ b/panda/src/chancfg/test_chancfg.cxx @@ -1,6 +1,19 @@ // Filename: test_chancfg.cxx // Created by: shochet (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chancfg.h" diff --git a/panda/src/char/character.I b/panda/src/char/character.I index 910172ab89..9eb7bf0a67 100644 --- a/panda/src/char/character.I +++ b/panda/src/char/character.I @@ -1,6 +1,19 @@ // Filename: character.I // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "characterJointBundle.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: Character::get_bundle // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CharacterJointBundle *Character:: get_bundle() const { @@ -19,7 +32,7 @@ get_bundle() const { //////////////////////////////////////////////////////////////////// // Function: Character::get_computed_vertices // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVertices *Character:: get_computed_vertices() const { diff --git a/panda/src/char/character.cxx b/panda/src/char/character.cxx index ada9f58439..b8c02d2039 100644 --- a/panda/src/char/character.cxx +++ b/panda/src/char/character.cxx @@ -1,6 +1,19 @@ // Filename: character.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "character.h" @@ -29,7 +42,7 @@ PStatCollector Character::_anim_pcollector("App:Animation"); // Description: Use make_copy() or copy_subgraph() to copy a character. //////////////////////////////////////////////////////////////////// Character:: -Character(const Character ©) : +Character(const Character ©) : PartBundleNode(copy.get_name(), new CharacterJointBundle(copy.get_bundle()->get_name())), _cv(DynamicVertices::deep_copy(copy._cv)), _computed_vertices(copy._computed_vertices), @@ -46,7 +59,7 @@ Character(const Character ©) : //////////////////////////////////////////////////////////////////// // Function: Character::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Character:: Character(const string &name) : @@ -58,7 +71,7 @@ Character(const string &name) : //////////////////////////////////////////////////////////////////// // Function: Character::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Character:: ~Character() { @@ -210,7 +223,7 @@ r_copy_subgraph(TypeHandle graph_type, Node::InstanceMap &) const { // GeomNodes found. //////////////////////////////////////////////////////////////////// void Character:: -r_copy_char(Node *dest, const Node *source, TypeHandle graph_type, +r_copy_char(Node *dest, const Node *source, TypeHandle graph_type, const Character *from, Character::ArcMap &arc_map) { if (source->is_of_type(GeomNode::get_class_type())) { const GeomNode *source_gnode; @@ -253,11 +266,11 @@ r_copy_char(Node *dest, const Node *source, TypeHandle graph_type, r_copy_char(dest_child, source_child, graph_type, from, arc_map); } - NodeRelation *dest_arc = + NodeRelation *dest_arc = NodeRelation::create_typed_arc(graph_type, dest, dest_child); nassertv(dest_arc != (NodeRelation *)NULL); nassertv(dest_arc->is_exact_type(graph_type)); - + dest_arc->copy_transitions_from(source_arc); arc_map[source_arc] = dest_arc; } @@ -434,7 +447,7 @@ fillin(DatagramIterator& scan, BamReader* manager) // Function: Character::complete_pointers // Access: Public // Description: Takes in a vector of pointers to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int Character:: diff --git a/panda/src/char/character.h b/panda/src/char/character.h index d845b7e7f0..f57907b142 100644 --- a/panda/src/char/character.h +++ b/panda/src/char/character.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CHARACTER_H #define CHARACTER_H @@ -56,9 +69,9 @@ private: void copy_joints(PartGroup *copy, PartGroup *orig); typedef map ArcMap; - virtual Node *r_copy_subgraph(TypeHandle graph_type, + virtual Node *r_copy_subgraph(TypeHandle graph_type, InstanceMap &inst_map) const; - void r_copy_char(Node *dest, const Node *source, TypeHandle graph_type, + void r_copy_char(Node *dest, const Node *source, TypeHandle graph_type, const Character *from, ArcMap &arc_map); PT(Geom) copy_geom(Geom *source, const Character *from); void copy_arc_pointers(const Character *from, const ArcMap &arc_map); @@ -85,8 +98,8 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_Character(const FactoryParams ¶ms); diff --git a/panda/src/char/characterJoint.cxx b/panda/src/char/characterJoint.cxx index aa5ae045d3..5378fec2ed 100644 --- a/panda/src/char/characterJoint.cxx +++ b/panda/src/char/characterJoint.cxx @@ -1,6 +1,19 @@ // Filename: characterJoint.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "characterJoint.h" @@ -27,7 +40,7 @@ CharacterJoint() { //////////////////////////////////////////////////////////////////// // Function: CharacterJoint::Copy Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// CharacterJoint:: CharacterJoint(const CharacterJoint ©) : @@ -41,12 +54,12 @@ CharacterJoint(const CharacterJoint ©) : //////////////////////////////////////////////////////////////////// // Function: CharacterJoint::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CharacterJoint:: -CharacterJoint(PartGroup *parent, const string &name, - const LMatrix4f &initial_value) - : MovingPartMatrix(parent, name, initial_value) +CharacterJoint(PartGroup *parent, const string &name, + const LMatrix4f &initial_value) + : MovingPartMatrix(parent, name, initial_value) { // Now that we've constructed and we're in the tree, let's call // update_internals() to get our _net_transform set properly. @@ -71,7 +84,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: CharacterJoint::update_internals // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CharacterJoint:: update_internals(PartGroup *parent, bool self_changed, bool) { @@ -322,7 +335,7 @@ fillin(DatagramIterator& scan, BamReader* manager) // Function: CharacterJoint::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int CharacterJoint:: @@ -332,12 +345,12 @@ complete_pointers(vector_typedWritable &plist, BamReader* manager) int start = MovingPartMatrix::complete_pointers(plist, manager); int mid = start+_num_net_arcs; int end = start+_num_net_arcs+_num_local_arcs; - + for(i = start; i < mid; i++) { if (plist[i] == TypedWritable::Null) { - char_cat->warning() << get_name() + char_cat->warning() << get_name() << " Ignoring null Net NodeRelation" << endl; } else @@ -350,7 +363,7 @@ complete_pointers(vector_typedWritable &plist, BamReader* manager) { if (plist[i] == TypedWritable::Null) { - char_cat->warning() << get_name() + char_cat->warning() << get_name() << " Ignoring null Local NodeRelation" << endl; } else diff --git a/panda/src/char/characterJoint.h b/panda/src/char/characterJoint.h index 970b45e7f0..923f5fe442 100644 --- a/panda/src/char/characterJoint.h +++ b/panda/src/char/characterJoint.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CHARACTERJOINT_H #define CHARACTERJOINT_H @@ -51,8 +64,8 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_CharacterJoint(const FactoryParams ¶ms); diff --git a/panda/src/char/characterJointBundle.I b/panda/src/char/characterJointBundle.I index d724aa2061..5284f7196c 100644 --- a/panda/src/char/characterJointBundle.I +++ b/panda/src/char/characterJointBundle.I @@ -1,6 +1,19 @@ // Filename: characterJointBundle.I // Created by: drose (02Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This comment tells ppremake that we know this is a circular diff --git a/panda/src/char/characterJointBundle.cxx b/panda/src/char/characterJointBundle.cxx index 3f3a933a68..00f12606a9 100644 --- a/panda/src/char/characterJointBundle.cxx +++ b/panda/src/char/characterJointBundle.cxx @@ -1,6 +1,19 @@ // Filename: characterJointBundle.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "characterJointBundle.h" @@ -15,7 +28,7 @@ TypeHandle CharacterJointBundle::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CharacterJointBundle::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CharacterJointBundle:: CharacterJointBundle(const string &name) : PartBundle(name) { diff --git a/panda/src/char/characterJointBundle.h b/panda/src/char/characterJointBundle.h index b5e81072f3..175ee5f9ed 100644 --- a/panda/src/char/characterJointBundle.h +++ b/panda/src/char/characterJointBundle.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CHARACTERJOINTBUNDLE_H #define CHARACTERJOINTBUNDLE_H diff --git a/panda/src/char/characterSlider.cxx b/panda/src/char/characterSlider.cxx index ef675fdd93..c1bf4ea3d1 100644 --- a/panda/src/char/characterSlider.cxx +++ b/panda/src/char/characterSlider.cxx @@ -1,6 +1,19 @@ // Filename: characterSlider.cxx // Created by: drose (03Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "characterSlider.h" @@ -23,7 +36,7 @@ CharacterSlider() { //////////////////////////////////////////////////////////////////// // Function: CharacterSlider::Copy Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// CharacterSlider:: CharacterSlider(const CharacterSlider ©) : @@ -34,7 +47,7 @@ CharacterSlider(const CharacterSlider ©) : //////////////////////////////////////////////////////////////////// // Function: CharacterSlider::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CharacterSlider:: CharacterSlider(PartGroup *parent, const string &name) diff --git a/panda/src/char/characterSlider.h b/panda/src/char/characterSlider.h index b9348099f0..7c4fa84b3b 100644 --- a/panda/src/char/characterSlider.h +++ b/panda/src/char/characterSlider.h @@ -2,6 +2,19 @@ // Created by: drose (03Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CHARACTERSLIDER_H #define CHARACTERSLIDER_H diff --git a/panda/src/char/computedVertices.I b/panda/src/char/computedVertices.I index 52eb995d7e..3cacda0f3c 100644 --- a/panda/src/char/computedVertices.I +++ b/panda/src/char/computedVertices.I @@ -1,6 +1,19 @@ // Filename: computedVertices.I // Created by: drose (01Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: ComputedVertices::VertexTransform::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVertices::VertexTransform:: VertexTransform() { @@ -17,7 +30,7 @@ VertexTransform() { //////////////////////////////////////////////////////////////////// // Function: ComputedVertices::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVertices:: ComputedVertices() { @@ -26,7 +39,7 @@ ComputedVertices() { //////////////////////////////////////////////////////////////////// // Function: ComputedVertices::VertexTransform::Ordering operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ComputedVertices::VertexTransform:: operator < (const ComputedVertices::VertexTransform &other) const { diff --git a/panda/src/char/computedVertices.cxx b/panda/src/char/computedVertices.cxx index c40f94c2ff..81efca413f 100644 --- a/panda/src/char/computedVertices.cxx +++ b/panda/src/char/computedVertices.cxx @@ -1,6 +1,19 @@ // Filename: computedVertices.cxx // Created by: drose (01Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "computedVertices.h" @@ -21,7 +34,7 @@ TypeHandle ComputedVertices::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ComputedVertices::VertexTransform::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ComputedVertices::VertexTransform:: VertexTransform(const VertexTransform ©) : @@ -59,7 +72,7 @@ compute_morphs(ValueType *table, const vector &morph_list, typedef typename MorphValue::VecType VecType; ushort index = (*mi)._index; const VecType &v = (*mi)._vector; - + table[index] += v * slider_value; } } @@ -93,7 +106,7 @@ write_datagram(Datagram &dest) //////////////////////////////////////////////////////////////////// // Function: VertexTransform::read_datagram // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVertices::VertexTransform:: read_datagram(DatagramIterator &source) @@ -139,7 +152,7 @@ update(Character *character) { int table_size = sizeof(Vertexf) * _orig_coords.size(); Vertexf *morphed_coords = (Vertexf *)alloca(table_size); memcpy(morphed_coords, _orig_coords, table_size); - + compute_morphs(morphed_coords, _vertex_morphs, character); orig_coords = morphed_coords; } @@ -198,8 +211,8 @@ update(Character *character) { CharacterJoint *joint; DCAST_INTO_V(joint, character->get_part(vt._joint_index)); - mat = - joint->_initial_net_transform_inverse * + mat = + joint->_initial_net_transform_inverse * joint->_net_transform; } @@ -258,12 +271,12 @@ make_orig(Character *character) { //////////////////////////////////////////////////////////////////// // Function: ComputedVertices::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVertices:: write(ostream &out, Character *character) const { VertexTransforms::const_iterator vti; - + out << "ComputedVertices:\n"; for (vti = _transforms.begin(); vti != _transforms.end(); ++vti) { const VertexTransform &vt = (*vti); @@ -319,22 +332,22 @@ write_datagram(BamWriter *manager, Datagram &me) me.add_uint16(_vertex_morphs.size()); for(i = 0; i < (int)_vertex_morphs.size(); i++){ _vertex_morphs[i].write_datagram(me); - } + } me.add_uint16(_normal_morphs.size()); for(i = 0; i < (int)_normal_morphs.size(); i++){ _normal_morphs[i].write_datagram(me); - } - + } + me.add_uint16(_texcoord_morphs.size()); for(i = 0; i < (int)_texcoord_morphs.size(); i++){ _texcoord_morphs[i].write_datagram(me); - } + } me.add_uint16(_color_morphs.size()); for(i = 0; i < (int)_color_morphs.size(); i++){ _color_morphs[i].write_datagram(me); - } + } //Original Coordinates for vertices, colors, normals and textures WRITE_PTA(manager, me, IPD_Vertexf::write_datagram, _orig_coords) @@ -389,7 +402,7 @@ fillin(DatagramIterator& scan, BamReader* manager) ComputedVerticesMorphColor cm; cm.read_datagram(scan); _color_morphs.push_back(cm); - } + } //Original Coordinates for vertices, colors, normals and textures READ_PTA(manager, scan, IPD_Vertexf::read_datagram, _orig_coords) diff --git a/panda/src/char/computedVertices.h b/panda/src/char/computedVertices.h index 70e892abbc..10207ab001 100644 --- a/panda/src/char/computedVertices.h +++ b/panda/src/char/computedVertices.h @@ -2,6 +2,19 @@ // Created by: drose (01Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COMPUTEDVERTICES_H #define COMPUTEDVERTICES_H @@ -47,8 +60,8 @@ private: Vertices _nindex; INLINE bool operator < (const VertexTransform &other) const; public: - void write_datagram(Datagram &dest); - void read_datagram(DatagramIterator &source); + void write_datagram(Datagram &dest); + void read_datagram(DatagramIterator &source); }; typedef vector VertexTransforms; @@ -71,7 +84,7 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_ComputedVertices(const FactoryParams ¶ms); diff --git a/panda/src/char/computedVerticesMorph.I b/panda/src/char/computedVerticesMorph.I index 668e6215fe..27b1881dcb 100644 --- a/panda/src/char/computedVerticesMorph.I +++ b/panda/src/char/computedVerticesMorph.I @@ -1,6 +1,19 @@ // Filename: computedVerticesMorph.I // Created by: drose (03Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "characterSlider.h" @@ -8,17 +21,17 @@ //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVerticesMorphValue2:: -ComputedVerticesMorphValue2(int index, const VecType &mvector) +ComputedVerticesMorphValue2(int index, const VecType &mvector) : _index(index), _vector(mvector) { } //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVerticesMorphValue2:: ComputedVerticesMorphValue2(void){ @@ -27,17 +40,17 @@ ComputedVerticesMorphValue2(void){ //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVerticesMorphValue3:: -ComputedVerticesMorphValue3(int index, const VecType &mvector) +ComputedVerticesMorphValue3(int index, const VecType &mvector) : _index(index), _vector(mvector) { } //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVerticesMorphValue3:: ComputedVerticesMorphValue3(void){ @@ -46,17 +59,17 @@ ComputedVerticesMorphValue3(void){ //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVerticesMorphValue4:: -ComputedVerticesMorphValue4(int index, const VecType &mvector) +ComputedVerticesMorphValue4(int index, const VecType &mvector) : _index(index), _vector(mvector) { } //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ComputedVerticesMorphValue4:: ComputedVerticesMorphValue4(void){ @@ -65,18 +78,18 @@ ComputedVerticesMorphValue4(void){ //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorph::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template ComputedVerticesMorph:: ComputedVerticesMorph() { _slider_index = -1; } - + //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorph::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template ComputedVerticesMorph:: @@ -85,17 +98,17 @@ ComputedVerticesMorph(const ComputedVerticesMorph &co _morphs(copy._morphs) { } - + //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorph::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void ComputedVerticesMorph:: output(ostream &out) const { - out << "morph index " << _slider_index << ": " + out << "morph index " << _slider_index << ": " << _morphs.size() << " points."; } @@ -103,7 +116,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorph::write_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void ComputedVerticesMorph:: @@ -120,7 +133,7 @@ write_datagram(Datagram &dest) //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorph::read_datagram // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void ComputedVerticesMorph:: diff --git a/panda/src/char/computedVerticesMorph.cxx b/panda/src/char/computedVerticesMorph.cxx index fb114da2e1..c7b2347bcd 100644 --- a/panda/src/char/computedVerticesMorph.cxx +++ b/panda/src/char/computedVerticesMorph.cxx @@ -1,6 +1,19 @@ // Filename: computedVerticesMorph.cxx // Created by: jason (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "computedVerticesMorph.h" @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue2::write_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMorphValue2:: write_datagram(Datagram &dest) @@ -25,7 +38,7 @@ write_datagram(Datagram &dest) //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue2::read_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMorphValue2:: read_datagram(DatagramIterator &source) @@ -37,7 +50,7 @@ read_datagram(DatagramIterator &source) //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue3::write_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMorphValue3:: write_datagram(Datagram &dest) @@ -49,7 +62,7 @@ write_datagram(Datagram &dest) //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue3::read_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMorphValue3:: read_datagram(DatagramIterator &source) @@ -61,7 +74,7 @@ read_datagram(DatagramIterator &source) //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue4::write_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMorphValue4:: write_datagram(Datagram &dest) @@ -73,7 +86,7 @@ write_datagram(Datagram &dest) //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMorphValue4::read_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMorphValue4:: read_datagram(DatagramIterator &source) diff --git a/panda/src/char/computedVerticesMorph.h b/panda/src/char/computedVerticesMorph.h index 0960a264bd..24525d834f 100644 --- a/panda/src/char/computedVerticesMorph.h +++ b/panda/src/char/computedVerticesMorph.h @@ -2,6 +2,19 @@ // Created by: drose (03Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COMPUTEDVERTICESMORPH_H #define COMPUTEDVERTICESMORPH_H @@ -30,7 +43,7 @@ public: INLINE ComputedVerticesMorphValue2(int index, const VecType &mvector); INLINE ComputedVerticesMorphValue2(void); - + ushort _index; VecType _vector; @@ -50,7 +63,7 @@ public: typedef LVector3f VecType; INLINE ComputedVerticesMorphValue3(int index, const VecType &mvector); - INLINE ComputedVerticesMorphValue3(void); + INLINE ComputedVerticesMorphValue3(void); ushort _index; VecType _vector; @@ -72,7 +85,7 @@ public: INLINE ComputedVerticesMorphValue4(int index, const VecType &mvector); INLINE ComputedVerticesMorphValue4(void); - + ushort _index; VecType _vector; @@ -102,8 +115,8 @@ public: Morphs _morphs; public: - void write_datagram(Datagram &dest); - void read_datagram(DatagramIterator &source); + void write_datagram(Datagram &dest); + void read_datagram(DatagramIterator &source); }; template diff --git a/panda/src/char/config_char.cxx b/panda/src/char/config_char.cxx index 3e4850b758..00b5862f0d 100644 --- a/panda/src/char/config_char.cxx +++ b/panda/src/char/config_char.cxx @@ -1,6 +1,19 @@ // Filename: config_char.cxx // Created by: drose (28Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_char.h" diff --git a/panda/src/char/config_char.h b/panda/src/char/config_char.h index b347943fd4..4a5cd355a6 100644 --- a/panda/src/char/config_char.h +++ b/panda/src/char/config_char.h @@ -1,6 +1,19 @@ // Filename: config_char.h // Created by: drose (28Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_CHAR_H diff --git a/panda/src/char/dynamicVertices.cxx b/panda/src/char/dynamicVertices.cxx index bef7903426..4b65881fda 100644 --- a/panda/src/char/dynamicVertices.cxx +++ b/panda/src/char/dynamicVertices.cxx @@ -1,6 +1,19 @@ // Filename: dynamicVertices.cxx // Created by: drose (01Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dynamicVertices.h" @@ -17,7 +30,7 @@ TypeHandle DynamicVertices::_type_handle; //////////////////////////////////////////////////////////////////// // Function: DynamicVertices::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DynamicVertices:: DynamicVertices() { diff --git a/panda/src/char/dynamicVertices.h b/panda/src/char/dynamicVertices.h index 0adfeff12b..ceb7bb3fbf 100644 --- a/panda/src/char/dynamicVertices.h +++ b/panda/src/char/dynamicVertices.h @@ -2,6 +2,19 @@ // Created by: drose (01Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DYNAMICVERTICES_H #define DYNAMICVERTICES_H @@ -35,7 +48,7 @@ public: PTA_TexCoordf _texcoords; public: - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); void fillin(DatagramIterator& scan, BamReader* manager); public: diff --git a/panda/src/chat/chatHelpers.cxx b/panda/src/chat/chatHelpers.cxx index 94eb83c311..2f2c81357d 100644 --- a/panda/src/chat/chatHelpers.cxx +++ b/panda/src/chat/chatHelpers.cxx @@ -3,13 +3,22 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chatHelpers.h" //////////////////////////////////////////////////////////////////// -// Function: add_line_wraps +// Function: add_line_wraps // Description: Take an input string and format it so that lines // will wrap before they reach line_length (unless // there is no whitespace). @@ -18,7 +27,7 @@ string add_line_wraps(const string& str, int line_length) { string new_str; string old_str = str; - if (str.length() <= line_length) + if (str.length() <= line_length) return old_str; int length_so_far = 0; diff --git a/panda/src/chat/chatHelpers.h b/panda/src/chat/chatHelpers.h index 77c6e27f87..10ab14087f 100644 --- a/panda/src/chat/chatHelpers.h +++ b/panda/src/chat/chatHelpers.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CHATHELPERS_H #define CHATHELPERS_H // diff --git a/panda/src/chat/chatInput.I b/panda/src/chat/chatInput.I index 1b9077044a..8726ca6a16 100644 --- a/panda/src/chat/chatInput.I +++ b/panda/src/chat/chatInput.I @@ -1,6 +1,19 @@ // Filename: chatInput.I // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -164,6 +177,6 @@ get_max_width() const { // far. //////////////////////////////////////////////////////////////////// INLINE const string &ChatInput:: -get_string() const { - return _str; +get_string() const { + return _str; } diff --git a/panda/src/chat/chatInput.cxx b/panda/src/chat/chatInput.cxx index bf1c97c0a2..89d1006f72 100644 --- a/panda/src/chat/chatInput.cxx +++ b/panda/src/chat/chatInput.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "chatInput.h" @@ -43,15 +52,15 @@ ChatInput(TextNode* text_node, const string& name) : DataNode(name) { // does not reset the max_chars setting. //////////////////////////////////////////////////////////////////// void ChatInput:: -reset() { - _str = ""; +reset() { + _str = ""; _text_node->set_text(_str); } //////////////////////////////////////////////////////////////////// // Function: ChatInput::transmit_data // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ChatInput:: transmit_data(NodeAttributes &data) { @@ -103,7 +112,7 @@ init_type(void) { } //////////////////////////////////////////////////////////////////// -// Function: append +// Function: append // Access: Public // Description: Appends the indicated string to the end of the // currently typed string, as if it were typed by the @@ -136,7 +145,7 @@ append_character(char ch) { string text = _str + ch; if (_text_node->has_wordwrap()) { - text = + text = _text_node->wordwrap_to(text, _text_node->get_wordwrap()); } diff --git a/panda/src/chat/chatInput.h b/panda/src/chat/chatInput.h index 2048ca8952..cf3ed72fc1 100644 --- a/panda/src/chat/chatInput.h +++ b/panda/src/chat/chatInput.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CHATINPUT_H #define CHATINPUT_H // diff --git a/panda/src/chat/config_chat.cxx b/panda/src/chat/config_chat.cxx index e35b6e7b6c..c8bfb43deb 100644 --- a/panda/src/chat/config_chat.cxx +++ b/panda/src/chat/config_chat.cxx @@ -1,6 +1,19 @@ // Filename: config_chat.cxx // Created by: drose (04May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_chat.h" diff --git a/panda/src/chat/config_chat.h b/panda/src/chat/config_chat.h index 4e7263f621..a05a608972 100644 --- a/panda/src/chat/config_chat.h +++ b/panda/src/chat/config_chat.h @@ -1,6 +1,19 @@ // Filename: config_chat.h // Created by: drose (04May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_CHAT_H diff --git a/panda/src/collide/collisionEntry.I b/panda/src/collide/collisionEntry.I index 7aecdc49e8..c450c1579e 100644 --- a/panda/src/collide/collisionEntry.I +++ b/panda/src/collide/collisionEntry.I @@ -1,12 +1,25 @@ // Filename: collisionEntry.I // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionEntry:: CollisionEntry() { @@ -125,7 +138,7 @@ get_into_space() const { //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::get_wrt_space // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LMatrix4f &CollisionEntry:: get_wrt_space() const { @@ -135,7 +148,7 @@ get_wrt_space() const { //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::get_inv_wrt_space // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LMatrix4f &CollisionEntry:: get_inv_wrt_space() const { @@ -145,7 +158,7 @@ get_inv_wrt_space() const { //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::set_into_intersection_point // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionEntry:: set_into_intersection_point(const LPoint3f &point) { @@ -209,7 +222,7 @@ get_from_intersection_point() const { //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::set_into_surface_normal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionEntry:: set_into_surface_normal(const LVector3f &normal) { @@ -247,7 +260,7 @@ get_into_surface_normal() const { //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::set_into_depth // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionEntry:: set_into_depth(float depth) { diff --git a/panda/src/collide/collisionEntry.cxx b/panda/src/collide/collisionEntry.cxx index f66486d6e5..8397700183 100644 --- a/panda/src/collide/collisionEntry.cxx +++ b/panda/src/collide/collisionEntry.cxx @@ -1,6 +1,19 @@ // Filename: collisionEntry.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionEntry.h" @@ -10,7 +23,7 @@ TypeHandle CollisionEntry::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionEntry:: CollisionEntry(const CollisionEntry ©) : @@ -26,14 +39,14 @@ CollisionEntry(const CollisionEntry ©) : _flags(copy._flags), _into_intersection_point(copy._into_intersection_point), _into_surface_normal(copy._into_surface_normal), - _into_depth(copy._into_depth) + _into_depth(copy._into_depth) { } //////////////////////////////////////////////////////////////////// // Function: CollisionEntry::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionEntry:: operator = (const CollisionEntry ©) { diff --git a/panda/src/collide/collisionEntry.h b/panda/src/collide/collisionEntry.h index 7d53948582..6da5d0e8b0 100644 --- a/panda/src/collide/collisionEntry.h +++ b/panda/src/collide/collisionEntry.h @@ -1,6 +1,19 @@ // Filename: collisionEntry.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONENTRY_H @@ -105,7 +118,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; @@ -113,6 +126,6 @@ private: #include "collisionEntry.I" #endif - - + + diff --git a/panda/src/collide/collisionHandler.cxx b/panda/src/collide/collisionHandler.cxx index a0fea02eab..043c1e6f51 100644 --- a/panda/src/collide/collisionHandler.cxx +++ b/panda/src/collide/collisionHandler.cxx @@ -1,6 +1,19 @@ // Filename: collisionHandler.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionHandler.h" diff --git a/panda/src/collide/collisionHandler.h b/panda/src/collide/collisionHandler.h index 8c6ba28d3e..eeee56a278 100644 --- a/panda/src/collide/collisionHandler.h +++ b/panda/src/collide/collisionHandler.h @@ -1,6 +1,19 @@ // Filename: collisionHandler.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONHANDLER_H @@ -42,7 +55,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; @@ -50,6 +63,6 @@ private: }; #endif - - + + diff --git a/panda/src/collide/collisionHandlerEvent.I b/panda/src/collide/collisionHandlerEvent.I index 1f10a8892d..1c4fc5d175 100644 --- a/panda/src/collide/collisionHandlerEvent.I +++ b/panda/src/collide/collisionHandlerEvent.I @@ -1,6 +1,19 @@ // Filename: collisionHandlerEvent.I // Created by: drose (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -11,7 +24,7 @@ // detected. //////////////////////////////////////////////////////////////////// INLINE bool CollisionHandlerEvent::SortEntries:: -operator () (const PT(CollisionEntry) &a, +operator () (const PT(CollisionEntry) &a, const PT(CollisionEntry) &b) const { if (a->get_from_node() != b->get_from_node()) { return a->get_from_node() < b->get_from_node(); diff --git a/panda/src/collide/collisionHandlerEvent.cxx b/panda/src/collide/collisionHandlerEvent.cxx index 3966f8ba9c..d6cbe91f09 100644 --- a/panda/src/collide/collisionHandlerEvent.cxx +++ b/panda/src/collide/collisionHandlerEvent.cxx @@ -1,6 +1,19 @@ // Filename: collisionHandlerEvent.cxx // Created by: drose (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionHandlerEvent.h" @@ -80,7 +93,7 @@ end_group() { collide_cat.spam() << "end_group.\n" << "current_colliding has " << _current_colliding.size() - << " entries, last_colliding has " << _last_colliding.size() + << " entries, last_colliding has " << _last_colliding.size() << "\n"; } @@ -170,15 +183,15 @@ throw_event_pattern(const string &pattern, CollisionEntry *entry) { event += entry->get_into_node()->get_name(); } else if (cmd == "ft") { - event += + event += (!entry->get_from()->is_tangible() ? 'i' : 't'); } else if (cmd == "it") { - event += + event += (entry->has_into() && !entry->get_into()->is_tangible() ? 'i' : 't'); } else if (cmd == "ig") { - event += + event += (entry->has_into() ? 'c' : 'g'); } else { diff --git a/panda/src/collide/collisionHandlerEvent.h b/panda/src/collide/collisionHandlerEvent.h index 78bd3d57e9..5edfbdabdf 100644 --- a/panda/src/collide/collisionHandlerEvent.h +++ b/panda/src/collide/collisionHandlerEvent.h @@ -1,6 +1,19 @@ // Filename: collisionHandlerEvent.h // Created by: drose (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONHANDLEREVENT_H @@ -53,8 +66,8 @@ private: class SortEntries { public: - INLINE bool - operator () (const PT(CollisionEntry) &a, + INLINE bool + operator () (const PT(CollisionEntry) &a, const PT(CollisionEntry) &b) const; INLINE void operator = (const SortEntries &other); }; @@ -76,7 +89,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; @@ -84,6 +97,6 @@ private: #include "collisionHandlerEvent.I" #endif - - + + diff --git a/panda/src/collide/collisionHandlerFloor.I b/panda/src/collide/collisionHandlerFloor.I index 31048583bc..5670462c3c 100644 --- a/panda/src/collide/collisionHandlerFloor.I +++ b/panda/src/collide/collisionHandlerFloor.I @@ -1,6 +1,19 @@ // Filename: collisionHandlerFloor.I // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/collide/collisionHandlerFloor.cxx b/panda/src/collide/collisionHandlerFloor.cxx index fefde28d19..0dc2763c61 100644 --- a/panda/src/collide/collisionHandlerFloor.cxx +++ b/panda/src/collide/collisionHandlerFloor.cxx @@ -1,6 +1,19 @@ // Filename: collisionHandlerFloor.cxx // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionHandlerFloor.h" @@ -15,7 +28,7 @@ TypeHandle CollisionHandlerFloor::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerFloor::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionHandlerFloor:: CollisionHandlerFloor() { @@ -26,7 +39,7 @@ CollisionHandlerFloor() { //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerFloor::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionHandlerFloor:: ~CollisionHandlerFloor() { @@ -54,7 +67,7 @@ handle_entries() { // it this CollisionHandler pointer--but they didn't tell us // about the node. collide_cat.error() - << "CollisionHandlerFloor doesn't know about " + << "CollisionHandlerFloor doesn't know about " << *from_node << "\n"; } else { @@ -94,7 +107,7 @@ handle_entries() { } if (adjust < 0.0 && _max_velocity != 0.0) { - float max_adjust = + float max_adjust = _max_velocity * ClockObject::get_global_clock()->get_dt(); adjust = max(adjust, -max_adjust); } diff --git a/panda/src/collide/collisionHandlerFloor.h b/panda/src/collide/collisionHandlerFloor.h index 90fe0e91a0..578de285ce 100644 --- a/panda/src/collide/collisionHandlerFloor.h +++ b/panda/src/collide/collisionHandlerFloor.h @@ -1,6 +1,19 @@ // Filename: collisionHandlerFloor.h // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONHANDLERFLOOR_H @@ -52,7 +65,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; @@ -60,6 +73,6 @@ private: #include "collisionHandlerFloor.I" #endif - - + + diff --git a/panda/src/collide/collisionHandlerPhysical.I b/panda/src/collide/collisionHandlerPhysical.I index cbbdd80ad4..5fc9312255 100644 --- a/panda/src/collide/collisionHandlerPhysical.I +++ b/panda/src/collide/collisionHandlerPhysical.I @@ -1,12 +1,25 @@ // Filename: collisionHandlerPhysical.I // Created by: drose (03Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPhysical::ColliderDef::set_drive_interface // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionHandlerPhysical::ColliderDef:: set_drive_interface(DriveInterface *drive_interface) { @@ -17,7 +30,7 @@ set_drive_interface(DriveInterface *drive_interface) { //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPhysical::ColliderDef::set_arc // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionHandlerPhysical::ColliderDef:: set_arc(NodeRelation *arc) { diff --git a/panda/src/collide/collisionHandlerPhysical.cxx b/panda/src/collide/collisionHandlerPhysical.cxx index 720784ad37..be956dc07c 100644 --- a/panda/src/collide/collisionHandlerPhysical.cxx +++ b/panda/src/collide/collisionHandlerPhysical.cxx @@ -1,6 +1,19 @@ // Filename: collisionHandlerPhysical.cxx // Created by: drose (03Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionHandlerPhysical.h" @@ -61,7 +74,7 @@ set_mat(const LMatrix4f &mat) const { //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPhysical::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionHandlerPhysical:: CollisionHandlerPhysical() { @@ -70,7 +83,7 @@ CollisionHandlerPhysical() { //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPhysical::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionHandlerPhysical:: ~CollisionHandlerPhysical() { @@ -101,7 +114,7 @@ add_entry(CollisionEntry *entry) { nassertv(entry != (CollisionEntry *)NULL); CollisionHandlerEvent::add_entry(entry); - if (entry->get_from()->is_tangible() && + if (entry->get_from()->is_tangible() && (!entry->has_into() || entry->get_into()->is_tangible())) { _from_entries[entry->get_from_node()].push_back(entry); } diff --git a/panda/src/collide/collisionHandlerPhysical.h b/panda/src/collide/collisionHandlerPhysical.h index 8e4af9fff9..cf2dba38b5 100644 --- a/panda/src/collide/collisionHandlerPhysical.h +++ b/panda/src/collide/collisionHandlerPhysical.h @@ -1,6 +1,19 @@ // Filename: collisionHandlerPhysical.h // Created by: drose (03Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONHANDLERPHYSICAL_H @@ -75,7 +88,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; @@ -83,6 +96,6 @@ private: #include "collisionHandlerPhysical.I" #endif - - + + diff --git a/panda/src/collide/collisionHandlerPusher.I b/panda/src/collide/collisionHandlerPusher.I index 71f20fe059..270df258ab 100644 --- a/panda/src/collide/collisionHandlerPusher.I +++ b/panda/src/collide/collisionHandlerPusher.I @@ -1,12 +1,25 @@ // Filename: collisionHandlerPusher.I // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPusher::set_horizontal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionHandlerPusher:: set_horizontal(bool flag) { @@ -16,7 +29,7 @@ set_horizontal(bool flag) { //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPusher::get_horizontal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool CollisionHandlerPusher:: get_horizontal() const { diff --git a/panda/src/collide/collisionHandlerPusher.cxx b/panda/src/collide/collisionHandlerPusher.cxx index 4c1d37b4a9..55313ed0f3 100644 --- a/panda/src/collide/collisionHandlerPusher.cxx +++ b/panda/src/collide/collisionHandlerPusher.cxx @@ -1,6 +1,19 @@ // Filename: collisionHandlerPusher.cxx // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionHandlerPusher.h" @@ -26,7 +39,7 @@ public: //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPusher::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionHandlerPusher:: CollisionHandlerPusher() { @@ -36,7 +49,7 @@ CollisionHandlerPusher() { //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerPusher::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionHandlerPusher:: ~CollisionHandlerPusher() { @@ -64,7 +77,7 @@ handle_entries() { // it this CollisionHandler pointer--but they didn't tell us // about the node. collide_cat.error() - << "CollisionHandlerPusher doesn't know about " + << "CollisionHandlerPusher doesn't know about " << *from_node << "\n"; } else { @@ -99,13 +112,13 @@ handle_entries() { // Shove it just enough to clear the volume. if (entry->get_into_depth() != 0.0) { ShoveData sd; - sd._shove = + sd._shove = entry->get_into_surface_normal() * entry->get_into_depth(); if (collide_cat.is_debug()) { collide_cat.debug() - << "Shove on " << *from_node << " from " + << "Shove on " << *from_node << " from " << *entry->get_into_node() << ": " << sd._shove << "\n"; } @@ -161,10 +174,10 @@ handle_entries() { if (_horizontal) { net_shove[2] = 0.0; } - + if (collide_cat.is_debug()) { collide_cat.debug() - << "Net shove on " << *from_node << " is: " + << "Net shove on " << *from_node << " is: " << net_shove << "\n"; } diff --git a/panda/src/collide/collisionHandlerPusher.h b/panda/src/collide/collisionHandlerPusher.h index d9825d50eb..0d537944bd 100644 --- a/panda/src/collide/collisionHandlerPusher.h +++ b/panda/src/collide/collisionHandlerPusher.h @@ -1,6 +1,19 @@ // Filename: collisionHandlerPusher.h // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONHANDLERPUSHER_H @@ -46,7 +59,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; @@ -54,6 +67,6 @@ private: #include "collisionHandlerPusher.I" #endif - - + + diff --git a/panda/src/collide/collisionHandlerQueue.cxx b/panda/src/collide/collisionHandlerQueue.cxx index 4066d097ee..039b411f9a 100644 --- a/panda/src/collide/collisionHandlerQueue.cxx +++ b/panda/src/collide/collisionHandlerQueue.cxx @@ -1,6 +1,19 @@ // Filename: collisionHandlerQueue.cxx // Created by: drose (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionHandlerQueue.h" @@ -13,8 +26,8 @@ class CollisionEntrySorter { public: CollisionEntrySorter(CollisionEntry *entry) { _entry = entry; - LVector3f vec = - entry->get_from_intersection_point() - + LVector3f vec = + entry->get_from_intersection_point() - entry->get_from()->get_collision_origin(); _dist2 = vec.length_squared(); } @@ -29,7 +42,7 @@ public: //////////////////////////////////////////////////////////////////// // Function: CollisionHandlerQueue::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionHandlerQueue:: CollisionHandlerQueue() { @@ -76,7 +89,7 @@ sort_entries() { typedef vector Sorter; Sorter sorter; sorter.reserve(_entries.size()); - + Entries::const_iterator ei; for (ei = _entries.begin(); ei != _entries.end(); ++ei) { sorter.push_back(CollisionEntrySorter(*ei)); diff --git a/panda/src/collide/collisionHandlerQueue.h b/panda/src/collide/collisionHandlerQueue.h index eeeb6a3f46..b32d236dde 100644 --- a/panda/src/collide/collisionHandlerQueue.h +++ b/panda/src/collide/collisionHandlerQueue.h @@ -1,6 +1,19 @@ // Filename: collisionHandlerQueue.h // Created by: drose (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONHANDLERQUEUE_H @@ -52,12 +65,12 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - - + + diff --git a/panda/src/collide/collisionLevelState.I b/panda/src/collide/collisionLevelState.I index fee4c8b47c..c609eefb0c 100644 --- a/panda/src/collide/collisionLevelState.I +++ b/panda/src/collide/collisionLevelState.I @@ -1,13 +1,26 @@ // Filename: collisionLevelState.I // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionLevelState:: CollisionLevelState(const ArcChain &arc_chain) : @@ -18,7 +31,7 @@ CollisionLevelState(const ArcChain &arc_chain) : //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionLevelState:: CollisionLevelState(const CollisionLevelState ©) : @@ -33,7 +46,7 @@ CollisionLevelState(const CollisionLevelState ©) : //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::Copy Assignment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionLevelState:: operator = (const CollisionLevelState ©) { @@ -69,7 +82,7 @@ get_arc_chain() const { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::get_num_colliders // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int CollisionLevelState:: get_num_colliders() const { @@ -104,7 +117,7 @@ has_collider_with_geom(int n) const { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::has_any_collider // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool CollisionLevelState:: has_any_collider() const { @@ -139,7 +152,7 @@ reached_collision_node() { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::get_collider // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSolid *CollisionLevelState:: get_collider(int n) const { @@ -152,7 +165,7 @@ get_collider(int n) const { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::get_node // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionNode *CollisionLevelState:: get_node(int n) const { @@ -165,7 +178,7 @@ get_node(int n) const { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::get_space // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LMatrix4f &CollisionLevelState:: get_space(int n) const { @@ -178,7 +191,7 @@ get_space(int n) const { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::get_inv_space // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LMatrix4f &CollisionLevelState:: get_inv_space(int n) const { @@ -191,7 +204,7 @@ get_inv_space(int n) const { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::get_local_bound // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const GeometricBoundingVolume *CollisionLevelState:: get_local_bound(int n) const { @@ -210,7 +223,7 @@ get_local_bound(int n) const { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::omit_collider // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionLevelState:: omit_collider(int n) { @@ -223,7 +236,7 @@ omit_collider(int n) { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::get_mask // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionLevelState::ColliderMask CollisionLevelState:: get_mask(int n) const { diff --git a/panda/src/collide/collisionLevelState.cxx b/panda/src/collide/collisionLevelState.cxx index 66392dd6ab..8f5e225fa1 100644 --- a/panda/src/collide/collisionLevelState.cxx +++ b/panda/src/collide/collisionLevelState.cxx @@ -1,6 +1,19 @@ // Filename: collisionLevelState.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionLevelState.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::clear // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionLevelState:: clear() { @@ -23,9 +36,9 @@ clear() { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::reserve // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -void CollisionLevelState:: +void CollisionLevelState:: reserve(int max_colliders) { _colliders.reserve(max_colliders); _local_bounds.reserve(max_colliders); @@ -37,7 +50,7 @@ reserve(int max_colliders) { // Description: Adds the indicated Collider to the set of Colliders // in the current level state. //////////////////////////////////////////////////////////////////// -void CollisionLevelState:: +void CollisionLevelState:: prepare_collider(const ColliderDef &def) { int index = (int)_colliders.size(); _colliders.push_back(def); @@ -63,16 +76,16 @@ prepare_collider(const ColliderDef &def) { //////////////////////////////////////////////////////////////////// // Function: CollisionLevelState::xform // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -void CollisionLevelState:: +void CollisionLevelState:: xform(const LMatrix4f &mat) { BoundingVolumes new_bounds; int num_colliders = get_num_colliders(); new_bounds.reserve(num_colliders); for (int c = 0; c < num_colliders; c++) { - if (!has_collider(c) || + if (!has_collider(c) || get_local_bound(c) == (GeometricBoundingVolume *)NULL) { new_bounds.push_back((GeometricBoundingVolume *)NULL); } else { diff --git a/panda/src/collide/collisionLevelState.h b/panda/src/collide/collisionLevelState.h index ab9e342ac4..960f17aeb4 100644 --- a/panda/src/collide/collisionLevelState.h +++ b/panda/src/collide/collisionLevelState.h @@ -1,6 +1,19 @@ // Filename: collisionLevelState.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONLEVELSTATE_H diff --git a/panda/src/collide/collisionNode.I b/panda/src/collide/collisionNode.I index 128b1080f7..c60b4f43a3 100644 --- a/panda/src/collide/collisionNode.I +++ b/panda/src/collide/collisionNode.I @@ -1,6 +1,19 @@ // Filename: collisionNode.I // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionSolid.h" @@ -107,7 +120,7 @@ get_collide_geom() const { //////////////////////////////////////////////////////////////////// // Function: CollisionNode::get_num_solids // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int CollisionNode:: get_num_solids() const { @@ -117,7 +130,7 @@ get_num_solids() const { //////////////////////////////////////////////////////////////////// // Function: CollisionNode::get_solid // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSolid *CollisionNode:: get_solid(int n) const { @@ -132,7 +145,7 @@ get_solid(int n) const { // will shift all subsequent indices down by one. //////////////////////////////////////////////////////////////////// INLINE void CollisionNode:: -remove_solid(int n) { +remove_solid(int n) { nassertv(n >= 0 && n < get_num_solids()); _solids.erase(_solids.begin() + n); mark_bound_stale(); diff --git a/panda/src/collide/collisionNode.cxx b/panda/src/collide/collisionNode.cxx index 62da7b4b9a..54bdd74d0b 100644 --- a/panda/src/collide/collisionNode.cxx +++ b/panda/src/collide/collisionNode.cxx @@ -1,6 +1,19 @@ // Filename: collisionNode.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionNode.h" @@ -17,10 +30,10 @@ TypeHandle CollisionNode::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionNode:: -CollisionNode(const string &name) : +CollisionNode(const string &name) : NamedNode(name), _from_collide_mask(CollideMask::all_on()), _into_collide_mask(CollideMask::all_on()), @@ -34,7 +47,7 @@ CollisionNode(const string &name) : // Description: //////////////////////////////////////////////////////////////////// CollisionNode:: -CollisionNode(const CollisionNode ©) : +CollisionNode(const CollisionNode ©) : NamedNode(copy), _from_collide_mask(copy._from_collide_mask), _into_collide_mask(copy._into_collide_mask), @@ -233,7 +246,7 @@ fillin(DatagramIterator& scan, BamReader* manager) // Function: CollisionNode::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int CollisionNode:: @@ -244,7 +257,7 @@ complete_pointers(vector_typedWritable &plist, BamReader* manager) { for (int i = 0; i < num_solids; i++) { _solids[i] = DCAST(CollisionSolid, plist[start + i]); } - + return start + num_solids; } diff --git a/panda/src/collide/collisionNode.h b/panda/src/collide/collisionNode.h index e59b32ae8a..5534263f32 100644 --- a/panda/src/collide/collisionNode.h +++ b/panda/src/collide/collisionNode.h @@ -1,6 +1,19 @@ // Filename: collisionNode.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONNODE_H @@ -64,15 +77,15 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_CollisionNode(const FactoryParams ¶ms); protected: void fillin(DatagramIterator& scan, BamReader* manager); - + public: static TypeHandle get_class_type(void) { return _type_handle; @@ -86,7 +99,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/collide/collisionPlane.I b/panda/src/collide/collisionPlane.I index 9d0d04f67a..e1abac5295 100644 --- a/panda/src/collide/collisionPlane.I +++ b/panda/src/collide/collisionPlane.I @@ -1,6 +1,19 @@ // Filename: collisionPlane.I // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -17,7 +30,7 @@ CollisionPlane() { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPlane:: CollisionPlane(const Planef &plane) : @@ -28,7 +41,7 @@ CollisionPlane(const Planef &plane) : //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPlane:: CollisionPlane(const CollisionPlane ©) : @@ -40,7 +53,7 @@ CollisionPlane(const CollisionPlane ©) : //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::get_normal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LVector3f CollisionPlane:: get_normal() const { @@ -50,7 +63,7 @@ get_normal() const { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::dist_to_plane // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float CollisionPlane:: dist_to_plane(const LPoint3f &point) const { @@ -60,7 +73,7 @@ dist_to_plane(const LPoint3f &point) const { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::set_plane // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionPlane:: set_plane(const Planef &plane) { @@ -72,7 +85,7 @@ set_plane(const Planef &plane) { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::get_plane // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const Planef &CollisionPlane:: get_plane() const { diff --git a/panda/src/collide/collisionPlane.cxx b/panda/src/collide/collisionPlane.cxx index 50b88bfb9b..7f3efb6985 100644 --- a/panda/src/collide/collisionPlane.cxx +++ b/panda/src/collide/collisionPlane.cxx @@ -1,6 +1,19 @@ // Filename: collisionPlane.cxx // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionPlane.h" @@ -25,7 +38,7 @@ TypeHandle CollisionPlane::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid *CollisionPlane:: make_copy() { @@ -35,7 +48,7 @@ make_copy() { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::test_intersection // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionPlane:: test_intersection(CollisionHandler *, const CollisionEntry &, @@ -77,7 +90,7 @@ get_collision_origin() const { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionPlane:: output(ostream &out) const { @@ -87,7 +100,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::recompute_bound // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionPlane:: recompute_bound() { @@ -101,7 +114,7 @@ recompute_bound() { //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::test_intersection_from_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionPlane:: test_intersection_from_sphere(CollisionHandler *record, @@ -110,7 +123,7 @@ test_intersection_from_sphere(CollisionHandler *record, DCAST_INTO_R(sphere, entry.get_from(), 0); LPoint3f from_center = sphere->get_center() * entry.get_wrt_space(); - LVector3f from_radius_v = + LVector3f from_radius_v = LVector3f(sphere->get_radius(), 0.0f, 0.0f) * entry.get_wrt_space(); float from_radius = length(from_radius_v); @@ -122,7 +135,7 @@ test_intersection_from_sphere(CollisionHandler *record, if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); @@ -140,7 +153,7 @@ test_intersection_from_sphere(CollisionHandler *record, //////////////////////////////////////////////////////////////////// // Function: CollisionPlane::test_intersection_from_ray // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionPlane:: test_intersection_from_ray(CollisionHandler *record, @@ -157,14 +170,14 @@ test_intersection_from_ray(CollisionHandler *record, return 0; } - if (t < 0.0f) { + if (t < 0.0f) { // The intersection point is before the start of the ray. return 0; } if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); @@ -197,7 +210,7 @@ recompute_viz(Node *parent) { // the plane. We'll start with a center point and one corner // point, and then use cross products to find the remaining three // corners of a square. - + // The center point will be on the axis with the largest // coefficent. The first corner will be diagonal in the other two // dimensions. @@ -213,12 +226,12 @@ recompute_viz(Node *parent) { // X has the largest coefficient. cp.set(-D / normal[0], 0.0f, 0.0f); p1 = LPoint3f(-(normal[1] + normal[2] + D)/normal[0], 1.0f, 1.0f) - cp; - + } else if (fabs(normal[1]) > fabs(normal[2])) { // Y has the largest coefficient. cp.set(0.0f, -D / normal[1], 0.0f); p1 = LPoint3f(1.0f, -(normal[0] + normal[2] + D)/normal[1], 1.0f) - cp; - + } else { // Z has the largest coefficient. cp.set(0.0f, 0.0f, -D / normal[2]); diff --git a/panda/src/collide/collisionPlane.h b/panda/src/collide/collisionPlane.h index 74ee456505..7886ad6aa7 100644 --- a/panda/src/collide/collisionPlane.h +++ b/panda/src/collide/collisionPlane.h @@ -1,6 +1,19 @@ // Filename: collisionPlane.h // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONPLANE_H @@ -15,7 +28,7 @@ /////////////////////////////////////////////////////////////////// // Class : CollisionPlane -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA CollisionPlane : public CollisionSolid { protected: @@ -39,11 +52,11 @@ public: virtual void output(ostream &out) const; PUBLISHED: - INLINE LVector3f get_normal() const; - INLINE float dist_to_plane(const LPoint3f &point) const; + INLINE LVector3f get_normal() const; + INLINE float dist_to_plane(const LPoint3f &point) const; INLINE void set_plane(const Planef &plane); - INLINE const Planef &get_plane() const; + INLINE const Planef &get_plane() const; protected: virtual void recompute_bound(); @@ -63,7 +76,7 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_CollisionPlane(const FactoryParams ¶ms); diff --git a/panda/src/collide/collisionPolygon.I b/panda/src/collide/collisionPolygon.I index 9f5850c4e7..53b7058437 100644 --- a/panda/src/collide/collisionPolygon.I +++ b/panda/src/collide/collisionPolygon.I @@ -1,12 +1,25 @@ // Filename: collisionPolygon.I // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPolygon:: CollisionPolygon(const LPoint3f &a, const LPoint3f &b, @@ -21,7 +34,7 @@ CollisionPolygon(const LPoint3f &a, const LPoint3f &b, //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPolygon:: CollisionPolygon(const LPoint3f &a, const LPoint3f &b, @@ -38,7 +51,7 @@ CollisionPolygon(const LPoint3f &a, const LPoint3f &b, //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPolygon:: CollisionPolygon(const LPoint3f *begin, const LPoint3f *end) { @@ -48,7 +61,7 @@ CollisionPolygon(const LPoint3f *begin, const LPoint3f *end) { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPolygon:: CollisionPolygon(void) { diff --git a/panda/src/collide/collisionPolygon.cxx b/panda/src/collide/collisionPolygon.cxx index 54569c6931..face03720d 100644 --- a/panda/src/collide/collisionPolygon.cxx +++ b/panda/src/collide/collisionPolygon.cxx @@ -1,6 +1,19 @@ // Filename: collisionPolygon.cxx // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionPolygon.h" @@ -39,7 +52,7 @@ is_right(const LVector2f &v1, const LVector2f &v2) { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionPolygon:: CollisionPolygon(const CollisionPolygon ©) : @@ -54,7 +67,7 @@ CollisionPolygon(const CollisionPolygon ©) : //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid *CollisionPolygon:: make_copy() { @@ -86,7 +99,7 @@ verify_points(const LPoint3f *begin, const LPoint3f *end) { LVector3f normal = plane.get_normal(); float normal_length = normal.length(); bool all_ok = IS_THRESHOLD_EQUAL(normal_length, 1.0f, 0.001f); - + const LPoint3f *pi; for (pi = begin; pi != end && all_ok; ++pi) { if ((*pi).is_nan()) { @@ -108,10 +121,10 @@ verify_points(const LPoint3f *begin, const LPoint3f *end) { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::test_intersection // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionPolygon:: -test_intersection(CollisionHandler *, const CollisionEntry &, +test_intersection(CollisionHandler *, const CollisionEntry &, const CollisionSolid *into) const { // Polygons cannot currently be intersected from, only into. Do not // add a CollisionPolygon to a CollisionTraverser. @@ -154,7 +167,7 @@ xform(const LMatrix4f &mat) { const LPoint3f *verts_end = verts_begin + verts.size(); setup_points(verts_begin, verts_end); } - + clear_viz_arcs(); mark_bound_stale(); } @@ -175,7 +188,7 @@ get_collision_origin() const { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionPolygon:: output(ostream &out) const { @@ -185,7 +198,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::recompute_bound // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionPolygon:: recompute_bound() { @@ -211,7 +224,7 @@ recompute_bound() { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::test_intersection_from_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionPolygon:: test_intersection_from_sphere(CollisionHandler *record, @@ -224,7 +237,7 @@ test_intersection_from_sphere(CollisionHandler *record, DCAST_INTO_R(sphere, entry.get_from(), 0); LPoint3f from_center = sphere->get_center() * entry.get_wrt_space(); - LVector3f from_radius_v = + LVector3f from_radius_v = LVector3f(sphere->get_radius(), 0.0f, 0.0f) * entry.get_wrt_space(); float from_radius = length(from_radius_v); @@ -239,7 +252,7 @@ test_intersection_from_sphere(CollisionHandler *record, // The nearest point within the plane to our center is the // intersection of the line (center, center+normal) with the plane. LPoint3f plane_point; - bool really_intersects = + bool really_intersects = get_plane().intersects_line(plane_point, from_center, from_center + get_normal()); nassertr(really_intersects, 0); @@ -252,7 +265,7 @@ test_intersection_from_sphere(CollisionHandler *record, // will intersect the polygon. We can approximate this by testing // whether a circle of the given radius centered around this tangent // point, in the plane of the polygon, would intersect. - + // But even this approximate test is too difficult. To approximate // the approximation, we'll test two points: (1) the center itself. // If this is inside the polygon, then certainly the circle @@ -301,7 +314,7 @@ test_intersection_from_sphere(CollisionHandler *record, if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); @@ -319,7 +332,7 @@ test_intersection_from_sphere(CollisionHandler *record, //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::test_intersection_from_ray // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionPolygon:: test_intersection_from_ray(CollisionHandler *record, @@ -340,7 +353,7 @@ test_intersection_from_ray(CollisionHandler *record, return 0; } - if (t < 0.0f) { + if (t < 0.0f) { // The intersection point is before the start of the ray. return 0; } @@ -353,7 +366,7 @@ test_intersection_from_ray(CollisionHandler *record, if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); @@ -367,7 +380,7 @@ test_intersection_from_ray(CollisionHandler *record, //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::test_intersection_from_segment // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionPolygon:: test_intersection_from_segment(CollisionHandler *record, @@ -389,7 +402,7 @@ test_intersection_from_segment(CollisionHandler *record, return 0; } - if (t < 0.0f || t > 1.0f) { + if (t < 0.0f || t > 1.0f) { // The intersection point is before the start of the segment or // after the end of the segment. return 0; @@ -403,7 +416,7 @@ test_intersection_from_segment(CollisionHandler *record, if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); @@ -443,7 +456,7 @@ recompute_viz(Node *parent) { if (_reversed) { reverse(verts.begin(), verts.end()); } - + PTA_int lengths; lengths.push_back(_points.size()); @@ -461,7 +474,7 @@ recompute_viz(Node *parent) { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::is_inside // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CollisionPolygon:: is_inside(const LPoint2f &p) const { @@ -476,9 +489,9 @@ is_inside(const LPoint2f &p) const { return false; } } - if (is_right(p - _points[_points.size() - 1], + if (is_right(p - _points[_points.size() - 1], _points[0] - _points[_points.size() - 1])) { - return false; + return false; } return true; @@ -529,7 +542,7 @@ is_concave() const { //////////////////////////////////////////////////////////////////// // Function: CollisionPolygon::setup_points // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionPolygon:: setup_points(const LPoint3f *begin, const LPoint3f *end) { @@ -554,9 +567,9 @@ setup_points(const LPoint3f *begin, const LPoint3f *end) { for (pi = begin; pi != end; ++pi) { collide_cat.error(false) << " " << (*pi) << "\n"; } - collide_cat.error(false) + collide_cat.error(false) << " normal " << normal << " with length " << normal.length() << "\n"; - + return; } } @@ -628,7 +641,7 @@ setup_points(const LPoint3f *begin, const LPoint3f *end) { for (pi = begin; pi != end; ++pi) { collide_cat.error(false) << " " << (*pi) << "\n"; } - collide_cat.error(false) + collide_cat.error(false) << " normal " << normal << " with length " << normal.length() << "\n"; _points.clear(); } @@ -670,10 +683,10 @@ to_2d(const LPoint3f &point3d) const { switch (_axis) { case AT_x: return LPoint2f(point3d[1], point3d[2]); - + case AT_y: return LPoint2f(point3d[0], point3d[2]); - + case AT_z: return LPoint2f(point3d[0], point3d[1]); } diff --git a/panda/src/collide/collisionPolygon.h b/panda/src/collide/collisionPolygon.h index 77483153e3..2fa734bee1 100644 --- a/panda/src/collide/collisionPolygon.h +++ b/panda/src/collide/collisionPolygon.h @@ -1,6 +1,19 @@ // Filename: collisionPolygon.h // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONPOLYGON_H @@ -14,7 +27,7 @@ /////////////////////////////////////////////////////////////////// // Class : CollisionPolygon -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA CollisionPolygon : public CollisionPlane { PUBLISHED: @@ -84,7 +97,7 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_CollisionPolygon(const FactoryParams ¶ms); diff --git a/panda/src/collide/collisionRay.I b/panda/src/collide/collisionRay.I index 10875176ea..3e644e57a9 100644 --- a/panda/src/collide/collisionRay.I +++ b/panda/src/collide/collisionRay.I @@ -1,6 +1,19 @@ // Filename: collisionRay.I // Created by: drose (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -13,26 +26,26 @@ //////////////////////////////////////////////////////////////////// INLINE CollisionRay:: CollisionRay() : - _origin(LPoint3f(0.0, 0.0, 0.0)), - _direction(LVector3f(0.0, 0.0, 0.0)) + _origin(LPoint3f(0.0, 0.0, 0.0)), + _direction(LVector3f(0.0, 0.0, 0.0)) { } //////////////////////////////////////////////////////////////////// // Function: CollisionRay::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionRay:: CollisionRay(const LPoint3f &origin, const LVector3f &direction) : - _origin(origin), _direction(direction) + _origin(origin), _direction(direction) { } //////////////////////////////////////////////////////////////////// // Function: CollisionRay::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionRay:: CollisionRay(float ox, float oy, float oz, @@ -44,12 +57,12 @@ CollisionRay(float ox, float oy, float oz, //////////////////////////////////////////////////////////////////// // Function: CollisionRay::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionRay:: CollisionRay(const CollisionRay ©) : CollisionSolid(copy), - _origin(copy._origin), + _origin(copy._origin), _direction(copy._direction) { } @@ -57,7 +70,7 @@ CollisionRay(const CollisionRay ©) : //////////////////////////////////////////////////////////////////// // Function: CollisionRay::set_origin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionRay:: set_origin(const LPoint3f &origin) { @@ -69,7 +82,7 @@ set_origin(const LPoint3f &origin) { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::set_origin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionRay:: set_origin(float x, float y, float z) { @@ -79,7 +92,7 @@ set_origin(float x, float y, float z) { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::get_origin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LPoint3f &CollisionRay:: get_origin() const { @@ -89,7 +102,7 @@ get_origin() const { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::set_direction // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionRay:: set_direction(const LVector3f &direction) { @@ -101,7 +114,7 @@ set_direction(const LVector3f &direction) { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::set_direction // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionRay:: set_direction(float x, float y, float z) { @@ -111,7 +124,7 @@ set_direction(float x, float y, float z) { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::get_direction // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LVector3f &CollisionRay:: get_direction() const { diff --git a/panda/src/collide/collisionRay.cxx b/panda/src/collide/collisionRay.cxx index daf7b8a53e..f8e3105a56 100644 --- a/panda/src/collide/collisionRay.cxx +++ b/panda/src/collide/collisionRay.cxx @@ -1,6 +1,19 @@ // Filename: collisionRay.cxx // Created by: drose (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionRay.h" @@ -21,7 +34,7 @@ TypeHandle CollisionRay::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionRay::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid *CollisionRay:: make_copy() { @@ -31,7 +44,7 @@ make_copy() { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::test_intersection // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionRay:: test_intersection(CollisionHandler *record, const CollisionEntry &entry, @@ -68,7 +81,7 @@ get_collision_origin() const { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionRay:: output(ostream &out) const { @@ -106,7 +119,7 @@ set_projection(ProjectionNode *camera, const LPoint2f &point) { //////////////////////////////////////////////////////////////////// // Function: CollisionRay::recompute_bound // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionRay:: recompute_bound() { @@ -134,7 +147,7 @@ recompute_viz(Node *parent) { PTA_Colorf colors; for (int i = 0; i < 100; i++) { verts.push_back(_origin + (double)i * _direction); - colors.push_back(Colorf(1.0, 1.0, 1.0, 1.0) + + colors.push_back(Colorf(1.0, 1.0, 1.0, 1.0) + ((double)i / 100.0) * Colorf(0.0, 0.0, 0.0, -1.0)); } ray->set_coords(verts, G_PER_VERTEX); diff --git a/panda/src/collide/collisionRay.h b/panda/src/collide/collisionRay.h index c6d3a92a7c..d87d8fc65e 100644 --- a/panda/src/collide/collisionRay.h +++ b/panda/src/collide/collisionRay.h @@ -1,6 +1,19 @@ // Filename: collisionRay.h // Created by: drose (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONRAY_H @@ -24,7 +37,7 @@ class EXPCL_PANDA CollisionRay : public CollisionSolid { PUBLISHED: INLINE CollisionRay(); INLINE CollisionRay(const LPoint3f &origin, const LVector3f &direction); - INLINE CollisionRay(float ox, float oy, float oz, + INLINE CollisionRay(float ox, float oy, float oz, float dx, float dy, float dz); public: diff --git a/panda/src/collide/collisionSegment.I b/panda/src/collide/collisionSegment.I index d3c8bc33fa..7ee27662e4 100644 --- a/panda/src/collide/collisionSegment.I +++ b/panda/src/collide/collisionSegment.I @@ -1,6 +1,19 @@ // Filename: collisionSegment.I // Created by: drose (30Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -13,26 +26,26 @@ //////////////////////////////////////////////////////////////////// INLINE CollisionSegment:: CollisionSegment() : - _a(LPoint3f(0.0, 0.0, 0.0)), - _b(LPoint3f(0.0, 0.0, 0.0)) + _a(LPoint3f(0.0, 0.0, 0.0)), + _b(LPoint3f(0.0, 0.0, 0.0)) { } //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSegment:: CollisionSegment(const LPoint3f &a, const LPoint3f &b) : - _a(a), _b(b) + _a(a), _b(b) { } //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSegment:: CollisionSegment(float ax, float ay, float az, @@ -44,12 +57,12 @@ CollisionSegment(float ax, float ay, float az, //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSegment:: CollisionSegment(const CollisionSegment ©) : CollisionSolid(copy), - _a(copy._a), + _a(copy._a), _b(copy._b) { } @@ -57,7 +70,7 @@ CollisionSegment(const CollisionSegment ©) : //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::set_point_a // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionSegment:: set_point_a(const LPoint3f &a) { @@ -69,7 +82,7 @@ set_point_a(const LPoint3f &a) { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::set_point_a // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionSegment:: set_point_a(float x, float y, float z) { @@ -79,7 +92,7 @@ set_point_a(float x, float y, float z) { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::get_point_a // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LPoint3f &CollisionSegment:: get_point_a() const { @@ -89,7 +102,7 @@ get_point_a() const { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::set_point_b // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionSegment:: set_point_b(const LPoint3f &b) { @@ -101,7 +114,7 @@ set_point_b(const LPoint3f &b) { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::set_point_b // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionSegment:: set_point_b(float x, float y, float z) { @@ -111,7 +124,7 @@ set_point_b(float x, float y, float z) { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::get_point_b // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LPoint3f &CollisionSegment:: get_point_b() const { diff --git a/panda/src/collide/collisionSegment.cxx b/panda/src/collide/collisionSegment.cxx index 63306d7f9a..c312121786 100644 --- a/panda/src/collide/collisionSegment.cxx +++ b/panda/src/collide/collisionSegment.cxx @@ -1,6 +1,19 @@ // Filename: collisionSegment.cxx // Created by: drose (30Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionSegment.h" @@ -21,7 +34,7 @@ TypeHandle CollisionSegment::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid *CollisionSegment:: make_copy() { @@ -31,7 +44,7 @@ make_copy() { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::test_intersection // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSegment:: test_intersection(CollisionHandler *record, const CollisionEntry &entry, @@ -68,7 +81,7 @@ get_collision_origin() const { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSegment:: output(ostream &out) const { @@ -112,7 +125,7 @@ set_projection(ProjectionNode *camera, const LPoint2f &point) { //////////////////////////////////////////////////////////////////// // Function: CollisionSegment::recompute_bound // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSegment:: recompute_bound() { diff --git a/panda/src/collide/collisionSegment.h b/panda/src/collide/collisionSegment.h index d7504c9d27..911a271159 100644 --- a/panda/src/collide/collisionSegment.h +++ b/panda/src/collide/collisionSegment.h @@ -1,6 +1,19 @@ // Filename: collisionSegment.h // Created by: drose (30Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONSEGMENT_H @@ -27,7 +40,7 @@ class EXPCL_PANDA CollisionSegment : public CollisionSolid { PUBLISHED: INLINE CollisionSegment(); INLINE CollisionSegment(const LPoint3f &a, const LPoint3f &db); - INLINE CollisionSegment(float ax, float ay, float az, + INLINE CollisionSegment(float ax, float ay, float az, float bx, float by, float bz); public: diff --git a/panda/src/collide/collisionSolid.I b/panda/src/collide/collisionSolid.I index 87e54af831..624e49f4e4 100644 --- a/panda/src/collide/collisionSolid.I +++ b/panda/src/collide/collisionSolid.I @@ -1,6 +1,19 @@ // Filename: collisionSolid.I // Created by: drose (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/collide/collisionSolid.cxx b/panda/src/collide/collisionSolid.cxx index 39519bee2b..12c9e6bcc3 100644 --- a/panda/src/collide/collisionSolid.cxx +++ b/panda/src/collide/collisionSolid.cxx @@ -1,6 +1,19 @@ // Filename: collisionSolid.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionSolid.h" @@ -29,7 +42,7 @@ TypeHandle CollisionSolid::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid:: CollisionSolid() { @@ -40,7 +53,7 @@ CollisionSolid() { //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid:: CollisionSolid(const CollisionSolid ©) : @@ -53,7 +66,7 @@ CollisionSolid(const CollisionSolid ©) : //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid:: ~CollisionSolid() { @@ -63,7 +76,7 @@ CollisionSolid:: //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::update_viz // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSolid:: update_viz(Node *parent) { @@ -77,7 +90,7 @@ update_viz(Node *parent) { //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSolid:: output(ostream &out) const { @@ -87,7 +100,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSolid:: write(ostream &out, int indent_level) const { @@ -97,7 +110,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::test_intersection_from_sphere // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSolid:: test_intersection_from_sphere(CollisionHandler *, @@ -110,7 +123,7 @@ test_intersection_from_sphere(CollisionHandler *, //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::test_intersection_from_ray // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSolid:: test_intersection_from_ray(CollisionHandler *, @@ -123,7 +136,7 @@ test_intersection_from_ray(CollisionHandler *, //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::test_intersection_from_segment // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSolid:: test_intersection_from_segment(CollisionHandler *, @@ -149,7 +162,7 @@ report_undefined_intersection_test(TypeHandle from_type, TypeHandle into_type) { if (reported.insert(Reported::value_type(from_type, into_type)).second) { collide_cat.error() - << "Invalid attempt to detect collision from " << from_type << " into " + << "Invalid attempt to detect collision from " << from_type << " into " << into_type << "!\n" "This means that a " << from_type << " object attempted to test for a\n" @@ -157,7 +170,7 @@ report_undefined_intersection_test(TypeHandle from_type, TypeHandle into_type) { "test has not yet been defined; it is possible the " << into_type << "\n" "object is not intended to be collidable. Consider calling\n" "set_into_collide_mask(0) on the " << into_type << " object, or\n" - "set_from_collide_mask(0) on the " << from_type << " object.\n"; + "set_from_collide_mask(0) on the " << from_type << " object.\n"; } #endif } @@ -190,7 +203,7 @@ clear_viz_arcs() { //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::add_solid_viz // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSolid:: add_solid_viz(Node *parent, GeomNode *viz) { @@ -213,7 +226,7 @@ add_solid_viz(Node *parent, GeomNode *viz) { //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::add_wireframe_viz // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSolid:: add_wireframe_viz(Node *parent, GeomNode *viz) { @@ -262,7 +275,7 @@ fillin(DatagramIterator& scan, BamReader*) //////////////////////////////////////////////////////////////////// // Function: CollisionSolid::add_other_viz // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSolid:: add_other_viz(Node *parent, GeomNode *viz) { diff --git a/panda/src/collide/collisionSolid.h b/panda/src/collide/collisionSolid.h index 0e018761f5..32648c5293 100644 --- a/panda/src/collide/collisionSolid.h +++ b/panda/src/collide/collisionSolid.h @@ -1,6 +1,19 @@ // Filename: collisionSolid.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONSOLID_H @@ -36,7 +49,7 @@ class CollisionNode; // function calls handle the subset of the N*N // intersection tests that we care about. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA CollisionSolid : +class EXPCL_PANDA CollisionSolid : public TypedWritableReferenceCount, public BoundedObject { public: CollisionSolid(); @@ -86,7 +99,7 @@ protected: void add_other_viz(Node *parent, GeomNode *viz); virtual void recompute_viz(Node *parent)=0; - + typedef vector_PT_NodeRelation VizArcs; VizArcs _solid_viz_arcs; VizArcs _wireframe_viz_arcs; @@ -95,7 +108,7 @@ protected: bool _tangible; public: - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); protected: void fillin(DatagramIterator& scan, BamReader* manager); diff --git a/panda/src/collide/collisionSphere.I b/panda/src/collide/collisionSphere.I index c0f6614851..e082b81815 100644 --- a/panda/src/collide/collisionSphere.I +++ b/panda/src/collide/collisionSphere.I @@ -1,35 +1,48 @@ // Filename: collisionSphere.I // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSphere:: CollisionSphere(const LPoint3f ¢er, float radius) : - _center(center), _radius(radius) + _center(center), _radius(radius) { } //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSphere:: CollisionSphere(float cx, float cy, float cz, float radius) : - _center(cx, cy, cz), _radius(radius) + _center(cx, cy, cz), _radius(radius) { } //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSphere:: CollisionSphere() { @@ -38,7 +51,7 @@ CollisionSphere() { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollisionSphere:: CollisionSphere(const CollisionSphere ©) : @@ -51,7 +64,7 @@ CollisionSphere(const CollisionSphere ©) : //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::set_center // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionSphere:: set_center(const LPoint3f ¢er) { @@ -63,7 +76,7 @@ set_center(const LPoint3f ¢er) { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::set_center // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionSphere:: set_center(float x, float y, float z) { @@ -73,7 +86,7 @@ set_center(float x, float y, float z) { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::get_center // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LPoint3f &CollisionSphere:: get_center() const { @@ -83,7 +96,7 @@ get_center() const { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::set_radius // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CollisionSphere:: set_radius(float radius) { @@ -95,7 +108,7 @@ set_radius(float radius) { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::get_radius // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float CollisionSphere:: get_radius() const { diff --git a/panda/src/collide/collisionSphere.cxx b/panda/src/collide/collisionSphere.cxx index 2341e44810..4669541f29 100644 --- a/panda/src/collide/collisionSphere.cxx +++ b/panda/src/collide/collisionSphere.cxx @@ -1,6 +1,19 @@ // Filename: collisionSphere.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionSphere.h" @@ -24,7 +37,7 @@ TypeHandle CollisionSphere::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionSolid *CollisionSphere:: make_copy() { @@ -34,7 +47,7 @@ make_copy() { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::test_intersection // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSphere:: test_intersection(CollisionHandler *record, const CollisionEntry &entry, @@ -76,7 +89,7 @@ get_collision_origin() const { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSphere:: output(ostream &out) const { @@ -86,7 +99,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::recompute_bound // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionSphere:: recompute_bound() { @@ -100,7 +113,7 @@ recompute_bound() { //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::test_intersection_from_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSphere:: test_intersection_from_sphere(CollisionHandler *record, @@ -109,7 +122,7 @@ test_intersection_from_sphere(CollisionHandler *record, DCAST_INTO_R(sphere, entry.get_from(), 0); LPoint3f from_center = sphere->get_center() * entry.get_wrt_space(); - LVector3f from_radius_v = + LVector3f from_radius_v = LVector3f(sphere->get_radius(), 0.0, 0.0) * entry.get_wrt_space(); float from_radius = length(from_radius_v); @@ -125,7 +138,7 @@ test_intersection_from_sphere(CollisionHandler *record, if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); @@ -146,7 +159,7 @@ test_intersection_from_sphere(CollisionHandler *record, //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::test_intersection_from_ray // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSphere:: test_intersection_from_ray(CollisionHandler *record, @@ -163,14 +176,14 @@ test_intersection_from_ray(CollisionHandler *record, return 0; } - if (t2 < 0.0) { + if (t2 < 0.0) { // Both intersection points are before the start of the ray. return 0; } if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); @@ -190,7 +203,7 @@ test_intersection_from_ray(CollisionHandler *record, //////////////////////////////////////////////////////////////////// // Function: CollisionSphere::test_intersection_from_segment // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CollisionSphere:: test_intersection_from_segment(CollisionHandler *record, @@ -208,7 +221,7 @@ test_intersection_from_segment(CollisionHandler *record, return 0; } - if (t2 < 0.0 || t1 > 1.0) { + if (t2 < 0.0 || t1 > 1.0) { // Both intersection points are before the start of the segment or // after the end of the segment. return 0; @@ -216,7 +229,7 @@ test_intersection_from_segment(CollisionHandler *record, if (collide_cat.is_debug()) { collide_cat.debug() - << "intersection detected from " << *entry.get_from_node() << " into " + << "intersection detected from " << *entry.get_from_node() << " into " << entry.get_into_node_path() << "\n"; } PT(CollisionEntry) new_entry = new CollisionEntry(entry); diff --git a/panda/src/collide/collisionSphere.h b/panda/src/collide/collisionSphere.h index 657911c6e7..a1596e1017 100644 --- a/panda/src/collide/collisionSphere.h +++ b/panda/src/collide/collisionSphere.h @@ -1,6 +1,19 @@ // Filename: collisionSphere.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONSPHERE_H @@ -67,7 +80,7 @@ private: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); protected: static TypedWritable *make_CollisionSphere(const FactoryParams ¶ms); diff --git a/panda/src/collide/collisionTraverser.I b/panda/src/collide/collisionTraverser.I index 6116bc0d73..a3b30fa7b1 100644 --- a/panda/src/collide/collisionTraverser.I +++ b/panda/src/collide/collisionTraverser.I @@ -1,4 +1,17 @@ // Filename: collisionTraverser.I // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/collide/collisionTraverser.cxx b/panda/src/collide/collisionTraverser.cxx index f2f6fa2258..7d408301d9 100644 --- a/panda/src/collide/collisionTraverser.cxx +++ b/panda/src/collide/collisionTraverser.cxx @@ -1,6 +1,19 @@ // Filename: collisionTraverser.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionTraverser.h" @@ -25,7 +38,7 @@ PStatCollector CollisionTraverser::_collisions_pcollector("App:Collisions"); //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionTraverser:: CollisionTraverser(TypeHandle graph_type) : @@ -36,7 +49,7 @@ CollisionTraverser(TypeHandle graph_type) : //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CollisionTraverser:: ~CollisionTraverser() { @@ -135,7 +148,7 @@ remove_collider(CollisionNode *node) { _colliders.erase(ci); - OrderedColliders::iterator oci = + OrderedColliders::iterator oci = find(_ordered_colliders.begin(), _ordered_colliders.end(), node); nassertr(oci != _ordered_colliders.end(), false); _ordered_colliders.erase(oci); @@ -214,7 +227,7 @@ clear_colliders() { //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::traverse // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: traverse(Node *root) { @@ -224,7 +237,7 @@ traverse(Node *root) { //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::traverse // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: traverse(const NodePath &root) { @@ -239,7 +252,7 @@ traverse(const NodePath &root) { (*hi).first->begin_group(); } - df_traverse(root.node(), *this, NullAttributeWrapper(), + df_traverse(root.node(), *this, NullAttributeWrapper(), level_state, _graph_type); for (hi = _handlers.begin(); hi != _handlers.end(); ++hi) { @@ -250,7 +263,7 @@ traverse(const NodePath &root) { //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: output(ostream &out) const { @@ -261,7 +274,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: write(ostream &out, int indent_level) const { @@ -288,7 +301,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::prepare_colliders // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: prepare_colliders(CollisionLevelState &level_state) { @@ -329,10 +342,10 @@ prepare_colliders(CollisionLevelState &level_state) { //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::reached_node // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CollisionTraverser:: -reached_node(Node *node, NullAttributeWrapper &, +reached_node(Node *node, NullAttributeWrapper &, CollisionLevelState &level_state) { if (node->is_of_type(CollisionNode::get_class_type())) { level_state.reached_collision_node(); @@ -363,10 +376,10 @@ reached_node(Node *node, NullAttributeWrapper &, NodePath root; LMatrix4f into_space_inv = root.get_mat(entry._into_node_path); entry._wrt_space = entry._from_space * into_space_inv; - entry._inv_wrt_space = + entry._inv_wrt_space = entry._into_space * level_state.get_inv_space(c); - const GeometricBoundingVolume *col_gbv = + const GeometricBoundingVolume *col_gbv = level_state.get_local_bound(c); compare_collider_to_node(entry, col_gbv, node_gbv); @@ -399,10 +412,10 @@ reached_node(Node *node, NullAttributeWrapper &, LMatrix4f into_space_inv; get_rel_mat(NULL, node, into_space_inv, _graph_type); entry._wrt_space = entry._from_space * into_space_inv; - entry._inv_wrt_space = + entry._inv_wrt_space = entry._into_space * level_state.get_inv_space(c); - const GeometricBoundingVolume *col_gbv = + const GeometricBoundingVolume *col_gbv = level_state.get_local_bound(c); compare_collider_to_geom_node(entry, col_gbv, node_gbv); @@ -416,7 +429,7 @@ reached_node(Node *node, NullAttributeWrapper &, //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::forward_arc // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CollisionTraverser:: forward_arc(NodeRelation *arc, NullTransitionWrapper &, @@ -432,7 +445,7 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &, int num_colliders = level_state.get_num_colliders(); for (int c = 0; c < num_colliders; c++) { if (level_state.has_collider(c)) { - const GeometricBoundingVolume *col_gbv = + const GeometricBoundingVolume *col_gbv = level_state.get_local_bound(c); if (col_gbv != (GeometricBoundingVolume *)NULL) { if (arc_gbv->contains(col_gbv) == 0) { @@ -468,7 +481,7 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &, //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::compare_collider_to_node // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: compare_collider_to_node(CollisionEntry &entry, @@ -508,7 +521,7 @@ compare_collider_to_node(CollisionEntry &entry, //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::compare_collider_to_geom_node // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: compare_collider_to_geom_node(CollisionEntry &entry, @@ -549,7 +562,7 @@ compare_collider_to_geom_node(CollisionEntry &entry, //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::compare_collider_to_solid // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: compare_collider_to_solid(CollisionEntry &entry, @@ -571,7 +584,7 @@ compare_collider_to_solid(CollisionEntry &entry, //////////////////////////////////////////////////////////////////// // Function: CollisionTraverser::compare_collider_to_geom // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CollisionTraverser:: compare_collider_to_geom(CollisionEntry &entry, Geom *geom, @@ -592,7 +605,7 @@ compare_collider_to_geom(CollisionEntry &entry, Geom *geom, PTA_ushort vindex; geom->get_coords(coords, bind, vindex); PTA_ushort tris = geom->get_tris(); - + for (int i = 0; i < (int)tris.size(); i += 3) { if (CollisionPolygon::verify_points(coords[tris[i]], coords[tris[i + 1]], diff --git a/panda/src/collide/collisionTraverser.h b/panda/src/collide/collisionTraverser.h index a7fcadd770..41d3d82410 100644 --- a/panda/src/collide/collisionTraverser.h +++ b/panda/src/collide/collisionTraverser.h @@ -1,6 +1,19 @@ // Filename: collisionTraverser.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLISIONTRAVERSER_H @@ -27,9 +40,9 @@ class NodePath; //////////////////////////////////////////////////////////////////// // Class : CollisionTraverser -// Description : +// Description : //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA CollisionTraverser : +class EXPCL_PANDA CollisionTraverser : public TraverserVisitor { PUBLISHED: CollisionTraverser(TypeHandle graph_type = RenderRelation::get_class_type()); @@ -52,7 +65,7 @@ PUBLISHED: private: void prepare_colliders(CollisionLevelState &state); -public: +public: // These methods, from parent class TraverserVisitor, define the // behavior of the CollisionTraverser as it traverses the graph. // Normally you would never call these directly. diff --git a/panda/src/collide/config_collide.cxx b/panda/src/collide/config_collide.cxx index 6b45630872..15303b1de9 100644 --- a/panda/src/collide/config_collide.cxx +++ b/panda/src/collide/config_collide.cxx @@ -1,6 +1,19 @@ // Filename: config_collide.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_collide.h" diff --git a/panda/src/collide/config_collide.h b/panda/src/collide/config_collide.h index 8399cb48c8..88363f743b 100644 --- a/panda/src/collide/config_collide.h +++ b/panda/src/collide/config_collide.h @@ -1,6 +1,19 @@ // Filename: config_collide.h // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_COLLIDE_H diff --git a/panda/src/collide/test_collide.cxx b/panda/src/collide/test_collide.cxx index 7b29d7f59b..a40fe8980c 100644 --- a/panda/src/collide/test_collide.cxx +++ b/panda/src/collide/test_collide.cxx @@ -1,6 +1,19 @@ // Filename: test_collide.cxx // Created by: drose (24Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "collisionTraverser.h" diff --git a/panda/src/cull/config_cull.cxx b/panda/src/cull/config_cull.cxx index 196e76144e..d87b814369 100644 --- a/panda/src/cull/config_cull.cxx +++ b/panda/src/cull/config_cull.cxx @@ -1,6 +1,19 @@ // Filename: config_cull.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_cull.h" diff --git a/panda/src/cull/config_cull.h b/panda/src/cull/config_cull.h index ad97c4a1d1..64cb0beef6 100644 --- a/panda/src/cull/config_cull.h +++ b/panda/src/cull/config_cull.h @@ -1,6 +1,19 @@ // Filename: config_cull.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_CULL_H diff --git a/panda/src/cull/cullLevelState.h b/panda/src/cull/cullLevelState.h index 3314e46db8..a01e925e72 100644 --- a/panda/src/cull/cullLevelState.h +++ b/panda/src/cull/cullLevelState.h @@ -1,6 +1,19 @@ // Filename: cullLevelState.h // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLLEVELSTATE_H diff --git a/panda/src/cull/cullState.I b/panda/src/cull/cullState.I index d7ff71844a..6b628ff944 100644 --- a/panda/src/cull/cullState.I +++ b/panda/src/cull/cullState.I @@ -1,12 +1,25 @@ // Filename: cullState.I // Created by: drose (14Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CullState::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState:: CullState(const AllTransitionsWrapper &trans) : @@ -20,7 +33,7 @@ CullState(const AllTransitionsWrapper &trans) : //////////////////////////////////////////////////////////////////// // Function: CullState::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState:: ~CullState() { @@ -37,7 +50,7 @@ INLINE CullState:: //////////////////////////////////////////////////////////////////// // Function: CullState::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int CullState:: compare_to(const CullState &other) const { @@ -47,7 +60,7 @@ compare_to(const CullState &other) const { //////////////////////////////////////////////////////////////////// // Function: CullState::mark_verified // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CullState:: mark_verified(Node *node, UpdateSeq now) { @@ -117,7 +130,7 @@ is_empty() const { //////////////////////////////////////////////////////////////////// // Function: CullState::count_current_nodes // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int CullState:: count_current_nodes() const { @@ -206,7 +219,7 @@ get_bin() const { //////////////////////////////////////////////////////////////////// // Function: CullState::geom_size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState::geom_size_type CullState:: geom_size() const { @@ -216,7 +229,7 @@ geom_size() const { //////////////////////////////////////////////////////////////////// // Function: CullState::geom_begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState::geom_iterator CullState:: geom_begin() const { @@ -226,7 +239,7 @@ geom_begin() const { //////////////////////////////////////////////////////////////////// // Function: CullState::geom_end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState::geom_iterator CullState:: geom_end() const { @@ -236,7 +249,7 @@ geom_end() const { //////////////////////////////////////////////////////////////////// // Function: CullState::direct_size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState::direct_size_type CullState:: direct_size() const { @@ -246,7 +259,7 @@ direct_size() const { //////////////////////////////////////////////////////////////////// // Function: CullState::direct_begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState::direct_iterator CullState:: direct_begin() const { @@ -256,7 +269,7 @@ direct_begin() const { //////////////////////////////////////////////////////////////////// // Function: CullState::direct_end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullState::direct_iterator CullState:: direct_end() const { diff --git a/panda/src/cull/cullState.cxx b/panda/src/cull/cullState.cxx index d11a262797..5c974fcbf5 100644 --- a/panda/src/cull/cullState.cxx +++ b/panda/src/cull/cullState.cxx @@ -1,6 +1,19 @@ // Filename: cullState.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullState.h" @@ -54,7 +67,7 @@ check_currency(Node *node, const AllTransitionsWrapper &, //////////////////////////////////////////////////////////////////// // Function: CullState::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CullState:: output(ostream &out) const { @@ -64,7 +77,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CullState::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CullState:: write(ostream &out, int indent_level) const { diff --git a/panda/src/cull/cullState.h b/panda/src/cull/cullState.h index 8c7502551b..9670f92c23 100644 --- a/panda/src/cull/cullState.h +++ b/panda/src/cull/cullState.h @@ -1,6 +1,19 @@ // Filename: cullState.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLSTATE_H @@ -45,7 +58,7 @@ public: INLINE int compare_to(const CullState &other) const; - bool check_currency(Node *node, + bool check_currency(Node *node, const AllTransitionsWrapper &trans, UpdateSeq as_of); diff --git a/panda/src/cull/cullStateLookup.I b/panda/src/cull/cullStateLookup.I index 28a69ff80a..36084f7ec4 100644 --- a/panda/src/cull/cullStateLookup.I +++ b/panda/src/cull/cullStateLookup.I @@ -1,6 +1,19 @@ // Filename: cullStateLookup.I // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullState.h" @@ -28,7 +41,7 @@ is_completely_empty() const { //////////////////////////////////////////////////////////////////// // Function: CullStateLookup::record_node // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CullStateLookup:: record_node(Node *node, CullState *cs, UpdateSeq now) { diff --git a/panda/src/cull/cullStateLookup.cxx b/panda/src/cull/cullStateLookup.cxx index 2d47d7b277..b8b580f4ce 100644 --- a/panda/src/cull/cullStateLookup.cxx +++ b/panda/src/cull/cullStateLookup.cxx @@ -1,6 +1,19 @@ // Filename: cullStateLookup.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullStateLookup.h" @@ -106,7 +119,7 @@ find_node(Node *node, // CullStateSubtree is always returned. //////////////////////////////////////////////////////////////////// CullStateSubtree *CullStateLookup:: -get_subtree(const PT_NodeRelation &arc, +get_subtree(const PT_NodeRelation &arc, const AllTransitionsWrapper &trans, Node *top_subtree, UpdateSeq now) { @@ -123,7 +136,7 @@ get_subtree(const PT_NodeRelation &arc, cull_cat.spam() << "No entry for the arc; creating new one.\n"; } - CullStateSubtree *subtree = + CullStateSubtree *subtree = new CullStateSubtree(this, trans, top_subtree, now); _subtrees.insert(Subtrees::value_type(arc, subtree)); return subtree; @@ -164,7 +177,7 @@ clean_out_old_nodes() { ++csnext; CullState *cs = (*csi).second; - if (!cs->has_bin() && cs->is_empty() && + if (!cs->has_bin() && cs->is_empty() && cs->get_empty_frames_count() > 100) { _cull_states.erase(csi); } @@ -217,7 +230,7 @@ compose_trans(const AllTransitionsWrapper &from, //////////////////////////////////////////////////////////////////// // Function: CullStateLookup::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CullStateLookup:: write(ostream &out, int indent_level) const { diff --git a/panda/src/cull/cullStateLookup.h b/panda/src/cull/cullStateLookup.h index bd1b6052cf..f6623e241a 100644 --- a/panda/src/cull/cullStateLookup.h +++ b/panda/src/cull/cullStateLookup.h @@ -1,6 +1,19 @@ // Filename: cullStateLookup.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLSTATELOOKUP_H @@ -40,7 +53,7 @@ public: void clear(); INLINE bool is_completely_empty() const; - CullState *find_node(Node *node, + CullState *find_node(Node *node, const AllTransitionsWrapper &trans, UpdateSeq now); CullStateSubtree *get_subtree(const PT_NodeRelation &arc, diff --git a/panda/src/cull/cullStateSubtree.I b/panda/src/cull/cullStateSubtree.I index 4969987713..32007c45c5 100644 --- a/panda/src/cull/cullStateSubtree.I +++ b/panda/src/cull/cullStateSubtree.I @@ -1,16 +1,29 @@ // Filename: cullStateSubtree.I // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CullStateSubtree::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullStateSubtree:: CullStateSubtree(CullStateLookup *parent, - const AllTransitionsWrapper &trans, + const AllTransitionsWrapper &trans, Node *top_subtree, UpdateSeq now) : _parent(parent), diff --git a/panda/src/cull/cullStateSubtree.cxx b/panda/src/cull/cullStateSubtree.cxx index bb200d1323..89d332ac4b 100644 --- a/panda/src/cull/cullStateSubtree.cxx +++ b/panda/src/cull/cullStateSubtree.cxx @@ -1,6 +1,19 @@ // Filename: cullStateSubtree.cxx // Created by: drose (09Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullStateSubtree.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: CullStateSubtree::Constructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CullStateSubtree:: ~CullStateSubtree() { @@ -24,7 +37,7 @@ CullStateSubtree:: // if it should be recomputed. //////////////////////////////////////////////////////////////////// bool CullStateSubtree:: -check_currency(const AllTransitionsWrapper &, Node *top_subtree, +check_currency(const AllTransitionsWrapper &, Node *top_subtree, UpdateSeq as_of) { if (cull_cat.is_spam()) { cull_cat.spam() diff --git a/panda/src/cull/cullStateSubtree.h b/panda/src/cull/cullStateSubtree.h index 7d86a75e93..2405974c62 100644 --- a/panda/src/cull/cullStateSubtree.h +++ b/panda/src/cull/cullStateSubtree.h @@ -1,6 +1,19 @@ // Filename: cullStateSubtree.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLSTATESUBTREE_H @@ -25,12 +38,12 @@ class CullStateLookup; class EXPCL_PANDA CullStateSubtree : public CullStateLookup { public: INLINE CullStateSubtree(CullStateLookup *parent, - const AllTransitionsWrapper &trans, + const AllTransitionsWrapper &trans, Node *top_subtree, UpdateSeq now); virtual ~CullStateSubtree(); - bool check_currency(const AllTransitionsWrapper &trans, + bool check_currency(const AllTransitionsWrapper &trans, Node *top_subtree, UpdateSeq as_of); INLINE void update(const AllTransitionsWrapper &trans, diff --git a/panda/src/cull/cullTraverser.I b/panda/src/cull/cullTraverser.I index f3b76da938..11a481d440 100644 --- a/panda/src/cull/cullTraverser.I +++ b/panda/src/cull/cullTraverser.I @@ -1,6 +1,19 @@ // Filename: cullTraverser.I // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullStateSubtree.h" @@ -20,7 +33,7 @@ INLINE void CullTraverser:: draw_geom(GeomNode *geom_node, const AllAttributesWrapper &initial_state) { if (cull_cat.is_spam()) { - cull_cat.spam() + cull_cat.spam() << "Drawing " << *geom_node << " with state: " << initial_state << "\n"; } nassertv(geom_node != (GeomNode *)NULL); @@ -52,12 +65,12 @@ draw_geom(const ArcChain &arc_chain, const AllAttributesWrapper &initial_state) // indicated node, and including all nested nodes below. //////////////////////////////////////////////////////////////////// INLINE void CullTraverser:: -draw_direct(const ArcChain &arc_chain, +draw_direct(const ArcChain &arc_chain, const AllAttributesWrapper &initial_state) { nassertv(!arc_chain.empty()); Node *node = arc_chain.back()->get_child(); if (cull_cat.is_spam()) { - cull_cat.spam() + cull_cat.spam() << "Drawing " << *node << " in direct mode.\n"; } nassertv(node != (Node *)NULL); @@ -106,16 +119,16 @@ find_bin_state(const AllTransitionsWrapper &trans) { if (result.second) { // The insert succeeded, so the CullState was not there // previously. - cull_cat.spam() + cull_cat.spam() << "Created CullState " << (void *)cs << " for:\n"; trans.write(cull_cat.spam(false), 2); } else { CullState *found_cs = *result.first; - cull_cat.spam() + cull_cat.spam() << "Found existing CullState " << (void *)found_cs << " which has:\n"; found_cs->get_transitions().write(cull_cat.spam(false), 2); - cull_cat.spam(false) + cull_cat.spam(false) << "for:\n"; trans.write(cull_cat.spam(false), 2); } @@ -128,7 +141,7 @@ find_bin_state(const AllTransitionsWrapper &trans) { //////////////////////////////////////////////////////////////////// // Function: CullTraverser::backward_arc // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CullTraverser:: backward_arc(NodeRelation *arc, NullTransitionWrapper &, diff --git a/panda/src/cull/cullTraverser.cxx b/panda/src/cull/cullTraverser.cxx index 654c0d056c..d93ba8d35e 100644 --- a/panda/src/cull/cullTraverser.cxx +++ b/panda/src/cull/cullTraverser.cxx @@ -1,6 +1,19 @@ // Filename: cullTraverser.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullTraverser.h" @@ -45,7 +58,7 @@ PStatCollector CullTraverser::_cull_bins_btf_pcollector("Cull:Bins:BTF"); //////////////////////////////////////////////////////////////////// // Function: CullTraverser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CullTraverser:: CullTraverser(GraphicsStateGuardian *gsg, TypeHandle graph_type, @@ -60,7 +73,7 @@ CullTraverser(GraphicsStateGuardian *gsg, TypeHandle graph_type, //////////////////////////////////////////////////////////////////// // Function: CullTraverser::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// CullTraverser:: ~CullTraverser() { @@ -123,7 +136,7 @@ clear_bins() { //////////////////////////////////////////////////////////////////// // Function: CullTraverser::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CullTraverser:: output(ostream &out) const { @@ -147,7 +160,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CullTraverser::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CullTraverser:: write(ostream &out, int indent_level) const { @@ -177,7 +190,7 @@ write(ostream &out, int indent_level) const { // the first frame. //////////////////////////////////////////////////////////////////// void CullTraverser:: -traverse(Node *root, +traverse(Node *root, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans) { // Statistics @@ -336,7 +349,7 @@ draw() { << "Initiating draw with " << num_states << " nonempty states of " << _states.size() << " total.\n"; } - + SubBins::const_iterator sbi; { PStatTimer timer(_cull_clean_pcollector); @@ -353,7 +366,7 @@ draw() { PStatTimer timer(_cull_draw_get_bin_pcollector); cs->apply_to(_initial_state); } - + static string default_bin_name = "default"; string bin_name = default_bin_name; GeomBin *requested_bin = _default_bin; @@ -367,12 +380,12 @@ draw() { bin_name = bin_attrib->get_bin(); requested_bin = get_bin(bin_name); } - + if (requested_bin == (GeomBin *)NULL) { // If we don't have a bin by this name, create one. cull_cat.warning() << "Bin " << bin_name << " is unknown; creating a default bin.\n"; - + requested_bin = new GeomBinNormal(bin_name); requested_bin->set_traverser(this); } @@ -517,7 +530,7 @@ add_direct_node(Node *node, const AllTransitionsWrapper &trans, //////////////////////////////////////////////////////////////////// // Function: CullTraverser::forward_arc // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool CullTraverser:: forward_arc(NodeRelation *arc, NullTransitionWrapper &, @@ -566,13 +579,13 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &, arc_num_sub_render--; } - bool has_direct_render = + bool has_direct_render = arc->has_transition(DirectRenderTransition::get_class_type()); #ifndef NDEBUG if (support_decals != SD_on) { has_direct_render = has_direct_render && !has_decal; - } else + } else #endif { has_direct_render = has_direct_render || has_decal; @@ -612,7 +625,7 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &, mark_forward_arc(arc); if (cull_cat.is_spam()) { - cull_cat.spam() + cull_cat.spam() << "Reached " << *node << ":\n" << " as_of = " << level_state._as_of << " now = " << _now @@ -624,11 +637,11 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &, << "\n"; } - if (is_instanced || is_geom || node_has_sub_render || + if (is_instanced || is_geom || node_has_sub_render || arc_num_sub_render != 0 || has_direct_render) { // In any of these cases, we'll need to determine the net // transition to this node. - wrt_subtree(arc, level_state._lookup->get_top_subtree(), + wrt_subtree(arc, level_state._lookup->get_top_subtree(), level_state._as_of, _now, trans, _graph_type); } @@ -723,7 +736,7 @@ attach_toplevel_bin(GeomBin *bin) { const string &bin_name = bin->get_name(); // Insert the new bin by name. - pair result = + pair result = _toplevel_bins.insert(ToplevelBins::value_type(bin_name, bin)); if (!result.second) { diff --git a/panda/src/cull/cullTraverser.h b/panda/src/cull/cullTraverser.h index 1892a88165..1d6736b30f 100644 --- a/panda/src/cull/cullTraverser.h +++ b/panda/src/cull/cullTraverser.h @@ -1,6 +1,19 @@ // Filename: cullTraverser.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLTRAVERSER_H @@ -33,8 +46,8 @@ class AllTransitionsWrapper; // the geometry by state and adding it to individual // GeomBins, and then renders the GeomBins in sequence. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA CullTraverser : - public RenderTraverser, +class EXPCL_PANDA CullTraverser : + public RenderTraverser, public TraverserVisitor { public: CullTraverser(GraphicsStateGuardian *gsg, TypeHandle graph_type, @@ -51,7 +64,7 @@ PUBLISHED: public: - virtual void traverse(Node *root, + virtual void traverse(Node *root, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans); @@ -68,14 +81,14 @@ private: void draw(); void clean_out_old_states(); - void add_geom_node(GeomNode *node, + void add_geom_node(GeomNode *node, const AllTransitionsWrapper &trans, const CullLevelState &level_state); - void add_direct_node(Node *node, + void add_direct_node(Node *node, const AllTransitionsWrapper &trans, const CullLevelState &level_state); - INLINE CullStateLookup *add_instance(NodeRelation *arc, + INLINE CullStateLookup *add_instance(NodeRelation *arc, const AllTransitionsWrapper &trans, Node *top_subtree, const CullLevelState &level_state); @@ -83,7 +96,7 @@ private: INLINE CullState *find_bin_state(const AllTransitionsWrapper &trans); -public: +public: // These methods, from parent class TraverserVisitor, define the // behavior of the RenderTraverser as it traverses the graph. // Normally you would never call these directly. @@ -91,7 +104,7 @@ public: NullAttributeWrapper &pre, NullAttributeWrapper &post, CullLevelState &level_state); - INLINE void + INLINE void backward_arc(NodeRelation *arc, NullTransitionWrapper &trans, NullAttributeWrapper &pre, NullAttributeWrapper &post, const CullLevelState &level_state); @@ -131,7 +144,7 @@ public: static PStatCollector _cull_bins_unsorted_pcollector; static PStatCollector _cull_bins_fixed_pcollector; static PStatCollector _cull_bins_btf_pcollector; - + public: static TypeHandle get_class_type() { return _type_handle; @@ -145,7 +158,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/cull/directRenderTransition.I b/panda/src/cull/directRenderTransition.I index 3bb56a8183..566a0014a9 100644 --- a/panda/src/cull/directRenderTransition.I +++ b/panda/src/cull/directRenderTransition.I @@ -1,12 +1,25 @@ // Filename: directRenderTransition.I // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DirectRenderTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DirectRenderTransition:: DirectRenderTransition() { diff --git a/panda/src/cull/directRenderTransition.cxx b/panda/src/cull/directRenderTransition.cxx index e4cd833c3c..783c3fce6f 100644 --- a/panda/src/cull/directRenderTransition.cxx +++ b/panda/src/cull/directRenderTransition.cxx @@ -1,6 +1,19 @@ // Filename: directRenderTransition.cxx // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "directRenderTransition.h" diff --git a/panda/src/cull/directRenderTransition.h b/panda/src/cull/directRenderTransition.h index 9592eb4c03..dfef265aff 100644 --- a/panda/src/cull/directRenderTransition.h +++ b/panda/src/cull/directRenderTransition.h @@ -1,6 +1,19 @@ // Filename: directRenderTransition.h // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DIRECTRENDERTRANSITION_H @@ -33,7 +46,7 @@ class EXPCL_PANDA DirectRenderTransition : public ImmediateTransition { PUBLISHED: INLINE DirectRenderTransition(); -public: +public: virtual NodeTransition *make_copy() const; virtual bool has_sub_render() const; diff --git a/panda/src/cull/geomBin.I b/panda/src/cull/geomBin.I index a3e43f22eb..ae808e373e 100644 --- a/panda/src/cull/geomBin.I +++ b/panda/src/cull/geomBin.I @@ -1,16 +1,29 @@ // Filename: geomBin.I // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GeomBin::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBin:: GeomBin(const string &name) : - Namable(name) + Namable(name) { _traverser = (CullTraverser *)NULL; _is_attached = false; diff --git a/panda/src/cull/geomBin.cxx b/panda/src/cull/geomBin.cxx index 7946007b4d..a1ee937622 100644 --- a/panda/src/cull/geomBin.cxx +++ b/panda/src/cull/geomBin.cxx @@ -1,6 +1,19 @@ // Filename: geomBin.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBin.h" @@ -21,7 +34,7 @@ TypeHandle GeomBin::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GeomBin::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// GeomBin:: ~GeomBin() { @@ -170,7 +183,7 @@ clear_traverser() { detach(); _traverser = (CullTraverser *)NULL; } - + return keep; } @@ -276,7 +289,7 @@ PT(GeomBin) GeomBin:: detach() { nassertr(_is_attached, NULL); nassertr(_traverser != (CullTraverser *)NULL, NULL); - + PT(GeomBin) keep = this; if (!has_parent()) { @@ -292,7 +305,7 @@ detach() { //////////////////////////////////////////////////////////////////// // Function: GeomBin::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBin:: output(ostream &out) const { @@ -302,7 +315,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: GeomBin::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBin:: write(ostream &out, int indent_level) const { @@ -316,7 +329,7 @@ write(ostream &out, int indent_level) const { // was previously associated; presumably because a // change in the scene's initial attributes as resulted // in the indicated CullState switching to a new bin. -// +// // Since the initial attributes will remain constant // throughout a given frame, this function will only be // called for GeomBins that save CullStates between diff --git a/panda/src/cull/geomBin.h b/panda/src/cull/geomBin.h index d59830e022..01a74c6f3a 100644 --- a/panda/src/cull/geomBin.h +++ b/panda/src/cull/geomBin.h @@ -1,6 +1,19 @@ // Filename: geomBin.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBIN_H @@ -101,7 +114,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/cull/geomBinAttribute.I b/panda/src/cull/geomBinAttribute.I index ce979a4329..d3b94bdf59 100644 --- a/panda/src/cull/geomBinAttribute.I +++ b/panda/src/cull/geomBinAttribute.I @@ -1,12 +1,25 @@ // Filename: geomBinAttribute.I // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GeomBinAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinAttribute:: GeomBinAttribute() { @@ -15,7 +28,7 @@ GeomBinAttribute() { //////////////////////////////////////////////////////////////////// // Function: GeomBinAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinAttribute:: GeomBinAttribute(const string &bin, int draw_order) { diff --git a/panda/src/cull/geomBinAttribute.cxx b/panda/src/cull/geomBinAttribute.cxx index d72c93d106..2778b0eeec 100644 --- a/panda/src/cull/geomBinAttribute.cxx +++ b/panda/src/cull/geomBinAttribute.cxx @@ -1,6 +1,19 @@ // Filename: geomBinAttribute.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBinAttribute.h" @@ -64,7 +77,7 @@ set_value_from(const OnOffTransition *other) { //////////////////////////////////////////////////////////////////// // Function: GeomBinAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int GeomBinAttribute:: compare_values(const OnOffAttribute *other) const { diff --git a/panda/src/cull/geomBinAttribute.h b/panda/src/cull/geomBinAttribute.h index d2fdd663e2..307e587d12 100644 --- a/panda/src/cull/geomBinAttribute.h +++ b/panda/src/cull/geomBinAttribute.h @@ -1,6 +1,19 @@ // Filename: geomBinAttribute.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBINATTRIBUTE_H diff --git a/panda/src/cull/geomBinBackToFront.I b/panda/src/cull/geomBinBackToFront.I index 27a103b61e..715de49885 100644 --- a/panda/src/cull/geomBinBackToFront.I +++ b/panda/src/cull/geomBinBackToFront.I @@ -1,6 +1,19 @@ // Filename: geomBinBackToFront.I // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullTraverser.h" @@ -8,10 +21,10 @@ //////////////////////////////////////////////////////////////////// // Function: GeomBinBackToFront::NodeEntry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinBackToFront::NodeEntry:: -NodeEntry(float distance, const PT(CullState) &state, +NodeEntry(float distance, const PT(CullState) &state, const ArcChain &arc_chain, bool is_direct) : _distance(distance), _state(state), @@ -23,7 +36,7 @@ NodeEntry(float distance, const PT(CullState) &state, //////////////////////////////////////////////////////////////////// // Function: GeomBinBackToFront::NodeEntry::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinBackToFront::NodeEntry:: NodeEntry(const GeomBinBackToFront::NodeEntry ©) : @@ -37,7 +50,7 @@ NodeEntry(const GeomBinBackToFront::NodeEntry ©) : //////////////////////////////////////////////////////////////////// // Function: GeomBinBackToFront::NodeEntry::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GeomBinBackToFront::NodeEntry:: operator = (const NodeEntry ©) { @@ -49,7 +62,7 @@ operator = (const NodeEntry ©) { //////////////////////////////////////////////////////////////////// // Function: GeomBinBackToFront::NodeEntry::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GeomBinBackToFront::NodeEntry:: operator < (const NodeEntry &other) const { @@ -59,7 +72,7 @@ operator < (const NodeEntry &other) const { //////////////////////////////////////////////////////////////////// // Function: GeomBinBackToFront::NodeEntry::draw // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GeomBinBackToFront::NodeEntry:: draw(CullTraverser *trav) const { @@ -74,10 +87,10 @@ draw(CullTraverser *trav) const { //////////////////////////////////////////////////////////////////// // Function: GeomBinBackToFront::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinBackToFront:: GeomBinBackToFront(const string &name) : - GeomBin(name) + GeomBin(name) { } diff --git a/panda/src/cull/geomBinBackToFront.cxx b/panda/src/cull/geomBinBackToFront.cxx index ac8595a860..3e677e0621 100644 --- a/panda/src/cull/geomBinBackToFront.cxx +++ b/panda/src/cull/geomBinBackToFront.cxx @@ -1,6 +1,19 @@ // Filename: geomBinBackToFront.cxx // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBinBackToFront.h" @@ -54,7 +67,7 @@ record_current_state(GraphicsStateGuardian *gsg, CullState *cs, int, nassertv(node != (GeomNode *)NULL); const BoundingVolume &volume = node->get_bound(); - if (!volume.is_empty() && + if (!volume.is_empty() && volume.is_of_type(GeometricBoundingVolume::get_class_type())) { const GeometricBoundingVolume *gbv; DCAST_INTO_V(gbv, &volume); @@ -80,7 +93,7 @@ record_current_state(GraphicsStateGuardian *gsg, CullState *cs, int, float distance = 0.0; bool got_distance = false; - if (!volume.is_empty() && + if (!volume.is_empty() && volume.is_of_type(GeometricBoundingVolume::get_class_type())) { const GeometricBoundingVolume *gbv; DCAST_INTO_V(gbv, &volume); @@ -105,7 +118,7 @@ record_current_state(GraphicsStateGuardian *gsg, CullState *cs, int, NodeRelation *arc = node->get_child(graph_type, i); const BoundingVolume &volume = arc->get_bound(); - if (!volume.is_empty() && + if (!volume.is_empty() && volume.is_of_type(GeometricBoundingVolume::get_class_type())) { const GeometricBoundingVolume *gbv; DCAST_INTO_V(gbv, &volume); @@ -133,14 +146,14 @@ record_current_state(GraphicsStateGuardian *gsg, CullState *cs, int, //////////////////////////////////////////////////////////////////// // Function: GeomBinBackToFront::draw // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinBackToFront:: draw(CullTraverser *trav) { PStatTimer timer(CullTraverser::_draw_pcollector); if (cull_cat.is_spam()) { - cull_cat.spam() + cull_cat.spam() << "GeomBinBackToFront drawing " << _node_entries.size() << " entries.\n"; } NodeEntries::iterator nei; diff --git a/panda/src/cull/geomBinBackToFront.h b/panda/src/cull/geomBinBackToFront.h index 1d7d682ef0..9d945dd959 100644 --- a/panda/src/cull/geomBinBackToFront.h +++ b/panda/src/cull/geomBinBackToFront.h @@ -1,6 +1,19 @@ // Filename: geomBinBackToFront.h // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBINBACKTOFRONT_H @@ -38,7 +51,7 @@ public: private: class NodeEntry { public: - INLINE NodeEntry(float distance, const PT(CullState) &state, + INLINE NodeEntry(float distance, const PT(CullState) &state, const ArcChain &arc_chain, bool is_direct); INLINE NodeEntry(const NodeEntry ©); INLINE void operator = (const NodeEntry ©); @@ -70,7 +83,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/cull/geomBinFixed.I b/panda/src/cull/geomBinFixed.I index e725a4bcaf..6df3f9161c 100644 --- a/panda/src/cull/geomBinFixed.I +++ b/panda/src/cull/geomBinFixed.I @@ -1,6 +1,19 @@ // Filename: geomBinFixed.I // Created by: drose (14Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullTraverser.h" @@ -8,10 +21,10 @@ //////////////////////////////////////////////////////////////////// // Function: GeomBinFixed::NodeEntry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinFixed::NodeEntry:: -NodeEntry(int draw_order, const PT(CullState) &state, +NodeEntry(int draw_order, const PT(CullState) &state, const ArcChain &arc_chain, bool is_direct) : _draw_order(draw_order), _state(state), @@ -23,7 +36,7 @@ NodeEntry(int draw_order, const PT(CullState) &state, //////////////////////////////////////////////////////////////////// // Function: GeomBinFixed::NodeEntry::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinFixed::NodeEntry:: NodeEntry(const GeomBinFixed::NodeEntry ©) : @@ -37,7 +50,7 @@ NodeEntry(const GeomBinFixed::NodeEntry ©) : //////////////////////////////////////////////////////////////////// // Function: GeomBinFixed::NodeEntry::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GeomBinFixed::NodeEntry:: operator = (const NodeEntry ©) { @@ -50,7 +63,7 @@ operator = (const NodeEntry ©) { //////////////////////////////////////////////////////////////////// // Function: GeomBinFixed::NodeEntry::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GeomBinFixed::NodeEntry:: operator < (const NodeEntry &other) const { @@ -60,7 +73,7 @@ operator < (const NodeEntry &other) const { //////////////////////////////////////////////////////////////////// // Function: GeomBinFixed::NodeEntry::draw // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GeomBinFixed::NodeEntry:: draw(CullTraverser *trav) const { @@ -75,10 +88,10 @@ draw(CullTraverser *trav) const { //////////////////////////////////////////////////////////////////// // Function: GeomBinFixed::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinFixed:: GeomBinFixed(const string &name) : - GeomBin(name) + GeomBin(name) { } diff --git a/panda/src/cull/geomBinFixed.cxx b/panda/src/cull/geomBinFixed.cxx index 6ec3bf5d3c..5a673c0972 100644 --- a/panda/src/cull/geomBinFixed.cxx +++ b/panda/src/cull/geomBinFixed.cxx @@ -1,6 +1,19 @@ // Filename: geomBinFixed.cxx // Created by: drose (14Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBinFixed.h" @@ -62,7 +75,7 @@ record_current_state(GraphicsStateGuardian *, CullState *cs, //////////////////////////////////////////////////////////////////// // Function: GeomBinFixed::draw // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinFixed:: draw(CullTraverser *trav) { diff --git a/panda/src/cull/geomBinFixed.h b/panda/src/cull/geomBinFixed.h index 666b5c71ea..c4bb79eb6b 100644 --- a/panda/src/cull/geomBinFixed.h +++ b/panda/src/cull/geomBinFixed.h @@ -1,6 +1,19 @@ // Filename: geomBinFixed.h // Created by: drose (14Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBINFIXED_H @@ -35,7 +48,7 @@ public: private: class NodeEntry { public: - INLINE NodeEntry(int draw_order, const PT(CullState) &state, + INLINE NodeEntry(int draw_order, const PT(CullState) &state, const ArcChain &arc_chain, bool is_direct); INLINE NodeEntry(const NodeEntry ©); INLINE void operator = (const NodeEntry ©); @@ -67,7 +80,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/cull/geomBinGroup.I b/panda/src/cull/geomBinGroup.I index c531be66de..614fd55bf8 100644 --- a/panda/src/cull/geomBinGroup.I +++ b/panda/src/cull/geomBinGroup.I @@ -1,16 +1,29 @@ // Filename: geomBinGroup.I // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GeomBinGroup::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinGroup:: GeomBinGroup(const string &name) : - GeomBin(name) + GeomBin(name) { } diff --git a/panda/src/cull/geomBinGroup.cxx b/panda/src/cull/geomBinGroup.cxx index cf618029f2..6200e961fa 100644 --- a/panda/src/cull/geomBinGroup.cxx +++ b/panda/src/cull/geomBinGroup.cxx @@ -1,6 +1,19 @@ // Filename: geomBinGroup.cxx // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBinGroup.h" @@ -15,7 +28,7 @@ TypeHandle GeomBinGroup::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GeomBinGroup::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// GeomBinGroup:: ~GeomBinGroup() { @@ -129,7 +142,7 @@ clear_current_states() { // GeomNodes) is visible this frame. //////////////////////////////////////////////////////////////////// void GeomBinGroup:: -record_current_state(GraphicsStateGuardian *gsg, CullState *cs, +record_current_state(GraphicsStateGuardian *gsg, CullState *cs, int draw_order, CullTraverser *trav) { int index = choose_bin(cs); if (index >= 0 && index < get_num_bins()) { @@ -140,7 +153,7 @@ record_current_state(GraphicsStateGuardian *gsg, CullState *cs, //////////////////////////////////////////////////////////////////// // Function: GeomBinGroup::draw // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinGroup:: draw(CullTraverser *trav) { @@ -160,7 +173,7 @@ draw(CullTraverser *trav) { //////////////////////////////////////////////////////////////////// // Function: GeomBinGroup::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinGroup:: output(ostream &out) const { @@ -171,7 +184,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: GeomBinGroup::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinGroup:: write(ostream &out, int indent_level) const { @@ -230,7 +243,7 @@ PT(GeomBin) GeomBinGroup:: detach() { nassertr(_is_attached, NULL); nassertr(_traverser != (CullTraverser *)NULL, NULL); - + PT(GeomBin) keep = this; if (!has_parent()) { diff --git a/panda/src/cull/geomBinGroup.h b/panda/src/cull/geomBinGroup.h index 4fbeae7445..0c8d847059 100644 --- a/panda/src/cull/geomBinGroup.h +++ b/panda/src/cull/geomBinGroup.h @@ -1,6 +1,19 @@ // Filename: geomBinGroup.h // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBINGROUP_H @@ -68,7 +81,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/cull/geomBinNormal.cxx b/panda/src/cull/geomBinNormal.cxx index 50e18b504c..1c94f0c307 100644 --- a/panda/src/cull/geomBinNormal.cxx +++ b/panda/src/cull/geomBinNormal.cxx @@ -1,6 +1,19 @@ // Filename: geomBinNormal.cxx // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBinNormal.h" @@ -16,11 +29,11 @@ TypeHandle GeomBinNormal::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GeomBinNormal::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GeomBinNormal:: GeomBinNormal(const string &name) : - GeomBinGroup(name) + GeomBinGroup(name) { GeomBinUnsorted *opaque = new GeomBinUnsorted("opaque"); GeomBinBackToFront *transparent = new GeomBinBackToFront("transparent"); @@ -44,7 +57,7 @@ choose_bin(CullState *cs) const { TransparencyAttribute *trans_attrib; if (get_attribute_into(trans_attrib, cs->get_attributes(), TransparencyTransition::get_class_type())) { - is_transparent = + is_transparent = (trans_attrib->get_mode() != TransparencyProperty::M_none); } diff --git a/panda/src/cull/geomBinNormal.h b/panda/src/cull/geomBinNormal.h index 5f73677e12..c22005f01b 100644 --- a/panda/src/cull/geomBinNormal.h +++ b/panda/src/cull/geomBinNormal.h @@ -1,6 +1,19 @@ // Filename: geomBinNormal.h // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBINNORMAL_H @@ -41,7 +54,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/cull/geomBinTransition.I b/panda/src/cull/geomBinTransition.I index 95b9ff70b6..086dc614fd 100644 --- a/panda/src/cull/geomBinTransition.I +++ b/panda/src/cull/geomBinTransition.I @@ -1,12 +1,25 @@ // Filename: geomBinTransition.I // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GeomBinTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinTransition:: GeomBinTransition() { @@ -15,10 +28,10 @@ GeomBinTransition() { //////////////////////////////////////////////////////////////////// // Function: GeomBinTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinTransition:: -GeomBinTransition(const string &bin, int draw_order) : +GeomBinTransition(const string &bin, int draw_order) : OnOffTransition(TD_on), _value(bin), _draw_order(draw_order) @@ -28,7 +41,7 @@ GeomBinTransition(const string &bin, int draw_order) : //////////////////////////////////////////////////////////////////// // Function: GeomBinTransition::off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinTransition GeomBinTransition:: off() { diff --git a/panda/src/cull/geomBinTransition.cxx b/panda/src/cull/geomBinTransition.cxx index 089c9bae0d..239471f0b2 100644 --- a/panda/src/cull/geomBinTransition.cxx +++ b/panda/src/cull/geomBinTransition.cxx @@ -1,6 +1,19 @@ // Filename: geomBinTransition.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBinTransition.h" @@ -44,14 +57,14 @@ set_value_from(const OnOffTransition *other) { const GeomBinTransition *ot; DCAST_INTO_V(ot, other); _value = ot->_value; - _draw_order = ot->_draw_order; + _draw_order = ot->_draw_order; nassertv(!_value.empty()); } //////////////////////////////////////////////////////////////////// // Function: GeomBinTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int GeomBinTransition:: compare_values(const OnOffTransition *other) const { diff --git a/panda/src/cull/geomBinTransition.h b/panda/src/cull/geomBinTransition.h index a49aa620f9..b52327cb17 100644 --- a/panda/src/cull/geomBinTransition.h +++ b/panda/src/cull/geomBinTransition.h @@ -1,6 +1,19 @@ // Filename: geomBinTransition.h // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBINTRANSITION_H @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// // Class : GeomBinTransition -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA GeomBinTransition : public OnOffTransition { PUBLISHED: @@ -25,7 +38,7 @@ PUBLISHED: INLINE const string &get_bin() const; INLINE int get_draw_order() const; -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -40,7 +53,7 @@ protected: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_GeomBinTransition(const FactoryParams ¶ms); diff --git a/panda/src/cull/geomBinUnsorted.I b/panda/src/cull/geomBinUnsorted.I index ca0aa55191..1f2e8abaed 100644 --- a/panda/src/cull/geomBinUnsorted.I +++ b/panda/src/cull/geomBinUnsorted.I @@ -1,15 +1,28 @@ // Filename: geomBinUnsorted.I // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GeomBinUnsorted::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GeomBinUnsorted:: GeomBinUnsorted(const string &name) : - GeomBin(name) + GeomBin(name) { } diff --git a/panda/src/cull/geomBinUnsorted.cxx b/panda/src/cull/geomBinUnsorted.cxx index 77b4ce88df..c98d59d1be 100644 --- a/panda/src/cull/geomBinUnsorted.cxx +++ b/panda/src/cull/geomBinUnsorted.cxx @@ -1,6 +1,19 @@ // Filename: geomBinUnsorted.cxx // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomBinUnsorted.h" @@ -16,7 +29,7 @@ TypeHandle GeomBinUnsorted::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GeomBinUnsorted::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// GeomBinUnsorted:: ~GeomBinUnsorted() { @@ -64,7 +77,7 @@ record_current_state(GraphicsStateGuardian *, CullState *cs, int, //////////////////////////////////////////////////////////////////// // Function: GeomBinUnsorted::draw // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinUnsorted:: draw(CullTraverser *trav) { @@ -73,7 +86,7 @@ draw(CullTraverser *trav) { GraphicsStateGuardian *gsg = trav->get_gsg(); if (cull_cat.is_spam()) { - cull_cat.spam() + cull_cat.spam() << "GeomBinUnsorted drawing " << _cull_states.size() << " states.\n"; } @@ -118,7 +131,7 @@ draw(CullTraverser *trav) { //////////////////////////////////////////////////////////////////// // Function: GeomBinUnsorted::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinUnsorted:: output(ostream &out) const { @@ -129,7 +142,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: GeomBinUnsorted::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomBinUnsorted:: write(ostream &out, int indent_level) const { diff --git a/panda/src/cull/geomBinUnsorted.h b/panda/src/cull/geomBinUnsorted.h index 1487aa1851..40909c7394 100644 --- a/panda/src/cull/geomBinUnsorted.h +++ b/panda/src/cull/geomBinUnsorted.h @@ -1,6 +1,19 @@ // Filename: geomBinUnsorted.h // Created by: drose (13Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMBINUNSORTED_H @@ -55,7 +68,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/cull/test_cull.cxx b/panda/src/cull/test_cull.cxx index ecc65d8c66..7e78b4d1d6 100644 --- a/panda/src/cull/test_cull.cxx +++ b/panda/src/cull/test_cull.cxx @@ -1,6 +1,19 @@ // Filename: test_cull.cxx // Created by: drose (07Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullTraverser.h" @@ -91,7 +104,7 @@ main(int argc, char *argv[]) { NodeRelation *m_mb = new NodeRelation(m, mb, 0, NodeRelation::get_class_type()); - + PT(Texture) alpha = new Texture; alpha->set_name("alpha"); PT(Texture) beta = new Texture; @@ -122,7 +135,7 @@ main(int argc, char *argv[]) { nout << "\n"; PrintNodes pn; - df_traverse(r, pn, + df_traverse(r, pn, AllAttributesWrapper(), NullLevelState(), NodeRelation::get_class_type()); nout << "\n"; diff --git a/panda/src/device/analogNode.I b/panda/src/device/analogNode.I index 185996c9dd..1f3ddb08f7 100644 --- a/panda/src/device/analogNode.I +++ b/panda/src/device/analogNode.I @@ -1,13 +1,26 @@ // Filename: analogNode.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AnalogNode::OutputData::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AnalogNode::OutputData:: OutputData() { diff --git a/panda/src/device/analogNode.cxx b/panda/src/device/analogNode.cxx index a368e01c95..5b8fcd175b 100644 --- a/panda/src/device/analogNode.cxx +++ b/panda/src/device/analogNode.cxx @@ -1,6 +1,19 @@ // Filename: analogNode.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "analogNode.h" @@ -12,7 +25,7 @@ TypeHandle AnalogNode::_type_handle; TypeHandle AnalogNode::_xyz_type; - + //////////////////////////////////////////////////////////////////// // Function: AnalogNode::Constructor // Access: Public @@ -23,7 +36,7 @@ AnalogNode(ClientBase *client, const string &device_name) : DataNode(device_name) { nassertv(client != (ClientBase *)NULL); - PT(ClientDevice) device = + PT(ClientDevice) device = client->get_device(ClientAnalogDevice::get_class_type(), device_name); if (device == (ClientDevice *)NULL) { @@ -60,7 +73,7 @@ AnalogNode:: //////////////////////////////////////////////////////////////////// // Function: AnalogNode::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AnalogNode:: write(ostream &out, int indent_level) const { @@ -87,7 +100,7 @@ transmit_data(NodeAttributes &data) { _analog->lock(); for (int i = 0; i < max_outputs; i++) { - if (_outputs[i]._index >= 0 && + if (_outputs[i]._index >= 0 && _analog->is_control_known(_outputs[i]._index)) { if (_outputs[i]._flip) { out[i] = -_analog->get_control_state(_outputs[i]._index); diff --git a/panda/src/device/analogNode.h b/panda/src/device/analogNode.h index 05708a5c6f..e8a1759739 100644 --- a/panda/src/device/analogNode.h +++ b/panda/src/device/analogNode.h @@ -1,6 +1,19 @@ // Filename: analogNode.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ANALOGNODE_H diff --git a/panda/src/device/buttonNode.I b/panda/src/device/buttonNode.I index 4472081a43..33a9c27119 100644 --- a/panda/src/device/buttonNode.I +++ b/panda/src/device/buttonNode.I @@ -1,6 +1,19 @@ // Filename: buttonNode.I // Created by: drose (31Dec69) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/device/buttonNode.cxx b/panda/src/device/buttonNode.cxx index e70d1e9323..dbd9a71958 100644 --- a/panda/src/device/buttonNode.cxx +++ b/panda/src/device/buttonNode.cxx @@ -1,6 +1,19 @@ // Filename: buttonNode.cxx // Created by: drose (31Dec69) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "buttonNode.h" @@ -14,7 +27,7 @@ TypeHandle ButtonNode::_type_handle; TypeHandle ButtonNode::_button_events_type; - + //////////////////////////////////////////////////////////////////// // Function: ButtonNode::Constructor // Access: Public @@ -25,7 +38,7 @@ ButtonNode(ClientBase *client, const string &device_name) : DataNode(device_name) { nassertv(client != (ClientBase *)NULL); - PT(ClientDevice) device = + PT(ClientDevice) device = client->get_device(ClientButtonDevice::get_class_type(), device_name); if (device == (ClientDevice *)NULL) { @@ -64,7 +77,7 @@ ButtonNode:: //////////////////////////////////////////////////////////////////// // Function: ButtonNode::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ButtonNode:: output(ostream &out) const { @@ -82,7 +95,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ButtonNode::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ButtonNode:: write(ostream &out, int indent_level) const { diff --git a/panda/src/device/buttonNode.h b/panda/src/device/buttonNode.h index 5fed20af04..29c375ba89 100644 --- a/panda/src/device/buttonNode.h +++ b/panda/src/device/buttonNode.h @@ -1,6 +1,19 @@ // Filename: buttonNode.h // Created by: drose (31Dec69) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BUTTONNODE_H @@ -59,7 +72,7 @@ public: NodeAttributes _attrib; PT(ButtonEventDataAttribute) _button_events; - // outputs + // outputs static TypeHandle _button_events_type; private: diff --git a/panda/src/device/clientAnalogDevice.I b/panda/src/device/clientAnalogDevice.I index 3ac686c77c..01c66f9b14 100644 --- a/panda/src/device/clientAnalogDevice.I +++ b/panda/src/device/clientAnalogDevice.I @@ -1,13 +1,26 @@ // Filename: clientAnalogDevice.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClientAnalogDevice::AnalogState::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClientAnalogDevice::AnalogState:: AnalogState() : @@ -19,7 +32,7 @@ AnalogState() : //////////////////////////////////////////////////////////////////// // Function: ClientAnalogDevice::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClientAnalogDevice:: ClientAnalogDevice(ClientBase *client, const string &device_name): diff --git a/panda/src/device/clientAnalogDevice.cxx b/panda/src/device/clientAnalogDevice.cxx index 428a074dab..f9dca4c8f8 100644 --- a/panda/src/device/clientAnalogDevice.cxx +++ b/panda/src/device/clientAnalogDevice.cxx @@ -1,6 +1,19 @@ // Filename: clientAnalogDevice.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clientAnalogDevice.h" @@ -31,7 +44,7 @@ ensure_control_index(int index) { //////////////////////////////////////////////////////////////////// // Function: ClientAnalogDevice::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ClientAnalogDevice:: write(ostream &out, int indent_level) const { diff --git a/panda/src/device/clientAnalogDevice.h b/panda/src/device/clientAnalogDevice.h index 87cc676a40..dbc8049659 100644 --- a/panda/src/device/clientAnalogDevice.h +++ b/panda/src/device/clientAnalogDevice.h @@ -1,6 +1,19 @@ // Filename: clientAnalogDevice.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLIENTANALOGDEVICE_H @@ -65,7 +78,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/device/clientBase.I b/panda/src/device/clientBase.I index 9bfc2ac157..5b5c0436f5 100644 --- a/panda/src/device/clientBase.I +++ b/panda/src/device/clientBase.I @@ -1,6 +1,19 @@ // Filename: clientBase.I // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -27,7 +40,7 @@ is_forked() const { //////////////////////////////////////////////////////////////////// INLINE bool ClientBase:: poll() { - if (_forked || + if (_forked || _last_poll_frame == ClockObject::get_global_clock()->get_frame_count()) { return false; } diff --git a/panda/src/device/clientBase.cxx b/panda/src/device/clientBase.cxx index d449e9d2d8..be0ed0223a 100644 --- a/panda/src/device/clientBase.cxx +++ b/panda/src/device/clientBase.cxx @@ -1,6 +1,19 @@ -// Filename: clientBase.h +// Filename: clientBase.cxx // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clientBase.h" @@ -11,7 +24,7 @@ TypeHandle ClientBase::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ClientBase::constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// ClientBase:: ClientBase() { @@ -29,7 +42,7 @@ ClientBase() { //////////////////////////////////////////////////////////////////// // Function: ClientBase::destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ClientBase:: ~ClientBase() { @@ -193,11 +206,11 @@ do_poll() { // Access: Private, static // Description: Call back function for thread (if thread has been // spawned). A call back function must be static, so -// this merely calls the non-static member callback In +// this merely calls the non-static member callback In // addition, the function has a void* return type even // though we don't actually return anything. This is -// necessary because ipc assumes a function that does -// not return anything indicates that the associated +// necessary because ipc assumes a function that does +// not return anything indicates that the associated // thread should be created as unjoinable (detached). //////////////////////////////////////////////////////////////////// void *ClientBase:: diff --git a/panda/src/device/clientBase.h b/panda/src/device/clientBase.h index c07af00125..9b0360bfee 100644 --- a/panda/src/device/clientBase.h +++ b/panda/src/device/clientBase.h @@ -1,6 +1,19 @@ // Filename: clientBase.h // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLIENTBASE_H @@ -49,12 +62,12 @@ PUBLISHED: public: PT(ClientDevice) get_device(TypeHandle device_type, const string &device_name); - + protected: virtual PT(ClientDevice) make_device(TypeHandle device_type, const string &device_name)=0; - virtual bool disconnect_device(TypeHandle device_type, + virtual bool disconnect_device(TypeHandle device_type, const string &device_name, ClientDevice *device); @@ -92,7 +105,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/device/clientButtonDevice.I b/panda/src/device/clientButtonDevice.I index b2a09cbcfd..bc432655a6 100644 --- a/panda/src/device/clientButtonDevice.I +++ b/panda/src/device/clientButtonDevice.I @@ -1,13 +1,26 @@ // Filename: clientButtonDevice.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClientButtonDevice::ButtonState::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClientButtonDevice::ButtonState:: ButtonState() : diff --git a/panda/src/device/clientButtonDevice.cxx b/panda/src/device/clientButtonDevice.cxx index e658f4da43..e68d8ff950 100644 --- a/panda/src/device/clientButtonDevice.cxx +++ b/panda/src/device/clientButtonDevice.cxx @@ -1,6 +1,19 @@ // Filename: clientButtonDevice.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clientButtonDevice.h" @@ -12,7 +25,7 @@ TypeHandle ClientButtonDevice::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ClientButtonDevice::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// ClientButtonDevice:: ClientButtonDevice(ClientBase *client, const string &device_name): @@ -64,7 +77,7 @@ ensure_button_index(int index) { //////////////////////////////////////////////////////////////////// // Function: ClientButtonDevice::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ClientButtonDevice:: output(ostream &out) const { @@ -76,7 +89,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ClientButtonDevice::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ClientButtonDevice:: write(ostream &out, int indent_level) const { diff --git a/panda/src/device/clientButtonDevice.h b/panda/src/device/clientButtonDevice.h index 07c603e7b4..182e7be5e8 100644 --- a/panda/src/device/clientButtonDevice.h +++ b/panda/src/device/clientButtonDevice.h @@ -1,6 +1,19 @@ // Filename: clientButtonDevice.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLIENTBUTTONDEVICE_H @@ -83,7 +96,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; friend class ButtonState; diff --git a/panda/src/device/clientDevice.I b/panda/src/device/clientDevice.I index 83c91c518f..63051ed7c3 100644 --- a/panda/src/device/clientDevice.I +++ b/panda/src/device/clientDevice.I @@ -1,6 +1,19 @@ // Filename: clientDevice.I // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/device/clientDevice.cxx b/panda/src/device/clientDevice.cxx index a09399d442..22947bb395 100644 --- a/panda/src/device/clientDevice.cxx +++ b/panda/src/device/clientDevice.cxx @@ -1,6 +1,19 @@ // Filename: clientDevice.cxx // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clientDevice.h" @@ -13,10 +26,10 @@ TypeHandle ClientDevice::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ClientDevice::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// ClientDevice:: -ClientDevice(ClientBase *client, TypeHandle device_type, +ClientDevice(ClientBase *client, TypeHandle device_type, const string &device_name) : _client(client), _device_type(device_type), @@ -50,7 +63,7 @@ ClientDevice:: // Access: Public // Description: Disconnects the ClientDevice from its ClientBase // object. The device will stop receiving -// updates. +// updates. // // Normally, you should not need to call this explicitly // (and it is probably a mistake to do so); it will @@ -91,7 +104,7 @@ poll() { //////////////////////////////////////////////////////////////////// // Function: ClientDevice::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ClientDevice:: output(ostream &out) const { @@ -101,7 +114,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ClientDevice::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ClientDevice:: write(ostream &out, int indent_level) const { diff --git a/panda/src/device/clientDevice.h b/panda/src/device/clientDevice.h index 1266c9d603..84208c5f2f 100644 --- a/panda/src/device/clientDevice.h +++ b/panda/src/device/clientDevice.h @@ -1,6 +1,19 @@ // Filename: clientDevice.h // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLIENTDEVICE_H @@ -25,7 +38,7 @@ class ClientBase; //////////////////////////////////////////////////////////////////// class EXPCL_PANDA ClientDevice : public TypedReferenceCount { protected: - ClientDevice(ClientBase *client, TypeHandle device_type, + ClientDevice(ClientBase *client, TypeHandle device_type, const string &device_name); public: @@ -68,7 +81,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/device/clientDialDevice.I b/panda/src/device/clientDialDevice.I index 2760707941..6800cac6a4 100644 --- a/panda/src/device/clientDialDevice.I +++ b/panda/src/device/clientDialDevice.I @@ -1,12 +1,25 @@ // Filename: clientDialDevice.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClientDialDevice::DialState::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClientDialDevice::DialState:: DialState() : @@ -18,7 +31,7 @@ DialState() : //////////////////////////////////////////////////////////////////// // Function: ClientDialDevice::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClientDialDevice:: ClientDialDevice(ClientBase *client, const string &device_name): diff --git a/panda/src/device/clientDialDevice.cxx b/panda/src/device/clientDialDevice.cxx index e9ea327965..2e4fd34c1d 100644 --- a/panda/src/device/clientDialDevice.cxx +++ b/panda/src/device/clientDialDevice.cxx @@ -1,6 +1,19 @@ // Filename: clientDialDevice.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clientDialDevice.h" diff --git a/panda/src/device/clientDialDevice.h b/panda/src/device/clientDialDevice.h index 96fd2e6a9d..b0c8b0851e 100644 --- a/panda/src/device/clientDialDevice.h +++ b/panda/src/device/clientDialDevice.h @@ -1,6 +1,19 @@ // Filename: clientDialDevice.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLIENTDIALDEVICE_H @@ -63,7 +76,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/device/clientTrackerDevice.I b/panda/src/device/clientTrackerDevice.I index c49e1cc64e..d8810160f0 100644 --- a/panda/src/device/clientTrackerDevice.I +++ b/panda/src/device/clientTrackerDevice.I @@ -1,13 +1,26 @@ // Filename: clientTrackerDevice.I // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClientTrackerDevice::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClientTrackerDevice:: ClientTrackerDevice(ClientBase *client, const string &device_name): diff --git a/panda/src/device/clientTrackerDevice.cxx b/panda/src/device/clientTrackerDevice.cxx index 976b406b5e..cbf09a74a0 100644 --- a/panda/src/device/clientTrackerDevice.cxx +++ b/panda/src/device/clientTrackerDevice.cxx @@ -1,6 +1,19 @@ // Filename: clientTrackerDevice.cxx // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clientTrackerDevice.h" diff --git a/panda/src/device/clientTrackerDevice.h b/panda/src/device/clientTrackerDevice.h index 29b0da9d60..534465a728 100644 --- a/panda/src/device/clientTrackerDevice.h +++ b/panda/src/device/clientTrackerDevice.h @@ -1,6 +1,19 @@ // Filename: clientTrackerDevice.h // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLIENTTRACKERDEVICE_H @@ -40,7 +53,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/device/config_device.cxx b/panda/src/device/config_device.cxx index eae87b08e1..87a31a92df 100644 --- a/panda/src/device/config_device.cxx +++ b/panda/src/device/config_device.cxx @@ -1,6 +1,19 @@ // Filename: config_device.cxx // Created by: drose (04May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_device.h" diff --git a/panda/src/device/config_device.h b/panda/src/device/config_device.h index 77061f7c5e..d49b138668 100644 --- a/panda/src/device/config_device.h +++ b/panda/src/device/config_device.h @@ -1,6 +1,19 @@ // Filename: config_device.h // Created by: drose (04May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_DEVICE_H diff --git a/panda/src/device/dialNode.I b/panda/src/device/dialNode.I index 9a90887fe8..a6928e84a4 100644 --- a/panda/src/device/dialNode.I +++ b/panda/src/device/dialNode.I @@ -1,6 +1,19 @@ // Filename: dialNode.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/device/dialNode.cxx b/panda/src/device/dialNode.cxx index b4b1a75761..3835a1e0bf 100644 --- a/panda/src/device/dialNode.cxx +++ b/panda/src/device/dialNode.cxx @@ -1,6 +1,19 @@ // Filename: dialNode.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dialNode.h" @@ -21,7 +34,7 @@ DialNode(ClientBase *client, const string &device_name) : DataNode(device_name) { nassertv(client != (ClientBase *)NULL); - PT(ClientDevice) device = + PT(ClientDevice) device = client->get_device(ClientDialDevice::get_class_type(), device_name); if (device == (ClientDevice *)NULL) { diff --git a/panda/src/device/dialNode.h b/panda/src/device/dialNode.h index 5d7c02c5ea..3b10df4796 100644 --- a/panda/src/device/dialNode.h +++ b/panda/src/device/dialNode.h @@ -1,6 +1,19 @@ // Filename: dialNode.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DIALNODE_H @@ -23,7 +36,7 @@ // exists, and provides hooks to the user to read the // state of any of the sequentially numbered dial // controls associated with that device. -// +// // A dial is a rotating device that does not have // stops--it can keep rotating any number of times. // Therefore it does not have a specific position at any diff --git a/panda/src/device/mouse.cxx b/panda/src/device/mouse.cxx index bd1bf21e35..19fdb28db0 100644 --- a/panda/src/device/mouse.cxx +++ b/panda/src/device/mouse.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "mouse.h" @@ -28,7 +37,7 @@ TypeHandle MouseAndKeyboard::_button_events_type; // Description: //////////////////////////////////////////////////////////////////// MouseAndKeyboard:: -MouseAndKeyboard(GraphicsWindow *window, int device, const string& name) : +MouseAndKeyboard(GraphicsWindow *window, int device, const string& name) : DataNode(name), _window(window), _device(device) @@ -64,14 +73,14 @@ transmit_data(NodeAttributes &data) { if (mdata._in_window) { // Get motion _pixel_xyz->set_value(LPoint3f(mdata._xpos, mdata._ypos, 0)); - - int w = _window->get_width(); + + int w = _window->get_width(); int h = _window->get_height(); - + // Scale to range [-1,1] float xf = (float)(2 * mdata._xpos) / (float)w - 1.0; float yf = 1.0 - (float)(2 * mdata._ypos) / (float)h; - + _xyz->set_value(LPoint3f(xf, yf, 0)); data = _got_mouse_attrib; diff --git a/panda/src/device/mouse.h b/panda/src/device/mouse.h index b111599646..b5c112559a 100644 --- a/panda/src/device/mouse.h +++ b/panda/src/device/mouse.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MOUSE_H #define MOUSE_H // @@ -58,16 +70,16 @@ public: PT(Vec3DataAttribute) _pixel_xyz; PT(Vec3DataAttribute) _xyz; PT(ButtonEventDataAttribute) _button_events; - + static TypeHandle _mods_type; static TypeHandle _pixel_xyz_type; static TypeHandle _xyz_type; static TypeHandle _button_events_type; - + protected: PT(GraphicsWindow) _window; int _device; - + public: virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/device/trackerData.I b/panda/src/device/trackerData.I index 85b7494fb2..d862710b75 100644 --- a/panda/src/device/trackerData.I +++ b/panda/src/device/trackerData.I @@ -1,12 +1,25 @@ // Filename: trackerData.I // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TrackerData::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TrackerData:: TrackerData() : @@ -17,7 +30,7 @@ TrackerData() : //////////////////////////////////////////////////////////////////// // Function: TrackerData::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TrackerData:: TrackerData(const TrackerData ©) { diff --git a/panda/src/device/trackerData.cxx b/panda/src/device/trackerData.cxx index 73cd23d897..93fb2c9cab 100644 --- a/panda/src/device/trackerData.cxx +++ b/panda/src/device/trackerData.cxx @@ -1,6 +1,19 @@ // Filename: trackerData.cxx // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "trackerData.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: TrackerData::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void TrackerData:: operator = (const TrackerData ©) { diff --git a/panda/src/device/trackerData.h b/panda/src/device/trackerData.h index 7ee8cf2bf3..aad9754674 100644 --- a/panda/src/device/trackerData.h +++ b/panda/src/device/trackerData.h @@ -1,6 +1,19 @@ // Filename: trackerData.h // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRACKERDATA_H diff --git a/panda/src/device/trackerNode.I b/panda/src/device/trackerNode.I index 15316b2747..e47cb68942 100644 --- a/panda/src/device/trackerNode.I +++ b/panda/src/device/trackerNode.I @@ -1,6 +1,19 @@ // Filename: trackerNode.I // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/device/trackerNode.cxx b/panda/src/device/trackerNode.cxx index 15cc7864c0..748cf70409 100644 --- a/panda/src/device/trackerNode.cxx +++ b/panda/src/device/trackerNode.cxx @@ -1,6 +1,19 @@ // Filename: trackerNode.cxx // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "trackerNode.h" @@ -12,7 +25,7 @@ TypeHandle TrackerNode::_type_handle; TypeHandle TrackerNode::_transform_type; - + //////////////////////////////////////////////////////////////////// // Function: TrackerNode::Constructor // Access: Public @@ -23,7 +36,7 @@ TrackerNode(ClientBase *client, const string &device_name) : DataNode(device_name) { nassertv(client != (ClientBase *)NULL); - PT(ClientDevice) device = + PT(ClientDevice) device = client->get_device(ClientTrackerDevice::get_class_type(), device_name); if (device == (ClientDevice *)NULL) { diff --git a/panda/src/device/trackerNode.h b/panda/src/device/trackerNode.h index 65699c4bac..fde5efcdfb 100644 --- a/panda/src/device/trackerNode.h +++ b/panda/src/device/trackerNode.h @@ -1,6 +1,19 @@ // Filename: trackerNode.h // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRACKERNODE_H diff --git a/panda/src/dgraph/buttonEventDataAttribute.I b/panda/src/dgraph/buttonEventDataAttribute.I index d125c1c8f6..213904a4db 100644 --- a/panda/src/dgraph/buttonEventDataAttribute.I +++ b/panda/src/dgraph/buttonEventDataAttribute.I @@ -1,12 +1,25 @@ // Filename: buttonEventDataAttribute.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEventDataAttribute:: ButtonEventDataAttribute() { @@ -15,7 +28,7 @@ ButtonEventDataAttribute() { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEventDataAttribute:: ButtonEventDataAttribute(const ButtonEventDataAttribute ©) : @@ -27,7 +40,7 @@ ButtonEventDataAttribute(const ButtonEventDataAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ButtonEventDataAttribute:: operator = (const ButtonEventDataAttribute ©) { @@ -38,7 +51,7 @@ operator = (const ButtonEventDataAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEventDataAttribute::const_iterator ButtonEventDataAttribute:: begin() const { @@ -48,7 +61,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEventDataAttribute::const_iterator ButtonEventDataAttribute:: end() const { @@ -58,7 +71,7 @@ end() const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::clear // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ButtonEventDataAttribute:: clear() { @@ -68,7 +81,7 @@ clear() { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::clear // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ButtonEventDataAttribute:: push_back(const ButtonEvent &event) { diff --git a/panda/src/dgraph/buttonEventDataAttribute.cxx b/panda/src/dgraph/buttonEventDataAttribute.cxx index d6f6512192..94195ee09b 100644 --- a/panda/src/dgraph/buttonEventDataAttribute.cxx +++ b/panda/src/dgraph/buttonEventDataAttribute.cxx @@ -1,6 +1,19 @@ // Filename: buttonEventDataAttribute.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "buttonEventDataAttribute.h" @@ -31,7 +44,7 @@ update_mods(ModifierButtons &mods) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *ButtonEventDataAttribute:: make_copy() const { @@ -41,7 +54,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *ButtonEventDataAttribute:: make_initial() const { @@ -51,7 +64,7 @@ make_initial() const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::get_handle // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// TypeHandle ButtonEventDataAttribute:: get_handle() const { @@ -81,7 +94,7 @@ merge(const NodeAttribute *other) const { } else { // We have to create a new data attribute that includes both sets // of buttons. - ButtonEventDataAttribute *new_attrib = + ButtonEventDataAttribute *new_attrib = new ButtonEventDataAttribute(*this); new_attrib->_buttons.insert(new_attrib->_buttons.end(), @@ -93,7 +106,7 @@ merge(const NodeAttribute *other) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ButtonEventDataAttribute:: output(ostream &out) const { @@ -109,7 +122,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ButtonEventDataAttribute:: write(ostream &out, int indent_level) const { @@ -119,7 +132,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataAttribute::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ButtonEventDataAttribute:: internal_compare_to(const NodeAttribute *other) const { @@ -132,7 +145,7 @@ internal_compare_to(const NodeAttribute *other) const { else if (lexicographical_compare(_buttons.begin(), _buttons.end(), ot->_buttons.begin(), ot->_buttons.end())) return -1; - else + else return 1; #else return lexicographical_compare_3way(_buttons.begin(), _buttons.end(), diff --git a/panda/src/dgraph/buttonEventDataAttribute.h b/panda/src/dgraph/buttonEventDataAttribute.h index 84544609fc..5a542f4bbe 100644 --- a/panda/src/dgraph/buttonEventDataAttribute.h +++ b/panda/src/dgraph/buttonEventDataAttribute.h @@ -1,6 +1,19 @@ // Filename: buttonEventDataAttribute.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BUTTONEVENTDATAATTRIBUTE_H @@ -48,7 +61,7 @@ public: public: virtual NodeAttribute *make_copy() const; virtual NodeAttribute *make_initial() const; - + virtual TypeHandle get_handle() const; virtual NodeAttribute *merge(const NodeAttribute *other) const; diff --git a/panda/src/dgraph/buttonEventDataTransition.I b/panda/src/dgraph/buttonEventDataTransition.I index fb31617372..d90798f2b8 100644 --- a/panda/src/dgraph/buttonEventDataTransition.I +++ b/panda/src/dgraph/buttonEventDataTransition.I @@ -1,12 +1,25 @@ // Filename: buttonEventDataTransition.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEventDataTransition:: ButtonEventDataTransition() { @@ -15,7 +28,7 @@ ButtonEventDataTransition() { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEventDataTransition:: ButtonEventDataTransition(const ButtonEventDataTransition ©) : @@ -26,7 +39,7 @@ ButtonEventDataTransition(const ButtonEventDataTransition ©) : //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ButtonEventDataTransition:: operator = (const ButtonEventDataTransition ©) { diff --git a/panda/src/dgraph/buttonEventDataTransition.cxx b/panda/src/dgraph/buttonEventDataTransition.cxx index 9bc80cd812..5debcae675 100644 --- a/panda/src/dgraph/buttonEventDataTransition.cxx +++ b/panda/src/dgraph/buttonEventDataTransition.cxx @@ -1,6 +1,19 @@ // Filename: buttonEventDataTransition.cxx // Created by: drose (09Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "buttonEventDataTransition.h" @@ -11,7 +24,7 @@ TypeHandle ButtonEventDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataTransition::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *ButtonEventDataTransition:: make_copy() const { @@ -21,7 +34,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *ButtonEventDataTransition:: make_attrib() const { @@ -48,7 +61,7 @@ compose(const NodeTransition *) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataTransition::invert // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *ButtonEventDataTransition:: invert() const { @@ -72,7 +85,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEventDataTransition::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ButtonEventDataTransition:: internal_compare_to(const NodeTransition *) const { diff --git a/panda/src/dgraph/buttonEventDataTransition.h b/panda/src/dgraph/buttonEventDataTransition.h index 3c0e9471b1..0d99feacc4 100644 --- a/panda/src/dgraph/buttonEventDataTransition.h +++ b/panda/src/dgraph/buttonEventDataTransition.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUTTONEVENTDATATRANSITION_H #define BUTTONEVENTDATATRANSITION_H diff --git a/panda/src/dgraph/config_dgraph.cxx b/panda/src/dgraph/config_dgraph.cxx index b5017dd84b..dbc5073656 100644 --- a/panda/src/dgraph/config_dgraph.cxx +++ b/panda/src/dgraph/config_dgraph.cxx @@ -1,6 +1,19 @@ // Filename: config_dgraph.cxx // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_dgraph.h" diff --git a/panda/src/dgraph/config_dgraph.h b/panda/src/dgraph/config_dgraph.h index 3839f4177e..14991c9eee 100644 --- a/panda/src/dgraph/config_dgraph.h +++ b/panda/src/dgraph/config_dgraph.h @@ -1,6 +1,19 @@ // Filename: config_dgraph.h // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_DGRAPH_H diff --git a/panda/src/dgraph/dataGraphTraversal.cxx b/panda/src/dgraph/dataGraphTraversal.cxx index f8be485820..93c7c2ec9d 100644 --- a/panda/src/dgraph/dataGraphTraversal.cxx +++ b/panda/src/dgraph/dataGraphTraversal.cxx @@ -1,6 +1,19 @@ // Filename: dataGraphTraversal.cxx // Created by: drose (26Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dataGraphTraversal.h" @@ -11,7 +24,7 @@ #ifndef CPPPARSER PStatCollector _dgraph_pcollector("App:Data graph"); #endif - + //////////////////////////////////////////////////////////////////// // Function: traverse_data_graph // Description: Initiates a traversal of the data graph given the diff --git a/panda/src/dgraph/dataGraphTraversal.h b/panda/src/dgraph/dataGraphTraversal.h index 9e3f45f471..b81b070a47 100644 --- a/panda/src/dgraph/dataGraphTraversal.h +++ b/panda/src/dgraph/dataGraphTraversal.h @@ -2,6 +2,19 @@ // Created by: drose (26Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAPHTRAVERSAL_H #define DATAGRAPHTRAVERSAL_H diff --git a/panda/src/dgraph/dataGraphTraverser.I b/panda/src/dgraph/dataGraphTraverser.I index 7442331398..262154ad39 100644 --- a/panda/src/dgraph/dataGraphTraverser.I +++ b/panda/src/dgraph/dataGraphTraverser.I @@ -1,13 +1,26 @@ // Filename: dataGraphTraverser.I // Created by: drose (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DataGraphTraverser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DataGraphTraverser:: DataGraphTraverser() { diff --git a/panda/src/dgraph/dataGraphTraverser.cxx b/panda/src/dgraph/dataGraphTraverser.cxx index 636a91fe7c..3458eaaa73 100644 --- a/panda/src/dgraph/dataGraphTraverser.cxx +++ b/panda/src/dgraph/dataGraphTraverser.cxx @@ -1,6 +1,19 @@ // Filename: dataGraphTraverser.cxx // Created by: drose (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dataGraphTraverser.h" @@ -81,25 +94,25 @@ r_traverse_below(Node *node, NodeAttributes &data, bool has_spam_mode) { // For the first n - 1 children we need to make a copy of our // NodeAttributes for each one--this allows our children to modify // the set freely without affecting its siblings. - + for (int i = 0; i < num_children - 1; i++) { NodeAttributes copy = data; if (data_node != (DataNode *)NULL) { data_node->transmit_data_per_child(copy, i); } - - NodeRelation *arc = + + NodeRelation *arc = node->get_child(DataRelation::get_class_type(), i); r_traverse(arc->get_child(), copy, has_spam_mode); } - + // For the last child, we don't have to bother making a copy since // no one cares any more. This is a slight optimization. if (data_node != (DataNode *)NULL) { data_node->transmit_data_per_child(data, num_children - 1); } - - NodeRelation *arc = + + NodeRelation *arc = node->get_child(DataRelation::get_class_type(), num_children - 1); if (dgraph_cat.is_spam()) { @@ -122,7 +135,7 @@ r_traverse_below(Node *node, NodeAttributes &data, bool has_spam_mode) { void DataGraphTraverser:: save(Node *node, const NodeAttributes &data, bool has_spam_mode, int num_parents) { - + States::iterator si; si = _saved_states.find(node); @@ -178,7 +191,7 @@ resume(Node *node, DataGraphTraverser::SavedState &state) { dgraph_cat.info() << "Sending into " << *node << " {\n"; describe_data_verbose(dgraph_cat.info(false), state._data, 2); dgraph_cat.info(false) << "}\n"; - + } else if (dgraph_cat.is_spam()) { dgraph_cat.spam() << "Sending into " << *node << " {\n"; describe_data_verbose(dgraph_cat.spam(false), state._data, 2); diff --git a/panda/src/dgraph/dataGraphTraverser.h b/panda/src/dgraph/dataGraphTraverser.h index bf83490c9e..565110a98f 100644 --- a/panda/src/dgraph/dataGraphTraverser.h +++ b/panda/src/dgraph/dataGraphTraverser.h @@ -1,6 +1,19 @@ // Filename: dataGraphTraverser.h // Created by: drose (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DATAGRAPHTRAVERSER_H diff --git a/panda/src/dgraph/dataNode.cxx b/panda/src/dgraph/dataNode.cxx index 62a18d9770..6d993b120e 100644 --- a/panda/src/dgraph/dataNode.cxx +++ b/panda/src/dgraph/dataNode.cxx @@ -1,16 +1,29 @@ // Filename: dataNode.cxx // Created by: drose (26Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dataNode.h" TypeHandle DataNode::_type_handle; - + //////////////////////////////////////////////////////////////////// // Function: DataNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DataNode:: DataNode(const string &name) : NamedNode(name) { @@ -33,7 +46,7 @@ DataNode(const string &name) : NamedNode(name) { void DataNode:: transmit_data_per_child(NodeAttributes &, int) { } - + //////////////////////////////////////////////////////////////////// // Function: DataNode::set_spam_mode // Access: Public @@ -47,7 +60,7 @@ void DataNode:: set_spam_mode(bool flag) { _spam_mode = flag; } - + //////////////////////////////////////////////////////////////////// // Function: DataNode::get_spam_mode // Access: Public @@ -60,7 +73,7 @@ get_spam_mode() const { } - + //////////////////////////////////////////////////////////////////// // Function: register_data_transition // Description: Defines a new data transition of the indicated name @@ -74,7 +87,7 @@ get_spam_mode() const { // on the TypeHandle of the data they share. //////////////////////////////////////////////////////////////////// void -register_data_transition(TypeHandle &type_handle, const string &name, +register_data_transition(TypeHandle &type_handle, const string &name, TypeHandle derived_from) { // Make sure the user gave us a transition type as the base. nassertv(derived_from.is_derived_from(NodeTransition::get_class_type())); @@ -87,4 +100,4 @@ register_data_transition(TypeHandle &type_handle, const string &name, } } - + diff --git a/panda/src/dgraph/dataNode.h b/panda/src/dgraph/dataNode.h index 1728eaf24c..18af7ba975 100644 --- a/panda/src/dgraph/dataNode.h +++ b/panda/src/dgraph/dataNode.h @@ -2,6 +2,19 @@ // Created by: drose (25Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATANODE_H #define DATANODE_H @@ -100,7 +113,7 @@ private: static TypeHandle _type_handle; }; - + //////////////////////////////////////////////////////////////////// // Function: register_data_transition // Description: Defines a new data transition of the indicated name @@ -113,7 +126,7 @@ private: // possible to unify data producers and consumers based // on the TypeHandle of the data they share. //////////////////////////////////////////////////////////////////// -void EXPCL_PANDA +void EXPCL_PANDA register_data_transition(TypeHandle &type_handle, const string &name, TypeHandle derived_from); diff --git a/panda/src/dgraph/dataRelation.I b/panda/src/dgraph/dataRelation.I index 0668f829fb..ffc0c4bc28 100644 --- a/panda/src/dgraph/dataRelation.I +++ b/panda/src/dgraph/dataRelation.I @@ -1,16 +1,29 @@ // Filename: dataRelation.I // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DataRelation::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DataRelation:: DataRelation(Node *from, Node *to, int sort) : - NodeRelation(from, to, sort, get_class_type()) + NodeRelation(from, to, sort, get_class_type()) { } diff --git a/panda/src/dgraph/dataRelation.cxx b/panda/src/dgraph/dataRelation.cxx index 563244931d..9c7dfa6a31 100644 --- a/panda/src/dgraph/dataRelation.cxx +++ b/panda/src/dgraph/dataRelation.cxx @@ -1,6 +1,19 @@ // Filename: dataRelation.cxx // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dataRelation.h" diff --git a/panda/src/dgraph/dataRelation.h b/panda/src/dgraph/dataRelation.h index 9699c86744..b473207a3b 100644 --- a/panda/src/dgraph/dataRelation.h +++ b/panda/src/dgraph/dataRelation.h @@ -1,6 +1,19 @@ // Filename: dataRelation.h // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DATARELATION_H @@ -27,7 +40,7 @@ public: // This is just to be called at initialization time; don't try to // call this directly. INLINE static void register_with_factory(); - + private: static NodeRelation *make_arc(const FactoryParams ¶ms); diff --git a/panda/src/dgraph/describe_data_verbose.cxx b/panda/src/dgraph/describe_data_verbose.cxx index 8540871e39..8be0ef0e23 100644 --- a/panda/src/dgraph/describe_data_verbose.cxx +++ b/panda/src/dgraph/describe_data_verbose.cxx @@ -1,6 +1,19 @@ // Filename: describe_data_verbose.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "describe_data_verbose.h" @@ -13,7 +26,7 @@ // data value. static const int data_indent_level = 12; - + //////////////////////////////////////////////////////////////////// // Function: describe_data_verbose // Description: Writes to the indicated output stream a @@ -44,7 +57,7 @@ describe_data_verbose(ostream &out, const NodeAttributes &state, // before the last underscore. name = actual_name.substr(0, underscore); } - + indent(out, indent_level) << name; if ((int)name.length() < data_indent_level) { indent(out, data_indent_level - name.length()); diff --git a/panda/src/dgraph/describe_data_verbose.h b/panda/src/dgraph/describe_data_verbose.h index 27b2e878f9..958e892c00 100644 --- a/panda/src/dgraph/describe_data_verbose.h +++ b/panda/src/dgraph/describe_data_verbose.h @@ -1,6 +1,19 @@ // Filename: describe_data_verbose.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DESCRIBE_DATA_VERBOSE_H diff --git a/panda/src/dgraph/doubleDataAttribute.I b/panda/src/dgraph/doubleDataAttribute.I index 3758932a88..ce3877f08d 100644 --- a/panda/src/dgraph/doubleDataAttribute.I +++ b/panda/src/dgraph/doubleDataAttribute.I @@ -1,12 +1,25 @@ // Filename: doubleDataAttribute.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DoubleDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoubleDataAttribute:: DoubleDataAttribute() { @@ -15,7 +28,7 @@ DoubleDataAttribute() { //////////////////////////////////////////////////////////////////// // Function: DoubleDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoubleDataAttribute:: DoubleDataAttribute(double value) : NumericDataAttribute(value) { diff --git a/panda/src/dgraph/doubleDataAttribute.cxx b/panda/src/dgraph/doubleDataAttribute.cxx index 4802ae94dc..9e7d9205b1 100644 --- a/panda/src/dgraph/doubleDataAttribute.cxx +++ b/panda/src/dgraph/doubleDataAttribute.cxx @@ -1,6 +1,19 @@ // Filename: doubleDataAttribute.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "doubleDataAttribute.h" @@ -16,7 +29,7 @@ TypeHandle DoubleDataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: DoubleDataAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *DoubleDataAttribute:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: DoubleDataAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *DoubleDataAttribute:: make_initial() const { diff --git a/panda/src/dgraph/doubleDataAttribute.h b/panda/src/dgraph/doubleDataAttribute.h index d79ecbc474..070e920c16 100644 --- a/panda/src/dgraph/doubleDataAttribute.h +++ b/panda/src/dgraph/doubleDataAttribute.h @@ -1,6 +1,19 @@ // Filename: doubleDataAttribute.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DOUBLEDATAATTRIBUTE_H @@ -35,7 +48,7 @@ public: } static void init_type() { NumericDataAttribute::init_type(); - register_type(_type_handle, "DoubleDataAttribute", + register_type(_type_handle, "DoubleDataAttribute", NumericDataAttribute::get_class_type()); } diff --git a/panda/src/dgraph/doubleDataTransition.I b/panda/src/dgraph/doubleDataTransition.I index 9732548e84..7b8350abfb 100644 --- a/panda/src/dgraph/doubleDataTransition.I +++ b/panda/src/dgraph/doubleDataTransition.I @@ -1,12 +1,25 @@ // Filename: doubleDataTransition.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DoubleDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoubleDataTransition:: DoubleDataTransition() { @@ -15,7 +28,7 @@ DoubleDataTransition() { //////////////////////////////////////////////////////////////////// // Function: DoubleDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoubleDataTransition:: DoubleDataTransition(double scale, double offset) : diff --git a/panda/src/dgraph/doubleDataTransition.cxx b/panda/src/dgraph/doubleDataTransition.cxx index 68df901ce7..1259266317 100644 --- a/panda/src/dgraph/doubleDataTransition.cxx +++ b/panda/src/dgraph/doubleDataTransition.cxx @@ -1,6 +1,19 @@ // Filename: doubleDataTransition.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "doubleDataTransition.h" @@ -16,7 +29,7 @@ TypeHandle DoubleDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: DoubleDataTransition::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *DoubleDataTransition:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: DoubleDataTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *DoubleDataTransition:: make_attrib() const { diff --git a/panda/src/dgraph/doubleDataTransition.h b/panda/src/dgraph/doubleDataTransition.h index 5cc05970b9..75a2dd909b 100644 --- a/panda/src/dgraph/doubleDataTransition.h +++ b/panda/src/dgraph/doubleDataTransition.h @@ -1,6 +1,19 @@ // Filename: doubleDataTransition.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DOUBLEDATATRANSITION_H @@ -35,7 +48,7 @@ public: } static void init_type() { NumericDataTransition::init_type(); - register_type(_type_handle, "DoubleDataTransition", + register_type(_type_handle, "DoubleDataTransition", NumericDataTransition::get_class_type()); } diff --git a/panda/src/dgraph/doublePtrDataAttribute.I b/panda/src/dgraph/doublePtrDataAttribute.I index e1b47e9cb3..60c1125756 100644 --- a/panda/src/dgraph/doublePtrDataAttribute.I +++ b/panda/src/dgraph/doublePtrDataAttribute.I @@ -1,12 +1,25 @@ // Filename: doublePtrDataAttribute.I // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoublePtrDataAttribute:: DoublePtrDataAttribute() { @@ -15,7 +28,7 @@ DoublePtrDataAttribute() { //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoublePtrDataAttribute:: DoublePtrDataAttribute(double* ptr) : PointerDataAttribute(ptr) { diff --git a/panda/src/dgraph/doublePtrDataAttribute.cxx b/panda/src/dgraph/doublePtrDataAttribute.cxx index db80bf0300..625a6ca4f0 100644 --- a/panda/src/dgraph/doublePtrDataAttribute.cxx +++ b/panda/src/dgraph/doublePtrDataAttribute.cxx @@ -1,6 +1,19 @@ // Filename: doublePtrDataAttribute.cxx // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "doublePtrDataAttribute.h" @@ -16,7 +29,7 @@ TypeHandle DoublePtrDataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *DoublePtrDataAttribute:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *DoublePtrDataAttribute:: make_initial() const { diff --git a/panda/src/dgraph/doublePtrDataAttribute.h b/panda/src/dgraph/doublePtrDataAttribute.h index 74f174a702..73e850b498 100644 --- a/panda/src/dgraph/doublePtrDataAttribute.h +++ b/panda/src/dgraph/doublePtrDataAttribute.h @@ -1,6 +1,19 @@ // Filename: doublePtrDataAttribute.h // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DOUBLEPTRDATAATTRIBUTE_H @@ -35,7 +48,7 @@ public: } static void init_type() { PointerDataAttribute::init_type(); - register_type(_type_handle, "DoublePtrDataAttribute", + register_type(_type_handle, "DoublePtrDataAttribute", PointerDataAttribute::get_class_type()); } diff --git a/panda/src/dgraph/doublePtrDataTransition.I b/panda/src/dgraph/doublePtrDataTransition.I index 680eed431d..25bae3c09f 100644 --- a/panda/src/dgraph/doublePtrDataTransition.I +++ b/panda/src/dgraph/doublePtrDataTransition.I @@ -1,12 +1,25 @@ // Filename: doublePtrDataTransition.I // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoublePtrDataTransition:: DoublePtrDataTransition() { @@ -15,7 +28,7 @@ DoublePtrDataTransition() { //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DoublePtrDataTransition:: DoublePtrDataTransition(double* ptr) : diff --git a/panda/src/dgraph/doublePtrDataTransition.cxx b/panda/src/dgraph/doublePtrDataTransition.cxx index aa5b229ec0..612241f770 100644 --- a/panda/src/dgraph/doublePtrDataTransition.cxx +++ b/panda/src/dgraph/doublePtrDataTransition.cxx @@ -1,6 +1,19 @@ // Filename: doublePtrDataTransition.cxx // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "doublePtrDataTransition.h" @@ -16,7 +29,7 @@ TypeHandle DoublePtrDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataTransition::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *DoublePtrDataTransition:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: DoublePtrDataTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *DoublePtrDataTransition:: make_attrib() const { diff --git a/panda/src/dgraph/doublePtrDataTransition.h b/panda/src/dgraph/doublePtrDataTransition.h index 905dcb18f2..e7bf6fafc9 100644 --- a/panda/src/dgraph/doublePtrDataTransition.h +++ b/panda/src/dgraph/doublePtrDataTransition.h @@ -1,6 +1,19 @@ // Filename: doublePtrDataTransition.h // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DOUBLEPTRDATATRANSITION_H @@ -35,7 +48,7 @@ public: } static void init_type() { PointerDataTransition::init_type(); - register_type(_type_handle, "DoublePtrDataTransition", + register_type(_type_handle, "DoublePtrDataTransition", PointerDataTransition::get_class_type()); } diff --git a/panda/src/dgraph/intDataAttribute.I b/panda/src/dgraph/intDataAttribute.I index 6bf93d10a1..9aa34d4103 100644 --- a/panda/src/dgraph/intDataAttribute.I +++ b/panda/src/dgraph/intDataAttribute.I @@ -1,12 +1,25 @@ // Filename: intDataAttribute.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: IntDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE IntDataAttribute:: IntDataAttribute() { @@ -15,7 +28,7 @@ IntDataAttribute() { //////////////////////////////////////////////////////////////////// // Function: IntDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE IntDataAttribute:: IntDataAttribute(int value) : NumericDataAttribute(value) { diff --git a/panda/src/dgraph/intDataAttribute.cxx b/panda/src/dgraph/intDataAttribute.cxx index 55565e0a5c..994964dda5 100644 --- a/panda/src/dgraph/intDataAttribute.cxx +++ b/panda/src/dgraph/intDataAttribute.cxx @@ -1,6 +1,19 @@ // Filename: intDataAttribute.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "intDataAttribute.h" @@ -16,7 +29,7 @@ TypeHandle IntDataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: IntDataAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *IntDataAttribute:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: IntDataAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *IntDataAttribute:: make_initial() const { diff --git a/panda/src/dgraph/intDataAttribute.h b/panda/src/dgraph/intDataAttribute.h index 7c372e2fb9..7bfb27c0f7 100644 --- a/panda/src/dgraph/intDataAttribute.h +++ b/panda/src/dgraph/intDataAttribute.h @@ -1,6 +1,19 @@ // Filename: intDataAttribute.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTDATAATTRIBUTE_H @@ -35,7 +48,7 @@ public: } static void init_type() { NumericDataAttribute::init_type(); - register_type(_type_handle, "IntDataAttribute", + register_type(_type_handle, "IntDataAttribute", NumericDataAttribute::get_class_type()); } diff --git a/panda/src/dgraph/intDataTransition.I b/panda/src/dgraph/intDataTransition.I index 5e31fc0600..ad16d8b0ac 100644 --- a/panda/src/dgraph/intDataTransition.I +++ b/panda/src/dgraph/intDataTransition.I @@ -1,12 +1,25 @@ // Filename: intDataTransition.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: IntDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE IntDataTransition:: IntDataTransition() { @@ -15,7 +28,7 @@ IntDataTransition() { //////////////////////////////////////////////////////////////////// // Function: IntDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE IntDataTransition:: IntDataTransition(int scale, int offset) : diff --git a/panda/src/dgraph/intDataTransition.cxx b/panda/src/dgraph/intDataTransition.cxx index 99df3a545a..698ad9ca33 100644 --- a/panda/src/dgraph/intDataTransition.cxx +++ b/panda/src/dgraph/intDataTransition.cxx @@ -1,6 +1,19 @@ // Filename: intDataTransition.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "intDataTransition.h" @@ -16,7 +29,7 @@ TypeHandle IntDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: IntDataTransition::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *IntDataTransition:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: IntDataTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *IntDataTransition:: make_attrib() const { diff --git a/panda/src/dgraph/intDataTransition.h b/panda/src/dgraph/intDataTransition.h index 9e13cc69eb..d29d64e45c 100644 --- a/panda/src/dgraph/intDataTransition.h +++ b/panda/src/dgraph/intDataTransition.h @@ -1,6 +1,19 @@ // Filename: intDataTransition.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INTDATATRANSITION_H @@ -35,7 +48,7 @@ public: } static void init_type() { NumericDataTransition::init_type(); - register_type(_type_handle, "IntDataTransition", + register_type(_type_handle, "IntDataTransition", NumericDataTransition::get_class_type()); } diff --git a/panda/src/dgraph/matrixDataAttribute.I b/panda/src/dgraph/matrixDataAttribute.I index 9566807e3c..094ad86bba 100644 --- a/panda/src/dgraph/matrixDataAttribute.I +++ b/panda/src/dgraph/matrixDataAttribute.I @@ -1,12 +1,25 @@ // Filename: matrixDataAttribute.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: MatrixDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MatrixDataAttribute:: MatrixDataAttribute() { @@ -15,7 +28,7 @@ MatrixDataAttribute() { //////////////////////////////////////////////////////////////////// // Function: MatrixDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MatrixDataAttribute:: MatrixDataAttribute(const LMatrix4f &value) : diff --git a/panda/src/dgraph/matrixDataAttribute.cxx b/panda/src/dgraph/matrixDataAttribute.cxx index d205423cb8..db229a036b 100644 --- a/panda/src/dgraph/matrixDataAttribute.cxx +++ b/panda/src/dgraph/matrixDataAttribute.cxx @@ -1,6 +1,19 @@ // Filename: matrixDataAttribute.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "matrixDataAttribute.h" @@ -16,7 +29,7 @@ TypeHandle MatrixDataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MatrixDataAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *MatrixDataAttribute:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: MatrixDataAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *MatrixDataAttribute:: make_initial() const { diff --git a/panda/src/dgraph/matrixDataAttribute.h b/panda/src/dgraph/matrixDataAttribute.h index 6c7bdc2319..2dc07dd6bb 100644 --- a/panda/src/dgraph/matrixDataAttribute.h +++ b/panda/src/dgraph/matrixDataAttribute.h @@ -1,6 +1,19 @@ // Filename: matrixDataAttribute.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MATRIXDATAATTRIBUTE_H @@ -40,7 +53,7 @@ public: } static void init_type() { VectorDataAttribute::init_type(); - register_type(_type_handle, "MatrixDataAttribute", + register_type(_type_handle, "MatrixDataAttribute", VectorDataAttribute::get_class_type()); } diff --git a/panda/src/dgraph/matrixDataTransition.I b/panda/src/dgraph/matrixDataTransition.I index e05a7cac01..1feb118f3d 100644 --- a/panda/src/dgraph/matrixDataTransition.I +++ b/panda/src/dgraph/matrixDataTransition.I @@ -1,12 +1,25 @@ // Filename: matrixDataTransition.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: MatrixDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MatrixDataTransition:: MatrixDataTransition() { @@ -15,7 +28,7 @@ MatrixDataTransition() { //////////////////////////////////////////////////////////////////// // Function: MatrixDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MatrixDataTransition:: MatrixDataTransition(const LMatrix4f &matrix) : diff --git a/panda/src/dgraph/matrixDataTransition.cxx b/panda/src/dgraph/matrixDataTransition.cxx index d48b51ad0a..ba265960bc 100644 --- a/panda/src/dgraph/matrixDataTransition.cxx +++ b/panda/src/dgraph/matrixDataTransition.cxx @@ -1,6 +1,19 @@ // Filename: matrixDataTransition.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "matrixDataTransition.h" @@ -16,7 +29,7 @@ TypeHandle MatrixDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MatrixDataTransition::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *MatrixDataTransition:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: MatrixDataTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *MatrixDataTransition:: make_attrib() const { diff --git a/panda/src/dgraph/matrixDataTransition.h b/panda/src/dgraph/matrixDataTransition.h index 6063d90627..431359fd99 100644 --- a/panda/src/dgraph/matrixDataTransition.h +++ b/panda/src/dgraph/matrixDataTransition.h @@ -1,6 +1,19 @@ // Filename: matrixDataTransition.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MATRIXDATATRANSITION_H @@ -40,7 +53,7 @@ public: } static void init_type() { VectorDataTransition::init_type(); - register_type(_type_handle, "MatrixDataTransition", + register_type(_type_handle, "MatrixDataTransition", VectorDataTransition::get_class_type()); } diff --git a/panda/src/dgraph/numericDataAttribute.I b/panda/src/dgraph/numericDataAttribute.I index 5d7f712fbd..e194e72056 100644 --- a/panda/src/dgraph/numericDataAttribute.I +++ b/panda/src/dgraph/numericDataAttribute.I @@ -1,6 +1,19 @@ // Filename: numericDataAttribute.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -13,7 +26,7 @@ TypeHandle NumericDataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE NumericDataAttribute:: @@ -24,7 +37,7 @@ NumericDataAttribute() { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE NumericDataAttribute:: @@ -36,7 +49,7 @@ NumericDataAttribute(NumType value) : //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE NumericDataAttribute:: @@ -49,7 +62,7 @@ NumericDataAttribute(const NumericDataAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void NumericDataAttribute:: @@ -61,7 +74,7 @@ operator = (const NumericDataAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::set_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void NumericDataAttribute:: @@ -72,7 +85,7 @@ set_value(NumType value) { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::get_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE NumType NumericDataAttribute:: @@ -84,7 +97,7 @@ get_value() const { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::get_handle // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template TypeHandle NumericDataAttribute:: @@ -95,7 +108,7 @@ get_handle() const { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void NumericDataAttribute:: @@ -106,7 +119,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void NumericDataAttribute:: @@ -117,7 +130,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int NumericDataAttribute:: diff --git a/panda/src/dgraph/numericDataAttribute.h b/panda/src/dgraph/numericDataAttribute.h index 81e9e9ce53..3aa2d14251 100644 --- a/panda/src/dgraph/numericDataAttribute.h +++ b/panda/src/dgraph/numericDataAttribute.h @@ -1,6 +1,19 @@ // Filename: numericDataAttribute.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NUMERICDATAATTRIBUTE_H @@ -16,7 +29,7 @@ class NumericDataTransition; //////////////////////////////////////////////////////////////////// // Class : NumericDataAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// template class NumericDataAttribute : public NodeAttribute { @@ -51,8 +64,8 @@ public: } static void init_type() { NodeAttribute::init_type(); - register_type(_type_handle, - string("NumericDataAttribute<") + + register_type(_type_handle, + string("NumericDataAttribute<") + get_type_handle(NumType).get_name() + ">", NodeAttribute::get_class_type()); } diff --git a/panda/src/dgraph/numericDataTransition.I b/panda/src/dgraph/numericDataTransition.I index bc643fb40b..785abcc961 100644 --- a/panda/src/dgraph/numericDataTransition.I +++ b/panda/src/dgraph/numericDataTransition.I @@ -1,6 +1,19 @@ // Filename: numericDataTransition.I // Created by: drose (25Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -12,7 +25,7 @@ TypeHandle NumericDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE NumericDataTransition:: @@ -25,7 +38,7 @@ NumericDataTransition() : //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE NumericDataTransition:: @@ -38,7 +51,7 @@ NumericDataTransition(NumType scale, NumType offset) : //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE NumericDataTransition:: @@ -52,7 +65,7 @@ NumericDataTransition(const NumericDataTransition ©) : //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void NumericDataTransition:: @@ -77,7 +90,7 @@ is_identity() const { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::set_scale // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void NumericDataTransition:: @@ -89,7 +102,7 @@ set_scale(NumType scale) { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::get_scale // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NumType NumericDataTransition:: @@ -100,7 +113,7 @@ get_scale() const { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::set_offset // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void NumericDataTransition:: @@ -112,7 +125,7 @@ set_offset(NumType offset) { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::get_offset // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NumType NumericDataTransition:: @@ -158,7 +171,7 @@ compose(const NodeTransition *other) const { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::invert // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NodeTransition *NumericDataTransition:: @@ -174,7 +187,7 @@ invert() const { NodeTransition *c = make_copy(); NumericDataTransition *result; DCAST_INTO_R(result, c, NULL); - + result->_offset = - _offset / _scale; result->_scale = (NumType)1 / _scale; return result; @@ -211,7 +224,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void NumericDataTransition:: @@ -222,7 +235,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void NumericDataTransition:: @@ -233,7 +246,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: NumericDataTransition::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int NumericDataTransition:: diff --git a/panda/src/dgraph/numericDataTransition.h b/panda/src/dgraph/numericDataTransition.h index 66a2d9d850..91f24f847f 100644 --- a/panda/src/dgraph/numericDataTransition.h +++ b/panda/src/dgraph/numericDataTransition.h @@ -2,6 +2,19 @@ // Created by: drose (25Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NUMERICDATATRANSITION_H #define NUMERICDATATRANSITION_H @@ -61,8 +74,8 @@ public: } static void init_type() { NodeTransition::init_type(); - register_type(_type_handle, - string("NumericDataTransition<") + + register_type(_type_handle, + string("NumericDataTransition<") + get_type_handle(NumType).get_name() + ">", NodeTransition::get_class_type()); } diff --git a/panda/src/dgraph/pointerDataAttribute.I b/panda/src/dgraph/pointerDataAttribute.I index 1b5922d706..da1dea4187 100644 --- a/panda/src/dgraph/pointerDataAttribute.I +++ b/panda/src/dgraph/pointerDataAttribute.I @@ -1,6 +1,19 @@ // Filename: pointerDataAttribute.I // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -15,7 +28,7 @@ PtrType* PointerDataAttribute::_null_ptr = (PtrType*)NULL; //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerDataAttribute:: @@ -27,7 +40,7 @@ PointerDataAttribute() : //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerDataAttribute:: @@ -39,7 +52,7 @@ PointerDataAttribute(PtrType* ptr) : //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerDataAttribute:: @@ -51,7 +64,7 @@ PointerDataAttribute(const PointerDataAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerDataAttribute:: @@ -63,7 +76,7 @@ operator = (const PointerDataAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::set_value // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void PointerDataAttribute:: @@ -74,7 +87,7 @@ set_value(PtrType* ptr) { //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::get_value // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template PtrType* PointerDataAttribute:: @@ -86,7 +99,7 @@ get_value() const { //////////////////////////////////////////////////////////////////// // Function: NumericDataAttribute::get_handle // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template TypeHandle PointerDataAttribute:: @@ -97,7 +110,7 @@ get_handle() const { //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void PointerDataAttribute:: @@ -108,7 +121,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void PointerDataAttribute:: @@ -119,7 +132,7 @@ write(ostream &out, int indent_level) const { /////////////////////////////////////////////////////////////////// // Function: PointerDataAttribute::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int PointerDataAttribute:: diff --git a/panda/src/dgraph/pointerDataAttribute.h b/panda/src/dgraph/pointerDataAttribute.h index cce9f93a59..410ee41cc6 100644 --- a/panda/src/dgraph/pointerDataAttribute.h +++ b/panda/src/dgraph/pointerDataAttribute.h @@ -1,6 +1,19 @@ // Filename: pointerDataAttribute.h // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTERDATAATTRIBUTE_H @@ -16,7 +29,7 @@ class PointerDataTransition; //////////////////////////////////////////////////////////////////// // Class : PointerDataTransition -// Description : +// Description : //////////////////////////////////////////////////////////////////// template class PointerDataAttribute : public NodeAttribute { @@ -51,8 +64,8 @@ public: } static void init_type() { NodeAttribute::init_type(); - register_type(_type_handle, - string("PointerDataAttribute<") + + register_type(_type_handle, + string("PointerDataAttribute<") + get_type_handle(PtrType).get_name() + ">", NodeAttribute::get_class_type()); } diff --git a/panda/src/dgraph/pointerDataTransition.I b/panda/src/dgraph/pointerDataTransition.I index b62133232b..8c848b0069 100644 --- a/panda/src/dgraph/pointerDataTransition.I +++ b/panda/src/dgraph/pointerDataTransition.I @@ -1,6 +1,19 @@ // Filename: pointerDataTransition.I // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -12,7 +25,7 @@ TypeHandle PointerDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerDataTransition:: @@ -24,7 +37,7 @@ PointerDataTransition() : //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerDataTransition:: @@ -36,7 +49,7 @@ PointerDataTransition(PtrType* ptr) : //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerDataTransition:: @@ -48,7 +61,7 @@ PointerDataTransition(const PointerDataTransition ©) : //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerDataTransition:: @@ -60,7 +73,7 @@ operator = (const PointerDataTransition ©) { //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::set_value // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void PointerDataTransition:: @@ -72,7 +85,7 @@ set_value(PtrType* ptr) { //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::get_value // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template PtrType* PointerDataTransition:: @@ -104,7 +117,7 @@ compose(const NodeTransition *other) const { //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::invert // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NodeTransition *PointerDataTransition:: @@ -133,7 +146,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void PointerDataTransition:: @@ -144,7 +157,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void PointerDataTransition:: @@ -155,7 +168,7 @@ write(ostream &out, int indent_level) const { /////////////////////////////////////////////////////////////////// // Function: PointerDataTransition::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int PointerDataTransition:: diff --git a/panda/src/dgraph/pointerDataTransition.h b/panda/src/dgraph/pointerDataTransition.h index 044bc1037e..d5ff2ad355 100644 --- a/panda/src/dgraph/pointerDataTransition.h +++ b/panda/src/dgraph/pointerDataTransition.h @@ -1,6 +1,19 @@ // Filename: pointerDataTransition.h // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTERDATATRANSITION_H @@ -52,8 +65,8 @@ public: } static void init_type() { NodeTransition::init_type(); - register_type(_type_handle, - string("PointerDataTransition<") + + register_type(_type_handle, + string("PointerDataTransition<") + get_type_handle(PtrType).get_name() + ">", NodeTransition::get_class_type()); } diff --git a/panda/src/dgraph/test_dgraph.cxx b/panda/src/dgraph/test_dgraph.cxx index 88d917a657..68624750a4 100644 --- a/panda/src/dgraph/test_dgraph.cxx +++ b/panda/src/dgraph/test_dgraph.cxx @@ -1,6 +1,19 @@ // Filename: test_dgraph.cxx // Created by: drose (25Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -149,7 +162,7 @@ transmit_data(NodeAttributes &data) { if (get_attribute_into(s, data, _s_type) && get_attribute_into(t, data, _t_type) && get_attribute_into(xyz, data, _xyz_type)) { - nout << get_name() << " got xyz " << *xyz << " s " << *s + nout << get_name() << " got xyz " << *xyz << " s " << *s << " t " << *t << "\n"; } else { nout << get_name() << " didn't get all data.\n"; @@ -161,7 +174,7 @@ transmit_data(NodeAttributes &data) { //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -int +int main() { Producer::init_type(); Consumer::init_type(); diff --git a/panda/src/dgraph/vec3DataAttribute.I b/panda/src/dgraph/vec3DataAttribute.I index 9ac30f5bdb..4eb73f4891 100644 --- a/panda/src/dgraph/vec3DataAttribute.I +++ b/panda/src/dgraph/vec3DataAttribute.I @@ -1,12 +1,25 @@ // Filename: vec3DataAttribute.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Vec3DataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec3DataAttribute:: Vec3DataAttribute() { @@ -15,10 +28,10 @@ Vec3DataAttribute() { //////////////////////////////////////////////////////////////////// // Function: Vec3DataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec3DataAttribute:: -Vec3DataAttribute(const LVecBase3f &value) : +Vec3DataAttribute(const LVecBase3f &value) : VectorDataAttribute(value) { } diff --git a/panda/src/dgraph/vec3DataAttribute.cxx b/panda/src/dgraph/vec3DataAttribute.cxx index 3695fc415f..3e06e739aa 100644 --- a/panda/src/dgraph/vec3DataAttribute.cxx +++ b/panda/src/dgraph/vec3DataAttribute.cxx @@ -1,6 +1,19 @@ // Filename: vec3DataAttribute.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vec3DataAttribute.h" @@ -16,7 +29,7 @@ TypeHandle Vec3DataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Vec3DataAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *Vec3DataAttribute:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: Vec3DataAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *Vec3DataAttribute:: make_initial() const { diff --git a/panda/src/dgraph/vec3DataAttribute.h b/panda/src/dgraph/vec3DataAttribute.h index 559da91f3c..fa40f35cb9 100644 --- a/panda/src/dgraph/vec3DataAttribute.h +++ b/panda/src/dgraph/vec3DataAttribute.h @@ -1,6 +1,19 @@ // Filename: vec3DataAttribute.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VEC3DATAATTRIBUTE_H @@ -40,7 +53,7 @@ public: } static void init_type() { VectorDataAttribute::init_type(); - register_type(_type_handle, "Vec3DataAttribute", + register_type(_type_handle, "Vec3DataAttribute", VectorDataAttribute::get_class_type()); } diff --git a/panda/src/dgraph/vec3DataTransition.I b/panda/src/dgraph/vec3DataTransition.I index 680bf2ce91..3833fe1fc5 100644 --- a/panda/src/dgraph/vec3DataTransition.I +++ b/panda/src/dgraph/vec3DataTransition.I @@ -1,12 +1,25 @@ // Filename: vec3DataTransition.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Vec3DataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec3DataTransition:: Vec3DataTransition() { @@ -15,7 +28,7 @@ Vec3DataTransition() { //////////////////////////////////////////////////////////////////// // Function: Vec3DataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec3DataTransition:: Vec3DataTransition(const LMatrix4f &matrix) : diff --git a/panda/src/dgraph/vec3DataTransition.cxx b/panda/src/dgraph/vec3DataTransition.cxx index a2a3b5886d..feed003e4c 100644 --- a/panda/src/dgraph/vec3DataTransition.cxx +++ b/panda/src/dgraph/vec3DataTransition.cxx @@ -1,6 +1,19 @@ // Filename: vec3DataTransition.cxx // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vec3DataTransition.h" @@ -16,7 +29,7 @@ TypeHandle Vec3DataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Vec3DataTransition::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *Vec3DataTransition:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: Vec3DataTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *Vec3DataTransition:: make_attrib() const { diff --git a/panda/src/dgraph/vec3DataTransition.h b/panda/src/dgraph/vec3DataTransition.h index c7e196e50b..11d567ed83 100644 --- a/panda/src/dgraph/vec3DataTransition.h +++ b/panda/src/dgraph/vec3DataTransition.h @@ -1,6 +1,19 @@ // Filename: vec3DataTransition.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VEC3DATATRANSITION_H @@ -40,7 +53,7 @@ public: } static void init_type() { VectorDataTransition::init_type(); - register_type(_type_handle, "Vec3DataTransition", + register_type(_type_handle, "Vec3DataTransition", VectorDataTransition::get_class_type()); } diff --git a/panda/src/dgraph/vec4DataAttribute.I b/panda/src/dgraph/vec4DataAttribute.I index 8504d5a5bd..282347f135 100644 --- a/panda/src/dgraph/vec4DataAttribute.I +++ b/panda/src/dgraph/vec4DataAttribute.I @@ -1,12 +1,25 @@ // Filename: vec4DataAttribute.I // Created by: jason (03Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Vec4DataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec4DataAttribute:: Vec4DataAttribute() { @@ -15,10 +28,10 @@ Vec4DataAttribute() { //////////////////////////////////////////////////////////////////// // Function: Vec4DataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec4DataAttribute:: -Vec4DataAttribute(const LVecBase4f &value) : +Vec4DataAttribute(const LVecBase4f &value) : VectorDataAttribute(value) { } diff --git a/panda/src/dgraph/vec4DataAttribute.cxx b/panda/src/dgraph/vec4DataAttribute.cxx index f634063f93..d69f55f64b 100644 --- a/panda/src/dgraph/vec4DataAttribute.cxx +++ b/panda/src/dgraph/vec4DataAttribute.cxx @@ -1,6 +1,19 @@ // Filename: vec4DataAttribute.cxx // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vec4DataAttribute.h" @@ -16,7 +29,7 @@ TypeHandle Vec4DataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Vec4DataAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *Vec4DataAttribute:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: Vec4DataAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *Vec4DataAttribute:: make_initial() const { diff --git a/panda/src/dgraph/vec4DataAttribute.h b/panda/src/dgraph/vec4DataAttribute.h index 0d61bd9f6c..20f3a83f6b 100644 --- a/panda/src/dgraph/vec4DataAttribute.h +++ b/panda/src/dgraph/vec4DataAttribute.h @@ -1,6 +1,19 @@ // Filename: vec4DataAttribute.h // Created by: jason (03Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VEC4DATAATTRIBUTE_H @@ -40,7 +53,7 @@ public: } static void init_type() { VectorDataAttribute::init_type(); - register_type(_type_handle, "Vec4DataAttribute", + register_type(_type_handle, "Vec4DataAttribute", VectorDataAttribute::get_class_type()); } diff --git a/panda/src/dgraph/vec4DataTransition.I b/panda/src/dgraph/vec4DataTransition.I index 13bdf7bc74..5171df1b18 100644 --- a/panda/src/dgraph/vec4DataTransition.I +++ b/panda/src/dgraph/vec4DataTransition.I @@ -1,12 +1,25 @@ // Filename: vec4DataTransition.I // Created by: jason (03Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Vec4DataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec4DataTransition:: Vec4DataTransition() { @@ -15,7 +28,7 @@ Vec4DataTransition() { //////////////////////////////////////////////////////////////////// // Function: Vec4DataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Vec4DataTransition:: Vec4DataTransition(const LMatrix4f &matrix) : diff --git a/panda/src/dgraph/vec4DataTransition.cxx b/panda/src/dgraph/vec4DataTransition.cxx index d04e763c31..ed19176f77 100644 --- a/panda/src/dgraph/vec4DataTransition.cxx +++ b/panda/src/dgraph/vec4DataTransition.cxx @@ -1,6 +1,19 @@ // Filename: vec4DataTransition.cxx // Created by: jason (03Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vec4DataTransition.h" @@ -16,7 +29,7 @@ TypeHandle Vec4DataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Vec4DataTransition::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransition *Vec4DataTransition:: make_copy() const { @@ -26,7 +39,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: Vec4DataTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *Vec4DataTransition:: make_attrib() const { diff --git a/panda/src/dgraph/vec4DataTransition.h b/panda/src/dgraph/vec4DataTransition.h index 17d7a822e5..4c07fb2f14 100644 --- a/panda/src/dgraph/vec4DataTransition.h +++ b/panda/src/dgraph/vec4DataTransition.h @@ -1,6 +1,19 @@ // Filename: vec4DataTransition.h // Created by: jason (03Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VEC4DATATRANSITION_H @@ -40,7 +53,7 @@ public: } static void init_type() { VectorDataTransition::init_type(); - register_type(_type_handle, "Vec4DataTransition", + register_type(_type_handle, "Vec4DataTransition", VectorDataTransition::get_class_type()); } diff --git a/panda/src/dgraph/vectorDataAttribute.I b/panda/src/dgraph/vectorDataAttribute.I index 653952f30f..d45d64c200 100644 --- a/panda/src/dgraph/vectorDataAttribute.I +++ b/panda/src/dgraph/vectorDataAttribute.I @@ -1,6 +1,19 @@ // Filename: vectorDataAttribute.I // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -12,7 +25,7 @@ TypeHandle VectorDataAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE VectorDataAttribute:: @@ -23,19 +36,19 @@ VectorDataAttribute() { //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE VectorDataAttribute:: VectorDataAttribute(const VecType &value) : - _value(value) + _value(value) { } //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE VectorDataAttribute:: @@ -48,7 +61,7 @@ VectorDataAttribute(const VectorDataAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void VectorDataAttribute:: @@ -60,7 +73,7 @@ operator = (const VectorDataAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::set_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void VectorDataAttribute:: @@ -71,7 +84,7 @@ set_value(const VecType &value) { //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::get_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE const VecType &VectorDataAttribute:: @@ -83,7 +96,7 @@ get_value() const { //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::get_handle // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template TypeHandle VectorDataAttribute:: @@ -94,7 +107,7 @@ get_handle() const { //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void VectorDataAttribute:: @@ -105,7 +118,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void VectorDataAttribute:: @@ -116,7 +129,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: VectorDataAttribute::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int VectorDataAttribute:: diff --git a/panda/src/dgraph/vectorDataAttribute.h b/panda/src/dgraph/vectorDataAttribute.h index 6071ed143e..7edbd11e49 100644 --- a/panda/src/dgraph/vectorDataAttribute.h +++ b/panda/src/dgraph/vectorDataAttribute.h @@ -1,6 +1,19 @@ // Filename: vectorDataAttribute.h // Created by: drose (27Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTORDATAATTRIBUTE_H @@ -16,7 +29,7 @@ class VectorDataTransition; //////////////////////////////////////////////////////////////////// // Class : VectorDataAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// template class VectorDataAttribute : public NodeAttribute { @@ -51,8 +64,8 @@ public: } static void init_type() { NodeAttribute::init_type(); - register_type(_type_handle, - string("VectorDataAttribute<") + + register_type(_type_handle, + string("VectorDataAttribute<") + get_type_handle(VecType).get_name() + "," + get_type_handle(MatType).get_name() + ">", NodeAttribute::get_class_type()); diff --git a/panda/src/dgraph/vectorDataTransition.I b/panda/src/dgraph/vectorDataTransition.I index 1fcad80831..743bf49ba8 100644 --- a/panda/src/dgraph/vectorDataTransition.I +++ b/panda/src/dgraph/vectorDataTransition.I @@ -1,6 +1,19 @@ // Filename: vectorDataTransition.I // Created by: drose (25Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -12,7 +25,7 @@ TypeHandle VectorDataTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE VectorDataTransition:: @@ -23,11 +36,11 @@ VectorDataTransition() { //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE VectorDataTransition:: -VectorDataTransition(const MatType &matrix) : +VectorDataTransition(const MatType &matrix) : _matrix(matrix) { } @@ -35,7 +48,7 @@ VectorDataTransition(const MatType &matrix) : //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE VectorDataTransition:: @@ -48,7 +61,7 @@ VectorDataTransition(const VectorDataTransition ©) : //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void VectorDataTransition:: @@ -72,7 +85,7 @@ is_identity() const { //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::set_matrix // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void VectorDataTransition:: @@ -84,7 +97,7 @@ set_matrix(const MatType &matrix) { //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::get_matrix // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template const MatType &VectorDataTransition:: @@ -129,7 +142,7 @@ compose(const NodeTransition *other) const { //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::invert // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NodeTransition *VectorDataTransition:: @@ -141,7 +154,7 @@ invert() const { PT(NodeTransition) c = make_copy(); VectorDataTransition *result; DCAST_INTO_R(result, c, NULL); - + bool invertible = result->_matrix.invert_from(_matrix); if (!invertible) { return NULL; @@ -180,7 +193,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void VectorDataTransition:: @@ -191,7 +204,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void VectorDataTransition:: @@ -202,7 +215,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: VectorDataTransition::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int VectorDataTransition:: diff --git a/panda/src/dgraph/vectorDataTransition.h b/panda/src/dgraph/vectorDataTransition.h index 104c35d75b..120cee8d3c 100644 --- a/panda/src/dgraph/vectorDataTransition.h +++ b/panda/src/dgraph/vectorDataTransition.h @@ -2,6 +2,19 @@ // Created by: drose (25Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef VECTORDATATRANSITION_H #define VECTORDATATRANSITION_H @@ -51,7 +64,7 @@ protected: private: MatType _matrix; - + public: virtual TypeHandle get_type() const { return get_class_type(); @@ -64,8 +77,8 @@ public: NodeTransition::init_type(); do_init_type(VecType); do_init_type(MatType); - register_type(_type_handle, - string("VectorDataTransition<") + + register_type(_type_handle, + string("VectorDataTransition<") + get_type_handle(VecType).get_name() + "," + get_type_handle(MatType).get_name() + ">", NodeTransition::get_class_type()); diff --git a/panda/src/display/config_display.cxx b/panda/src/display/config_display.cxx index 98aea7b573..33c77a4245 100644 --- a/panda/src/display/config_display.cxx +++ b/panda/src/display/config_display.cxx @@ -1,6 +1,19 @@ // Filename: config_display.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_display.h" diff --git a/panda/src/display/config_display.h b/panda/src/display/config_display.h index 3d9056f103..e61930e472 100644 --- a/panda/src/display/config_display.h +++ b/panda/src/display/config_display.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_DISPLAY_H #define CONFIG_DISPLAY_H diff --git a/panda/src/display/displayRegion.I b/panda/src/display/displayRegion.I index 75422f8af2..850e78487f 100644 --- a/panda/src/display/displayRegion.I +++ b/panda/src/display/displayRegion.I @@ -1,6 +1,19 @@ // Filename: displayRegion.I // Created by: frang (07Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/displayRegion.cxx b/panda/src/display/displayRegion.cxx index 7e82c25523..f66fe5520b 100644 --- a/panda/src/display/displayRegion.cxx +++ b/panda/src/display/displayRegion.cxx @@ -1,6 +1,19 @@ // Filename: displayRegion.cxx // Created by: cary (10Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "displayRegion.h" @@ -13,11 +26,11 @@ //////////////////////////////////////////////////////////////////// // Function: DisplayRegion::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DisplayRegion:: DisplayRegion(GraphicsLayer *layer) : - _l(0.), _r(1.), _b(0.), _t(1.), + _l(0.), _r(1.), _b(0.), _t(1.), _layer(layer), _active(true) { @@ -26,7 +39,7 @@ DisplayRegion(GraphicsLayer *layer) : //////////////////////////////////////////////////////////////////// // Function: DisplayRegion::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DisplayRegion:: DisplayRegion(GraphicsLayer *layer, const float l, @@ -45,7 +58,7 @@ DisplayRegion(GraphicsLayer *layer, const float l, // typically for rendering a temporary pass. //////////////////////////////////////////////////////////////////// DisplayRegion:: -DisplayRegion(int xsize, int ysize) : +DisplayRegion(int xsize, int ysize) : _l(0.), _r(1.), _b(0.), _t(1.), _pl(0), _pr(xsize), _pb(0), _pt(ysize), _layer((GraphicsLayer *)0L), @@ -56,7 +69,7 @@ DisplayRegion(int xsize, int ysize) : //////////////////////////////////////////////////////////////////// // Function: DisplayRegion::Copy Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// DisplayRegion:: DisplayRegion(const DisplayRegion&) { @@ -67,7 +80,7 @@ DisplayRegion(const DisplayRegion&) { //////////////////////////////////////////////////////////////////// // Function: DisplayRegion::Copy Assignment Operator // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// DisplayRegion &DisplayRegion:: operator=(const DisplayRegion&) { @@ -79,7 +92,7 @@ operator=(const DisplayRegion&) { //////////////////////////////////////////////////////////////////// // Function: DisplayRegion::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DisplayRegion:: ~DisplayRegion() { @@ -170,11 +183,11 @@ set_camera(const PT(Camera) &camera) { //////////////////////////////////////////////////////////////////// // Function: DisplayRegion::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DisplayRegion:: output(ostream &out) const { - out << "DisplayRegion(" << _l << " " << _r << " " << _b << " " << _t - << ")=pixels(" << _pl << " " << _pr << " " << _pb << " " << _pt + out << "DisplayRegion(" << _l << " " << _r << " " << _b << " " << _t + << ")=pixels(" << _pl << " " << _pr << " " << _pb << " " << _pt << ")"; } diff --git a/panda/src/display/displayRegion.h b/panda/src/display/displayRegion.h index 82cffb42be..6275fd02c4 100644 --- a/panda/src/display/displayRegion.h +++ b/panda/src/display/displayRegion.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DISPLAYREGION_H #define DISPLAYREGION_H // diff --git a/panda/src/display/displayRegionStack.I b/panda/src/display/displayRegionStack.I index ae3bfd9d0b..0a5aee9497 100644 --- a/panda/src/display/displayRegionStack.I +++ b/panda/src/display/displayRegionStack.I @@ -1,6 +1,19 @@ // Filename: displayRegionStack.I // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: DisplayRegionStack::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DisplayRegionStack:: DisplayRegionStack() { @@ -18,7 +31,7 @@ DisplayRegionStack() { //////////////////////////////////////////////////////////////////// // Function: DisplayRegionStack::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DisplayRegionStack:: ~DisplayRegionStack() { @@ -27,19 +40,19 @@ INLINE DisplayRegionStack:: //////////////////////////////////////////////////////////////////// // Function: DisplayRegionStack::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DisplayRegionStack:: DisplayRegionStack(const DisplayRegionStack ©) : _display_region(copy._display_region), - _stack_level(copy._stack_level) + _stack_level(copy._stack_level) { } //////////////////////////////////////////////////////////////////// // Function: DisplayRegionStack::Copy Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DisplayRegionStack:: operator =(const DisplayRegionStack ©) { diff --git a/panda/src/display/displayRegionStack.h b/panda/src/display/displayRegionStack.h index 1240e07940..eb8283dcc4 100644 --- a/panda/src/display/displayRegionStack.h +++ b/panda/src/display/displayRegionStack.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DISPLAYREGIONSTACK_H #define DISPLAYREGIONSTACK_H @@ -26,7 +39,7 @@ public: INLINE ~DisplayRegionStack(); INLINE DisplayRegionStack(const DisplayRegionStack ©); INLINE void operator =(const DisplayRegionStack ©); - + private: CPT(DisplayRegion) _display_region; int _stack_level; diff --git a/panda/src/display/frameBufferStack.I b/panda/src/display/frameBufferStack.I index d69d6e23ae..8106f7e290 100644 --- a/panda/src/display/frameBufferStack.I +++ b/panda/src/display/frameBufferStack.I @@ -1,12 +1,25 @@ // Filename: frameBufferStack.I // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: FrameBufferStack::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FrameBufferStack:: FrameBufferStack() { @@ -16,7 +29,7 @@ FrameBufferStack() { //////////////////////////////////////////////////////////////////// // Function: FrameBufferStack::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FrameBufferStack:: ~FrameBufferStack() { @@ -25,19 +38,19 @@ INLINE FrameBufferStack:: //////////////////////////////////////////////////////////////////// // Function: FrameBufferStack::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FrameBufferStack:: FrameBufferStack(const FrameBufferStack ©) : _frame_buffer(copy._frame_buffer), - _stack_level(copy._stack_level) + _stack_level(copy._stack_level) { } //////////////////////////////////////////////////////////////////// // Function: FrameBufferStack::Copy Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void FrameBufferStack:: operator =(const FrameBufferStack ©) { diff --git a/panda/src/display/frameBufferStack.h b/panda/src/display/frameBufferStack.h index 7a5d79f1e1..786bdcdcf6 100644 --- a/panda/src/display/frameBufferStack.h +++ b/panda/src/display/frameBufferStack.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FRAMEBUFFERSTACK_H #define FRAMEBUFFERSTACK_H @@ -26,7 +39,7 @@ public: INLINE ~FrameBufferStack(); INLINE FrameBufferStack(const FrameBufferStack ©); INLINE void operator =(const FrameBufferStack ©); - + private: PT(SavedFrameBuffer) _frame_buffer; int _stack_level; diff --git a/panda/src/display/graphicsChannel.I b/panda/src/display/graphicsChannel.I index 46af9fec38..3f5952b0d4 100644 --- a/panda/src/display/graphicsChannel.I +++ b/panda/src/display/graphicsChannel.I @@ -1,6 +1,19 @@ // Filename: graphicsChannel.I // Created by: frang (07Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsChannel.cxx b/panda/src/display/graphicsChannel.cxx index cf372cc200..7d03fa1928 100644 --- a/panda/src/display/graphicsChannel.cxx +++ b/panda/src/display/graphicsChannel.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsChannel.h" #include "graphicsWindow.h" @@ -20,7 +29,7 @@ TypeHandle GraphicsChannel::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GraphicsChannel::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsChannel:: GraphicsChannel() { @@ -31,11 +40,11 @@ GraphicsChannel() { //////////////////////////////////////////////////////////////////// // Function: GraphicsChannel::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsChannel:: GraphicsChannel(GraphicsWindow *window) - : _window(window) + : _window(window) { _is_active = true; } @@ -43,7 +52,7 @@ GraphicsChannel(GraphicsWindow *window) //////////////////////////////////////////////////////////////////// // Function: GraphicsChannel::Copy Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GraphicsChannel:: GraphicsChannel(const GraphicsChannel&) { @@ -54,7 +63,7 @@ GraphicsChannel(const GraphicsChannel&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsChannel::Copy Assignment Operator // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GraphicsChannel &GraphicsChannel:: operator=(const GraphicsChannel&) { @@ -66,7 +75,7 @@ operator=(const GraphicsChannel&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsChannel::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsChannel:: ~GraphicsChannel() { @@ -75,7 +84,7 @@ GraphicsChannel:: // pointers do. However, we do need to zero out their pointers to // us. GraphicsLayers::iterator li; - for (li = _layers.begin(); + for (li = _layers.begin(); li != _layers.end(); ++li) { (*li)->_channel = NULL; @@ -210,7 +219,7 @@ window_resized(int x, int y) { // so when the window resizes so does the channel, by the same // amount. GraphicsLayers::iterator li; - for (li = _layers.begin(); + for (li = _layers.begin(); li != _layers.end(); ++li) { (*li)->channel_resized(x, y); diff --git a/panda/src/display/graphicsChannel.h b/panda/src/display/graphicsChannel.h index 5a298e4ab0..988a3b5cf4 100644 --- a/panda/src/display/graphicsChannel.h +++ b/panda/src/display/graphicsChannel.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GRAPHICSCHANNEL_H #define GRAPHICSCHANNEL_H // @@ -85,7 +97,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/display/graphicsLayer.I b/panda/src/display/graphicsLayer.I index 447281b48a..20122bd7f7 100644 --- a/panda/src/display/graphicsLayer.I +++ b/panda/src/display/graphicsLayer.I @@ -1,6 +1,19 @@ // Filename: graphicsLayer.I // Created by: drose (18Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsLayer.cxx b/panda/src/display/graphicsLayer.cxx index 8e68e7c678..b862fd217f 100644 --- a/panda/src/display/graphicsLayer.cxx +++ b/panda/src/display/graphicsLayer.cxx @@ -1,10 +1,19 @@ // Filename: graphicsLayer.cxx // Created by: drose (18Apr00) -// -//////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////// -// Includes +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsLayer.h" #include "graphicsChannel.h" @@ -23,7 +32,7 @@ TypeHandle GraphicsLayer::_type_handle; //////////////////////////////////////////////////////////////////// // Function: GraphicsLayer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsLayer:: GraphicsLayer() { @@ -34,11 +43,11 @@ GraphicsLayer() { //////////////////////////////////////////////////////////////////// // Function: GraphicsLayer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsLayer:: GraphicsLayer(GraphicsChannel *channel) - : _channel(channel) + : _channel(channel) { _is_active = true; } @@ -46,7 +55,7 @@ GraphicsLayer(GraphicsChannel *channel) //////////////////////////////////////////////////////////////////// // Function: GraphicsLayer::Copy Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GraphicsLayer:: GraphicsLayer(const GraphicsLayer&) { @@ -57,7 +66,7 @@ GraphicsLayer(const GraphicsLayer&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsLayer::Copy Assignment Operator // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GraphicsLayer &GraphicsLayer:: operator=(const GraphicsLayer&) { @@ -69,7 +78,7 @@ operator=(const GraphicsLayer&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsLayer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsLayer:: ~GraphicsLayer() { @@ -78,7 +87,7 @@ GraphicsLayer:: // pointers do. However, we do need to zero out their pointers to // us. DisplayRegions::iterator dri; - for (dri = _display_regions.begin(); + for (dri = _display_regions.begin(); dri != _display_regions.end(); ++dri) { (*dri)->_layer = NULL; @@ -222,7 +231,7 @@ channel_resized(int x, int y) { // Since a layer always fills the whole channel, when the channel // resizes so does the layer, by the same amount. DisplayRegions::iterator dri; - for (dri = _display_regions.begin(); + for (dri = _display_regions.begin(); dri != _display_regions.end(); ++dri) { (*dri)->compute_pixels(x, y); diff --git a/panda/src/display/graphicsLayer.h b/panda/src/display/graphicsLayer.h index 614fe1bbf5..bf34368fb2 100644 --- a/panda/src/display/graphicsLayer.h +++ b/panda/src/display/graphicsLayer.h @@ -1,6 +1,19 @@ // Filename: graphicsLayer.h // Created by: drose (18Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GRAPHICSLAYER_H @@ -48,7 +61,7 @@ PUBLISHED: DisplayRegion *make_display_region(); DisplayRegion *make_display_region(float l, float r, float b, float t); - + int get_num_drs() const; DisplayRegion *get_dr(int index) const; void remove_dr(int index); @@ -91,7 +104,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/display/graphicsPipe.I b/panda/src/display/graphicsPipe.I index fb5ce192c8..8838b67b6e 100644 --- a/panda/src/display/graphicsPipe.I +++ b/panda/src/display/graphicsPipe.I @@ -1,6 +1,19 @@ // Filename: graphicsPipe.I // Created by: frang (07Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsPipe.cxx b/panda/src/display/graphicsPipe.cxx index e4eea7d1d6..241886ae5c 100644 --- a/panda/src/display/graphicsPipe.cxx +++ b/panda/src/display/graphicsPipe.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsPipe.h" #include "config_display.h" @@ -48,11 +57,11 @@ TypeHandle GraphicsPipe::PipeSpec::force_init_type(void) { //////////////////////////////////////////////////////////////////// // Function: GraphicsPipe::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsPipe:: GraphicsPipe(const PipeSpecifier &spec) : - Namable(spec.get_name()) + Namable(spec.get_name()) { // Add ourself to the global list of pipes. get_all_pipes().push_back(this); @@ -61,7 +70,7 @@ GraphicsPipe(const PipeSpecifier &spec) : //////////////////////////////////////////////////////////////////// // Function: GraphicsPipe::Default Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsPipe:: GraphicsPipe() { @@ -72,7 +81,7 @@ GraphicsPipe() { //////////////////////////////////////////////////////////////////// // Function: GraphicsPipe::Copy Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsPipe:: GraphicsPipe(const GraphicsPipe&) { @@ -83,7 +92,7 @@ GraphicsPipe(const GraphicsPipe&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsPipe::Copy Assignment Operator // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsPipe &GraphicsPipe:: operator=(const GraphicsPipe&) { @@ -96,7 +105,7 @@ operator=(const GraphicsPipe&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsPipe::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsPipe:: ~GraphicsPipe() { @@ -111,7 +120,7 @@ GraphicsPipe:: // Remove ourself from the global list. Pipes &all_pipes = get_all_pipes(); - Pipes::iterator pi = + Pipes::iterator pi = find(all_pipes.begin(), all_pipes.end(), this); if (pi != all_pipes.end()) { all_pipes.erase(pi); @@ -178,7 +187,7 @@ remove_window(GraphicsWindow *window) { // For whatever reason, VC++ considers == ambiguous unless we // compare it to a PT(GraphicsWindow) instead of a GraphicsWindow*. PT(GraphicsWindow) ptwin = window; - Windows::iterator wi = + Windows::iterator wi = find(_windows.begin(), _windows.end(), ptwin); if (wi != _windows.end()) { _windows.erase(wi); diff --git a/panda/src/display/graphicsPipe.h b/panda/src/display/graphicsPipe.h index 496933c909..e6f51eaf96 100644 --- a/panda/src/display/graphicsPipe.h +++ b/panda/src/display/graphicsPipe.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GRAPHICSPIPE_H #define GRAPHICSPIPE_H // @@ -107,7 +119,7 @@ private: typedef vector Pipes; Windows _windows; - + static PipeFactory *_factory; static Pipes *_all_pipes; INLINE static Pipes &get_all_pipes(); @@ -127,10 +139,10 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; - + // this is so it can call get_hw_channel friend class GraphicsWindow; }; diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index f5613b9396..158fcbbd47 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -1,6 +1,19 @@ // Filename: graphicsStateGuardian.I // Created by: drose (24Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -50,7 +63,7 @@ get_state() const { // set by the last call to render_subgraph(). //////////////////////////////////////////////////////////////////// INLINE ProjectionNode *GraphicsStateGuardian:: -get_current_projection_node(void) const { +get_current_projection_node(void) const { return _current_projection_node; } diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 98aa0d28fd..f0dc740340 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -1,6 +1,19 @@ // Filename: graphicsStateGuardian.cxx // Created by: drose (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsStateGuardian.h" @@ -62,7 +75,7 @@ TypeHandle GraphicsStateGuardian::GsgWindow::force_init_type(void) { //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsStateGuardian:: GraphicsStateGuardian(GraphicsWindow *win) { @@ -75,7 +88,7 @@ GraphicsStateGuardian(GraphicsWindow *win) { //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsStateGuardian:: ~GraphicsStateGuardian() { @@ -99,7 +112,7 @@ release_all_textures() { ti != temp.end(); ++ti) { release_texture(*ti); - } + } // Now that we've released all of the textures, the // _prepared_textures list should have completely emptied itself. @@ -149,7 +162,7 @@ void GraphicsStateGuardian:: set_state(const NodeAttributes &new_state, bool complete) { if (gsg_cat.is_debug()) { gsg_cat.debug() << "\n"; - gsg_cat.debug() + gsg_cat.debug() << "Frame " << ClockObject::get_global_clock()->get_frame_count() << ", setting to (complete = " << complete << ")\n"; new_state.write(gsg_cat.debug(false), 10); @@ -191,7 +204,7 @@ set_state(const NodeAttributes &new_state, bool complete) { if (gsg_cat.is_debug()) { gsg_cat.debug() - << "Unissuing attrib " << *(*current_i).second + << "Unissuing attrib " << *(*current_i).second << " (previously set, not now)\n"; } record_state_change((*current_i).first); @@ -220,7 +233,7 @@ set_state(const NodeAttributes &new_state, bool complete) { if (gsg_cat.is_debug()) { gsg_cat.debug() - << "Unissuing attrib " << *(*current_i).second + << "Unissuing attrib " << *(*current_i).second << " (previously set, now NULL)\n"; } record_state_change((*current_i).first); @@ -275,9 +288,9 @@ set_state(const NodeAttributes &new_state, bool complete) { << "Issuing new attrib " << *(*new_i).second << "\n"; } record_state_change((*new_i).first); - + (*new_i).second->issue(this); - + // And store the new value. _state.insert(_state.end(), *new_i); } @@ -291,19 +304,19 @@ set_state(const NodeAttributes &new_state, bool complete) { if (gsg_cat.is_debug()) { gsg_cat.debug() - << "Unissuing attrib " << *(*current_i).second + << "Unissuing attrib " << *(*current_i).second << " (previously set, end of list)\n"; } record_state_change((*current_i).first); - + // If we're in the "complete state" model, that means this // attribute should now get the default initial value. PT(NodeAttribute) initial = (*current_i).second->make_initial(); initial->issue(this); - + NodeAttributes::iterator erase_i = current_i; ++current_i; - + _state.erase(erase_i); } } @@ -391,7 +404,7 @@ enable_frame_clear(bool clear_color, bool clear_depth) { //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::wants_normals // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool GraphicsStateGuardian:: wants_normals() const { @@ -401,7 +414,7 @@ wants_normals() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::wants_texcoords // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool GraphicsStateGuardian:: wants_texcoords() const { @@ -411,7 +424,7 @@ wants_texcoords() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::wants_colors // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool GraphicsStateGuardian:: wants_colors() const { @@ -555,7 +568,7 @@ traverse_prepared_textures(bool (*pertex_callbackfn)(TextureContext *,void *),vo bool bResult=(*pertex_callbackfn)(*ti,callback_arg); if(!bResult) return; - } + } } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index db9990c999..6867cc9d5f 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -2,6 +2,19 @@ // Created by: drose (02Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GRAPHICSSTATEGUARDIAN_H #define GRAPHICSSTATEGUARDIAN_H @@ -77,7 +90,7 @@ public: virtual void render_frame(const AllAttributesWrapper &initial_state)=0; virtual void render_scene(Node *root, ProjectionNode *projnode, const AllAttributesWrapper &initial_state)=0; - virtual void render_subgraph(RenderTraverser *traverser, + virtual void render_subgraph(RenderTraverser *traverser, Node *subgraph, ProjectionNode *projnode, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans)=0; @@ -126,7 +139,7 @@ public: // virtual function because different GSG's may define the modelview // coordinate space differently. virtual float compute_distance_to(const LPoint3f &point) const=0; - + protected: virtual PT(SavedFrameBuffer) save_frame_buffer(const RenderBuffer &buffer, CPT(DisplayRegion) dr)=0; @@ -248,7 +261,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/display/graphicsWindow.I b/panda/src/display/graphicsWindow.I index 0f41715ec1..ff9bf68c64 100644 --- a/panda/src/display/graphicsWindow.I +++ b/panda/src/display/graphicsWindow.I @@ -1,6 +1,19 @@ // Filename: graphicsWindow.I // Created by: frang (07Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -19,7 +32,7 @@ get_properties() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::get_width // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int GraphicsWindow:: get_width() const { @@ -29,7 +42,7 @@ get_width() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::get_height // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int GraphicsWindow:: get_height() const { @@ -39,7 +52,7 @@ get_height() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::get_xorg // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int GraphicsWindow:: get_xorg() const { @@ -49,7 +62,7 @@ get_xorg() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::get_yorg // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int GraphicsWindow:: get_yorg() const { @@ -142,7 +155,7 @@ has_keyboard(int device) const { //////////////////////////////////////////////////////////////////// INLINE const MouseData &GraphicsWindow:: get_mouse_data(int device) const { - nassertr(device >= 0 && device < (int)_input_devices.size(), + nassertr(device >= 0 && device < (int)_input_devices.size(), *(new MouseData)); return _input_devices[device].get_mouse_data(); } @@ -202,7 +215,7 @@ get_frame_number() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::set_draw_callback // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GraphicsWindow:: set_draw_callback(Callback *c) { @@ -212,7 +225,7 @@ set_draw_callback(Callback *c) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::set_idle_callback // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GraphicsWindow:: set_idle_callback(Callback *c) { @@ -222,7 +235,7 @@ set_idle_callback(Callback *c) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::call_draw_callback // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GraphicsWindow:: call_draw_callback(bool force_redraw) { @@ -234,7 +247,7 @@ call_draw_callback(bool force_redraw) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::call_idle_callback // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GraphicsWindow:: call_idle_callback() { diff --git a/panda/src/display/graphicsWindow.cxx b/panda/src/display/graphicsWindow.cxx index 5f9960b64f..a3a734e21e 100644 --- a/panda/src/display/graphicsWindow.cxx +++ b/panda/src/display/graphicsWindow.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsWindow.h" #include "graphicsPipe.h" @@ -47,7 +56,7 @@ Properties() { _title = ""; _border = true; _fullscreen = false; - _mask = W_RGBA | W_DOUBLE | W_DEPTH; + _mask = W_RGBA | W_DOUBLE | W_DEPTH; _want_depth_bits = 1; _want_color_bits = 1; } @@ -119,7 +128,7 @@ TypeHandle GraphicsWindow::WindowPipe::force_init_type(void) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsWindow:: GraphicsWindow(GraphicsPipe *pipe) : Configurable() { @@ -135,7 +144,7 @@ GraphicsWindow(GraphicsPipe *pipe) : Configurable() { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsWindow:: GraphicsWindow(GraphicsPipe *pipe, @@ -152,7 +161,7 @@ GraphicsWindow(GraphicsPipe *pipe, //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsWindow:: GraphicsWindow(const GraphicsWindow&) { @@ -163,7 +172,7 @@ GraphicsWindow(const GraphicsWindow&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsWindow& GraphicsWindow:: operator=(const GraphicsWindow&) { @@ -175,7 +184,7 @@ operator=(const GraphicsWindow&) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsWindow:: ~GraphicsWindow() { @@ -298,7 +307,7 @@ is_channel_defined(int index) const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::flag_redisplay // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GraphicsWindow:: flag_redisplay() { @@ -328,7 +337,7 @@ declare_channel(int index, GraphicsChannel *chan) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::register_draw_function // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GraphicsWindow:: register_draw_function(GraphicsWindow::vfn f) { @@ -338,7 +347,7 @@ register_draw_function(GraphicsWindow::vfn f) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::register_idle_function // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GraphicsWindow:: register_idle_function(GraphicsWindow::vfn f) { @@ -348,7 +357,7 @@ register_idle_function(GraphicsWindow::vfn f) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::register_resize_function // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GraphicsWindow:: register_resize_function(GraphicsWindow::vfnii f) { @@ -392,7 +401,7 @@ supports_update() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::update // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GraphicsWindow:: update() { @@ -462,7 +471,7 @@ make_scratch_display_region(int xsize, int ysize) const { ysize = _props._ysize; } - return new DisplayRegion(xsize, ysize); + return new DisplayRegion(xsize, ysize); } //////////////////////////////////////////////////////////////////// @@ -480,7 +489,7 @@ make_current(void) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindow::unmake_current // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GraphicsWindow:: unmake_current(void) { @@ -497,7 +506,7 @@ void GraphicsWindow:: make_gsg() { FactoryParams params; params.add_param(new GraphicsStateGuardian::GsgWindow(this)); - + _gsg = GraphicsStateGuardian::get_factory(). make_instance(get_gsg_type(), params); diff --git a/panda/src/display/graphicsWindow.h b/panda/src/display/graphicsWindow.h index d224b634a5..e75ab5bc37 100644 --- a/panda/src/display/graphicsWindow.h +++ b/panda/src/display/graphicsWindow.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GRAPHICSWINDOW_H #define GRAPHICSWINDOW_H // @@ -51,7 +63,7 @@ enum WindowModeType class GraphicsPipe; class GraphicsWindow; - + //////////////////////////////////////////////////////////////////// // Class : GraphicsWindow // Description : @@ -73,7 +85,7 @@ public: int _want_depth_bits; int _want_color_bits; }; - + class EXPCL_PANDA Callback { public: virtual void draw(bool); @@ -81,7 +93,7 @@ public: }; typedef void (*vfn)(); typedef void (*vfnii)(int, int); - + public: GraphicsWindow(GraphicsPipe*); @@ -91,7 +103,7 @@ public: GraphicsWindow(GraphicsPipe*, const GraphicsWindow::Properties&); #endif virtual ~GraphicsWindow(); - + INLINE const GraphicsWindow::Properties& get_properties() const; PUBLISHED: @@ -99,23 +111,23 @@ PUBLISHED: INLINE int get_height() const; INLINE int get_xorg() const; INLINE int get_yorg() const; - + INLINE GraphicsStateGuardian *get_gsg() const; - + INLINE GraphicsPipe *get_pipe() const; - + INLINE void set_frame_number(const int); INLINE int get_frame_number() const; -public: +public: virtual void resized(const int, const int); - + INLINE virtual void set_draw_callback(Callback *c); INLINE virtual void set_idle_callback(Callback *c); - + INLINE void call_draw_callback(bool force_redraw); INLINE void call_idle_callback(); - + PT(DisplayRegion) make_scratch_display_region(int xsize, int ysize) const; @@ -139,7 +151,7 @@ public: INLINE const MouseData &get_mouse_data(int device) const; INLINE bool has_button_event(int device) const; INLINE ButtonEvent get_button_event(int device); - + PUBLISHED: // GUI glue methods virtual void flag_redisplay(); @@ -150,7 +162,7 @@ PUBLISHED: virtual void main_loop(); virtual bool supports_update() const; virtual void update(); - + public: virtual void begin_frame(); virtual void end_frame(); @@ -162,7 +174,7 @@ public: static PStatCollector _clear_pcollector; static PStatCollector _show_fps_pcollector; static PStatCollector _make_current_pcollector; - + protected: void make_gsg(); @@ -171,7 +183,7 @@ protected: PT(GraphicsStateGuardian) _gsg; Properties _props; - + GraphicsPipe *_pipe; vfn _draw_function; vfn _idle_function; @@ -179,18 +191,18 @@ protected: int _frame_number; protected: - + Callback *_draw_callback; Callback *_idle_callback; Callback *_resize_callback; - + public: virtual GraphicsChannel *get_channel(int index); void remove_channel(int index); int get_max_channel_index() const; bool is_channel_defined(int index) const; - + protected: void declare_channel(int index, GraphicsChannel *chan); @@ -243,12 +255,12 @@ public: private: static void read_priorities(void); - + GraphicsWindow(const GraphicsWindow&); GraphicsWindow &operator=(const GraphicsWindow&); static WindowFactory *_factory; - + public: static TypeHandle get_class_type() { return _type_handle; @@ -264,13 +276,13 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; - + friend class GraphicsPipe; }; - + #include "graphicsWindow.I" #endif /* GRAPHICSWINDOW_H */ diff --git a/panda/src/display/graphicsWindowInputDevice.I b/panda/src/display/graphicsWindowInputDevice.I index 5d34671917..1e0b3a7361 100644 --- a/panda/src/display/graphicsWindowInputDevice.I +++ b/panda/src/display/graphicsWindowInputDevice.I @@ -1,12 +1,25 @@ // Filename: graphicsWindowInputDevice.I // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GraphicsWindowInputDevice:: GraphicsWindowInputDevice() { @@ -16,7 +29,7 @@ GraphicsWindowInputDevice() { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::get_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string GraphicsWindowInputDevice:: get_name() const { @@ -26,7 +39,7 @@ get_name() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::has_pointer // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GraphicsWindowInputDevice:: has_pointer() const { @@ -36,7 +49,7 @@ has_pointer() const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::has_keyboard // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GraphicsWindowInputDevice:: has_keyboard() const { @@ -81,9 +94,9 @@ set_pointer_out_of_window() { } //////////////////////////////////////////////////////////////////// -// Function: GraphicsWindowInputDevice::operator == +// Function: GraphicsWindowInputDevice::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GraphicsWindowInputDevice:: operator == (const GraphicsWindowInputDevice &) const { @@ -91,9 +104,9 @@ operator == (const GraphicsWindowInputDevice &) const { } //////////////////////////////////////////////////////////////////// -// Function: GraphicsWindowInputDevice::operator != +// Function: GraphicsWindowInputDevice::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GraphicsWindowInputDevice:: operator != (const GraphicsWindowInputDevice &) const { @@ -103,7 +116,7 @@ operator != (const GraphicsWindowInputDevice &) const { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::operator < // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GraphicsWindowInputDevice:: operator < (const GraphicsWindowInputDevice &) const { diff --git a/panda/src/display/graphicsWindowInputDevice.cxx b/panda/src/display/graphicsWindowInputDevice.cxx index 6b93cadd61..4633353e9e 100644 --- a/panda/src/display/graphicsWindowInputDevice.cxx +++ b/panda/src/display/graphicsWindowInputDevice.cxx @@ -1,14 +1,27 @@ // Filename: graphicsWindowInputDevice.cxx // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsWindowInputDevice.h" #include #include -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE GraphicsWindowInputDevice #define NAME vector_GraphicsWindowInputDevice @@ -74,7 +87,7 @@ pointer_and_keyboard(const string &name) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsWindowInputDevice:: GraphicsWindowInputDevice(const GraphicsWindowInputDevice ©) : @@ -88,7 +101,7 @@ GraphicsWindowInputDevice(const GraphicsWindowInputDevice ©) : //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GraphicsWindowInputDevice:: operator = (const GraphicsWindowInputDevice ©) { @@ -101,7 +114,7 @@ operator = (const GraphicsWindowInputDevice ©) { //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphicsWindowInputDevice:: ~GraphicsWindowInputDevice() { diff --git a/panda/src/display/graphicsWindowInputDevice.h b/panda/src/display/graphicsWindowInputDevice.h index cc44e31a00..0d3355b79c 100644 --- a/panda/src/display/graphicsWindowInputDevice.h +++ b/panda/src/display/graphicsWindowInputDevice.h @@ -1,6 +1,19 @@ // Filename: graphicsWindowInputDevice.h // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GRAPHICSWINDOWINPUTDEVICE_H @@ -67,7 +80,7 @@ private: IDF_has_keyboard = 0x02 }; typedef deque ButtonEvents; - + string _name; int _flags; MouseData _mouse_data; @@ -76,8 +89,8 @@ private: #include "graphicsWindowInputDevice.I" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE GraphicsWindowInputDevice #define NAME vector_GraphicsWindowInputDevice diff --git a/panda/src/display/hardwareChannel.I b/panda/src/display/hardwareChannel.I index c30a8606b3..84be01174a 100644 --- a/panda/src/display/hardwareChannel.I +++ b/panda/src/display/hardwareChannel.I @@ -1,12 +1,25 @@ -// Filename: graphicsChannel.I +// Filename: hardwareChannel.I // Created by: mike (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: get_id +// Function: get_id // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int HardwareChannel::get_id( void ) const { diff --git a/panda/src/display/hardwareChannel.cxx b/panda/src/display/hardwareChannel.cxx index 215ca2d1ac..73018ed8da 100644 --- a/panda/src/display/hardwareChannel.cxx +++ b/panda/src/display/hardwareChannel.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "hardwareChannel.h" #include "config_display.h" diff --git a/panda/src/display/hardwareChannel.h b/panda/src/display/hardwareChannel.h index cc3ae80c2c..ea02511d4c 100644 --- a/panda/src/display/hardwareChannel.h +++ b/panda/src/display/hardwareChannel.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef HARDWARECHANNEL_H #define HARDWARECHANNEL_H // @@ -61,7 +73,7 @@ class EXPCL_PANDA HardwareChannel : public GraphicsChannel return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/display/interactiveGraphicsPipe.I b/panda/src/display/interactiveGraphicsPipe.I index 76d7f3b1ba..bc7d017c53 100644 --- a/panda/src/display/interactiveGraphicsPipe.I +++ b/panda/src/display/interactiveGraphicsPipe.I @@ -1,5 +1,18 @@ // Filename: interactiveGraphicsPipe.I // Created by: cary (10Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/interactiveGraphicsPipe.cxx b/panda/src/display/interactiveGraphicsPipe.cxx index 4e849ff317..a31281f562 100644 --- a/panda/src/display/interactiveGraphicsPipe.cxx +++ b/panda/src/display/interactiveGraphicsPipe.cxx @@ -1,6 +1,19 @@ -// Filename: interativeGraphicsPipe.cxx +// Filename: interactiveGraphicsPipe.cxx // Created by: cary (10Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "interactiveGraphicsPipe.h" diff --git a/panda/src/display/interactiveGraphicsPipe.h b/panda/src/display/interactiveGraphicsPipe.h index 7e0d38a3cc..ca53e8cbe5 100644 --- a/panda/src/display/interactiveGraphicsPipe.h +++ b/panda/src/display/interactiveGraphicsPipe.h @@ -2,6 +2,19 @@ // Created by: cary (10Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __INTERACTIVEGRAPHICSPIPE_H__ #define __INTERACTIVEGRAPHICSPIPE_H__ diff --git a/panda/src/display/noninteractiveGraphicsPipe.I b/panda/src/display/noninteractiveGraphicsPipe.I index 60663f4266..2e73f9b4ad 100644 --- a/panda/src/display/noninteractiveGraphicsPipe.I +++ b/panda/src/display/noninteractiveGraphicsPipe.I @@ -1,4 +1,17 @@ // Filename: noninteractiveGraphicsPipe.I // Created by: cary (10Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/noninteractiveGraphicsPipe.cxx b/panda/src/display/noninteractiveGraphicsPipe.cxx index b1a54202d3..db1e4d1ff2 100644 --- a/panda/src/display/noninteractiveGraphicsPipe.cxx +++ b/panda/src/display/noninteractiveGraphicsPipe.cxx @@ -1,6 +1,19 @@ // Filename: noninteractiveGraphicsPipe.cxx // Created by: cary (10Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "noninteractiveGraphicsPipe.h" diff --git a/panda/src/display/noninteractiveGraphicsPipe.h b/panda/src/display/noninteractiveGraphicsPipe.h index 20c271641e..eeeb2b2398 100644 --- a/panda/src/display/noninteractiveGraphicsPipe.h +++ b/panda/src/display/noninteractiveGraphicsPipe.h @@ -2,6 +2,19 @@ // Created by: cary (10Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __NONINTERACTIVEGRAPHICSPIPE_H__ #define __NONINTERACTIVEGRAPHICSPIPE_H__ diff --git a/panda/src/display/pipeSpec.I b/panda/src/display/pipeSpec.I index 235fc67ca0..3dd2841e6f 100644 --- a/panda/src/display/pipeSpec.I +++ b/panda/src/display/pipeSpec.I @@ -1,6 +1,19 @@ // Filename: pipeSpec.I // Created by: frang (07Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE void PipeSpecifier::set_name(const std::string& name) { diff --git a/panda/src/display/pipeSpec.cxx b/panda/src/display/pipeSpec.cxx index 23bacfdbf2..c6c2acfe57 100644 --- a/panda/src/display/pipeSpec.cxx +++ b/panda/src/display/pipeSpec.cxx @@ -1,6 +1,19 @@ // Filename: pipeSpec.cxx // Created by: frang (07Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pipeSpec.h" diff --git a/panda/src/display/pipeSpec.h b/panda/src/display/pipeSpec.h index facabd5ae1..2fe42bed78 100644 --- a/panda/src/display/pipeSpec.h +++ b/panda/src/display/pipeSpec.h @@ -2,6 +2,19 @@ // Created by: frang (07Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __PIPESPEC_H__ #define __PIPESPEC_H__ diff --git a/panda/src/display/renderBuffer.h b/panda/src/display/renderBuffer.h index 84cbdb125c..6e81b9bac4 100644 --- a/panda/src/display/renderBuffer.h +++ b/panda/src/display/renderBuffer.h @@ -2,6 +2,19 @@ // Created by: drose (02Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RENDERBUFFER_H #define RENDERBUFFER_H @@ -24,7 +37,7 @@ public: T_back_left = 0x0002, T_front_right = 0x0004, T_back_right = 0x0008, - + T_front = 0x0005, T_back = 0x000a, T_left = 0x0003, diff --git a/panda/src/display/savedFrameBuffer.I b/panda/src/display/savedFrameBuffer.I index 84810f70aa..5487b08cc5 100644 --- a/panda/src/display/savedFrameBuffer.I +++ b/panda/src/display/savedFrameBuffer.I @@ -1,12 +1,25 @@ // Filename: savedFrameBuffer.I // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SavedFrameBuffer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SavedFrameBuffer:: SavedFrameBuffer(const RenderBuffer &buffer, CPT(DisplayRegion) dr) : diff --git a/panda/src/display/savedFrameBuffer.cxx b/panda/src/display/savedFrameBuffer.cxx index 4f9526f95d..8b20218ef7 100644 --- a/panda/src/display/savedFrameBuffer.cxx +++ b/panda/src/display/savedFrameBuffer.cxx @@ -1,6 +1,19 @@ // Filename: savedFrameBuffer.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "savedFrameBuffer.h" diff --git a/panda/src/display/savedFrameBuffer.h b/panda/src/display/savedFrameBuffer.h index a17b6e6912..951f69a165 100644 --- a/panda/src/display/savedFrameBuffer.h +++ b/panda/src/display/savedFrameBuffer.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SAVEDFRAMEBUFFER_H #define SAVEDFRAMEBUFFER_H @@ -56,7 +69,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/display/test_display.cxx b/panda/src/display/test_display.cxx index d371aac816..2b49799131 100644 --- a/panda/src/display/test_display.cxx +++ b/panda/src/display/test_display.cxx @@ -1,6 +1,19 @@ // Filename: test_display.cxx // Created by: shochet (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsWindow.h" diff --git a/panda/src/display/textureContext.I b/panda/src/display/textureContext.I index 9c6137842d..54f244b432 100644 --- a/panda/src/display/textureContext.I +++ b/panda/src/display/textureContext.I @@ -1,16 +1,29 @@ // Filename: textureContext.I // Created by: drose (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TextureContext::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureContext:: -TextureContext(Texture *tex) : +TextureContext(Texture *tex) : _texture(tex) { } diff --git a/panda/src/display/textureContext.cxx b/panda/src/display/textureContext.cxx index c52b816243..4ca3faa9a0 100644 --- a/panda/src/display/textureContext.cxx +++ b/panda/src/display/textureContext.cxx @@ -1,6 +1,19 @@ // Filename: textureContext.cxx // Created by: drose (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "textureContext.h" @@ -75,7 +88,7 @@ estimate_texture_memory() { case Texture::FT_linear_mipmap_linear: use_mipmaps = true; break; - + default: use_mipmaps = false; break; diff --git a/panda/src/display/textureContext.h b/panda/src/display/textureContext.h index 005a09404b..f898709818 100644 --- a/panda/src/display/textureContext.h +++ b/panda/src/display/textureContext.h @@ -2,6 +2,19 @@ // Created by: drose (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TEXTURECONTEXT_H #define TEXTURECONTEXT_H @@ -35,7 +48,7 @@ public: // both own their TextureContexts! That would create a circular // reference count. Texture *_texture; - + public: static TypeHandle get_class_type() { return _type_handle; @@ -49,7 +62,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/doc/sampleClass.I b/panda/src/doc/sampleClass.I index df026a96e1..c8fd7760c6 100644 --- a/panda/src/doc/sampleClass.I +++ b/panda/src/doc/sampleClass.I @@ -1,13 +1,26 @@ // Filename: sampleClass.I // Created by: drose (10Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SampleClass::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SampleClass:: SampleClass(const SampleClass ©) : @@ -20,7 +33,7 @@ SampleClass(const SampleClass ©) : //////////////////////////////////////////////////////////////////// // Function: SampleClass::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SampleClass:: ~SampleClass() { diff --git a/panda/src/doc/sampleClass.cxx b/panda/src/doc/sampleClass.cxx index 8489eac1f7..ba21cdc8c6 100644 --- a/panda/src/doc/sampleClass.cxx +++ b/panda/src/doc/sampleClass.cxx @@ -1,6 +1,19 @@ // Filename: sampleClass.cxx // Created by: drose (10Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "sampleClass.h" @@ -10,7 +23,7 @@ TypeHandle SampleClass::_type_handle; //////////////////////////////////////////////////////////////////// // Function: SampleClass::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// SampleClass:: SampleClass() { diff --git a/panda/src/doc/sampleClass.h b/panda/src/doc/sampleClass.h index c3ea3d0a4b..0a57430148 100644 --- a/panda/src/doc/sampleClass.h +++ b/panda/src/doc/sampleClass.h @@ -2,6 +2,19 @@ // Created by: drose (10Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SAMPLECLASS_H #define SAMPLECLASS_H @@ -94,7 +107,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/downloader/asyncDecompressor.cxx b/panda/src/downloader/asyncDecompressor.cxx index 7cd546e7ad..9a9072ab86 100644 --- a/panda/src/downloader/asyncDecompressor.cxx +++ b/panda/src/downloader/asyncDecompressor.cxx @@ -1,7 +1,20 @@ -// Filename: decompressor.cxx +// Filename: asyncDecompressor.cxx // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// // This file is compiled only if we have zlib installed. @@ -28,7 +41,7 @@ //////////////////////////////////////////////////////////////////// class DecompressorToken : public ReferenceCount { public: - INLINE DecompressorToken(uint id, const Filename &source_file, + INLINE DecompressorToken(uint id, const Filename &source_file, const Filename &dest_file, const string &event_name) { _id = id; _source_file = source_file; @@ -64,7 +77,7 @@ Decompressor(PT(Buffer) buffer) : AsyncUtility() { //////////////////////////////////////////////////////////////////// // Function: Decompressor::Constructor -// Access: Private +// Access: Private // Description: //////////////////////////////////////////////////////////////////// void Decompressor:: @@ -72,7 +85,7 @@ init(PT(Buffer) buffer) { nassertv(!buffer.is_null()); _frequency = decompressor_frequency; _token_board = new DecompressorTokenBoard; - _half_buffer_length = buffer->get_length()/2; + _half_buffer_length = buffer->get_length()/2; _buffer = buffer; char *temp_name = tempnam(NULL, "dc"); _temp_file_name = temp_name; @@ -96,7 +109,7 @@ Decompressor:: //////////////////////////////////////////////////////////////////// // Function: Decompressor::request_decompress // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int Decompressor:: request_decompress(const Filename &source_file, const string &event_name) { @@ -108,7 +121,7 @@ request_decompress(const Filename &source_file, const string &event_name) { if (downloader_cat.is_debug()) downloader_cat.debug() << "Decompressor::request_decompress() - Unknown file extension: ." - << extension << endl; + << extension << endl; } return request_decompress(source_file, dest_file, event_name); } @@ -168,11 +181,11 @@ request_decompress(const Filename &source_file, const Filename &dest_file, } if (downloader_cat.is_debug()) { downloader_cat.debug() - << "Decompress requested for file: " << source_file << endl; + << "Decompress requested for file: " << source_file << endl; } tok = new DecompressorToken(_next_token++, source_file, dest_file, - event_name); + event_name); _token_board->_waiting.insert(tok); process_request(); } @@ -210,7 +223,7 @@ process_request() { if (downloader_cat.is_debug()) { downloader_cat.debug() - << "Decompressor::process_request() - decompress complete for " + << "Decompressor::process_request() - decompress complete for " << tok->_source_file << "\n"; } } @@ -242,7 +255,7 @@ decompress(Filename &source_file) { //////////////////////////////////////////////////////////////////// // Function: Decompressor::decompress -// Access: Public +// Access: Public // Description: //////////////////////////////////////////////////////////////////// bool Decompressor:: @@ -253,10 +266,10 @@ decompress(Filename &source_file, Filename &dest_file) { source_file.set_binary(); if (!source_file.open_read(read_stream)) { downloader_cat.error() - << "Decompressor::decompress() - Error opening source file: " + << "Decompressor::decompress() - Error opening source file: " << source_file << endl; return false; - } + } // Determine source file length read_stream.seekg(0, ios::end); @@ -269,15 +282,15 @@ decompress(Filename &source_file, Filename &dest_file) { } read_stream.seekg(0, ios::beg); - // Open destination file + // Open destination file ofstream write_stream; dest_file.set_binary(); if (!dest_file.open_write(write_stream)) { downloader_cat.error() - << "Decompressor::decompress() - Error opening dest file: " + << "Decompressor::decompress() - Error opening dest file: " << source_file << endl; return false; - } + } // Read from the source file into the first half of the buffer, // decompress into the second half of the buffer, write the second @@ -310,7 +323,7 @@ decompress(Filename &source_file, Filename &dest_file) { while (avail_in > 0) { int ret = decompressor.decompress_to_stream(next_in, avail_in, - next_out, avail_out, dest_buffer, + next_out, avail_out, dest_buffer, dest_buffer_length, write_stream); if (ret == ZCompressorBase::S_error) return false; diff --git a/panda/src/downloader/asyncDecompressor.h b/panda/src/downloader/asyncDecompressor.h index e1debc43c3..4456bc4646 100644 --- a/panda/src/downloader/asyncDecompressor.h +++ b/panda/src/downloader/asyncDecompressor.h @@ -1,8 +1,20 @@ -// Filename: decompressor.h +// Filename: asyncDecompressor.h // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ASYNCDECOMPRESSOR_H #define ASYNCDECOMPRESSOR_H // @@ -19,7 +31,7 @@ class DecompressorToken; //////////////////////////////////////////////////////////////////// -// Class : Decompressor +// Class : Decompressor // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS Decompressor : public AsyncUtility { @@ -30,7 +42,7 @@ PUBLISHED: int request_decompress(const Filename &source_file, const string &event_name); - int request_decompress(const Filename &source_file, + int request_decompress(const Filename &source_file, const Filename &dest_file, const string &event_name); diff --git a/panda/src/downloader/asyncDownloader.I b/panda/src/downloader/asyncDownloader.I index 67d1b7c4a9..a496e930c7 100644 --- a/panda/src/downloader/asyncDownloader.I +++ b/panda/src/downloader/asyncDownloader.I @@ -1,15 +1,28 @@ -// Filename: downloader.I +// Filename: asyncDownloader.I // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "config_downloader.h" //////////////////////////////////////////////////////////////////// // Function: Downloader::set_byte_rate // Access: Public -// Description: Note: modem speeds are reported in bits, so you -// need to convert! +// Description: Note: modem speeds are reported in bits, so you +// need to convert! //////////////////////////////////////////////////////////////////// INLINE void Downloader:: set_byte_rate(float bytes) { diff --git a/panda/src/downloader/asyncDownloader.cxx b/panda/src/downloader/asyncDownloader.cxx index 7256edce61..bff788d78b 100644 --- a/panda/src/downloader/asyncDownloader.cxx +++ b/panda/src/downloader/asyncDownloader.cxx @@ -1,10 +1,19 @@ -// Filename: downloader.cxx +// Filename: asyncDownloader.cxx // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "asyncDownloader.h" #include "config_downloader.h" @@ -49,10 +58,10 @@ enum receive_status { //////////////////////////////////////////////////////////////////// class DownloaderToken : public ReferenceCount { public: - INLINE DownloaderToken(uint id, const string &file_name, + INLINE DownloaderToken(uint id, const string &file_name, const Filename &file_dest, const string &event_name, int first_byte, int last_byte, int total_bytes, - bool partial_content, bool sync) : _id(id), _first_byte(first_byte), + bool partial_content, bool sync) : _id(id), _first_byte(first_byte), _last_byte(last_byte), _total_bytes(total_bytes) { _file_name = file_name; _event_name = event_name; @@ -61,11 +70,11 @@ public: _sync = sync; } uint _id; - string _file_name; + string _file_name; Filename _file_dest; string _event_name; int _first_byte; - int _last_byte; + int _last_byte; int _total_bytes; bool _partial_content; bool _sync; @@ -146,14 +155,14 @@ Downloader:: //////////////////////////////////////////////////////////////////// // Function: Downloader::connect_to_server -// Access: Public +// Access: Public // Description: //////////////////////////////////////////////////////////////////// bool Downloader:: connect_to_server(const string &name, uint port) { if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader connecting to server: " << name + << "Downloader connecting to server: " << name << " on port: " << port << endl; _server_name = name; @@ -169,7 +178,7 @@ connect_to_server(const string &name, uint port) { (void)memcpy(&_sin.sin_addr, hp->h_addr, (uint)hp->h_length); else { downloader_cat.error() - << "Downloader::connect_to_server() - gethostbyname() failed: " + << "Downloader::connect_to_server() - gethostbyname() failed: " << strerror(errno) << endl; return false; } @@ -213,7 +222,7 @@ connect_to_server(void) { /////////////////////////////////////////////////////////////////// // Function: Downloader::disconnect_from_server -// Access: Public +// Access: Public // Description: //////////////////////////////////////////////////////////////////// void Downloader:: @@ -234,7 +243,7 @@ disconnect_from_server(void) { //////////////////////////////////////////////////////////////////// // Function: Downloader::request_sync_download // Access: Public -// Description: Requests the synchronous download of a complete file. +// Description: Requests the synchronous download of a complete file. //////////////////////////////////////////////////////////////////// int Downloader:: request_sync_download(const string &file_name, const Filename &file_dest, @@ -245,20 +254,20 @@ request_sync_download(const string &file_name, const Filename &file_dest, //////////////////////////////////////////////////////////////////// // Function: Downloader::request_sync_download // Access: Public -// Description: Requests the synchronous download of a complete file. +// Description: Requests the synchronous download of a complete file. //////////////////////////////////////////////////////////////////// int Downloader:: request_sync_download(const string &file_name, const Filename &file_dest, const string &event_name, int first_byte, int last_byte, int total_bytes, bool partial_content) { return request_download(file_name, file_dest, event_name, first_byte, - last_byte, total_bytes, partial_content, true); + last_byte, total_bytes, partial_content, true); } //////////////////////////////////////////////////////////////////// // Function: Downloader::request_download // Access: Public -// Description: Requests the download of a complete file. +// Description: Requests the download of a complete file. //////////////////////////////////////////////////////////////////// int Downloader:: request_download(const string &file_name, const Filename &file_dest, @@ -317,8 +326,8 @@ request_download(const string &file_name, const Filename &file_dest, << "Download requested for file: " << file_name << "\n"; } - tok = new DownloaderToken(_next_token++, file_name, file_dest, - event_name, first_byte, last_byte, total_bytes, + tok = new DownloaderToken(_next_token++, file_name, file_dest, + event_name, first_byte, last_byte, total_bytes, partial_content, sync); _token_board->_waiting.insert(tok); @@ -340,8 +349,8 @@ request_download(const string &file_name, const Filename &file_dest, << "Load requested for file: " << file_name << "\n"; } - tok = new DownloaderToken(_next_token++, file_name, file_dest, - event_name, first_byte, last_byte, total_bytes, + tok = new DownloaderToken(_next_token++, file_name, file_dest, + event_name, first_byte, last_byte, total_bytes, partial_content, sync); _token_board->_waiting.insert(tok); process_request(); @@ -387,7 +396,7 @@ process_request() { if (downloader_cat.is_debug()) { downloader_cat.debug() - << "Downloader::process_request() - downloading complete for " + << "Downloader::process_request() - downloading complete for " << tok->_file_name << "\n"; } } else { @@ -448,7 +457,7 @@ safe_send(int socket, const char *data, int length, long timeout) { // Description: //////////////////////////////////////////////////////////////////// int Downloader:: -safe_receive(int socket, DownloadStatus &status, int length, +safe_receive(int socket, DownloadStatus &status, int length, long timeout, int &bytes) { bytes = 0; if (length == 0) { @@ -529,7 +538,7 @@ attempt_read(int length, DownloadStatus &status, int &bytes_read) { // Make the request for length bytes int bytes; int ans = safe_receive(_socket, status, length, - (long)downloader_timeout, bytes); + (long)downloader_timeout, bytes); bytes_read += bytes; switch (ans) { @@ -549,7 +558,7 @@ attempt_read(int length, DownloadStatus &status, int &bytes_read) { return RS_error; } } - + // We timed out on retries consecutive attempts - this is considered // a true timeout return RS_timeout; @@ -561,7 +570,7 @@ attempt_read(int length, DownloadStatus &status, int &bytes_read) { // Description: //////////////////////////////////////////////////////////////////// int Downloader:: -download(const string &file_name, Filename file_dest, +download(const string &file_name, Filename file_dest, const string &event_name, int first_byte, int last_byte, int total_bytes, bool partial_content, bool sync, uint id) { @@ -599,7 +608,7 @@ download(const string &file_name, Filename file_dest, if (partial_content == true) { if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader::download() - Requesting byte range: " << first_byte + << "Downloader::download() - Requesting byte range: " << first_byte << "-" << last_byte << endl; request += "\012Range: bytes="; stringstream start_stream; @@ -611,7 +620,7 @@ download(const string &file_name, Filename file_dest, if (downloader_cat.is_debug()) downloader_cat.debug() << "Downloader::download() - Sending request:\n" << request << endl; - int send_ret = safe_send(_socket, request.c_str(), outlen, + int send_ret = safe_send(_socket, request.c_str(), outlen, (long)downloader_timeout); // Handle timeouts on the send @@ -625,7 +634,7 @@ download(const string &file_name, Filename file_dest, if (send_ret == SS_timeout) { // We've really timed out - throw an event downloader_cat.error() - << "Downloader::download() - send timed out after: " + << "Downloader::download() - send timed out after: " << downloader_timeout_retries << " retries" << endl; return DS_timeout; } @@ -649,7 +658,7 @@ download(const string &file_name, Filename file_dest, #endif nassertr(_frequency > 0, DS_abort); - // If byte rate has changed, recompute read size and write buffer size + // If byte rate has changed, recompute read size and write buffer size if (_new_byte_rate > 0) { _read_size = (int)ceil(_new_byte_rate * _frequency); _byte_rate = _new_byte_rate; @@ -681,7 +690,7 @@ download(const string &file_name, Filename file_dest, // Resize the buffer _disk_buffer_size = (_disk_write_frequency * _read_size); - + if (downloader_cat.is_debug()) downloader_cat.debug() << "Downloader::download() - resizing disk buffer to: " @@ -707,7 +716,7 @@ download(const string &file_name, Filename file_dest, int ret = attempt_read(_read_size, status, bytes_read); if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader::download() - stalled status: " << _current_attempt_stalled + << "Downloader::download() - stalled status: " << _current_attempt_stalled << endl; _last_attempt_stalled = _current_attempt_stalled; @@ -724,12 +733,12 @@ download(const string &file_name, Filename file_dest, << strerror(errno) << endl; return DS_abort; - case RS_timeout: + case RS_timeout: { // We've really timed out - throw an event downloader_cat.error() - << "Downloader::download() - receive timed out after: " + << "Downloader::download() - receive timed out after: " << downloader_timeout_retries << " retries" << endl; if (bytes_read > 0) { if (write_to_disk(status) == false) { @@ -746,7 +755,7 @@ download(const string &file_name, Filename file_dest, if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader::download() - Got: " << bytes_read << " bytes" + << "Downloader::download() - Got: " << bytes_read << " bytes" << endl; break; @@ -790,7 +799,7 @@ download(const string &file_name, Filename file_dest, // Sleep for the requested frequency nap(); - } // for (;;) + } // for (;;) downloader_cat.error() << "Downloader::download() - Dropped out of for loop without returning!" @@ -809,7 +818,7 @@ parse_http_response(const string &resp) { string httpstr = resp.substr(0, ws); if (!(httpstr == "HTTP/1.1")) { downloader_cat.error() - << "Downloader::parse_http_response() - not HTTP/1.1 - got: " + << "Downloader::parse_http_response() - not HTTP/1.1 - got: " << httpstr << endl; return false; } @@ -839,13 +848,13 @@ parse_http_response(const string &resp) { downloader_cat.error() << "Downloader::parse_http_response() - Invalid response: " << resp << endl; - return false; + return false; } //////////////////////////////////////////////////////////////////// // Function: Downloader::parse_header // Access: Private -// Description: Looks for a valid header. If it finds one, it +// Description: Looks for a valid header. If it finds one, it // calculates the header length and strips it from // the download status structure. Function returns false // on an error condition, otherwise true. @@ -888,7 +897,7 @@ parse_header(DownloadStatus &status) { if (parse_http_response(component) == true) { if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader::parse_header() - Header is valid: " + << "Downloader::parse_header() - Header is valid: " << component << endl; status._header_is_valid = true; } else { @@ -907,13 +916,13 @@ parse_header(DownloadStatus &status) { client_download_bytes += 1; if (client_download_bytes != server_download_bytes) { downloader_cat.error() - << "Downloader::parse_header() - server size = " - << server_download_bytes << ", client size = " + << "Downloader::parse_header() - server size = " + << server_download_bytes << ", client size = " << client_download_bytes << " (" << status._last_byte << "-" << status._first_byte << ")" << endl; return false; } - } + } // Two consecutive (CR LF)s indicates end of HTTP header if (nl == p) { @@ -921,7 +930,7 @@ parse_header(DownloadStatus &status) { downloader_cat.debug() << "Downloader::parse_header() - Header is complete" << endl; status._header_is_complete = true; - + // Strip the header out of the status buffer int header_length = nl + 2; status._start += header_length; @@ -942,7 +951,7 @@ parse_header(DownloadStatus &status) { if (downloader_cat.is_debug()) downloader_cat.debug() << "Downloader::parse_header() - Reached end of buffer without " - << "successfully parsing the header - buffer size: " + << "successfully parsing the header - buffer size: " << status._bytes_in_buffer << endl; } @@ -970,15 +979,15 @@ write_to_disk(DownloadStatus &status) { << "(or header was larger than download buffer) - " << "try increasing download-buffer-size" << endl; return false; - } + } // Write what we have so far to disk if (status._bytes_in_buffer > 0) { if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader::write_to_disk() - Writing " + << "Downloader::write_to_disk() - Writing " << status._bytes_in_buffer << " to disk" << endl; - + _dest_stream.write(status._start, status._bytes_in_buffer); status._total_bytes_written += status._bytes_in_buffer; @@ -1020,7 +1029,7 @@ DownloadStatus(char *buffer, const string &event_name, int first_byte, //////////////////////////////////////////////////////////////////// // Function: Downloader::DownloadStatus::reset -// Access: Public +// Access: Public // Description: Resets the status buffer for more downloading after // a write. //////////////////////////////////////////////////////////////////// diff --git a/panda/src/downloader/asyncDownloader.h b/panda/src/downloader/asyncDownloader.h index 95d1bc0feb..749012bab9 100644 --- a/panda/src/downloader/asyncDownloader.h +++ b/panda/src/downloader/asyncDownloader.h @@ -1,8 +1,20 @@ -// Filename: downloader.h +// Filename: asyncDownloader.h // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ASYNCDOWNLOADER_H #define ASYNCDOWNLOADER_H // @@ -56,7 +68,7 @@ PUBLISHED: const string &event_name, bool sync = false); int request_download(const string &file_name, const Filename &file_dest, const string &event_name, int first_byte, - int last_byte, int total_bytes, + int last_byte, int total_bytes, bool partial_content = true, bool sync = false); INLINE void set_byte_rate(float bytes); @@ -93,7 +105,7 @@ private: }; void init(); - int download(const string &file_name, Filename file_dest, + int download(const string &file_name, Filename file_dest, const string &event_name, int first_byte, int last_byte, int total_bytes, bool partial_content, bool sync, uint id); @@ -102,7 +114,7 @@ private: bool write_to_disk(DownloadStatus &status); bool connect_to_server(void); int safe_send(int socket, const char *data, int length, long timeout); - int safe_receive(int socket, DownloadStatus &status, int length, + int safe_receive(int socket, DownloadStatus &status, int length, long timeout, int &bytes); bool parse_http_response(const string &resp); int attempt_read(int length, DownloadStatus &status, int &bytes_read); @@ -120,7 +132,7 @@ private: PT(Buffer) _buffer; int _disk_write_frequency; int _new_disk_write_frequency; - float _byte_rate; + float _byte_rate; float _new_byte_rate; int _read_size; bool _download_enabled; diff --git a/panda/src/downloader/asyncExtractor.cxx b/panda/src/downloader/asyncExtractor.cxx index 43be0af828..66ba2e335c 100644 --- a/panda/src/downloader/asyncExtractor.cxx +++ b/panda/src/downloader/asyncExtractor.cxx @@ -1,10 +1,19 @@ -// Filename: extractor.cxx +// Filename: asyncExtractor.cxx // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "asyncExtractor.h" #include "config_downloader.h" @@ -25,7 +34,7 @@ //////////////////////////////////////////////////////////////////// class ExtractorToken : public ReferenceCount { public: - INLINE ExtractorToken(uint id, const Filename &source_file, + INLINE ExtractorToken(uint id, const Filename &source_file, const string &event_name, const Filename &rel_path) { _id = id; @@ -62,7 +71,7 @@ Extractor(PT(Buffer) buffer) : AsyncUtility() { //////////////////////////////////////////////////////////////////// // Function: Extractor::Constructor -// Access: Private +// Access: Private // Description: //////////////////////////////////////////////////////////////////// void Extractor:: @@ -88,7 +97,7 @@ Extractor:: //////////////////////////////////////////////////////////////////// // Function: Extractor::request_extract // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int Extractor:: request_extract(const Filename &source_file, const string &event_name, @@ -140,7 +149,7 @@ request_extract(const Filename &source_file, const string &event_name, } if (downloader_cat.is_debug()) { downloader_cat.debug() - << "Extract requested for file: " << source_file << endl; + << "Extract requested for file: " << source_file << endl; } tok = new ExtractorToken(_next_token++, source_file, event_name, @@ -182,7 +191,7 @@ process_request() { if (downloader_cat.is_debug()) { downloader_cat.debug() - << "Extractor::process_request() - extract complete for " + << "Extractor::process_request() - extract complete for " << tok->_source_file << "\n"; } } @@ -204,10 +213,10 @@ extract(Filename &source_file, const Filename &rel_path) { source_file.set_binary(); if (!source_file.open_read(read_stream)) { downloader_cat.error() - << "Extractor::extract() - Error opening source file: " + << "Extractor::extract() - Error opening source file: " << source_file << endl; return false; - } + } // Determine source file length read_stream.seekg(0, ios::end); @@ -237,7 +246,7 @@ extract(Filename &source_file, const Filename &rel_path) { // Write to the out file char *start = _buffer->_buffer; - int size = source_buffer_length; + int size = source_buffer_length; if (mfile.write_extract(start, size, rel_path) == true) handled_all_input = true; diff --git a/panda/src/downloader/asyncExtractor.h b/panda/src/downloader/asyncExtractor.h index 88b2946f23..42a7b69dda 100644 --- a/panda/src/downloader/asyncExtractor.h +++ b/panda/src/downloader/asyncExtractor.h @@ -1,8 +1,20 @@ -// Filename: extractor.h +// Filename: asyncExtractor.h // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ASYNCEXTRACTOR_H #define ASYNCEXTRACTOR_H // @@ -19,7 +31,7 @@ class ExtractorToken; //////////////////////////////////////////////////////////////////// -// Class : Extractor +// Class : Extractor // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS Extractor : public AsyncUtility { diff --git a/panda/src/downloader/asyncUtility.I b/panda/src/downloader/asyncUtility.I index 81d0acf7be..eacc138d9e 100644 --- a/panda/src/downloader/asyncUtility.I +++ b/panda/src/downloader/asyncUtility.I @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AsyncUtility::set_frequency diff --git a/panda/src/downloader/asyncUtility.cxx b/panda/src/downloader/asyncUtility.cxx index 5cc4bd48a7..8be18f2e1a 100644 --- a/panda/src/downloader/asyncUtility.cxx +++ b/panda/src/downloader/asyncUtility.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "asyncUtility.h" #include "config_downloader.h" @@ -59,7 +68,7 @@ void AsyncUtility:: create_thread(void) { #ifdef HAVE_IPC if (_threaded == false && _threads_enabled == true) { - downloader_cat.debug() + downloader_cat.debug() << "AsyncUtility::create_thread()" << endl; _thread = thread::create(&st_callback, this, thread::PRIORITY_NORMAL); _threaded = true; @@ -77,7 +86,7 @@ destroy_thread(void) { #ifdef HAVE_IPC if (_threaded == false) return; - + // Tell the thread to shut itself down. // We need to grab the lock in order to signal the condition variable _lock.lock(); @@ -98,10 +107,10 @@ destroy_thread(void) { // Description: This is a static wrapper around the callback() // method, below. It's static just so we can pass it to // the thread-creation function. In addition, the -// function has a void* return type even though we +// function has a void* return type even though we // don't actually return anything. This is necessary // because ipc assumes a function that does not return -// anything indicates that the associated thread should +// anything indicates that the associated thread should // be created as unjoinable (detached). //////////////////////////////////////////////////////////////////// void* AsyncUtility:: @@ -133,7 +142,7 @@ callback(void) { //////////////////////////////////////////////////////////////////// // Function: AsyncUtility::nap -// Access: Protected +// Access: Protected // Description: //////////////////////////////////////////////////////////////////// void AsyncUtility:: diff --git a/panda/src/downloader/asyncUtility.h b/panda/src/downloader/asyncUtility.h index 5f4769ae27..2c34f62309 100644 --- a/panda/src/downloader/asyncUtility.h +++ b/panda/src/downloader/asyncUtility.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ASYNCUTILITY_H #define ASYNCUTILITY_H // @@ -21,7 +33,7 @@ //////////////////////////////////////////////////////////////////// -// Class : AsyncUtility +// Class : AsyncUtility // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS AsyncUtility { diff --git a/panda/src/downloader/config_downloader.cxx b/panda/src/downloader/config_downloader.cxx index 2c13d988d7..4d8a3a1114 100644 --- a/panda/src/downloader/config_downloader.cxx +++ b/panda/src/downloader/config_downloader.cxx @@ -1,6 +1,19 @@ // Filename: config_downloader.cxx // Created by: mike (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_downloader.h" @@ -19,7 +32,7 @@ const int downloader_disk_write_frequency = // We'd like this to be about 1 second worth of download assuming a // 28.8Kb connection (28.8Kb / 8 = 3600 bytes per second). -const int downloader_byte_rate = +const int downloader_byte_rate = config_downloader.GetInt("downloader-byte-rate", 3600); // Frequency of download chunk requests in seconds (or fractions of) diff --git a/panda/src/downloader/config_downloader.h b/panda/src/downloader/config_downloader.h index e4b2d51258..cc7ead0126 100644 --- a/panda/src/downloader/config_downloader.h +++ b/panda/src/downloader/config_downloader.h @@ -1,6 +1,19 @@ // Filename: config_downloader.h // Created by: mike (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_DOWNLOADER_H diff --git a/panda/src/downloader/decompressor.I b/panda/src/downloader/decompressor.I index 351d0cb0d6..a5c41820dd 100644 --- a/panda/src/downloader/decompressor.I +++ b/panda/src/downloader/decompressor.I @@ -2,13 +2,26 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "config_downloader.h" //////////////////////////////////////////////////////////////////// // Function: Decompressor::get_progress // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float Decompressor:: get_progress(void) const { diff --git a/panda/src/downloader/decompressor.cxx b/panda/src/downloader/decompressor.cxx index 8cccccc515..9bd2642341 100644 --- a/panda/src/downloader/decompressor.cxx +++ b/panda/src/downloader/decompressor.cxx @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// // This file is compiled only if we have zlib installed. @@ -48,14 +61,14 @@ Decompressor(PT(Buffer) buffer) { //////////////////////////////////////////////////////////////////// // Function: Decompressor::Constructor -// Access: Private +// Access: Private // Description: //////////////////////////////////////////////////////////////////// void Decompressor:: init(PT(Buffer) buffer) { _initiated = false; nassertv(!buffer.is_null()); - _half_buffer_length = buffer->get_length()/2; + _half_buffer_length = buffer->get_length()/2; _buffer = buffer; char *temp_name = tempnam(NULL, "dc"); _temp_file_name = temp_name; @@ -77,9 +90,9 @@ Decompressor:: } //////////////////////////////////////////////////////////////////// -// Function: Decompressor::initiate +// Function: Decompressor::initiate // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int Decompressor:: initiate(Filename &source_file) { @@ -91,7 +104,7 @@ initiate(Filename &source_file) { if (downloader_cat.is_debug()) downloader_cat.debug() << "Decompressor::request_decompress() - Unknown file extension: ." - << extension << endl; + << extension << endl; return EU_error_abort; } return initiate(source_file, dest_file); @@ -117,10 +130,10 @@ initiate(Filename &source_file, Filename &dest_file) { _source_file.set_binary(); if (!_source_file.open_read(_read_stream)) { downloader_cat.error() - << "Decompressor::initiate() - Error opening source file: " + << "Decompressor::initiate() - Error opening source file: " << _source_file << " : " << strerror(errno) << endl; - return get_write_error(); - } + return get_write_error(); + } // Determine source file length _read_stream.seekg(0, ios::end); @@ -133,14 +146,14 @@ initiate(Filename &source_file, Filename &dest_file) { } _read_stream.seekg(0, ios::beg); - // Open destination file + // Open destination file dest_file.set_binary(); if (!dest_file.open_write(_write_stream)) { downloader_cat.error() - << "Decompressor::initiate() - Error opening dest file: " + << "Decompressor::initiate() - Error opening dest file: " << source_file << " : " << strerror(errno) << endl; return get_write_error(); - } + } // Read from the source file into the first half of the buffer, // decompress into the second half of the buffer, write the second @@ -181,7 +194,7 @@ initiate(Ramfile &source_file) { return get_write_error(); } - // Open destination file + // Open destination file _write_string_stream = new ostringstream(); // Read from the source file into the first half of the buffer, @@ -261,16 +274,16 @@ run(void) { int dest_buffer_length = _buffer->get_length() - _source_buffer_length; int avail_out = dest_buffer_length; nassertr(avail_out > 0 && avail_in > 0, false); - + while (avail_in > 0) { int ret; - if (_decompress_to_ram == false) + if (_decompress_to_ram == false) ret = _decompressor->decompress_to_stream(next_in, avail_in, - next_out, avail_out, dest_buffer, + next_out, avail_out, dest_buffer, dest_buffer_length, _write_stream); else ret = _decompressor->decompress_to_stream(next_in, avail_in, - next_out, avail_out, dest_buffer, + next_out, avail_out, dest_buffer, dest_buffer_length, *_write_string_stream); if (ret == ZCompressorBase::S_error) return EU_error_zlib; @@ -292,7 +305,7 @@ run(void) { bool Decompressor:: decompress(Filename &source_file) { int ret = initiate(source_file); - if (ret < 0) + if (ret < 0) return false; for (;;) { ret = run(); @@ -312,7 +325,7 @@ decompress(Filename &source_file) { bool Decompressor:: decompress(Ramfile &source_file) { int ret = initiate(source_file); - if (ret < 0) + if (ret < 0) return false; for (;;) { ret = run(); diff --git a/panda/src/downloader/decompressor.h b/panda/src/downloader/decompressor.h index 331a07c07e..db3ff39619 100644 --- a/panda/src/downloader/decompressor.h +++ b/panda/src/downloader/decompressor.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DECOMPRESSOR_H #define DECOMPRESSOR_H // @@ -16,7 +28,7 @@ #include "zcompressor.h" //////////////////////////////////////////////////////////////////// -// Class : Decompressor +// Class : Decompressor // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS Decompressor { diff --git a/panda/src/downloader/downloadDb.I b/panda/src/downloader/downloadDb.I index c9ae188443..831d8d957c 100644 --- a/panda/src/downloader/downloadDb.I +++ b/panda/src/downloader/downloadDb.I @@ -2,12 +2,25 @@ // Created by: shochet (08Sep00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DownloadDb:: get_client_num_multifiles(void) const { @@ -17,7 +30,7 @@ get_client_num_multifiles(void) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DownloadDb:: get_server_num_multifiles(void) const { @@ -27,7 +40,7 @@ get_server_num_multifiles(void) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string DownloadDb:: get_client_multifile_name(int index) const { @@ -37,7 +50,7 @@ get_client_multifile_name(int index) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string DownloadDb:: get_server_multifile_name(int index) const { @@ -48,7 +61,7 @@ get_server_multifile_name(int index) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Version DownloadDb:: get_client_multifile_phase(string mfname) const { @@ -58,7 +71,7 @@ get_client_multifile_phase(string mfname) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Version DownloadDb:: get_server_multifile_phase(string mfname) const { @@ -70,7 +83,7 @@ get_server_multifile_phase(string mfname) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DownloadDb:: get_client_multifile_size(string mfname) const { @@ -80,7 +93,7 @@ get_client_multifile_size(string mfname) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DownloadDb:: set_client_multifile_size(string mfname, int size) { @@ -92,7 +105,7 @@ set_client_multifile_size(string mfname, int size) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DownloadDb:: set_client_multifile_delta_size(string mfname, int size) { @@ -107,7 +120,7 @@ set_client_multifile_delta_size(string mfname, int size) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DownloadDb:: get_server_multifile_size(string mfname) const { @@ -118,7 +131,7 @@ get_server_multifile_size(string mfname) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DownloadDb:: set_server_multifile_size(string mfname, int size) { @@ -129,7 +142,7 @@ set_server_multifile_size(string mfname, int size) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DownloadDb:: set_client_multifile_incomplete(string mfname) { @@ -140,7 +153,7 @@ set_client_multifile_incomplete(string mfname) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DownloadDb:: set_client_multifile_complete(string mfname) { @@ -151,7 +164,7 @@ set_client_multifile_complete(string mfname) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DownloadDb:: set_client_multifile_decompressed(string mfname) { @@ -162,7 +175,7 @@ set_client_multifile_decompressed(string mfname) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DownloadDb:: set_client_multifile_extracted(string mfname) { @@ -174,7 +187,7 @@ set_client_multifile_extracted(string mfname) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DownloadDb:: get_client_num_files(string mfname) const { @@ -183,7 +196,7 @@ get_client_num_files(string mfname) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DownloadDb:: get_server_num_files(string mfname) const { @@ -193,9 +206,9 @@ get_server_num_files(string mfname) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string DownloadDb:: get_server_file_name(string mfname, int index) const { - return (_server_db.get_multifile_record_named(mfname))->get_file_name(index); + return (_server_db.get_multifile_record_named(mfname))->get_file_name(index); } diff --git a/panda/src/downloader/downloadDb.cxx b/panda/src/downloader/downloadDb.cxx index 121d99d91f..a891819892 100644 --- a/panda/src/downloader/downloadDb.cxx +++ b/panda/src/downloader/downloadDb.cxx @@ -1,10 +1,19 @@ -// Filename: downloader.cxx +// Filename: downloadDb.cxx // Created by: shochet (08Sep00) // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "downloadDb.h" #include "config_downloader.h" @@ -18,8 +27,8 @@ PN_uint32 DownloadDb::_magic_number = 0xfeedfeed; // Written at the top of the file to signify we are not done -// writing to the file yet. If you load a db with this magic -// number that means the previous time it got written out was +// writing to the file yet. If you load a db with this magic +// number that means the previous time it got written out was // probably interrupted in the middle of the write. PN_uint32 DownloadDb::_bogus_magic_number = 0x11111111; @@ -59,7 +68,7 @@ DownloadDb:: //////////////////////////////////////////////////////////////////// // Function: DownloadDb::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DownloadDb:: output(ostream &out) const { @@ -112,7 +121,7 @@ client_multifile_exists(string mfname) const { //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public -// Description: A multifile is complete when it is completely +// Description: A multifile is complete when it is completely // downloaded. Note: it may already be decompressed // or extracted and it is still complete //////////////////////////////////////////////////////////////////// @@ -141,7 +150,7 @@ client_multifile_decompressed(string mfname) const { bool DownloadDb:: client_multifile_extracted(string mfname) const { int client_status = _client_db.get_multifile_record_named(mfname)->_status; - return (client_status >= Status_extracted); + return (client_status >= Status_extracted); } // Operations on multifiles @@ -190,7 +199,7 @@ read_db(Filename &file, bool want_server_info) { // Open the multifile for reading ifstream read_stream; file.set_binary(); - + Db db; if (!file.open_read(read_stream)) { @@ -209,7 +218,7 @@ read_db(Filename &file, bool want_server_info) { if (want_server_info) { if (!read_version_map(read_stream)) { downloader_cat.error() - << "DownloadDb::read() - read_version_map() failed: " + << "DownloadDb::read() - read_version_map() failed: " << file << endl; } } @@ -236,7 +245,7 @@ read_db(Ramfile &file, bool want_server_info) { if (want_server_info) { if (!read_version_map(read_stream)) { downloader_cat.error() - << "DownloadDb::read() - read_version_map() failed" << endl; + << "DownloadDb::read() - read_version_map() failed" << endl; } } @@ -259,7 +268,7 @@ write_db(Filename &file, Db db, bool want_server_info) { << file << endl; return false; } - + downloader_cat.debug() << "Writing to file: " << file << endl; @@ -279,7 +288,7 @@ write_db(Filename &file, Db db, bool want_server_info) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::create_new_server_db // Access: Public -// Description: Used on the server side makefiles to create a +// Description: Used on the server side makefiles to create a // new clean server db //////////////////////////////////////////////////////////////////// void DownloadDb:: @@ -320,7 +329,7 @@ server_add_file(string mfname, string fname) { } // Uh-oh, did not find it - downloader_cat.error() << "Could not find record named " + downloader_cat.error() << "Could not find record named " << mfname << " in database " << endl; return; } @@ -362,7 +371,7 @@ MultifileRecord(string name, Phase phase, int size, int status) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::MultifileRecord::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DownloadDb::MultifileRecord:: output(ostream &out) const { @@ -432,7 +441,7 @@ get_file_record_named(string fname) const { } } // Did not find it, just return an empty version - downloader_cat.error() << "Could not find record named " + downloader_cat.error() << "Could not find record named " << fname << " in multifile " << _name << endl; PT(FileRecord) foo = new FileRecord; return foo; @@ -461,7 +470,7 @@ add_file_record(PT(FileRecord) fr) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::Db::constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DownloadDb::Db:: Db(void) { @@ -473,7 +482,7 @@ Db(void) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::Db::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DownloadDb::Db:: output(ostream &out) const { @@ -534,7 +543,7 @@ get_multifile_record_named(string mfname) const { } } // Did not find it, just return an empty version - downloader_cat.error() << "Could not find record named " + downloader_cat.error() << "Could not find record named " << mfname << " in database " << endl; PT(MultifileRecord) foo = new MultifileRecord; return foo; @@ -554,7 +563,7 @@ add_multifile_record(PT(MultifileRecord) mfr) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::Db::parse_header // Access: Private -// Description: Verifies magic number, returns the number of +// Description: Verifies magic number, returns the number of // multifiles or -1 if invalid //////////////////////////////////////////////////////////////////// int DownloadDb::Db:: @@ -572,15 +581,15 @@ parse_header(uchar *start, int size) { if (magic_number == _bogus_magic_number) { downloader_cat.error() << "DownloadDb::parse_header() - " - << "Bogus magic number, previous write incomplete: " + << "Bogus magic number, previous write incomplete: " << magic_number << " expected: " << _magic_number << endl; return -1; } - // If the magic number does not match at all, something is + // If the magic number does not match at all, something is // really wrong else if (magic_number != _magic_number) { downloader_cat.error() - << "DownloadDb::parse_header() - Invalid magic number: " + << "DownloadDb::parse_header() - Invalid magic number: " << magic_number << " expected: " << _magic_number << endl; return -1; } @@ -636,9 +645,9 @@ parse_mfr(uchar *start, int size) { mfr->_size = di.get_int32(); mfr->_status = di.get_int32(); mfr->_num_files = di.get_int32(); - + downloader_cat.debug() - << "Parsed multifile record: " << mfr->_name << " phase: " << mfr->_phase + << "Parsed multifile record: " << mfr->_name << " phase: " << mfr->_phase << " size: " << mfr->_size << " status: " << mfr->_status << " num_files: " << mfr->_num_files << endl; @@ -665,7 +674,7 @@ parse_fr(uchar *start, int size) { DatagramIterator di(_datagram); PN_int32 fr_name_length = di.get_int32(); fr->_name = di.extract_bytes(fr_name_length); - + downloader_cat.spam() << "Parsed file record: " << fr->_name << endl; @@ -679,11 +688,11 @@ parse_fr(uchar *start, int size) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::Db::read // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool DownloadDb::Db:: read(istream &read_stream, bool want_server_info) { - + // Make a little buffer to read the header into uchar *header_buf = new uchar[_header_length]; // Read the header @@ -697,7 +706,7 @@ read(istream &read_stream, bool want_server_info) { return false; } - delete header_buf; + delete header_buf; // Now that we know how many multifiles this db has, we can iterate // reading them off one by one @@ -715,7 +724,7 @@ read(istream &read_stream, bool want_server_info) { // Parse the header int mfr_length = parse_record_header(header_buf, mfr_header_length); delete header_buf; - + // Ok, now that we know the size of the mfr, read it in // Make a buffer to read the multifile record into header_buf = new uchar[mfr_length]; @@ -745,7 +754,7 @@ read(istream &read_stream, bool want_server_info) { // Parse the header int fr_length = parse_record_header(header_buf, fr_header_length); delete header_buf; - + // Ok, now that we know the size of the mfr, read it in // Make a buffer to read the file record into header_buf = new uchar[fr_length]; @@ -774,7 +783,7 @@ read(istream &read_stream, bool want_server_info) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::Db::write // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool DownloadDb::Db:: write(ofstream &write_stream, bool want_server_info) { @@ -791,7 +800,7 @@ write(ofstream &write_stream, bool want_server_info) { vector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); for(; i != _mfile_records.end(); ++i) { _datagram.clear(); - + // Cache some properties so we do not have to keep asking for them phase = (*i)->_phase; size = (*i)->_size; @@ -800,13 +809,13 @@ write(ofstream &write_stream, bool want_server_info) { name_length = (*i)->_name.length(); // Compute the length of this datagram - header_length = + header_length = sizeof(header_length) + // Size of this header length sizeof(name_length) + // Size of the size of the name string (*i)->_name.length() + // Size of the name string - sizeof(phase) + sizeof(size) + + sizeof(phase) + sizeof(size) + sizeof(status) + sizeof(num_files); - + // Add the length of this entire datagram _datagram.add_int32(header_length); @@ -820,7 +829,7 @@ write(ofstream &write_stream, bool want_server_info) { _datagram.add_int32(size); _datagram.add_int32(status); _datagram.add_int32(num_files); - + // Now put this datagram on the write stream string msg = _datagram.get_message(); write_stream.write(msg.data(), msg.length()); @@ -837,11 +846,11 @@ write(ofstream &write_stream, bool want_server_info) { name_length = (*j)->_name.length(); // Compute the length of this datagram - header_length = + header_length = sizeof(header_length) + // Size of this header length sizeof(name_length) + // Size of the size of the name string (*j)->_name.length(); // Size of the name string - + // Add the length of this entire datagram _datagram.add_int32(header_length); @@ -864,8 +873,8 @@ write(ofstream &write_stream, bool want_server_info) { // Function: DownloadDb::Db::write_bogus_header // Access: Private // Description: Writes the bogus header uncompressed with platform- -// independent byte ordering. This header will get -// overwritten with the real magic number as the last +// independent byte ordering. This header will get +// overwritten with the real magic number as the last // step in the write //////////////////////////////////////////////////////////////////// bool DownloadDb::Db:: @@ -938,7 +947,7 @@ FileRecord(string name) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::FileRecord::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DownloadDb::FileRecord:: output(ostream &out) const { @@ -1076,8 +1085,8 @@ read_version_map(istream &read_stream) { // Get the length of the file name _master_datagram.clear(); - read_stream.read(buffer, sizeof(PN_int32)); - _master_datagram.append_data(buffer, sizeof(PN_int32)); + read_stream.read(buffer, sizeof(PN_int32)); + _master_datagram.append_data(buffer, sizeof(PN_int32)); DatagramIterator di2(_master_datagram); int name_length = di2.get_int32(); downloader_cat.spam() @@ -1099,7 +1108,7 @@ read_version_map(istream &read_stream) { read_stream.read(buffer, sizeof(PN_int32)); _master_datagram.append_data(buffer, sizeof(PN_int32)); DatagramIterator di5(_master_datagram); - int length = di5.get_int32(); + int length = di5.get_int32(); downloader_cat.spam() << "DownloadDb::read_version_map() - number of values: " << length << endl; @@ -1132,7 +1141,7 @@ read_version_map(istream &read_stream) { //////////////////////////////////////////////////////////////////// // Function: DownloadDb::output_version_map // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DownloadDb:: output_version_map(ostream &out) const { diff --git a/panda/src/downloader/downloadDb.h b/panda/src/downloader/downloadDb.h index 887c81e765..77b46e6ab1 100644 --- a/panda/src/downloader/downloadDb.h +++ b/panda/src/downloader/downloadDb.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DOWNLOADDB_H #define DOWNLOADDB_H // @@ -32,7 +44,7 @@ header_length multifile_name phase version size status num_files header_length file_name version hash header_length file_name version hash header_length multifile_name phase version size status num_files - header_length file_name version hash + header_length file_name version hash header_length file_name version hash ... ... @@ -68,7 +80,7 @@ PUBLISHED: // Write a database file bool write_client_db(Filename &file); bool write_server_db(Filename &file); - + INLINE int get_client_num_multifiles(void) const; INLINE int get_server_num_multifiles(void) const; @@ -181,10 +193,10 @@ public: // and one that represents the server state Db _client_db; Db _server_db; - + // Magic number for knowing this is a download Db - static PN_uint32 _magic_number; - static PN_uint32 _bogus_magic_number; + static PN_uint32 _magic_number; + static PN_uint32 _bogus_magic_number; typedef vector vectorHash; typedef map VersionMap; diff --git a/panda/src/downloader/download_utils.cxx b/panda/src/downloader/download_utils.cxx index 9454e84f64..7a528a13d6 100644 --- a/panda/src/downloader/download_utils.cxx +++ b/panda/src/downloader/download_utils.cxx @@ -1,6 +1,19 @@ // Filename: download_utils.cxx // Created by: mike (18Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // This file is compiled only if we have zlib installed. @@ -29,8 +42,8 @@ check_crc(Filename name) { // Compute the crc ulong crc = crc32(0L, Z_NULL, 0); crc = crc32(crc, (uchar *)buffer, buffer_length); - - delete buffer; + + delete buffer; return crc; } @@ -52,11 +65,11 @@ check_adler(Filename name) { read_stream.seekg(0, ios::beg); read_stream.read(buffer, buffer_length); - // Compute the adler checksum + // Compute the adler checksum ulong adler = adler32(0L, Z_NULL, 0); adler = adler32(adler, (uchar *)buffer, buffer_length); - - delete buffer; + + delete buffer; return adler; } diff --git a/panda/src/downloader/download_utils.h b/panda/src/downloader/download_utils.h index e780d19985..37ed03503e 100644 --- a/panda/src/downloader/download_utils.h +++ b/panda/src/downloader/download_utils.h @@ -2,6 +2,19 @@ // Created by: mike (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DOWNLOAD_UTILS_H #define DOWNLOAD_UTILS_H diff --git a/panda/src/downloader/downloader.I b/panda/src/downloader/downloader.I index ddf4646cbf..46c9042764 100644 --- a/panda/src/downloader/downloader.I +++ b/panda/src/downloader/downloader.I @@ -2,13 +2,26 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "config_downloader.h" //////////////////////////////////////////////////////////////////// // Function: Downloader::set_frequency // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void Downloader:: set_frequency(float frequency) { @@ -22,7 +35,7 @@ set_frequency(float frequency) { //////////////////////////////////////////////////////////////////// // Function: Downloader::get_frequency // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float Downloader:: get_frequency(void) const { @@ -32,8 +45,8 @@ get_frequency(void) const { //////////////////////////////////////////////////////////////////// // Function: Downloader::set_byte_rate // Access: Public -// Description: Note: modem speeds are reported in bits, so you -// need to convert! +// Description: Note: modem speeds are reported in bits, so you +// need to convert! //////////////////////////////////////////////////////////////////// INLINE void Downloader:: set_byte_rate(float bytes) { diff --git a/panda/src/downloader/downloader.cxx b/panda/src/downloader/downloader.cxx index 23977157eb..d26b8bb6e7 100644 --- a/panda/src/downloader/downloader.cxx +++ b/panda/src/downloader/downloader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "downloader.h" #include "config_downloader.h" @@ -30,7 +39,7 @@ const int MAX_RECEIVE_BYTES = 16384; //////////////////////////////////////////////////////////////////// // Function: Downloader::Constructor -// Access: Published +// Access: Published // Description: //////////////////////////////////////////////////////////////////// Downloader:: @@ -142,7 +151,7 @@ connect_to_server(void) { return get_network_error(); } - if (connect(_socket, (struct sockaddr *)&_sin, sizeof(_sin)) == + if (connect(_socket, (struct sockaddr *)&_sin, sizeof(_sin)) == SOCKET_ERROR) { downloader_cat.error() << "Downloader::connect_to_server() - connect() failed: " @@ -201,7 +210,7 @@ safe_send(int socket, const char *data, int length, long timeout) { return EU_error_network_timeout; } else if (sret == -1) { downloader_cat.error() - << "Downloader::safe_send() - error: " << handle_socket_error() + << "Downloader::safe_send() - error: " << handle_socket_error() << endl; return get_network_error(); } @@ -210,7 +219,7 @@ safe_send(int socket, const char *data, int length, long timeout) { bytes += ret; else { downloader_cat.error() - << "Downloader::safe_send() - error: " << handle_socket_error() + << "Downloader::safe_send() - error: " << handle_socket_error() << endl; return get_network_error(); } @@ -245,7 +254,7 @@ fast_receive(int socket, DownloadStatus *status, int rec_size) { return EU_network_no_data; } else if (sret == -1) { downloader_cat.error() - << "Downloader::fast_receive() - select() error: " + << "Downloader::fast_receive() - select() error: " << handle_socket_error() << endl; return get_network_error(); } @@ -254,7 +263,7 @@ fast_receive(int socket, DownloadStatus *status, int rec_size) { return EU_eof; } else if (ret == -1) { downloader_cat.error() - << "Downloader::fast_receive() - recv() error: " + << "Downloader::fast_receive() - recv() error: " << handle_socket_error() << endl; return get_network_error(); } @@ -417,7 +426,7 @@ cleanup(void) { return; } - // The "Connection: close" line tells the server to close the + // The "Connection: close" line tells the server to close the // connection when the download is complete disconnect_from_server(); _dest_stream.close(); @@ -457,7 +466,7 @@ run(void) { if (_tfirst == 0.0) { _tfirst = t0; } - if (t0 - _tlast < _frequency) + if (t0 - _tlast < _frequency) return EU_ok; // Recompute the buffer size if necessary @@ -508,7 +517,7 @@ run(void) { int remain = (int)fmod((double)_receive_size, (double)MAX_RECEIVE_BYTES); if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader::run() - fast connection - repeat: " << repeat + << "Downloader::run() - fast connection - repeat: " << repeat << " remain: " << remain << endl; // Make multiple requests at once but do not exceed MAX_RECEIVE_BYTES // for any single request @@ -577,7 +586,7 @@ run_to_ram(void) { if (_tfirst == 0.0) { _tfirst = t0; } - if (t0 - _tlast < _frequency) + if (t0 - _tlast < _frequency) return EU_ok; // Recompute the buffer size if necessary @@ -607,7 +616,7 @@ run_to_ram(void) { _tfirst = t0; _current_status->_total_bytes = 0; - } else if (_current_status->_bytes_in_buffer + _receive_size > + } else if (_current_status->_bytes_in_buffer + _receive_size > ((unsigned int)_disk_buffer_size)) { // Flush the current buffer if the next request would overflow it @@ -628,7 +637,7 @@ run_to_ram(void) { int remain = (int)fmod((double)_receive_size, (double)MAX_RECEIVE_BYTES); if (downloader_cat.is_debug()) downloader_cat.debug() - << "Downloader::run_to_ram() - fast connection - repeat: " << repeat + << "Downloader::run_to_ram() - fast connection - repeat: " << repeat << " remain: " << remain << endl; // Make multiple requests at once but do not exceed MAX_RECEIVE_BYTES // for any single request @@ -975,7 +984,7 @@ get_ramfile(Ramfile &rfile) { // Description: //////////////////////////////////////////////////////////////////// Downloader::DownloadStatus:: -DownloadStatus(char *buffer, int first_byte, int last_byte, +DownloadStatus(char *buffer, int first_byte, int last_byte, int total_bytes, bool partial_content) { _first_line_complete = false; _header_is_complete = false; diff --git a/panda/src/downloader/downloader.h b/panda/src/downloader/downloader.h index 9d86fb716b..365220256a 100644 --- a/panda/src/downloader/downloader.h +++ b/panda/src/downloader/downloader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DOWNLOADER_H #define DOWNLOADER_H // @@ -102,7 +114,7 @@ private: PT(Buffer) _buffer; int _disk_write_frequency; float _frequency; - float _byte_rate; + float _byte_rate; ulong _receive_size; int _disk_buffer_size; ofstream _dest_stream; diff --git a/panda/src/downloader/extractor.I b/panda/src/downloader/extractor.I index 9dd52a3d57..36a39e9a57 100644 --- a/panda/src/downloader/extractor.I +++ b/panda/src/downloader/extractor.I @@ -2,13 +2,26 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "config_downloader.h" //////////////////////////////////////////////////////////////////// // Function: Extractor::get_progress // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float Extractor:: get_progress(void) const { diff --git a/panda/src/downloader/extractor.cxx b/panda/src/downloader/extractor.cxx index 8d8bae441e..2a1532fe4f 100644 --- a/panda/src/downloader/extractor.cxx +++ b/panda/src/downloader/extractor.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "extractor.h" #include "config_downloader.h" @@ -41,7 +50,7 @@ Extractor(PT(Buffer) buffer) { //////////////////////////////////////////////////////////////////// // Function: Extractor::Constructor -// Access: Private +// Access: Private // Description: //////////////////////////////////////////////////////////////////// void Extractor:: @@ -66,14 +75,14 @@ Extractor:: //////////////////////////////////////////////////////////////////// // Function: Extractor::initiate // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int Extractor:: initiate(Filename &source_file, const Filename &rel_path) { if (_initiated == true) { downloader_cat.error() - << "Extractor::initiate() - Extraction has already been initiated" + << "Extractor::initiate() - Extraction has already been initiated" << endl; return EU_error_abort; } @@ -83,10 +92,10 @@ initiate(Filename &source_file, const Filename &rel_path) { _source_file.set_binary(); if (!_source_file.open_read(_read_stream)) { downloader_cat.error() - << "Extractor::extract() - Error opening source file: " + << "Extractor::extract() - Error opening source file: " << _source_file << " : " << strerror(errno) << endl; return get_write_error(); - } + } _rel_path = rel_path; @@ -105,14 +114,14 @@ initiate(Filename &source_file, const Filename &rel_path) { //////////////////////////////////////////////////////////////////// // Function: Extractor::cleanup -// Access: Private -// Description: +// Access: Private +// Description: //////////////////////////////////////////////////////////////////// void Extractor:: cleanup(void) { if (_initiated == false) { downloader_cat.error() - << "Extractor::cleanup() - Extraction has not been initiated" + << "Extractor::cleanup() - Extraction has not been initiated" << endl; return; } @@ -127,13 +136,13 @@ cleanup(void) { //////////////////////////////////////////////////////////////////// // Function: Extractor::run // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int Extractor:: run(void) { if (_initiated == false) { downloader_cat.error() - << "Extractor::run() - Extraction has not been initiated" + << "Extractor::run() - Extraction has not been initiated" << endl; return EU_error_abort; } @@ -169,7 +178,7 @@ run(void) { //////////////////////////////////////////////////////////////////// // Function: Extractor::extract // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool Extractor:: extract(Filename &source_file, const Filename &rel_path) { diff --git a/panda/src/downloader/extractor.h b/panda/src/downloader/extractor.h index ecd5f3d8c8..8079991aa6 100644 --- a/panda/src/downloader/extractor.h +++ b/panda/src/downloader/extractor.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EXTRACTOR_H #define EXTRACTOR_H // @@ -16,7 +28,7 @@ #include //////////////////////////////////////////////////////////////////// -// Class : Extractor +// Class : Extractor // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS Extractor { diff --git a/panda/src/downloader/multiplexStream.I b/panda/src/downloader/multiplexStream.I index 1d8461d14b..42b025d8f1 100644 --- a/panda/src/downloader/multiplexStream.I +++ b/panda/src/downloader/multiplexStream.I @@ -1,15 +1,28 @@ // Filename: multiplexStream.I // Created by: drose (27Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: MultiplexStream::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MultiplexStream:: -MultiplexStream() : ostream(&_msb) { +MultiplexStream() : ostream(&_msb) { setf(ios::unitbuf); } @@ -22,7 +35,7 @@ MultiplexStream() : ostream(&_msb) { //////////////////////////////////////////////////////////////////// INLINE void MultiplexStream:: add_ostream(ostream *out, bool delete_later) { - _msb.add_output(MultiplexStreamBuf::BT_none, + _msb.add_output(MultiplexStreamBuf::BT_none, MultiplexStreamBuf::OT_ostream, out, NULL, delete_later); } @@ -35,7 +48,7 @@ add_ostream(ostream *out, bool delete_later) { //////////////////////////////////////////////////////////////////// INLINE bool MultiplexStream:: add_stdio_file(FILE *fout, bool close_when_done) { - _msb.add_output(MultiplexStreamBuf::BT_line, + _msb.add_output(MultiplexStreamBuf::BT_line, MultiplexStreamBuf::OT_ostream, NULL, fout, close_when_done); return true; @@ -48,7 +61,7 @@ add_stdio_file(FILE *fout, bool close_when_done) { //////////////////////////////////////////////////////////////////// INLINE void MultiplexStream:: add_standard_output() { - _msb.add_output(MultiplexStreamBuf::BT_none, + _msb.add_output(MultiplexStreamBuf::BT_none, MultiplexStreamBuf::OT_ostream, &cout, NULL, false); } @@ -70,7 +83,7 @@ add_file(Filename file) { } out->setf(ios::unitbuf); - _msb.add_output(MultiplexStreamBuf::BT_line, + _msb.add_output(MultiplexStreamBuf::BT_line, MultiplexStreamBuf::OT_ostream, out, NULL, true); return true; @@ -89,7 +102,7 @@ add_file(Filename file) { //////////////////////////////////////////////////////////////////// INLINE void MultiplexStream:: add_system_debug() { - _msb.add_output(MultiplexStreamBuf::BT_line, + _msb.add_output(MultiplexStreamBuf::BT_line, MultiplexStreamBuf::OT_system_debug); } diff --git a/panda/src/downloader/multiplexStream.cxx b/panda/src/downloader/multiplexStream.cxx index 0b60b31c7b..8af771afb0 100644 --- a/panda/src/downloader/multiplexStream.cxx +++ b/panda/src/downloader/multiplexStream.cxx @@ -1,6 +1,19 @@ // Filename: multiplexStream.cxx // Created by: drose (27Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "multiplexStream.h" diff --git a/panda/src/downloader/multiplexStream.h b/panda/src/downloader/multiplexStream.h index e355f47693..0728b061dc 100644 --- a/panda/src/downloader/multiplexStream.h +++ b/panda/src/downloader/multiplexStream.h @@ -1,6 +1,19 @@ // Filename: multiplexStream.h // Created by: drose (27Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MULTIPLEXSTREAM_H diff --git a/panda/src/downloader/multiplexStreamBuf.I b/panda/src/downloader/multiplexStreamBuf.I index 839ae655dd..65fd9bf50b 100644 --- a/panda/src/downloader/multiplexStreamBuf.I +++ b/panda/src/downloader/multiplexStreamBuf.I @@ -1,5 +1,18 @@ // Filename: multiplexStreamBuf.I // Created by: drose (27Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/downloader/multiplexStreamBuf.cxx b/panda/src/downloader/multiplexStreamBuf.cxx index 4da2f70c44..4e0f180330 100644 --- a/panda/src/downloader/multiplexStreamBuf.cxx +++ b/panda/src/downloader/multiplexStreamBuf.cxx @@ -1,6 +1,19 @@ // Filename: multiplexStreamBuf.cxx // Created by: drose (27Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "multiplexStreamBuf.h" @@ -78,7 +91,7 @@ write_string(const string &str) { //////////////////////////////////////////////////////////////////// // Function: MultiplexStreamBuf::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// MultiplexStreamBuf:: MultiplexStreamBuf() { @@ -93,7 +106,7 @@ MultiplexStreamBuf() { //////////////////////////////////////////////////////////////////// // Function: MultiplexStreamBuf::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// MultiplexStreamBuf:: ~MultiplexStreamBuf() { @@ -155,7 +168,7 @@ flush() { // internal buffer is filled, plus one character. //////////////////////////////////////////////////////////////////// int MultiplexStreamBuf:: -overflow(int ch) { +overflow(int ch) { #ifdef HAVE_IPC mutex_lock m(_lock); #endif @@ -184,7 +197,7 @@ overflow(int ch) { // destruction). //////////////////////////////////////////////////////////////////// int MultiplexStreamBuf:: -sync() { +sync() { #ifdef HAVE_IPC mutex_lock m(_lock); #endif @@ -256,5 +269,5 @@ write_chars(const char *start, int length, bool flush) { break; } } - + } diff --git a/panda/src/downloader/multiplexStreamBuf.h b/panda/src/downloader/multiplexStreamBuf.h index 4ab2f76b70..545ee4a07e 100644 --- a/panda/src/downloader/multiplexStreamBuf.h +++ b/panda/src/downloader/multiplexStreamBuf.h @@ -1,6 +1,19 @@ // Filename: multiplexStreamBuf.h // Created by: drose (27Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MULTIPLEXSTREAMBUF_H @@ -38,8 +51,8 @@ public: }; void add_output(BufferType buffer_type, OutputType output_type, - ostream *out = (ostream *)NULL, - FILE *fout = (FILE *)NULL, + ostream *out = (ostream *)NULL, + FILE *fout = (FILE *)NULL, bool owns_obj = false); void flush(); diff --git a/panda/src/downloader/patcher.I b/panda/src/downloader/patcher.I index f7d2fd20b6..36710ba956 100644 --- a/panda/src/downloader/patcher.I +++ b/panda/src/downloader/patcher.I @@ -2,6 +2,19 @@ // Created by: darren (20Dec00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Patcher::get_progress diff --git a/panda/src/downloader/patcher.cxx b/panda/src/downloader/patcher.cxx index be185a9004..f673f4c0db 100644 --- a/panda/src/downloader/patcher.cxx +++ b/panda/src/downloader/patcher.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "patcher.h" #include "config_downloader.h" diff --git a/panda/src/downloader/patcher.h b/panda/src/downloader/patcher.h index 6e172febc6..c3058b9ebd 100644 --- a/panda/src/downloader/patcher.h +++ b/panda/src/downloader/patcher.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PATCHER_H #define PATCHER_H // diff --git a/panda/src/downloader/zcompressor.I b/panda/src/downloader/zcompressor.I index 19d09c7feb..7d248d9624 100644 --- a/panda/src/downloader/zcompressor.I +++ b/panda/src/downloader/zcompressor.I @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ZCompressorBase::get_total_in @@ -40,10 +53,10 @@ reset(void) { //////////////////////////////////////////////////////////////////// INLINE void ZCompressorBase:: reset_stream(z_stream *strm) const { - strm->next_in = Z_NULL; + strm->next_in = Z_NULL; strm->avail_in = 0; strm->total_in = 0; - strm->next_out = Z_NULL; + strm->next_out = Z_NULL; strm->avail_out = 0; strm->total_out = 0; strm->zalloc = Z_NULL; @@ -58,7 +71,7 @@ reset_stream(z_stream *strm) const { // Description: //////////////////////////////////////////////////////////////////// INLINE void ZCompressorBase:: -put_stream(z_stream *strm, char *next_in, int avail_in, char *next_out, +put_stream(z_stream *strm, char *next_in, int avail_in, char *next_out, int avail_out) const { strm->next_in = (uchar *)next_in; strm->avail_in = (ulong)avail_in; diff --git a/panda/src/downloader/zcompressor.cxx b/panda/src/downloader/zcompressor.cxx index 2dfc1aa5e4..5a8fb93534 100644 --- a/panda/src/downloader/zcompressor.cxx +++ b/panda/src/downloader/zcompressor.cxx @@ -1,7 +1,20 @@ -/// Filename: zcompressor.cxx +// Filename: zcompressor.cxx // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// // This file is compiled only if we have zlib installed. @@ -70,8 +83,8 @@ compress(char *&next_in, int &avail_in, char *&next_out, int &avail_out, //////////////////////////////////////////////////////////////////// int ZCompressor:: compress_to_stream(char *&next_in, int &avail_in, char *&next_out, - int &avail_out, char *out_buffer, - int out_buffer_length, ofstream &write_stream, + int &avail_out, char *out_buffer, + int out_buffer_length, ofstream &write_stream, bool finish) { int ret = compress(next_in, avail_in, next_out, avail_out, finish); if (ret == S_error) @@ -118,7 +131,7 @@ ZDecompressor:: //////////////////////////////////////////////////////////////////// // Function: ZDecompressor::decompress // Access: Public -// Description: Decompress from next_in into next_out until avail_in +// Description: Decompress from next_in into next_out until avail_in // is 0 or avail_out is 0 or an error occurs. //////////////////////////////////////////////////////////////////// int ZDecompressor:: @@ -137,12 +150,12 @@ decompress(char *&next_in, int &avail_in, char *&next_out, int &avail_out, //////////////////////////////////////////////////////////////////// // Function: ZDecompressor::decompress_to_stream // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ZDecompressor:: decompress_to_stream(char *&next_in, int &avail_in, char *&next_out, - int &avail_out, char *out_buffer, - int out_buffer_length, ostream &write_stream, + int &avail_out, char *out_buffer, + int out_buffer_length, ostream &write_stream, bool finish) { int ret = decompress(next_in, avail_in, next_out, avail_out, finish); if (ret == S_error) diff --git a/panda/src/downloader/zcompressor.h b/panda/src/downloader/zcompressor.h index a463fcd70d..85e6b7aa24 100644 --- a/panda/src/downloader/zcompressor.h +++ b/panda/src/downloader/zcompressor.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ZCOMPRESSOR_H #define ZCOMPRESSOR_H // @@ -14,7 +26,7 @@ #include "typedef.h" //////////////////////////////////////////////////////////////////// -// Class : ZCompressorBase +// Class : ZCompressorBase // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS ZCompressorBase { @@ -31,9 +43,9 @@ public: INLINE void reset_stream(z_stream *strm) const; #ifndef CPPPARSER INLINE void put_stream(z_stream *strm, char *next_in, int avail_in, - char *next_out, int avail_out) const; + char *next_out, int avail_out) const; INLINE void get_stream(z_stream *strm, char *&next_in, int &avail_in, - char *&next_out, int &avail_out) const; + char *&next_out, int &avail_out) const; #endif int handle_zerror(int code, const z_stream *strm = NULL) const; @@ -42,7 +54,7 @@ protected: }; //////////////////////////////////////////////////////////////////// -// Class : ZCompressor +// Class : ZCompressor // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS ZCompressor : public ZCompressorBase { @@ -59,14 +71,14 @@ public: //////////////////////////////////////////////////////////////////// // Class : ZDecompressor -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS ZDecompressor : public ZCompressorBase { public: ZDecompressor(void); ~ZDecompressor(void); - int decompress(char *&next_in, int &avail_in, char *&next_out, + int decompress(char *&next_in, int &avail_in, char *&next_out, int &avail_out, bool finish = false); int decompress_to_stream(char *&next_in, int &avail_in, char *&next_out, int &avail_out, char *out_buffer, int out_buffer_length, diff --git a/panda/src/downloadertools/apply_patch.cxx b/panda/src/downloadertools/apply_patch.cxx index c7acff9d4b..28a10f460f 100644 --- a/panda/src/downloadertools/apply_patch.cxx +++ b/panda/src/downloadertools/apply_patch.cxx @@ -1,3 +1,21 @@ +// Filename: apply_patch.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #ifndef HAVE_GETOPT #include diff --git a/panda/src/downloadertools/build_patch.cxx b/panda/src/downloadertools/build_patch.cxx index d0c3c91efa..081e3186f9 100644 --- a/panda/src/downloadertools/build_patch.cxx +++ b/panda/src/downloadertools/build_patch.cxx @@ -1,3 +1,21 @@ +// Filename: build_patch.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #ifndef HAVE_GETOPT #include diff --git a/panda/src/downloadertools/check_adler.cxx b/panda/src/downloadertools/check_adler.cxx index ffcab1c1e6..c4bd19173b 100644 --- a/panda/src/downloadertools/check_adler.cxx +++ b/panda/src/downloadertools/check_adler.cxx @@ -1,6 +1,24 @@ +// Filename: check_adler.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include -int +int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Usage: check_adler " << endl; diff --git a/panda/src/downloadertools/check_crc.cxx b/panda/src/downloadertools/check_crc.cxx index 33de2ce7f8..199a285bb0 100644 --- a/panda/src/downloadertools/check_crc.cxx +++ b/panda/src/downloadertools/check_crc.cxx @@ -1,6 +1,24 @@ +// Filename: check_crc.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include -int +int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Usage: check_crc " << endl; diff --git a/panda/src/downloadertools/check_md5.cxx b/panda/src/downloadertools/check_md5.cxx index 83926987a1..d720978868 100644 --- a/panda/src/downloadertools/check_md5.cxx +++ b/panda/src/downloadertools/check_md5.cxx @@ -1,7 +1,25 @@ +// Filename: check_md5.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include -int +int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Usage: check_md5 " << endl; diff --git a/panda/src/downloadertools/multify.cxx b/panda/src/downloadertools/multify.cxx index 86a2c27d7a..9dc61c041e 100644 --- a/panda/src/downloadertools/multify.cxx +++ b/panda/src/downloadertools/multify.cxx @@ -1,3 +1,21 @@ +// Filename: multify.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #ifndef HAVE_GETOPT #include @@ -40,7 +58,7 @@ main(int argc, char *argv[]) { default: cerr << "Unhandled switch: " << flag << endl; break; - } + } flag = getopt(argc, argv, "xcvr:"); } argc -= (optind - 1); diff --git a/panda/src/downloadertools/pcompress.cxx b/panda/src/downloadertools/pcompress.cxx index 0540fbe804..d38f1e2ae8 100644 --- a/panda/src/downloadertools/pcompress.cxx +++ b/panda/src/downloadertools/pcompress.cxx @@ -1,8 +1,26 @@ +// Filename: pcompress.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include -int +int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Usage: pcompress " << endl; @@ -101,6 +119,6 @@ main(int argc, char *argv[]) { read_stream.close(); write_stream.close(); source_file.unlink(); - + return 1; } diff --git a/panda/src/downloadertools/pdecompress.cxx b/panda/src/downloadertools/pdecompress.cxx index 645b8ca569..e06a9257ec 100644 --- a/panda/src/downloadertools/pdecompress.cxx +++ b/panda/src/downloadertools/pdecompress.cxx @@ -1,8 +1,26 @@ +// Filename: pdecompress.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include -int +int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Usage: pdecompress " << endl; diff --git a/panda/src/downloadertools/test_downloader.cxx b/panda/src/downloadertools/test_downloader.cxx index 2229de18c7..7d80a9798a 100644 --- a/panda/src/downloadertools/test_downloader.cxx +++ b/panda/src/downloadertools/test_downloader.cxx @@ -1,3 +1,21 @@ +// Filename: test_downloader.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include diff --git a/panda/src/dxgsg/config_dxgsg.cxx b/panda/src/dxgsg/config_dxgsg.cxx index 3d2cdb9f1b..ac09d47ff1 100644 --- a/panda/src/dxgsg/config_dxgsg.cxx +++ b/panda/src/dxgsg/config_dxgsg.cxx @@ -1,5 +1,20 @@ // Filename: config_dxgsg.cxx // Created by: drose (06Oct99) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "config_dxgsg.h" #include "dxGraphicsStateGuardian.h" @@ -16,7 +31,7 @@ NotifyCategoryDef(dxgsg, ":display:gsg"); // cannot be enabled when the player is compiled in NDEBUG mode. bool dx_show_transforms = config_dxgsg.GetBool("dx-show-transforms", false); -// Configure this to TRUE if you want DirectX to control the entire screen, +// Configure this to TRUE if you want DirectX to control the entire screen, // If false, it will just blit into a window. bool dx_full_screen = config_dxgsg.GetBool("dx-full-screen", false); diff --git a/panda/src/dxgsg/config_dxgsg.h b/panda/src/dxgsg/config_dxgsg.h index 5534481e39..22de332e10 100644 --- a/panda/src/dxgsg/config_dxgsg.h +++ b/panda/src/dxgsg/config_dxgsg.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_DXGSG_H #define CONFIG_DXGSG_H diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.I b/panda/src/dxgsg/dxGraphicsStateGuardian.I index 0c2ea21950..605b4bb170 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.I +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.I @@ -1,6 +1,19 @@ // Filename: dxGraphicsStateGuardian.I // Created by: mike (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_dxgsg.h" @@ -32,7 +45,7 @@ set_pack_alignment(int alignment) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::set_unpack_alignment // Access: -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DXGraphicsStateGuardian:: set_unpack_alignment(int alignment) { @@ -61,15 +74,15 @@ enable_multisample(bool val) { //////////////////////////////////////////////////////////////////// INLINE void DXGraphicsStateGuardian:: enable_line_smooth(bool val) { - if(_line_smooth_enabled != val) { + if(_line_smooth_enabled != val) { _line_smooth_enabled = val; #ifdef NDEBUG { - if(val && (_D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES)) + if(val && (_D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES)) dxgsg_cat.error() << "no HW support for line smoothing!!\n"; } #endif - + _d3dDevice->SetRenderState(D3DRENDERSTATE_EDGEANTIALIAS, (DWORD)val); } } @@ -95,7 +108,7 @@ enable_point_smooth(bool val) { //////////////////////////////////////////////////////////////////// INLINE void DXGraphicsStateGuardian:: enable_lighting(bool val) { - if (_lighting_enabled != val) { + if (_lighting_enabled != val) { _d3dDevice->SetRenderState(D3DRENDERSTATE_LIGHTING, (DWORD)val); if(_lighting_enabled = val) _lighting_enabled_this_frame = true; @@ -114,11 +127,11 @@ enable_dither(bool val) { #ifdef NDEBUG { - if(val && (_D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_DITHER)) + if(val && (_D3DDevDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_DITHER)) dxgsg_cat.error() << "no HW support for color dithering!!\n"; } #endif - + _d3dDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, (DWORD)val); } } @@ -154,16 +167,16 @@ enable_color_material(bool val) { // Description: //////////////////////////////////////////////////////////////////// INLINE void DXGraphicsStateGuardian:: -enable_clip_plane(int clip_plane, bool val) +enable_clip_plane(int clip_plane, bool val) { - if (_clip_plane_enabled[clip_plane] != val) + if (_clip_plane_enabled[clip_plane] != val) { _clip_plane_enabled[clip_plane] = val; DWORD ClipPlaneBits; _d3dDevice->GetRenderState(D3DRENDERSTATE_CLIPPLANEENABLE , &ClipPlaneBits); if (val) ClipPlaneBits |= 1 << clip_plane; - else + else ClipPlaneBits &= ~(1 << clip_plane); _d3dDevice->SetRenderState(D3DRENDERSTATE_CLIPPLANEENABLE , ClipPlaneBits); } @@ -240,7 +253,7 @@ enable_fog(bool val) { // Description: //////////////////////////////////////////////////////////////////// INLINE void DXGraphicsStateGuardian:: -enable_alpha_test(bool val ) +enable_alpha_test(bool val ) { if (_alpha_test_enabled != val) { _alpha_test_enabled = val; @@ -254,7 +267,7 @@ enable_alpha_test(bool val ) // Description: //////////////////////////////////////////////////////////////////// INLINE void DXGraphicsStateGuardian:: -call_dxLightModelAmbient( const Colorf& color) +call_dxLightModelAmbient( const Colorf& color) { if (_lmodel_ambient != color) { _lmodel_ambient = color; @@ -262,7 +275,7 @@ call_dxLightModelAmbient( const Colorf& color) dxgsg_cat.debug() << "glLightModel(GL_LIGHT_MODEL_AMBIENT, " << color << ")" << endl; #endif - _d3dDevice->SetRenderState( D3DRENDERSTATE_AMBIENT, + _d3dDevice->SetRenderState( D3DRENDERSTATE_AMBIENT, D3DRGBA(color[0], color[1], color[2], color[3])); } } @@ -274,7 +287,7 @@ call_dxLightModelAmbient( const Colorf& color) // Description: //////////////////////////////////////////////////////////////////// INLINE void DXGraphicsStateGuardian:: -call_dxAlphaFunc(D3DCMPFUNC func, DWORD ref) +call_dxAlphaFunc(D3DCMPFUNC func, DWORD ref) { if (_alpha_func != func || _alpha_func_ref != ref) { _alpha_func = func; @@ -283,28 +296,28 @@ call_dxAlphaFunc(D3DCMPFUNC func, DWORD ref) dxgsg_cat.debug() << "glAlphaFunc("; switch (func) { case D3DCMP_NEVER: - dxgsg_cat.debug(false) << "D3DCMP_NEVER, "; + dxgsg_cat.debug(false) << "D3DCMP_NEVER, "; break; case D3DCMP_LESS: - dxgsg_cat.debug(false) << "D3DCMP_LESS, "; + dxgsg_cat.debug(false) << "D3DCMP_LESS, "; break; case D3DCMP_EQUAL: - dxgsg_cat.debug(false) << "D3DCMP_EQUAL, "; + dxgsg_cat.debug(false) << "D3DCMP_EQUAL, "; break; case D3DCMP_LEQUAL: - dxgsg_cat.debug(false) << "D3DCMP_LEQUAL, "; + dxgsg_cat.debug(false) << "D3DCMP_LEQUAL, "; break; case D3DCMP_GREATER: - dxgsg_cat.debug(false) << "D3DCMP_GREATER, "; + dxgsg_cat.debug(false) << "D3DCMP_GREATER, "; break; case D3DCMP_NOTEQUAL: - dxgsg_cat.debug(false) << "D3DCMP_NOTEQUAL, "; + dxgsg_cat.debug(false) << "D3DCMP_NOTEQUAL, "; break; case D3DCMP_GEQUAL: - dxgsg_cat.debug(false) << "D3DCMP_GEQUAL, "; + dxgsg_cat.debug(false) << "D3DCMP_GEQUAL, "; break; case D3DCMP_ALWAYS: - dxgsg_cat.debug(false) << "D3DCMP_ALWAYS, "; + dxgsg_cat.debug(false) << "D3DCMP_ALWAYS, "; break; } dxgsg_cat.debug() << ref << ")" << endl; @@ -316,7 +329,7 @@ call_dxAlphaFunc(D3DCMPFUNC func, DWORD ref) INLINE void DXGraphicsStateGuardian:: -call_dxBlendFunc(D3DBLEND sfunc, D3DBLEND dfunc ) +call_dxBlendFunc(D3DBLEND sfunc, D3DBLEND dfunc ) { if (_blend_source_func != sfunc) { @@ -324,76 +337,76 @@ call_dxBlendFunc(D3DBLEND sfunc, D3DBLEND dfunc ) _d3dDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, sfunc); #ifdef GSG_VERBOSE dxgsg_cat.debug() << "dxSrcBlendFunc("; - switch (sfunc) + switch (sfunc) { case D3DBLEND_ZERO: - dxgsg_cat.debug(false) << "ZERO, "; + dxgsg_cat.debug(false) << "ZERO, "; break; case D3DBLEND_ONE: - dxgsg_cat.debug(false) << "ONE, "; + dxgsg_cat.debug(false) << "ONE, "; break; case D3DBLEND_DESTCOLOR: - dxgsg_cat.debug(false) << "DESTCOLOR, "; + dxgsg_cat.debug(false) << "DESTCOLOR, "; break; case D3DBLEND_INVDESTCOLOR: - dxgsg_cat.debug(false) << "INVDESTCOLOR, "; + dxgsg_cat.debug(false) << "INVDESTCOLOR, "; break; case D3DBLEND_SRCALPHA: - dxgsg_cat.debug(false) << "SRCALPHA, "; + dxgsg_cat.debug(false) << "SRCALPHA, "; break; case D3DBLEND_INVSRCALPHA: - dxgsg_cat.debug(false) << "INVSRCALPHA, "; + dxgsg_cat.debug(false) << "INVSRCALPHA, "; break; case D3DBLEND_DESTALPHA: - dxgsg_cat.debug(false) << "DESTALPHA, "; + dxgsg_cat.debug(false) << "DESTALPHA, "; break; case D3DBLEND_INVDESTALPHA: - dxgsg_cat.debug(false) << "INVDESTALPHA, "; + dxgsg_cat.debug(false) << "INVDESTALPHA, "; break; case D3DBLEND_SRCALPHASAT: - dxgsg_cat.debug(false) << "SRCALPHASAT, "; + dxgsg_cat.debug(false) << "SRCALPHASAT, "; break; default: - dxgsg_cat.debug(false) << "unknown, "; + dxgsg_cat.debug(false) << "unknown, "; break; } dxgsg_cat.debug(false) << endl; #endif } - if ( _blend_dest_func != dfunc) + if ( _blend_dest_func != dfunc) { _blend_dest_func = dfunc; _d3dDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, dfunc); #ifdef GSG_VERBOSE dxgsg_cat.debug() << "dxDstBlendFunc("; - switch (dfunc) + switch (dfunc) { case D3DBLEND_ZERO: - dxgsg_cat.debug(false) << "ZERO, "; + dxgsg_cat.debug(false) << "ZERO, "; break; case D3DBLEND_ONE: - dxgsg_cat.debug(false) << "ONE, "; + dxgsg_cat.debug(false) << "ONE, "; break; case D3DBLEND_DESTCOLOR: - dxgsg_cat.debug(false) << "DESTCOLOR, "; + dxgsg_cat.debug(false) << "DESTCOLOR, "; break; case D3DBLEND_INVDESTCOLOR: - dxgsg_cat.debug(false) << "INVDESTCOLOR, "; + dxgsg_cat.debug(false) << "INVDESTCOLOR, "; break; case D3DBLEND_SRCALPHA: - dxgsg_cat.debug(false) << "SRCALPHA, "; + dxgsg_cat.debug(false) << "SRCALPHA, "; break; case D3DBLEND_INVSRCALPHA: - dxgsg_cat.debug(false) << "INVSRCALPHA, "; + dxgsg_cat.debug(false) << "INVSRCALPHA, "; break; case D3DBLEND_DESTALPHA: - dxgsg_cat.debug(false) << "DESTALPHA, "; + dxgsg_cat.debug(false) << "DESTALPHA, "; break; case D3DBLEND_INVDESTALPHA: - dxgsg_cat.debug(false) << "INVDESTALPHA, "; + dxgsg_cat.debug(false) << "INVDESTALPHA, "; break; case D3DBLEND_SRCALPHASAT: - dxgsg_cat.debug(false) << "SRCALPHASAT, "; + dxgsg_cat.debug(false) << "SRCALPHASAT, "; break; } dxgsg_cat.debug(false) << endl; diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index 5663e25e2b..cdeedbaaa7 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -1,6 +1,19 @@ // Filename: dxGraphicsStateGuardian.cxx // Created by: mike (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -76,7 +89,7 @@ //#define PRINT_TEXSTATS //const int VERT_BUFFER_SIZE = (8*1024L); -// For sparkle particles, we can have 4 vertices per sparkle, and a +// For sparkle particles, we can have 4 vertices per sparkle, and a // particle pool size of 1024 particles const int VERT_BUFFER_SIZE = (32*6*1024L); @@ -106,7 +119,7 @@ static D3DMATRIX matIdentity; //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DXGraphicsStateGuardian:: DXGraphicsStateGuardian(GraphicsWindow *win) : GraphicsStateGuardian(win) { @@ -155,7 +168,7 @@ DXGraphicsStateGuardian(GraphicsWindow *win) : GraphicsStateGuardian(win) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DXGraphicsStateGuardian:: ~DXGraphicsStateGuardian() { @@ -181,12 +194,12 @@ reset() { GraphicsStateGuardian::reset(); _buffer_mask = 0; - // All implementations have the following buffers. + // All implementations have the following buffers. _buffer_mask = (RenderBuffer::T_color | RenderBuffer::T_depth | - RenderBuffer::T_back + RenderBuffer::T_back // RenderBuffer::T_stencil | -// RenderBuffer::T_accum +// RenderBuffer::T_accum ); _current_projection_mat = LMatrix4f::ident_mat(); @@ -198,15 +211,15 @@ reset() { // Set up our clear values to invalid values, so the glClear* calls // will be made initially. - _clear_color_red = -1.0f; + _clear_color_red = -1.0f; _clear_color_green = -1.0f; - _clear_color_blue = -1.0f; + _clear_color_blue = -1.0f; _clear_color_alpha = -1.0f; _clear_depth = -1.0f; _clear_stencil = -1; _clear_accum_red = -1.0f; _clear_accum_green = -1.0f; - _clear_accum_blue = -1.0f; + _clear_accum_blue = -1.0f; _clear_accum_alpha = -1.0f; _line_width = 1.0f; _point_size = 1.0f; @@ -252,7 +265,7 @@ HRESULT CALLBACK EnumTexFmtsCallback( LPDDPIXELFORMAT pddpf, VOID* param ) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::reset // Access: Public, Virtual -// Description: Handles initialization which assumes that DX has already been +// Description: Handles initialization which assumes that DX has already been // set up. //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: @@ -312,7 +325,7 @@ init_dx( LPDIRECTDRAW7 context, #if(DIRECT3D_VERSION < 0x700) dx_decal_type = GDT_mask; #else - dx_decal_type = GDT_blend; + dx_decal_type = GDT_blend; #endif } @@ -324,7 +337,7 @@ init_dx( LPDIRECTDRAW7 context, #if(DIRECT3D_VERSION < 0x700) dx_decal_type = GDT_mask; #else - dx_decal_type = GDT_blend; + dx_decal_type = GDT_blend; #endif #endif @@ -505,7 +518,7 @@ clear(const RenderBuffer &buffer) { dxgsg_cat.error() << "dxGSG::clear_buffer failed: Clear returned " << ConvD3DErrorToString(hr) << endl; /* The following line will cause the background to always clear to a medium red - _color_clear_value[0] = .5; + _color_clear_value[0] = .5; /* The following lines will cause the background color to cycle from black to red. _color_clear_value[0] += .001; if (_color_clear_value[0] > 1.0f) _color_clear_value[0] = 0.0f; @@ -571,9 +584,9 @@ prepare_display_region() { GLsizei width = GLsizei(w); GLsizei height = GLsizei(h); #ifdef WBD_GL_MODE - call_glScissor( x, y, width, height ); + call_glScissor( x, y, width, height ); call_glViewport( x, y, width, height ); -#else +#else if ( _scissor_x != x || _scissor_y != y || _scissor_width != width || _scissor_height != height ) { @@ -591,7 +604,7 @@ prepare_display_region() { //////////////////////////////////////////////////////////////////// -// Function: set_clipper +// Function: set_clipper // Access: // Description: Useless in DX at the present time //////////////////////////////////////////////////////////////////// @@ -607,7 +620,7 @@ void DXGraphicsStateGuardian::set_clipper(RECT cliprect) { /* The cliprect we receive is normalized so that (0,0) means the upper left of the client portion of the window. At least, I think that's true, and the following code assumes that. - So we must adjust the clip region by offsetting it to the origin of the + So we must adjust the clip region by offsetting it to the origin of the view rectangle. */ clip_rect = cliprect; // store the normalized clip rect @@ -678,7 +691,7 @@ render_frame(const AllAttributesWrapper &initial_state) { if (_clear_buffer_type != 0) { // First, clear the entire window. - PT(DisplayRegion) win_dr = + PT(DisplayRegion) win_dr = _win->make_scratch_display_region(_win->get_width(), _win->get_height()); clear(get_render_buffer(_clear_buffer_type), win_dr); } @@ -699,7 +712,7 @@ render_frame(const AllAttributesWrapper &initial_state) { Camera *cam = dr->get_camera(); // For each display region, render from the camera's view. - if (dr->is_active() && cam != (Camera *)NULL && + if (dr->is_active() && cam != (Camera *)NULL && cam->is_active() && cam->get_scene() != (Node *)NULL) { DisplayRegionStack old_dr = push_display_region(dr); prepare_display_region(); @@ -707,11 +720,11 @@ render_frame(const AllAttributesWrapper &initial_state) { pop_display_region(old_dr); } } - } // if (layer->is_active()) + } // if (layer->is_active()) } - } // if (chan->is_active()) + } // if (chan->is_active()) } - } // for (int c = 0; c < max_channel_index; c++) + } // for (int c = 0; c < max_channel_index; c++) // Now we're done with the frame processing. Clean up. @@ -738,7 +751,7 @@ render_frame(const AllAttributesWrapper &initial_state) { // ideal--there may be a better way. Maybe if the lights were just // more aware of whether their parameters or positions have changed // at all? - } + } if(dx_show_fps_meter) { PStatTimer timer(_win->_show_fps_pcollector); @@ -774,7 +787,7 @@ render_frame(const AllAttributesWrapper &initial_state) { _cur_frame_count++; // only used by fps meter right now } - _win->end_frame(); + _win->end_frame(); show_frame(); @@ -861,7 +874,7 @@ report_texmgr_stats() { ZeroMemory(&tminfo, sizeof(tminfo)); hr = _d3dDevice->GetInfo(D3DDEVINFOID_TEXTUREMANAGER, &tminfo, sizeof(tminfo)); - + // Quietly ignore an error in GetInfo(). if (hr == D3D_OK) { _texmgrmem_total_pcollector.set_level(tminfo.dwTotalBytes); @@ -884,7 +897,7 @@ render_scene(Node *root, ProjectionNode *projnode, #ifdef GSG_VERBOSE _pass_number = 0; dxgsg_cat.debug() - << "begin scene - - - - - - - - - - - - - - - - - - - - - - - - -" + << "begin scene - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif _current_root_node = root; @@ -894,7 +907,7 @@ render_scene(Node *root, ProjectionNode *projnode, #ifdef GSG_VERBOSE dxgsg_cat.debug() - << "done scene - - - - - - - - - - - - - - - - - - - - - - - - -" + << "done scene - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif } @@ -918,7 +931,7 @@ render_subgraph(RenderTraverser *traverser, LMatrix4f old_projection_mat = _current_projection_mat; // d3d is left-handed coord system - LMatrix4f projection_mat = + LMatrix4f projection_mat = projnode->get_projection()->get_projection_mat(CS_yup_left); #if 0 @@ -928,7 +941,7 @@ render_subgraph(RenderTraverser *traverser, _current_projection_mat = projection_mat; _projection_mat_stack_count++; -#ifdef _DEBUG +#ifdef _DEBUG { static bool bPrintedMsg=false; @@ -945,7 +958,7 @@ render_subgraph(RenderTraverser *traverser, #endif // We load the projection matrix directly. - HRESULT res = + HRESULT res = _d3dDevice->SetTransform(D3DTRANSFORMSTATE_PROJECTION, (LPD3DMATRIX) _current_projection_mat.get_data()); @@ -958,7 +971,7 @@ render_subgraph(RenderTraverser *traverser, if (_coordinate_system != CS_yup_left) { // Now we build the coordinate system conversion into the // modelview matrix (as described in the paragraph above). - modelview_mat = modelview_mat * + modelview_mat = modelview_mat * LMatrix4f::convert_mat(_coordinate_system, CS_yup_left); } @@ -992,12 +1005,12 @@ render_subgraph(RenderTraverser *traverser, // render process. //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: -render_subgraph(RenderTraverser *traverser, Node *subgraph, +render_subgraph(RenderTraverser *traverser, Node *subgraph, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans) { #ifdef GSG_VERBOSE dxgsg_cat.debug() - << "begin subgraph (pass " << ++_pass_number + << "begin subgraph (pass " << ++_pass_number << ") - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif activate(); @@ -1007,8 +1020,8 @@ render_subgraph(RenderTraverser *traverser, Node *subgraph, #ifdef GSG_VERBOSE dxgsg_cat.debug() - << "end subgraph (pass " << _pass_number - << ") - - - - - - - - - - - - - - - - - - - - - - - - -" + << "end subgraph (pass " << _pass_number + << ") - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif } @@ -1091,14 +1104,14 @@ draw_prim_setup(const Geom *geom) { //////// - vi = geom->make_vertex_iterator(); - p_flags = D3DFVF_XYZ; - size_t vertex_size = sizeof(D3DVALUE) * 3; + vi = geom->make_vertex_iterator(); + p_flags = D3DFVF_XYZ; + size_t vertex_size = sizeof(D3DVALUE) * 3; if ((geom->get_binding(G_COLOR) != G_OFF) || _issued_color_enabled) { ci = geom->make_color_iterator(); - p_flags |= D3DFVF_DIFFUSE; - vertex_size += sizeof(D3DCOLOR); + p_flags |= D3DFVF_DIFFUSE; + vertex_size += sizeof(D3DCOLOR); if (geom->get_binding(G_COLOR) == G_OVERALL) { GET_NEXT_COLOR(); @@ -1114,8 +1127,8 @@ draw_prim_setup(const Geom *geom) { if (geom->get_binding(G_NORMAL) != G_OFF) { ni = geom->make_normal_iterator(); - p_flags |= D3DFVF_NORMAL; - vertex_size += sizeof(D3DVALUE) * 3; + p_flags |= D3DFVF_NORMAL; + vertex_size += sizeof(D3DVALUE) * 3; if (geom->get_binding(G_NORMAL) == G_OVERALL) p_normal = geom->get_next_normal(ni); // set overall normal if there is one @@ -1200,7 +1213,7 @@ draw_prim_inner_loop(int nVerts, const Geom *geom, DWORD perFlags) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_point // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_point(const GeomPoint *geom) { @@ -1313,7 +1326,7 @@ draw_point(const GeomPoint *geom) { dps_data.diffuse.dwStride = sizeof(D3DCOLOR); // Geom nodes store floats for colors, drawprim requires ARGB dwords - // BUGBUG: eventually this hack every-frame all-colors conversion needs + // BUGBUG: eventually this hack every-frame all-colors conversion needs // to be done only once as part of a vertex buffer if(_color_transform_enabled || _alpha_transform_enabled) { @@ -1322,7 +1335,7 @@ draw_point(const GeomPoint *geom) { transform_color(colors[i],RGBA_color); add_DWORD_to_FVFBuf(RGBA_color); } - } else + } else for (int i=0;iDrawPrimitive(D3DPT_LINELIST, p_flags, _pFvfBufBasePtr, nPrims*2, NULL); else { hr = _d3dDevice->DrawPrimitive(D3DPT_LINELIST, p_flags, _tmp_fvf, nPrims*2, NULL); @@ -1579,7 +1592,7 @@ draw_linestrip(const GeomLinestrip* geom) { // this class exists because an alpha sort is necessary for correct -// sprite rendering, and we can't simply sort the vertex arrays as +// sprite rendering, and we can't simply sort the vertex arrays as // each vertex may or may not have corresponding information in the // x/y texel-world-ratio and rotation arrays. typedef struct { @@ -1598,14 +1611,14 @@ public: // this struct exists because the STL can sort faster than i can. struct draw_sprite_vertex_less { - INLINE bool operator ()(const WrappedSpriteSortPtr& v0, + INLINE bool operator ()(const WrappedSpriteSortPtr& v0, const WrappedSpriteSortPtr& v1) const { return v0.z > v1.z; // reversed from gl } }; /* struct draw_sprite_vertex_less { - INLINE bool operator ()(const WrappedSprite& v0, + INLINE bool operator ()(const WrappedSprite& v0, const WrappedSprite& v1) const { return v0._v[2] > v1._v[2]; // reversed from gl } @@ -1615,7 +1628,7 @@ struct draw_sprite_vertex_less { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_sprite // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_sprite(const GeomSprite *geom) { @@ -1625,12 +1638,12 @@ draw_sprite(const GeomSprite *geom) { // of sprites all facing the screen. Performing the billboard math // for ~1000 sprites is way too slow. Ideally, we want one // matrix transformation that will handle everything, and this is - // just about what ends up happening. We're getting the front-facing + // just about what ends up happening. We're getting the front-facing // effect by setting up a new frustum (of the same z-depth as the // current one) that is very small in x and y. This way regularly // rendered triangles that might not be EXACTLY facing the camera // will certainly look close enough. Then, we transform to camera-space - // by hand and apply the inverse frustum to the transformed point. + // by hand and apply the inverse frustum to the transformed point. // For some cracked out reason, this actually works. @@ -1758,7 +1771,7 @@ draw_sprite(const GeomSprite *geom) { vector< WrappedSpriteSortPtr > sorted_sprite_vector; vector< WrappedSpriteSortPtr >::iterator sorted_vec_iter; - WrappedSprite *SpriteArray = new WrappedSprite[nprims]; + WrappedSprite *SpriteArray = new WrappedSprite[nprims]; //BUGBUG: could we use _fvfbuf for this to avoid perframe alloc? // alternately, alloc once when retained mode becomes available @@ -1828,7 +1841,7 @@ draw_sprite(const GeomSprite *geom) { if (color_overall == true) { GET_NEXT_COLOR(); CurColor = p_colr; - bDoColor = (p_colr != ~0); + bDoColor = (p_colr != ~0); } if (bDoColor) { @@ -1939,7 +1952,7 @@ draw_sprite(const GeomSprite *geom) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_polygon // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_polygon(const GeomPolygon *geom) { @@ -1959,7 +1972,7 @@ draw_polygon(const GeomPolygon *geom) { Geom *gp=dynamic_cast(geom); doesnt work draw_linestrip(gp); } -*/ +*/ draw_multitri(geom, D3DPT_TRIANGLEFAN); @@ -1980,7 +1993,7 @@ draw_polygon(const GeomPolygon *geom) { // If we have per-vertex colors or normals, we need smooth shading. // Otherwise we want flat shading for performance reasons. - if (geom->get_binding(G_COLOR) == G_PER_VERTEX || + if (geom->get_binding(G_COLOR) == G_PER_VERTEX || geom->get_binding(G_NORMAL) == G_PER_VERTEX) { call_glShadeModel(GL_SMOOTH); } else { @@ -1989,7 +2002,7 @@ draw_polygon(const GeomPolygon *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - issuer.issue_normal(G_OVERALL, ni); + issuer.issue_normal(G_OVERALL, ni); for (int i = 0; i < nprims; i++) { // Draw per primitive @@ -2020,7 +2033,7 @@ draw_polygon(const GeomPolygon *geom) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_tri // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_tri(const GeomTri *geom) { @@ -2137,7 +2150,7 @@ draw_tri(const GeomTri *geom) { #ifdef _DEBUG nassertv(geom->get_num_vertices_per_prim()==3); - nassertv( nPrims*dwVertsPerPrim*sizeof(D3DVECTOR) <= D3DMAXNUMVERTICES*sizeof(WORD)); + nassertv( nPrims*dwVertsPerPrim*sizeof(D3DVECTOR) <= D3DMAXNUMVERTICES*sizeof(WORD)); if (NormalBinding==G_PER_VERTEX) nassertv(norms.size()>=nPrims*dwVertsPerPrim); #endif @@ -2166,7 +2179,7 @@ draw_tri(const GeomTri *geom) { // copy the one global color in, set stride to 0 *pExpandedNormalArray=norms[0]; dps_data.normal.lpvData = (VOID*)pExpandedNormalArray; - dps_data.normal.dwStride = 0; + dps_data.normal.dwStride = 0; } } @@ -2201,7 +2214,7 @@ draw_tri(const GeomTri *geom) { // must use tmp array to expand per-prim info to per-vert info // Geom nodes store floats for colors, drawprim requires ARGB dwords - // BUGBUG: eventually this hack every-frame all-colors conversion needs + // BUGBUG: eventually this hack every-frame all-colors conversion needs // to be done only once as part of a vertex buffer if (NeededShadeMode!=D3DSHADE_FLAT) { @@ -2223,7 +2236,7 @@ draw_tri(const GeomTri *geom) { *(pOutColor+1) = newcolr; *(pOutColor+2) = newcolr; } - } + } } else { // dont write 2nd,3rd colors in output buffer, these are not used in flat shading // MAKE SURE ShadeMode never set to GOURAUD after this! @@ -2236,7 +2249,7 @@ draw_tri(const GeomTri *geom) { for (int i=0;iget_binding(G_COLOR) == G_PER_VERTEX || + if (geom->get_binding(G_COLOR) == G_PER_VERTEX || geom->get_binding(G_NORMAL) == G_PER_VERTEX) { call_glShadeModel(GL_SMOOTH); } else { @@ -2364,7 +2377,7 @@ draw_quad(const GeomQuad *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - issuer.issue_normal(G_OVERALL, ni); + issuer.issue_normal(G_OVERALL, ni); glBegin(GL_QUADS); @@ -2389,7 +2402,7 @@ draw_quad(const GeomQuad *geom) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_tristrip // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_tristrip(const GeomTristrip *geom) { @@ -2405,7 +2418,7 @@ draw_tristrip(const GeomTristrip *geom) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_trifan // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_trifan(const GeomTrifan *geom) { @@ -2525,7 +2538,7 @@ draw_multitri(const Geom *geom, D3DPRIMITIVETYPE trilisttype) { // handles first triangle strip/fan if (perComp & PER_COLOR) { GET_NEXT_COLOR(); - } + } if (perComp & PER_NORMAL) p_normal = geom->get_next_normal(ni); // set primitive normal if there is one. @@ -2574,7 +2587,7 @@ draw_multitri(const Geom *geom, D3DPRIMITIVETYPE trilisttype) { #ifdef _DEBUG nassertv(geom->get_num_more_vertices_than_components()==2); nassertv(NormalBinding!=G_PER_COMPONENT); // makes no sense, unimplementable for strips since normals always shared across tris - nassertv( cTotalVerts*sizeof(D3DVECTOR) <= D3DMAXNUMVERTICES*sizeof(WORD)); + nassertv( cTotalVerts*sizeof(D3DVECTOR) <= D3DMAXNUMVERTICES*sizeof(WORD)); if(NormalBinding==G_PER_VERTEX) nassertv(norms.size()>=cTotalVerts); #endif @@ -2604,7 +2617,7 @@ draw_multitri(const Geom *geom, D3DPRIMITIVETYPE trilisttype) { // copy the one global color in, set stride to 0 *pExpandedNormalArray=norms[0]; dps_data.normal.lpvData = (VOID*)pExpandedNormalArray; - dps_data.normal.dwStride = 0; + dps_data.normal.dwStride = 0; } } @@ -2729,7 +2742,7 @@ draw_multitri(const Geom *geom, D3DPRIMITIVETYPE trilisttype) { if(!(_color_transform_enabled || _alpha_transform_enabled)) { COMPONENT_COLOR_COPY_LOOPS(COLOR_CONVERT_COPY_STMT); - } else { + } else { COMPONENT_COLOR_COPY_LOOPS(COLOR_CONVERT_XFORM_STMT); } } else { @@ -2777,10 +2790,10 @@ draw_multitri(const Geom *geom, D3DPRIMITIVETYPE trilisttype) { hr = _d3dDevice->DrawPrimitiveStrided(trilisttype, fvf_flags, &dps_data, cCurNumStripVerts, NULL); TestDrawPrimFailure(DrawPrimStrided,hr,_pDD); - dps_data.position.lpvData = (VOID*)(((char*) dps_data.position.lpvData) + cCurNumStripVerts*dps_data.position.dwStride); + dps_data.position.lpvData = (VOID*)(((char*) dps_data.position.lpvData) + cCurNumStripVerts*dps_data.position.dwStride); dps_data.diffuse.lpvData = (VOID*)(((char*) dps_data.diffuse.lpvData) + cCurNumStripVerts*dps_data.diffuse.dwStride); - dps_data.normal.lpvData = (VOID*)(((char*) dps_data.normal.lpvData) + cCurNumStripVerts*dps_data.normal.dwStride); - dps_data.textureCoords[0].lpvData = (VOID*)(((char*) dps_data.textureCoords[0].lpvData) + cCurNumStripVerts*dps_data.textureCoords[0].dwStride); + dps_data.normal.lpvData = (VOID*)(((char*) dps_data.normal.lpvData) + cCurNumStripVerts*dps_data.normal.dwStride); + dps_data.textureCoords[0].lpvData = (VOID*)(((char*) dps_data.textureCoords[0].lpvData) + cCurNumStripVerts*dps_data.textureCoords[0].dwStride); } _pCurFvfBufPtr = NULL; @@ -2796,7 +2809,7 @@ draw_multitri(const Geom *geom, D3DPRIMITIVETYPE trilisttype) { void DXGraphicsStateGuardian:: GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, void *pIndexSpace,DWORD dwIndexSpaceByteSize, - D3DVECTOR *pCenter, float fRadius, + D3DVECTOR *pCenter, float fRadius, DWORD wNumRings, DWORD wNumSections, float sx, float sy, float sz, DWORD *pNumVertices,DWORD *pNumIndices,DWORD fvfFlags,DWORD dwVertSize) { @@ -2807,9 +2820,9 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, #define M_PI 3.1415926f // probably should get this from mathNumbers.h instead nassertv(wNumRings>=2 && wNumSections>=2); - wNumRings--; // wNumRings indicates number of vertex rings (not tri-rings). + wNumRings--; // wNumRings indicates number of vertex rings (not tri-rings). // gluSphere 'stacks' arg for 1 vert ring is 2, so convert to our '1'. - wNumSections++; // to make us equiv to gluSphere + wNumSections++; // to make us equiv to gluSphere //Figure out needed space for the triangles and vertices. DWORD dwNumVertices,dwNumIndices,dwNumTriangles; @@ -2830,7 +2843,7 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, dwNumIndices = *pNumIndices = dwNumTriangles*3; - D3DVERTEX* pvVertices = (D3DVERTEX*) pVertexSpace; + D3DVERTEX* pvVertices = (D3DVERTEX*) pVertexSpace; WORD *pwIndices = (WORD *) pIndexSpace; nassertv(dwNumVertices*dwVertSize < VERT_BUFFER_SIZE); @@ -2851,7 +2864,7 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, if(fvfFlags & D3DFVF_DIFFUSE) \ add_DWORD_to_FVFBuf(p_colr); \ if(fvfFlags & D3DFVF_TEXCOUNT_MASK) \ - add_to_FVFBuf((void *)texCoords, sizeof(TexCoordf)); + add_to_FVFBuf((void *)texCoords, sizeof(TexCoordf)); #ifdef DBG_GENSPHERE int nvs_written=0; @@ -2874,7 +2887,7 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, if (DOTEXTURING) { // numRings already includes 1st and last rings for this case - dtheta = (float)(M_PI / (wNumRings-1)); //Angle between each ring (ignore 2 fake rings) + dtheta = (float)(M_PI / (wNumRings-1)); //Angle between each ring (ignore 2 fake rings) theta = 0.0f; } else { dtheta = (float)(M_PI / (wNumRings + 1)); //Angle between each ring @@ -2910,7 +2923,7 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, if (DONORMAL) { // this is wrong normal for the non-spherical case (i think you need to multiply by 1/scale factor per component) - vNormal = Normalize(D3DVECTOR( x*inv_radius, y*inv_radius, z*inv_radius )); + vNormal = Normalize(D3DVECTOR( x*inv_radius, y*inv_radius, z*inv_radius )); add_to_FVFBuf((void *)&vNormal, sizeof(D3DVECTOR)); } @@ -2919,7 +2932,7 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, if (DOTEXTURING) { texCoords[0] = 1.0f - phi*reciprocal_2PI; - add_to_FVFBuf((void *)texCoords, sizeof(TexCoordf)); + add_to_FVFBuf((void *)texCoords, sizeof(TexCoordf)); } phi += dphi; @@ -3014,10 +3027,10 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, #ifdef DBG_GENSPHERE if (DOTEXTURING) { - assert(CurFinalTriIndex == dwNumTriangles); + assert(CurFinalTriIndex == dwNumTriangles); assert(base_index == dwNumIndices); } else { - assert(CurFinalTriIndex == dwNumTriangles-wNumSections); + assert(CurFinalTriIndex == dwNumTriangles-wNumSections); assert(base_index == dwNumIndices-wNumSections*3); } @@ -3030,7 +3043,7 @@ GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_sphere(const GeomSphere *geom) { @@ -3074,7 +3087,7 @@ draw_sphere(const GeomSphere *geom) { GenerateSphere(_pCurFvfBufPtr, VERT_BUFFER_SIZE, _index_buf, D3DMAXNUMVERTICES, - (D3DVECTOR *)¢er, fRadius, + (D3DVECTOR *)¢er, fRadius, SPHERE_NUMSTACKS, SPHERE_NUMSLICES, 1.0f, 1.0f, 1.0f, // no scaling factors, do a sphere not ellipsoid &nVerts,&nIndices,p_flags,vertex_size); @@ -3090,7 +3103,7 @@ draw_sphere(const GeomSphere *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_color_transform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_color_transform(const ColorMatrixAttribute *attrib) { @@ -3106,7 +3119,7 @@ issue_color_transform(const ColorMatrixAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_alpha_transform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_alpha_transform(const AlphaTransformAttribute *attrib) { @@ -3168,7 +3181,7 @@ prepare_texture(Texture *tex) { void DXGraphicsStateGuardian:: apply_texture(TextureContext *tc) { if (tc==NULL) { - return; // use enable_texturing to disable/enable + return; // use enable_texturing to disable/enable } add_to_texture_record(tc); @@ -3179,7 +3192,7 @@ apply_texture(TextureContext *tc) { // Note: if this code changes, make sure to change initialization SetTSS code in init_dx as well // so DX TSS renderstate matches dxgsg state - DXTextureContext *dtc = DCAST(DXTextureContext, tc); + DXTextureContext *dtc = DCAST(DXTextureContext, tc); if( _pCurTexContext == dtc) { return; // tex already set (and possible problem in state-sorting?) @@ -3239,11 +3252,11 @@ apply_texture(TextureContext *tc) { FT_nearest,FT_linear,FT_nearest_mipmap_nearest,FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, FT_linear_mipmap_linear, }; */ - static D3DTEXTUREMINFILTER PandaToD3DMinType[8] = + static D3DTEXTUREMINFILTER PandaToD3DMinType[8] = {D3DTFN_POINT,D3DTFN_LINEAR,D3DTFN_POINT,D3DTFN_LINEAR,D3DTFN_POINT,D3DTFN_LINEAR}; - static D3DTEXTUREMIPFILTER PandaToD3DMipType[8] = + static D3DTEXTUREMIPFILTER PandaToD3DMipType[8] = {D3DTFP_NONE,D3DTFP_NONE,D3DTFP_POINT,D3DTFP_POINT,D3DTFP_LINEAR,D3DTFP_LINEAR}; - + ft=tex->get_minfilter(); if ((ft!=_CurTexMinFilter)||(aniso_degree!=_CurTexAnisoDegree)) { @@ -3306,7 +3319,7 @@ apply_texture(TextureContext *tc) { _CurTexAnisoDegree = aniso_degree; } - // bugbug: does this handle the case of untextured geometry? + // bugbug: does this handle the case of untextured geometry? // we dont see this bug cause we never mix textured/untextured _d3dDevice->SetTexture(0, dtc->_surface ); @@ -3400,7 +3413,7 @@ copy_texture(TextureContext *tc, const DisplayRegion *dr) { bind_texture(tc); - glCopyTexImage2D( GL_TEXTURE_2D, tex->get_level(), + glCopyTexImage2D( GL_TEXTURE_2D, tex->get_level(), get_internal_image_format(pb->get_format()), pb->get_xorg(), pb->get_yorg(), pb->get_xsize(), pb->get_ysize(), pb->get_border() ); @@ -3425,7 +3438,7 @@ copy_texture(TextureContext *tc, const DisplayRegion *dr, const RenderBuffer &rb //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_texture(TextureContext *tc, const DisplayRegion *dr) { @@ -3454,7 +3467,7 @@ draw_texture(TextureContext *tc, const DisplayRegion *dr) { TextureApplyAttribute *taa = new TextureApplyAttribute; taa->set_mode(TextureApplyProperty::M_decal); - state.set_attribute(LightTransition::get_class_type(), + state.set_attribute(LightTransition::get_class_type(), new LightAttribute); state.set_attribute(ColorMaskTransition::get_class_type(), new ColorMaskAttribute); @@ -3511,7 +3524,7 @@ draw_texture(TextureContext *tc, const DisplayRegion *dr) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_texture(TextureContext *tc, const DisplayRegion *dr, const RenderBuffer &rb) { @@ -3555,7 +3568,7 @@ texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb) { // Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: -texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb, +texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb, const DisplayRegion *dr) { nassertv(tc != NULL && pb != NULL && dr != NULL); activate(); @@ -3579,7 +3592,7 @@ texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb, //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::copy_pixel_buffer // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { @@ -3599,8 +3612,8 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { /* set_pack_alignment(1); - glReadPixels( pb->get_xorg() + xo, pb->get_yorg() + yo, - pb->get_xsize(), pb->get_ysize(), + glReadPixels( pb->get_xorg() + xo, pb->get_yorg() + yo, + pb->get_xsize(), pb->get_ysize(), get_external_image_format(pb->get_format()), get_image_type(pb->get_image_type()), pb->_image.p() ); @@ -3618,7 +3631,7 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { // Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: -copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, +copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, const RenderBuffer &rb) { set_read_buffer(rb); copy_pixel_buffer(pb, dr); @@ -3627,7 +3640,7 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::draw_pixel_buffer // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, @@ -3645,20 +3658,20 @@ draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, prepare_display_region(); NodeAttributes state(na); - state.set_attribute(LightTransition::get_class_type(), + state.set_attribute(LightTransition::get_class_type(), new LightAttribute); - state.set_attribute(TextureTransition::get_class_type(), + state.set_attribute(TextureTransition::get_class_type(), new TextureAttribute); - state.set_attribute(TransformTransition::get_class_type(), + state.set_attribute(TransformTransition::get_class_type(), new TransformAttribute); - state.set_attribute(ColorBlendTransition::get_class_type(), + state.set_attribute(ColorBlendTransition::get_class_type(), new ColorBlendAttribute); - state.set_attribute(StencilTransition::get_class_type(), + state.set_attribute(StencilTransition::get_class_type(), new StencilAttribute); switch (pb->get_format()) { - case PixelBuffer::F_depth_component: + case PixelBuffer::F_depth_component: { ColorMaskAttribute *cma = new ColorMaskAttribute; cma->set_mask(0); @@ -3713,28 +3726,28 @@ draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, << "glDrawPixels(" << pb->get_xsize() << ", " << pb->get_ysize() << ", "; switch (get_external_image_format(pb->get_format())) { - case GL_DEPTH_COMPONENT: - dxgsg_cat.debug(false) << "GL_DEPTH_COMPONENT, "; - break; + case GL_DEPTH_COMPONENT: + dxgsg_cat.debug(false) << "GL_DEPTH_COMPONENT, "; + break; case GL_RGB: - dxgsg_cat.debug(false) << "GL_RGB, "; + dxgsg_cat.debug(false) << "GL_RGB, "; break; - case GL_RGBA: - dxgsg_cat.debug(false) << "GL_RGBA, "; + case GL_RGBA: + dxgsg_cat.debug(false) << "GL_RGBA, "; break; - default: + default: dxgsg_cat.debug(false) << "unknown, "; break; } switch (get_image_type(pb->get_image_type())) { - case GL_UNSIGNED_BYTE: - dxgsg_cat.debug(false) << "GL_UNSIGNED_BYTE, "; + case GL_UNSIGNED_BYTE: + dxgsg_cat.debug(false) << "GL_UNSIGNED_BYTE, "; break; case GL_float: dxgsg_cat.debug(false) << "GL_float, "; break; - default: - dxgsg_cat.debug(false) << "unknown, "; + default: + dxgsg_cat.debug(false) << "unknown, "; break; } dxgsg_cat.debug(false) @@ -3742,7 +3755,7 @@ draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, #endif glRasterPos2i( pb->get_xorg(), pb->get_yorg() ); - glDrawPixels( pb->get_xsize(), pb->get_ysize(), + glDrawPixels( pb->get_xsize(), pb->get_ysize(), get_external_image_format(pb->get_format()), get_image_type(pb->get_image_type()), pb->_image.p() ); @@ -3813,24 +3826,24 @@ apply_fog(Fog *fog) { float fog_start,fog_end; fog->get_range(fog_start,fog_end); - _d3dDevice->SetRenderState( D3DRENDERSTATE_FOGSTART, + _d3dDevice->SetRenderState( D3DRENDERSTATE_FOGSTART, *((LPDWORD) (&fog_start)) ); - _d3dDevice->SetRenderState( D3DRENDERSTATE_FOGEND, + _d3dDevice->SetRenderState( D3DRENDERSTATE_FOGEND, *((LPDWORD) (&fog_end)) ); } break; case Fog::M_exponential: case Fog::M_exponential_squared: { - float fog_density = fog->get_density(); - _d3dDevice->SetRenderState( D3DRENDERSTATE_FOGDENSITY, + float fog_density = fog->get_density(); + _d3dDevice->SetRenderState( D3DRENDERSTATE_FOGDENSITY, *((LPDWORD) (&fog_density)) ); } break; } Colorf fog_colr = fog->get_color(); - _d3dDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, + _d3dDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, D3DRGBA(fog_colr[0], fog_colr[1], fog_colr[2], 0.0f)); } @@ -3892,7 +3905,7 @@ void DXGraphicsStateGuardian::apply_light( PointLight* light ) { << "glPopMatrix()" << endl; #endif -#else +#else D3DCOLORVALUE black; black.r = black.g = black.b = black.a = 0.0f; D3DLIGHT7 alight; @@ -3946,9 +3959,9 @@ void DXGraphicsStateGuardian::apply_light( DirectionalLight* light ) { glLightfv(id, GL_DIFFUSE, light->get_color().get_data()); glLightfv(id, GL_SPECULAR, light->get_specular().get_data()); - // Position needs to specify x, y, z, and w + // Position needs to specify x, y, z, and w // w == 0 implies light is at infinity - LPoint3f dir = get_rel_forward( light, _current_root_node, + LPoint3f dir = get_rel_forward( light, _current_root_node, _coordinate_system ); LPoint4f pos( -dir[0], -dir[1], -dir[2], 0 ); glLightfv( id, GL_POSITION, pos.get_data() ); @@ -4036,17 +4049,17 @@ void DXGraphicsStateGuardian::apply_light( Spotlight* light ) { LPoint4f fpos( pos[0], pos[1], pos[2], 1 ); glLightfv( id, GL_POSITION, fpos.get_data() ); - glLightfv( id, GL_SPOT_DIRECTION, + glLightfv( id, GL_SPOT_DIRECTION, get_rel_forward( light, _current_projection_node, _coordinate_system ).get_data() ); glLightf( id, GL_SPOT_EXPONENT, light->get_exponent() ); - glLightf( id, GL_SPOT_CUTOFF, + glLightf( id, GL_SPOT_CUTOFF, light->get_cutoff_angle() ); - glLightf( id, GL_CONSTANT_ATTENUATION, + glLightf( id, GL_CONSTANT_ATTENUATION, light->get_constant_attenuation() ); - glLightf( id, GL_LINEAR_ATTENUATION, + glLightf( id, GL_LINEAR_ATTENUATION, light->get_linear_attenuation() ); - glLightf( id, GL_QUADRATIC_ATTENUATION, + glLightf( id, GL_QUADRATIC_ATTENUATION, light->get_quadratic_attenuation() ); glPopMatrix(); @@ -4070,7 +4083,7 @@ void DXGraphicsStateGuardian::apply_light( Spotlight* light ) { (get_rel_pos( light, _current_root_node ).get_data()); alight.dvDirection = *(D3DVECTOR *) - (get_rel_forward( light, _current_root_node, _coordinate_system).get_data()); + (get_rel_forward( light, _current_root_node, _coordinate_system).get_data()); alight.dvRange = D3DLIGHT_RANGE_MAX; alight.dvFalloff = 1.0f; @@ -4083,7 +4096,7 @@ void DXGraphicsStateGuardian::apply_light( Spotlight* light ) { HRESULT res = _d3dDevice->SetLight(_cur_light_id, &alight); -#endif // WBD_GL_MODE +#endif // WBD_GL_MODE } //////////////////////////////////////////////////////////////////// @@ -4092,13 +4105,13 @@ void DXGraphicsStateGuardian::apply_light( Spotlight* light ) { // Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian::apply_light( AmbientLight* light ) { - _cur_ambient_light = _cur_ambient_light + light->get_color(); + _cur_ambient_light = _cur_ambient_light + light->get_color(); } //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::issue_transform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_transform(const TransformAttribute *attrib) { @@ -4142,7 +4155,7 @@ issue_transform(const TransformAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::issue_matrix // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_tex_matrix(const TexMatrixAttribute *attrib) { @@ -4168,7 +4181,7 @@ issue_tex_matrix(const TexMatrixAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::issue_color // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_color(const ColorAttribute *attrib) { @@ -4185,7 +4198,7 @@ issue_color(const ColorAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::issue_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_texture(const TextureAttribute *attrib) { @@ -4295,7 +4308,7 @@ issue_fog(const FogAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::issue_render_mode // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_render_mode(const RenderModeAttribute *attrib) { @@ -4365,7 +4378,7 @@ void DXGraphicsStateGuardian::issue_light(const LightAttribute *attrib ) { } } - // See if there are any unbound light ids + // See if there are any unbound light ids if (_cur_light_id == -1) { for (i = 0; i < _max_lights; i++) { if (_available_light_ids[i] == NULL) { @@ -4377,7 +4390,7 @@ void DXGraphicsStateGuardian::issue_light(const LightAttribute *attrib ) { } // If there were no unbound light ids, see if we can replace - // a currently unused but previously bound id + // a currently unused but previously bound id if (_cur_light_id == -1) { for (i = 0; i < _max_lights; i++) { if (attrib->is_off(_available_light_ids[i])) { @@ -4470,8 +4483,8 @@ void DXGraphicsStateGuardian::SetTextureBlendMode(TextureApplyProperty::Mode Tex /*class TextureApplyProperty { enum Mode { M_modulate,M_decal,M_blend,M_replace,M_add}; -*/ - static D3DTEXTUREOP TexBlendColorOp1[/* TextureApplyProperty::Mode maxval*/ 10] = +*/ + static D3DTEXTUREOP TexBlendColorOp1[/* TextureApplyProperty::Mode maxval*/ 10] = {D3DTOP_MODULATE,D3DTOP_BLENDTEXTUREALPHA,D3DTOP_MODULATE,D3DTOP_SELECTARG1,D3DTOP_ADD}; //if bCanJustEnable, then we only need to make sure ColorOp is turned on and set properly @@ -4485,7 +4498,7 @@ void DXGraphicsStateGuardian::SetTextureBlendMode(TextureApplyProperty::Mode Tex switch (TexBlendMode) { - case TextureApplyProperty::M_modulate: + case TextureApplyProperty::M_modulate: // emulates GL_MODULATE glTexEnv mode // want to multiply tex-color*pixel color to emulate GL modulate blend (see glTexEnv) _d3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); @@ -4503,14 +4516,14 @@ void DXGraphicsStateGuardian::SetTextureBlendMode(TextureApplyProperty::Mode Tex _d3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); _d3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE ); - break; - case TextureApplyProperty::M_replace: + break; + case TextureApplyProperty::M_replace: _d3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); _d3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); _d3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); - break; - case TextureApplyProperty::M_add: + break; + case TextureApplyProperty::M_add: _d3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); _d3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); @@ -4519,15 +4532,15 @@ void DXGraphicsStateGuardian::SetTextureBlendMode(TextureApplyProperty::Mode Tex _d3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); _d3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE ); - break; - case TextureApplyProperty::M_blend: + break; + case TextureApplyProperty::M_blend: dxgsg_cat.error() << "Impossible to emulate GL_BLEND in DX exactly " << (int) TexBlendMode << endl; /* // emulate GL_BLEND glTexEnv GL requires 2 independent operations on 3 input vars for this mode - DX texture pipeline requires re-using input of last stage on each new op, so I dont think + DX texture pipeline requires re-using input of last stage on each new op, so I dont think exact emulation is possible _d3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE ); _d3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE | D3DTA_COMPLEMENT ); @@ -4563,7 +4576,7 @@ void DXGraphicsStateGuardian::SetTextureBlendMode(TextureApplyProperty::Mode Tex INLINE void DXGraphicsStateGuardian:: enable_texturing(bool val) { // if (_texturing_enabled == val) { // this check is mostly for internal gsg calls, panda already screens out redundant state changes -// return; +// return; // } _texturing_enabled = val; @@ -4644,13 +4657,13 @@ issue_depth_write(const DepthWriteAttribute *attrib) { //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: issue_stencil(const StencilAttribute *attrib) { - + StencilProperty::Mode mode = attrib->get_mode(); #if 1 if (mode != StencilProperty::M_none) { - dxgsg_cat.error() << "stencil buffering unimplemented for DX GSG renderer!!!\n"; - // to implement stenciling, need to change wdxGraphicsWindow to create a stencil + dxgsg_cat.error() << "stencil buffering unimplemented for DX GSG renderer!!!\n"; + // to implement stenciling, need to change wdxGraphicsWindow to create a stencil // z-buffer or maybe do a SetRenderTarget on a new zbuffer } @@ -4778,7 +4791,7 @@ issue_clip_plane(const ClipPlaneAttribute *attrib) { } } - // Disable all unused clip planes + // Disable all unused clip planes for (i = 0; i < _max_clip_planes; i++) { if (_cur_clip_plane_enabled[i] == false) enable_clip_plane(i, false); @@ -4803,7 +4816,7 @@ issue_transparency(const TransparencyAttribute *attrib ) { enable_blend(false); enable_alpha_test(false); break; - case TransparencyProperty::M_alpha: + case TransparencyProperty::M_alpha: case TransparencyProperty::M_alpha_sorted: // Should we really have an "alpha" and an "alpha_sorted" mode, // like Performer does? (The difference is that "alpha" is with @@ -4857,7 +4870,7 @@ issue_linesmooth(const LinesmoothAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::wants_normals // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool DXGraphicsStateGuardian:: wants_normals() const { @@ -4867,7 +4880,7 @@ wants_normals() const { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::wants_texcoords // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool DXGraphicsStateGuardian:: wants_texcoords() const { @@ -4924,7 +4937,7 @@ begin_decal(GeomNode *base_geom) { base_geom->draw(this); _d3dDevice->SetRenderState(D3DRENDERSTATE_ZBIAS, POLYGON_OFFSET_MULTIPLIER * _decal_level); // _decal_level better not be higher than 8! } else -#endif +#endif { if (_decal_level > 1) base_geom->draw(this); // If we're already decaling, just draw the geometry. @@ -4961,7 +4974,7 @@ end_decal(GeomNode *base_geom) { // Restore the Zbias offset. _d3dDevice->SetRenderState(D3DRENDERSTATE_ZBIAS, POLYGON_OFFSET_MULTIPLIER * _decal_level); // _decal_level better not be higher than 8! } else -#endif +#endif { // for GDT_mask if (_decal_level == 0) { // Now we need to re-render the base geometry with the depth write @@ -5003,7 +5016,7 @@ end_decal(GeomNode *base_geom) { /* DepthWriteAttribute *depth_write; if (get_attribute_into(depth_write, _state, - DepthWriteTransition::get_class_type())) + DepthWriteTransition::get_class_type())) issue_depth_write(depth_write); ColorMaskAttribute *color_mask; @@ -5013,22 +5026,22 @@ end_decal(GeomNode *base_geom) { } else { glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - } -*/ + } +*/ if (dx_decal_type == GDT_blend) { enable_blend(was_blend); if (was_blend) call_dxBlendFunc(old_blend_source_func, old_blend_dest_func); } -#if(DIRECT3D_VERSION < 0x700) +#if(DIRECT3D_VERSION < 0x700) else { _d3dDevice->SetRenderState(D3DRENDERSTATE_PLANEMASK,0xFFFFFFFF); // this is unlikely to work due to poor driver support } #endif enable_texturing(was_textured); - _d3dDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, _depth_write_enabled); + _d3dDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, _depth_write_enabled); } } } @@ -5046,7 +5059,7 @@ compute_distance_to(const LPoint3f &point) const { // In the case of a DXGraphicsStateGuardian, we know that the // modelview matrix already includes the relative transform from the // camera, as well as a to-y-up conversion. Thus, the distance to - // the camera plane is simply the +z distance. (negative of gl compute_distance_to, + // the camera plane is simply the +z distance. (negative of gl compute_distance_to, // since d3d uses left-hand coords) return point[2]; @@ -5108,7 +5121,7 @@ set_draw_buffer(const RenderBuffer &rb) { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::set_read_buffer // Access: Protected -// Description: Vestigial analog of glReadBuffer +// Description: Vestigial analog of glReadBuffer //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: set_read_buffer(const RenderBuffer &rb) { @@ -5146,7 +5159,7 @@ get_texture_wrap_mode(Texture::WrapMode wm) const { //////////////////////////////////////////////////////////////////// // Function: DXGraphicsStateGuardian::get_depth_func_type // Access: Protected -// Description: Maps from the depth func modes to gl version +// Description: Maps from the depth func modes to gl version //////////////////////////////////////////////////////////////////// INLINE D3DCMPFUNC DXGraphicsStateGuardian:: get_depth_func_type(DepthTestProperty::Mode m) const { @@ -5282,7 +5295,7 @@ save_frame_buffer(const RenderBuffer &buffer, if (buffer._buffer_type & RenderBuffer::T_depth) { // Save the depth buffer. - sfb->_depth = + sfb->_depth = new PixelBuffer(PixelBuffer::depth_buffer(dr->get_pixel_width(), dr->get_pixel_height())); copy_pixel_buffer(sfb->_depth, dr, buffer); @@ -5358,7 +5371,7 @@ void DXGraphicsStateGuardian::init_type(void) { //////////////////////////////////////////////////////////////////// // Function: dx_cleanup -// Description: Clean up the DirectX environment. +// Description: Clean up the DirectX environment. //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian:: dx_cleanup() { @@ -5446,7 +5459,7 @@ dx_setup_after_resize(RECT viewrect, HWND mwindow) { } // Create a clipper object which handles all our clipping for cases when - // our window is partially obscured by other windows. + // our window is partially obscured by other windows. LPDIRECTDRAWCLIPPER Clipper; if (FAILED(hr = _pDD->CreateClipper( 0, &Clipper, NULL ))) { @@ -5475,7 +5488,7 @@ dx_setup_after_resize(RECT viewrect, HWND mwindow) { PRINTVIDMEM(_pDD,&ddsd_back.ddsCaps,"resize zbuffer surf"); - // Recreate and attach a z-buffer. + // Recreate and attach a z-buffer. if (FAILED(hr = _pDD->CreateSurface( &ddsd_zbuf, &_zbuf, NULL ))) { dxgsg_cat.fatal() << "DXGraphicsStateGuardian::resize() - CreateSurface failed for Z buffer: result = " << ConvD3DErrorToString(hr) << endl; exit(1); @@ -5505,7 +5518,7 @@ dx_setup_after_resize(RECT viewrect, HWND mwindow) { } bool refill_tex_callback(TextureContext *tc,void *void_dxgsg_ptr) { - DXTextureContext *dtc = DCAST(DXTextureContext, tc); + DXTextureContext *dtc = DCAST(DXTextureContext, tc); // DXGraphicsStateGuardian *dxgsg = (DXGraphicsStateGuardian *)void_dxgsg_ptr; // Re-fill the contents of textures and vertex buffers @@ -5536,7 +5549,7 @@ HRESULT DXGraphicsStateGuardian::RestoreAllVideoSurfaces(void) { //////////////////////////////////////////////////////////////////// -// Function: show_frame +// Function: show_frame // Access: // Description: Repaint primary buffer from back buffer //////////////////////////////////////////////////////////////////// @@ -5554,7 +5567,7 @@ void DXGraphicsStateGuardian::show_frame(void) { } //////////////////////////////////////////////////////////////////// -// Function: show_full_screen_frame +// Function: show_full_screen_frame // Access: // Description: Repaint primary buffer from back buffer //////////////////////////////////////////////////////////////////// @@ -5564,71 +5577,71 @@ void DXGraphicsStateGuardian::show_full_screen_frame(void) { if(hr == DDERR_SURFACELOST || hr == DDERR_SURFACEBUSY) { //full screen app has been switched away HRESULT hr; - + // TestCooperativeLevel returns DD_OK: If the current mode is same as the one which the App set. // The following error is returned only for exclusivemode apps. // DDERR_NOEXCLUSIVEMODE: Some other app took exclusive mode. hr = _pDD->TestCooperativeLevel(); - + while(hr == DDERR_NOEXCLUSIVEMODE) { // This means that mode changes had taken place, surfaces // were lost but still we are in the original mode, so we // simply restore all surfaces and keep going. _dx_ready = FALSE; - + #ifdef _DEBUG dxgsg_cat.spam() << "DXGraphicsStateGuardian:: no exclusive mode, waiting...\n"; #endif - + Sleep( 500 ); // Dont consume CPU. throw_event("PandaPaused"); // throw panda event to invoke network-only processing - + _win->process_events(); hr = _pDD->TestCooperativeLevel(); } - + if(FAILED(hr)) { - dxgsg_cat.error() << "DXGraphicsStateGuardian::unexpected return code from TestCoopLevel: " << ConvD3DErrorToString(hr) << endl; + dxgsg_cat.error() << "DXGraphicsStateGuardian::unexpected return code from TestCoopLevel: " << ConvD3DErrorToString(hr) << endl; return; } - + #ifdef _DEBUG dxgsg_cat.debug() << "DXGraphicsStateGuardian:: regained exclusive mode, refilling surfs...\n"; #endif - + RestoreAllVideoSurfaces(); - + #ifdef _DEBUG dxgsg_cat.debug() << "DXGraphicsStateGuardian:: refill done...\n"; #endif - + _dx_ready = TRUE; - + return; // need to re-render scene before we can display it } - + if(hr != DD_OK) { dxgsg_cat.error() << "DXGraphicsStateGuardian::show_frame() - Flip failed w/unexpected error code: " << ConvD3DErrorToString(hr) << endl; exit(1); } } - + //////////////////////////////////////////////////////////////////// -// Function: show_windowed_frame +// Function: show_windowed_frame // Access: // Description: Repaint primary buffer from back buffer (windowed mode only) //////////////////////////////////////////////////////////////////// void DXGraphicsStateGuardian::show_windowed_frame(void) { DX_DECLARE_CLEAN(DDBLTFX, bltfx); - + bltfx.dwDDFX |= DDBLTFX_NOTEARING; HRESULT hr = _pri->Blt( &_view_rect, _back, NULL, DDBLT_DDFX | DDBLT_WAIT, &bltfx ); - + if(FAILED(hr)) { if(hr == DDERR_SURFACELOST || hr == DDERR_SURFACEBUSY) { - + HRESULT hr; - + // TestCooperativeLevel returns DD_OK: If the current mode is same as the one which the App set. // The following two errors are returned to NORMALMODE (windowed)apps only. // @@ -5640,40 +5653,40 @@ void DXGraphicsStateGuardian::show_windowed_frame(void) { // This means that mode changes had taken place, surfaces // were lost but still we are in the original mode, so we // simply restore all surfaces and keep going. - + _dx_ready = FALSE; - + #ifdef _DEBUG dxgsg_cat.spam() << "DXGraphicsStateGuardian:: another app has exclusive mode, waiting...\n"; #endif - + Sleep( 500 ); // Dont consume CPU. throw_event("PandaPaused"); // throw panda event to invoke network-only processing - + hr = _pDD->TestCooperativeLevel(); } - + if(hr==DDERR_WRONGMODE) { // This means that the desktop mode has changed // need to destroy all of dx stuff and recreate everything back again, which is a big hit - dxgsg_cat.error() << "DXGraphicsStateGuardian:: detected display mode change in TestCoopLevel, must recreate all DDraw surfaces, D3D devices, this is not handled yet. " << ConvD3DErrorToString(hr) << endl; + dxgsg_cat.error() << "DXGraphicsStateGuardian:: detected display mode change in TestCoopLevel, must recreate all DDraw surfaces, D3D devices, this is not handled yet. " << ConvD3DErrorToString(hr) << endl; exit(1); return; } - + if(FAILED(hr)) { - dxgsg_cat.error() << "DXGraphicsStateGuardian::unexpected return code from TestCoopLevel: " << ConvD3DErrorToString(hr) << endl; + dxgsg_cat.error() << "DXGraphicsStateGuardian::unexpected return code from TestCoopLevel: " << ConvD3DErrorToString(hr) << endl; return; } - + #ifdef _DEBUG dxgsg_cat.debug() << "DXGraphicsStateGuardian:: other app relinquished exclusive mode, refilling surfs...\n"; #endif - RestoreAllVideoSurfaces(); + RestoreAllVideoSurfaces(); #ifdef _DEBUG dxgsg_cat.debug() << "DXGraphicsStateGuardian:: refill done...\n"; #endif - + _dx_ready = TRUE; return; // need to re-render scene before we can display it } else { @@ -5681,7 +5694,7 @@ void DXGraphicsStateGuardian::show_windowed_frame(void) { exit(1); } } - + // right now, we force sync to v-blank (time from now up to vblank // is wasted) this keeps calling processes from trying to render // more frames than the refresh rate since (as implemented right diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.h b/panda/src/dxgsg/dxGraphicsStateGuardian.h index ba0d41e422..261d76903f 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.h +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.h @@ -2,6 +2,19 @@ // Created by: mike (02Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DXGRAPHICSSTATEGUARDIAN_H #define DXGRAPHICSSTATEGUARDIAN_H @@ -56,7 +69,7 @@ INLINE ostream &operator << (ostream &out, GLenum v) { #define DX_DECLARE_CLEAN(type, var) \ type var; \ ZeroMemory(&var, sizeof(type)); \ - var.dwSize = sizeof(type); + var.dwSize = sizeof(type); #define RELEASE(object) if (object!=NULL) {object->Release(); object = NULL;} @@ -93,7 +106,7 @@ public: virtual void render_frame(const AllAttributesWrapper &initial_state); virtual void render_scene(Node *root, ProjectionNode *projnode, const AllAttributesWrapper &initial_state); - virtual void render_subgraph(RenderTraverser *traverser, + virtual void render_subgraph(RenderTraverser *traverser, Node *subgraph, ProjectionNode *projnode, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans); @@ -175,7 +188,7 @@ public: virtual void end_decal(GeomNode *base_geom); INLINE float compute_distance_to(const LPoint3f &point) const; - + void reset_ambient(); protected: @@ -192,10 +205,10 @@ protected: void bind_texture(TextureContext *tc); // for storage of the flexible vertex format - char *_pCurFvfBufPtr,*_pFvfBufBasePtr; + char *_pCurFvfBufPtr,*_pFvfBufBasePtr; INLINE void add_to_FVFBuf(void *data, size_t bytes) ; WORD *_index_buf; // base of malloced array - + bool _dx_ready; bool _bIsTNLDevice; LPDIRECTDRAWSURFACE7 _back; @@ -212,14 +225,14 @@ protected: LPDDPIXELFORMAT _pTexPixFmts; DXTextureContext *_pCurTexContext; - RenderBuffer::Type _cur_read_pixel_buffer; // source for copy_pixel_buffer operation + RenderBuffer::Type _cur_read_pixel_buffer; // source for copy_pixel_buffer operation D3DDEVICEDESC7 _D3DDevDesc; void set_clipper(RECT cliprect); void GenerateSphere(void *pVertexSpace,DWORD dwVertSpaceByteSize, void *pIndexSpace,DWORD dwIndexSpaceByteSize, - D3DVECTOR *pCenter, float fRadius, + D3DVECTOR *pCenter, float fRadius, DWORD wNumRings, DWORD wNumSections, float sx, float sy, float sz, DWORD *pNumVertices,DWORD *pNumIndices,DWORD fvfFlags,DWORD dwVertSize); HRESULT DXGraphicsStateGuardian::RestoreAllVideoSurfaces(void); @@ -247,7 +260,7 @@ protected: /* INLINE void enable_multisample_alpha_one(bool val); INLINE void enable_multisample_alpha_mask(bool val); INLINE void enable_multisample(bool val, LPDIRECT3DDEVICE7 d3dDevice); -*/ +*/ INLINE void enable_alpha_test(bool val); INLINE void enable_line_smooth(bool val); INLINE void enable_blend(bool val); @@ -282,7 +295,7 @@ protected: short perComp; // iterators for primitives - Geom::VertexIterator vi; + Geom::VertexIterator vi; Geom::NormalIterator ni; Geom::TexCoordIterator ti; Geom::ColorIterator ci; @@ -363,7 +376,7 @@ protected: PTA(PlaneNode*) _available_clip_plane_ids; int _max_clip_planes; - bool* _cur_clip_plane_enabled; + bool* _cur_clip_plane_enabled; int _cur_clip_plane_id; CPT(DisplayRegion) _actual_display_region; diff --git a/panda/src/dxgsg/dxSavedFrameBuffer.I b/panda/src/dxgsg/dxSavedFrameBuffer.I index 631eba5ec4..d621f689f2 100644 --- a/panda/src/dxgsg/dxSavedFrameBuffer.I +++ b/panda/src/dxgsg/dxSavedFrameBuffer.I @@ -1,13 +1,26 @@ // Filename: dxSavedFrameBuffer.I // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DXSavedFrameBuffer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DXSavedFrameBuffer:: DXSavedFrameBuffer(const RenderBuffer &buffer, CPT(DisplayRegion) dr) : @@ -18,7 +31,7 @@ DXSavedFrameBuffer(const RenderBuffer &buffer, CPT(DisplayRegion) dr) : //////////////////////////////////////////////////////////////////// // Function: DXSavedFrameBuffer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DXSavedFrameBuffer:: ~DXSavedFrameBuffer() { diff --git a/panda/src/dxgsg/dxSavedFrameBuffer.cxx b/panda/src/dxgsg/dxSavedFrameBuffer.cxx index ee9bcafba4..c174d6411c 100644 --- a/panda/src/dxgsg/dxSavedFrameBuffer.cxx +++ b/panda/src/dxgsg/dxSavedFrameBuffer.cxx @@ -1,6 +1,19 @@ // Filename: dxSavedFrameBuffer.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dxSavedFrameBuffer.h" diff --git a/panda/src/dxgsg/dxSavedFrameBuffer.h b/panda/src/dxgsg/dxSavedFrameBuffer.h index 8e5831df25..32617b342b 100644 --- a/panda/src/dxgsg/dxSavedFrameBuffer.h +++ b/panda/src/dxgsg/dxSavedFrameBuffer.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DXSAVEDFRAMEBUFFER_H #define DXSAVEDFRAMEBUFFER_H @@ -40,7 +53,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/dxgsg/dxTextureContext.I b/panda/src/dxgsg/dxTextureContext.I index f7715ba736..10a13ae1e4 100644 --- a/panda/src/dxgsg/dxTextureContext.I +++ b/panda/src/dxgsg/dxTextureContext.I @@ -1,18 +1,31 @@ // Filename: dxTextureContext.I // Created by: drose (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DXTextureContext::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DXTextureContext:: DXTextureContext(Texture *tex) : TextureContext(tex) { _index = 0; - _priority = 0.5; // For keeping resident in texture memory + _priority = 0.5; // For keeping resident in texture memory } diff --git a/panda/src/dxgsg/dxTextureContext.cxx b/panda/src/dxgsg/dxTextureContext.cxx index c625c14b9b..5780d35402 100644 --- a/panda/src/dxgsg/dxTextureContext.cxx +++ b/panda/src/dxgsg/dxTextureContext.cxx @@ -1,15 +1,19 @@ // Filename: dxTextureContext.cxx // Created by: drose (07Oct99) -// +// //////////////////////////////////////////////////////////////////// -// Copyright (C) 2000 Walt Disney Imagineering, Inc. -// -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -62,7 +66,7 @@ static void DebugPrintPixFmt(DDPIXELFORMAT* pddpf) { *dbgout << " Lummask:" << (void *) pddpf->dwLuminanceBitMask; } - *dbgout << endl; + *dbgout << endl; iddpfnum++; } @@ -117,7 +121,7 @@ enum Format { T_unsigned_short, // 2 byte per channel T_unsigned_byte_332, // RGB in 1 byte T_float, // 1 channel stored as float - }; + }; */ //////////////////////////////////////////////////////////////////// @@ -149,7 +153,7 @@ get_bits_per_pixel(PixelBuffer::Format format, int *alphbits) { return 16; case PixelBuffer::F_luminance: return 8; - case PixelBuffer::F_rgba4: + case PixelBuffer::F_rgba4: *alphbits = 4; return 16; case PixelBuffer::F_rgba5: @@ -165,7 +169,7 @@ get_bits_per_pixel(PixelBuffer::Format format, int *alphbits) { case PixelBuffer::F_rgba: *alphbits = 8; return 32; - case PixelBuffer::F_rgbm: + case PixelBuffer::F_rgbm: *alphbits = 1; return 32; case PixelBuffer::F_rgb12: @@ -216,9 +220,9 @@ HRESULT ConvertPixBuftoDDSurf(ConversionType ConvNeeded,BYTE *pbuf,LPDIRECTDRAWS r = (BYTE)((dwPixel )&0x000000ff); *pDstWord = (a << 24) | (r << 16)| (g << 8) | b; -#else +#else BYTE r,b; - // simpler: just swap r & b + // simpler: just swap r & b b = (BYTE)((dwPixel>>16)&0x000000ff); r = (BYTE)((dwPixel )&0x000000ff); *pDstWord = ((dwPixel & 0xff00ff00) | (r<<16) | b) & dwAlphaMaskOff; @@ -228,13 +232,13 @@ HRESULT ConvertPixBuftoDDSurf(ConversionType ConvNeeded,BYTE *pbuf,LPDIRECTDRAWS break; } - case Conv32to16_1555: + case Conv32to16_1555: case Conv32to16_0555: { DWORD *pSrcWord = (DWORD *) pbuf; WORD *pDstWord; DWORD dwAlphaMaskOff = (ConvNeeded==Conv32to16_0555) ? 0x7FFF : 0xFFFF; - assert(ddsd.ddpfPixelFormat.dwRBitMask==0x7C00); + assert(ddsd.ddpfPixelFormat.dwRBitMask==0x7C00); // for some reason, bits are 'in-order' when converting to 16bit // just handle 1/15 alpha/rgb @@ -269,7 +273,7 @@ HRESULT ConvertPixBuftoDDSurf(ConversionType ConvNeeded,BYTE *pbuf,LPDIRECTDRAWS DWORD *pSrcWord = (DWORD *) pbuf; WORD *pDstWord; - assert(ddsd.ddpfPixelFormat.dwRBitMask==0xF800); + assert(ddsd.ddpfPixelFormat.dwRBitMask==0xF800); // for some reason, bits are 'in-order' when converting to 16bit // just handle 1/15 alpha/rgb @@ -343,7 +347,7 @@ HRESULT ConvertPixBuftoDDSurf(ConversionType ConvNeeded,BYTE *pbuf,LPDIRECTDRAWS // pixel buffer is in ABGR format (orig fmt designed for big-endian RGBA) // need to change byte order to ARGB - a = (BYTE)((dwPixel>>24)) >> 4; + a = (BYTE)((dwPixel>>24)) >> 4; b = (BYTE)((dwPixel>>16) & 0x000000ff) >> 4; g = (BYTE)((dwPixel>> 8) & 0x000000ff) >> 4; r = (BYTE)((dwPixel ) & 0x000000ff) >> 4; @@ -384,7 +388,7 @@ HRESULT ConvertPixBuftoDDSurf(ConversionType ConvNeeded,BYTE *pbuf,LPDIRECTDRAWS BYTE *pSrcWord = (BYTE *) pbuf; WORD *pDstWord; - assert(ddsd.ddpfPixelFormat.dwRBitMask==0x7C00); + assert(ddsd.ddpfPixelFormat.dwRBitMask==0x7C00); // for some reason, bits are 'in-order' when converting to 16bit for(DWORD y=0; y>8) >> 4; + a = (BYTE)(dwPixel>>8) >> 4; r = (BYTE)(dwPixel & 0x000000ff) >> 4; *pDstWord = (a << 12) | (r << 8)| (r << 4) | r; @@ -534,7 +538,7 @@ HRESULT ConvertPixBuftoDDSurf(ConversionType ConvNeeded,BYTE *pbuf,LPDIRECTDRAWS break; } - case ConvLum8to16_0565: + case ConvLum8to16_0565: case ConvLum8to16_0555: { BYTE *pSrcWord = (BYTE *) pbuf; WORD *pDstWord; @@ -543,11 +547,11 @@ HRESULT ConvertPixBuftoDDSurf(ConversionType ConvNeeded,BYTE *pbuf,LPDIRECTDRAWS if(ConvNeeded==ConvLum8to16_0555) { FarShift=10; OrVal=0x8000; // turn on alpha bit, just in case MiddleRoundShift = 3; - assert(ddsd.ddpfPixelFormat.dwRBitMask==0x7C00); + assert(ddsd.ddpfPixelFormat.dwRBitMask==0x7C00); } else { - FarShift=11; OrVal=0x0; + FarShift=11; OrVal=0x0; MiddleRoundShift = 2; - assert(ddsd.ddpfPixelFormat.dwRBitMask==0xF800); + assert(ddsd.ddpfPixelFormat.dwRBitMask==0xF800); } for(DWORD y=0; yUnlock(NULL); return E_INVALIDARG; @@ -710,7 +714,7 @@ HRESULT ConvertDDSurftoPixBuf(PixelBuffer *pixbuf,LPDIRECTDRAWSURFACE7 pDDSurf) // pixel buffer is in ABGR format(it stores big-endian RGBA) // need to change byte order from ARGB - // simpler: just swap r & b + // simpler: just swap r & b r = (BYTE)((dwPixel>>16)&0x000000ff); g = (BYTE)((dwPixel>> 8)&0x000000ff); b = (BYTE)((dwPixel )&0x000000ff); @@ -743,7 +747,7 @@ HRESULT ConvertDDSurftoPixBuf(PixelBuffer *pixbuf,LPDIRECTDRAWSURFACE7 pDDSurf) break; } - case 16: { + case 16: { assert((ddsd.ddpfPixelFormat.dwRBitMask==0xF800) || // 565 (ddsd.ddpfPixelFormat.dwRBitMask==0x0F00) || // 4444 @@ -813,7 +817,7 @@ HRESULT ConvertDDSurftoPixBuf(PixelBuffer *pixbuf,LPDIRECTDRAWSURFACE7 pDDSurf) // pixel buffer is in ABGR format(it stores big-endian RGBA) // need to change byte order to ARGB - // simpler: just swap r & b + // simpler: just swap r & b r = (BYTE)((dwPixel>>16)&0x000000ff); g = (BYTE)((dwPixel>> 8)&0x000000ff); b = (BYTE)((dwPixel )&0x000000ff); @@ -901,7 +905,7 @@ HRESULT ConvertDDSurftoPixBuf(PixelBuffer *pixbuf,LPDIRECTDRAWSURFACE7 pDDSurf) *pDstByte++ = b; } } - } + } break; } } @@ -929,7 +933,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT LPDIRECTDRAWSURFACE7 pddsRender; LPDIRECTDRAW7 pDD = NULL; - DDPIXELFORMAT TexFmtsArr[MAX_DX_TEXPIXFMTS]; + DDPIXELFORMAT TexFmtsArr[MAX_DX_TEXPIXFMTS]; ConversionType ConvNeeded; @@ -965,19 +969,19 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT DDSURFACEDESC2 ddsd; ZeroMemory( &ddsd, sizeof(DDSURFACEDESC2) ); ddsd.dwSize = sizeof(DDSURFACEDESC2); - ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH + ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT ; ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); // setup ddpf to match against avail fmts - ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB; + ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB; if((pbuf->get_format() == PixelBuffer::F_luminance_alpha)|| (pbuf->get_format() == PixelBuffer::F_luminance_alphamask) || (pbuf->get_format() == PixelBuffer::F_luminance)) { - ddsd.ddpfPixelFormat.dwFlags = DDPF_LUMINANCE; + ddsd.ddpfPixelFormat.dwFlags = DDPF_LUMINANCE; } ddsd.ddpfPixelFormat.dwRGBBitCount = bpp; @@ -1017,7 +1021,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT bShrinkOriginal=FALSE; if((dwOrigWidth>devDesc.dwMaxTextureWidth)||(dwOrigHeight>devDesc.dwMaxTextureHeight)) { #ifdef _DEBUG - dxgsg_cat.error() << "WARNING: " <<_tex->get_name() << ": Image size exceeds max texture dimensions of (" << devDesc.dwMaxTextureWidth << "," << devDesc.dwMaxTextureHeight << ") !!\n" + dxgsg_cat.error() << "WARNING: " <<_tex->get_name() << ": Image size exceeds max texture dimensions of (" << devDesc.dwMaxTextureWidth << "," << devDesc.dwMaxTextureHeight << ") !!\n" << "Scaling "<< _tex->get_name() << " ("<< dwOrigWidth<<"," < ("<< devDesc.dwMaxTextureWidth << "," << devDesc.dwMaxTextureHeight << ") !\n"; #endif @@ -1028,9 +1032,9 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT bShrinkOriginal=TRUE; } -#if 0 +#if 0 // checks for SQUARE reqmt - //riva128 seems to handle non-sq fine. is it wasting mem to do this? do I care or should I shrink to be sure we save mem? + //riva128 seems to handle non-sq fine. is it wasting mem to do this? do I care or should I shrink to be sure we save mem? if((ddsd.dwWidth != ddsd.dwHeight) && (devDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY )) { // assume pow2 textures. sum exponents, divide by 2 rounding down to get sq size @@ -1048,7 +1052,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT #endif if(bShrinkOriginal) { - // need 2 add checks for errors + // need 2 add checks for errors PNMImage pnmi_src; PNMImage *pnmi = new PNMImage(ddsd.dwWidth, ddsd.dwHeight, cNumColorChannels); pbuf->store(pnmi_src); @@ -1114,7 +1118,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT if(!dx_force_16bpptextures) #endif for(i=0,pCurPixFmt=pTexPixFmts;idwRGBBitCount==32) && + if((pCurPixFmt->dwRGBBitCount==32) && (((pCurPixFmt->dwFlags & DDPF_ALPHAPIXELS)!=0)==(cNumAlphaBits!=0))) { // we should have a match assert(pCurPixFmt->dwRGBAlphaBitMask==0xFF000000); @@ -1134,7 +1138,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT ConversionType ConvTo1=Conv32to16_4444,ConvTo2=Conv32to16_1555; DWORD dwAlphaMask1=0xF000,dwAlphaMask2=0x8000; // assume ALPHAMASK is x8000 and RGBMASK is x7fff to simplify 32->16 conversion - // this should be true on most cards. + // this should be true on most cards. #ifndef FORCE_16bpp_1555 if(cNumAlphaBits==1) @@ -1190,22 +1194,22 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT #endif // no 24-bit fmt. look for 32 bit fmt (note: this is memory-hogging choice - // instead I could look for memory-conserving 16-bit fmt). + // instead I could look for memory-conserving 16-bit fmt). // check mask to ensure ARGB, not RGBA (which I am not handling here) for(i=0,pCurPixFmt=pTexPixFmts;idwRGBBitCount==32) && (pCurPixFmt->dwFlags & DDPF_RGB) && ((pCurPixFmt->dwRBitMask|pCurPixFmt->dwGBitMask|pCurPixFmt->dwBBitMask)==0xFFFFFF) ) { - // I'm allowing alpha formats here. will set alpha to opaque + // I'm allowing alpha formats here. will set alpha to opaque ConvNeeded=((cNumColorChannels==3) ? Conv24to32 : Conv32to32_NoAlpha); goto found_matching_format; } } - // no 24-bit or 32 fmt. look for 16 bit fmt + // no 24-bit or 32 fmt. look for 16 bit fmt for(i=0,pCurPixFmt=&pTexPixFmts[cNumTexPixFmts-1];i16 conversion, should be true on most cards. - if((pCurPixFmt->dwFlags & DDPF_RGB) && (pCurPixFmt->dwRGBBitCount==16) + // assume RGBMASK is x7fff to simplify 32->16 conversion, should be true on most cards. + if((pCurPixFmt->dwFlags & DDPF_RGB) && (pCurPixFmt->dwRGBBitCount==16) && !(pCurPixFmt->dwFlags & DDPF_ALPHAPIXELS)) { // no alpha fmts // if numchan==4,this means user has requested we throw away the input alpha channel if(pCurPixFmt->dwGBitMask==0x7E0) { @@ -1219,7 +1223,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT } } - // at this point, bail. + // at this point, bail. break; case 16: @@ -1253,7 +1257,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT ConversionType ConvTo1=ConvLum16to16_4444,ConvTo2=ConvLum16to16_1555; DWORD dwAlphaMask1=0xF000,dwAlphaMask2=0x8000; // assume ALPHAMASK is x8000 and RGBMASK is x7fff to simplify 32->16 conversion - // this should be true on most cards. + // this should be true on most cards. #ifndef FORCE_16bpp_1555 if(cNumAlphaBits==1) @@ -1285,14 +1289,14 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT } else - // look for compatible 16bit fmts, if none then give up + // look for compatible 16bit fmts, if none then give up // (dont worry about other bitdepths for 16 bit) for(i=0,pCurPixFmt=pTexPixFmts;idwRGBBitCount==16)&&(pCurPixFmt->dwFlags & DDPF_RGB)) { switch(cNumAlphaBits) { - case 0: + case 0: if(!(pCurPixFmt->dwFlags & DDPF_ALPHAPIXELS)) { // if numchan==4,this means user has requested we throw away the input alpha channel if(pCurPixFmt->dwGBitMask==0x7E0) { @@ -1305,14 +1309,14 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT goto found_matching_format; } break; - case 1: + case 1: if((pCurPixFmt->dwFlags & DDPF_ALPHAPIXELS)&& (pCurPixFmt->dwRGBAlphaBitMask==0x8000)) { ConvNeeded=Conv32to16_1555; goto found_matching_format; } break; - case 4: + case 4: if((pCurPixFmt->dwFlags & DDPF_ALPHAPIXELS)&& (pCurPixFmt->dwRGBAlphaBitMask==0xF000)) { ConvNeeded=Conv32to16_4444; @@ -1399,7 +1403,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE; - ddsd.ddsCaps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE // Turn on texture management + ddsd.ddsCaps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE // Turn on texture management | DDSCAPS2_HINTSTATIC; // BUGBUG: is this ok for ALL textures? // validate magfilter setting @@ -1472,7 +1476,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT aniso_degree=1; if(devDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANISOTROPY) { aniso_degree=_tex->get_anisotropic_degree(); - if((aniso_degree>devDesc.dwMaxAnisotropy) + if((aniso_degree>devDesc.dwMaxAnisotropy) #ifdef _DEBUG || dx_force_anisotropic_filtering #endif @@ -1485,9 +1489,9 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT #endif if(_bHasMipMaps) { - // We dont specify mipmapcount, so CreateSurface will auto-create surfs + // We dont specify mipmapcount, so CreateSurface will auto-create surfs // for all mipmaps down to 1x1 (if driver supports deep-mipmaps, otherwise Nx1) - ddsd.ddsCaps.dwCaps |= (DDSCAPS_MIPMAP | DDSCAPS_COMPLEX); + ddsd.ddsCaps.dwCaps |= (DDSCAPS_MIPMAP | DDSCAPS_COMPLEX); dxgsg_cat.debug() << "CreateTexture: generating mipmaps for "<< _tex->get_name() << endl; } @@ -1507,7 +1511,7 @@ CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT } #ifdef _DEBUG - dxgsg_cat.debug() << "CreateTexture: "<< _tex->get_name() <<" converted " << ConvNameStrs[ConvNeeded] << " \n"; + dxgsg_cat.debug() << "CreateTexture: "<< _tex->get_name() <<" converted " << ConvNameStrs[ConvNeeded] << " \n"; #endif _PixBufConversionType=ConvNeeded; @@ -1649,7 +1653,7 @@ FillDDSurfTexturePixels(void) { // cerr << "mipmap gen takes " << elapsed_time << " secs for this texture\n"; delete [] pMipMapPixBufSpace; - pCurDDSurf->Release(); + pCurDDSurf->Release(); #ifdef _DEBUG if(dx_debug_view_mipmaps) { @@ -1665,8 +1669,8 @@ FillDDSurfTexturePixels(void) { LPDIRECTDRAWSURFACE7 pTextureCurrent,pTexturePrev = _surface; int cury,curx; HDC hScreenDC; - RECT scrnrect; - hScreenDC=GetDC(NULL); + RECT scrnrect; + hScreenDC=GetDC(NULL); scrnrect.left=scrnrect.top=0; scrnrect.bottom=GetDeviceCaps(hScreenDC,VERTRES); @@ -1682,7 +1686,7 @@ FillDDSurfTexturePixels(void) { hr = pTexturePrev->GetDC(&hTexDC); if(FAILED(hr)) { - dxgsg_cat.error() << "GetDC failed hr = " << ConvD3DErrorToString(hr) << "\n"; + dxgsg_cat.error() << "GetDC failed hr = " << ConvD3DErrorToString(hr) << "\n"; break; } @@ -1693,25 +1697,25 @@ FillDDSurfTexturePixels(void) { #if 0 if(cNumAlphaBits>0) { BLENDFUNCTION bf; - bf.BlendOp = AC_SRC_OVER; bf.BlendFlags=0; + bf.BlendOp = AC_SRC_OVER; bf.BlendFlags=0; bf.SourceConstantAlpha=255; bf.AlphaFormat=AC_SRC_ALPHA; res = AlphaBlend(hScreenDC,curx,cury,ddsd_cur.dwWidth,ddsd_cur.dwHeight, TexDC,0,0,ddsd_cur.dwWidth,ddsd_cur.dwHeight,bf); if(!res) { PrintLastError(msg); - dxgsg_cat.error() << "AlphaBlend BLT failed: "<ReleaseDC(hTexDC); if(FAILED(hr)) { - dxgsg_cat.error() << "tex ReleaseDC failed for mip "<GetAttachedSurface(&ddsCaps, &pTextureCurrent); + hr = pTexturePrev->GetAttachedSurface(&ddsCaps, &pTextureCurrent); if(FAILED(hr)) { dxgsg_cat.error() << " failed displaying mipmaps: GetAttachedSurf hr = " << ConvD3DErrorToString(hr) << "\n"; } // done with the previous texture pTexturePrev->Release(); - pTexturePrev = pTextureCurrent; + pTexturePrev = pTextureCurrent; } ReleaseDC(0,hScreenDC); @@ -1782,7 +1786,7 @@ DeleteTexture( ) { //////////////////////////////////////////////////////////////////// // Function: DXTextureContext::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DXTextureContext:: DXTextureContext(Texture *tex) : @@ -1798,7 +1802,7 @@ TextureContext(tex) { DXTextureContext:: ~DXTextureContext() { #ifdef _DEBUG - dxgsg_cat.spam() << "Deleting DX texture for " << _tex->get_name() << "\n"; + dxgsg_cat.spam() << "Deleting DX texture for " << _tex->get_name() << "\n"; #endif DeleteTexture(); TextureContext::~TextureContext(); diff --git a/panda/src/dxgsg/dxTextureContext.h b/panda/src/dxgsg/dxTextureContext.h index 828ebb39ed..e6a052fb5f 100644 --- a/panda/src/dxgsg/dxTextureContext.h +++ b/panda/src/dxgsg/dxTextureContext.h @@ -2,6 +2,19 @@ // Created by: drose (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DXTEXTURECONTEXT_H #define DXTEXTURECONTEXT_H @@ -33,7 +46,7 @@ public: Texture *_tex; // ptr to parent, primarily for access to namestr LPDIRECTDRAWSURFACE7 CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, LPDDPIXELFORMAT pTexPixFmts); - + void DeleteTexture(); bool _bHasMipMaps; @@ -56,7 +69,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/effects/config_effects.cxx b/panda/src/effects/config_effects.cxx index d5b522b238..30deb40dde 100644 --- a/panda/src/effects/config_effects.cxx +++ b/panda/src/effects/config_effects.cxx @@ -1,6 +1,20 @@ // Filename: config_effects.cxx // Created by: jason (18Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "config_effects.h" #include "lensFlareNode.h" diff --git a/panda/src/effects/config_effects.h b/panda/src/effects/config_effects.h index 0621d1638e..febdafa421 100644 --- a/panda/src/effects/config_effects.h +++ b/panda/src/effects/config_effects.h @@ -1,6 +1,20 @@ // Filename: config_effects.h // Created by: jason (18Jul00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_EFFECTS_H diff --git a/panda/src/effects/lensFlareNode.I b/panda/src/effects/lensFlareNode.I index a5e440296d..a215d692c6 100644 --- a/panda/src/effects/lensFlareNode.I +++ b/panda/src/effects/lensFlareNode.I @@ -1,12 +1,25 @@ // Filename: lensFlareNode.I // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LensFlareNode:: LensFlareNode(void) : @@ -18,7 +31,7 @@ LensFlareNode(void) : //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_texel_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void LensFlareNode:: set_texel_scale(float texel_to_world) @@ -29,7 +42,7 @@ set_texel_scale(float texel_to_world) //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_global_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void LensFlareNode:: set_global_scale(float scale) @@ -40,7 +53,7 @@ set_global_scale(float scale) //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_blind_falloff // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void LensFlareNode:: set_blind_falloff(float fall_off) @@ -51,7 +64,7 @@ set_blind_falloff(float fall_off) //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_flare_falloff // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void LensFlareNode:: set_flare_falloff(float fall_off) @@ -62,7 +75,7 @@ set_flare_falloff(float fall_off) //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_light // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void LensFlareNode:: set_light_source(PT_Node light) diff --git a/panda/src/effects/lensFlareNode.cxx b/panda/src/effects/lensFlareNode.cxx index 844e6dd7df..6b64a919c3 100644 --- a/panda/src/effects/lensFlareNode.cxx +++ b/panda/src/effects/lensFlareNode.cxx @@ -1,6 +1,19 @@ // Filename: lensFlareNode.cxx // Created by: jason (18Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lensFlareNode.h" @@ -40,7 +53,7 @@ TypeHandle LensFlareNode::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::add_bloom // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: add_flare(PT(Texture) flare, PTA_float scales, PTA_float offsets, @@ -60,7 +73,7 @@ add_flare(PT(Texture) flare, PTA_float scales, PTA_float offsets, //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::add_blind // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: add_blind(PT(Texture) blind) @@ -68,38 +81,38 @@ add_blind(PT(Texture) blind) _blind = blind; GeomSprite *sprite = new GeomSprite(); GeomNode *node = new GeomNode(); - + //We don't want to set any geometry right now, as that will be //taken care of later (and on each subsequent render), but //Geoms requires a certain amount of info or else they crash, //so simply give it the minimum it needs not to crash - + //The lengths and number of prims will never change, so give //it valid values for those, but pass it an empty array of //vertices PTA_Vertexf coords(0); PTA_float tex_scales(0); - + tex_scales.push_back(_texel_scale); sprite->set_coords(coords, G_PER_VERTEX); sprite->set_num_prims(1); sprite->set_texture(_blind); - + node->add_geom(sprite); - + _blind_arc = new RenderRelation(this, node); } //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_geometry // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: set_geometry(GeomSprite *sprite, const PTA_float &geom_scales, const PTA_float &geom_offsets, const PTA_float &geom_angle_scales, - const PTA_Colorf &geom_colors, const LVector3f &delta, + const PTA_Colorf &geom_colors, const LVector3f &delta, const LPoint3f &light, const float &angle) { PTA_Vertexf coords(0); @@ -150,7 +163,7 @@ set_geometry(GeomSprite *sprite, const PTA_float &geom_scales, //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::prepare_flares // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: prepare_flares(const LVector3f &delta, const LPoint3f &light, const float &angle) @@ -183,7 +196,7 @@ prepare_flares(const LVector3f &delta, const LPoint3f &light, const float &angle node->add_geom(sprite); RenderRelation *arc = new RenderRelation(this, node); - //arc->set_transition(new TransparencyTransition(TransparencyProperty::M_alpha)); + //arc->set_transition(new TransparencyTransition(TransparencyProperty::M_alpha)); _flare_arcs.push_back(arc); } } @@ -193,8 +206,8 @@ prepare_flares(const LVector3f &delta, const LPoint3f &light, const float &angle GeomNode *node = DCAST(GeomNode, _flare_arcs[i]->get_child()); GeomSprite *sprite = DCAST(GeomSprite, node->get_geom(0)); - set_geometry(sprite, _flare_scales[i], _flare_offsets[i], - _flare_angle_scales[i], _flare_colors[i], + set_geometry(sprite, _flare_scales[i], _flare_offsets[i], + _flare_angle_scales[i], _flare_colors[i], delta, light, angle); sprite->set_texture(_flares[i]); @@ -208,7 +221,7 @@ prepare_flares(const LVector3f &delta, const LPoint3f &light, const float &angle //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::prepare_blind // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: prepare_blind(const float &angle, const float &tnear) @@ -226,9 +239,9 @@ prepare_blind(const float &angle, const float &tnear) PTA_Colorf colors(0); PTA_float x_tex_scales(0); PTA_float y_tex_scales(0); - + //The height and the width are set to two as sprites are always - //drawn in a frustum of size 2. + //drawn in a frustum of size 2. float width = sprite->get_frustum_right() - sprite->get_frustum_left(); float height = sprite->get_frustum_top() - sprite->get_frustum_bottom(); float x_offset_scale = width / _blind->_pbuffer->get_xsize(); @@ -236,7 +249,7 @@ prepare_blind(const float &angle, const float &tnear) float inten = 1 - offset; - coords.push_back(Vertexf(0, 0, -tnear )); + coords.push_back(Vertexf(0, 0, -tnear )); colors.push_back(Colorf(inten,inten,inten,1)); x_tex_scales.push_back(x_offset_scale); y_tex_scales.push_back(y_offset_scale); @@ -261,16 +274,16 @@ render_child(RenderRelation *arc, const AllAttributesWrapper &attrib, { AllAttributesWrapper new_attrib(attrib); - new_attrib.clear_attribute(TransformTransition::get_class_type()); - + new_attrib.clear_attribute(TransformTransition::get_class_type()); + AllTransitionsWrapper arc_trans; arc_trans.extract_from(arc); - + AllTransitionsWrapper new_trans(trans); new_trans.compose_in_place(arc_trans); - + // Now render everything from this node and below. - gsg->render_subgraph(gsg->get_render_traverser(), + gsg->render_subgraph(gsg->get_render_traverser(), arc->get_child(), new_attrib, new_trans); } @@ -306,32 +319,32 @@ sub_render(const AllAttributesWrapper &attrib, AllTransitionsWrapper &trans, PerspectiveProjection *pp = DCAST(PerspectiveProjection, camera_node->get_projection()); LPoint3f light_pos = get_rel_pos(_light_node, camera_node); - + LMatrix4f light_mat; - get_rel_mat(_light_node, camera_node, light_mat); - + get_rel_mat(_light_node, camera_node, light_mat); + LMatrix4f modelview_mat; - + const TransformAttribute *ta; if (!get_attribute_into(ta, attrib.get_attributes(), TransformTransition::get_class_type())) modelview_mat = LMatrix4f::ident_mat(); else modelview_mat = ta->get_matrix(); - - LMatrix4f inv_light_mat = invert(light_mat); + + LMatrix4f inv_light_mat = invert(light_mat); light_pos = light_pos * inv_light_mat * modelview_mat; - + //Now figure out where the center of the screen is. Since we are //doing everything in camera space, this should merely be the //distance between the camera and the near clipping plane projected //along Y into the screen LPoint3f center = LPoint3f::origin() + LPoint3f::rfu(0,pp->get_frustum()._fnear,0); center = center * inv_light_mat * modelview_mat; - + //Now lets get the vector from the light to the center. LPoint3f delta = center - light_pos; delta.set_z(light_pos.get_z()); - + //Now perform the angle caclulationss for increasing the brightness //as we look at the light dead on LPoint3f origin = LPoint3f::origin() * inv_light_mat * modelview_mat; @@ -341,13 +354,13 @@ sub_render(const AllAttributesWrapper &attrib, AllTransitionsWrapper &trans, float dot = view_dir.dot(light_dir); dot = (dot < 0) ? -dot : dot; - + prepare_flares(delta, light_pos, dot); prepare_blind(dot, pp->get_frustum()._fnear); - + render_children(_flare_arcs, attrib, trans, gsg); render_child(_blind_arc, attrib, trans, gsg); - + //Short circuit the rendering return false; } @@ -360,7 +373,7 @@ sub_render(const AllAttributesWrapper &attrib, AllTransitionsWrapper &trans, // traversal. //////////////////////////////////////////////////////////////////// bool LensFlareNode:: -has_sub_render() const +has_sub_render() const { return true; } @@ -382,7 +395,7 @@ write_datagram(BamWriter *manager, Datagram &me) { manager->write_pointer(me, _flares[i]); } manager->write_pointer(me, _blind); - + me.add_uint16(_flare_arcs.size()); for(i = 0; i < (int)_flare_arcs.size(); i++) { @@ -429,7 +442,7 @@ write_datagram(BamWriter *manager, Datagram &me) { // the new LensFlareNode. //////////////////////////////////////////////////////////////////// void LensFlareNode:: -fillin(DatagramIterator &scan, BamReader *manager) +fillin(DatagramIterator &scan, BamReader *manager) { int i, size; Node::fillin(scan, manager); @@ -442,7 +455,7 @@ fillin(DatagramIterator &scan, BamReader *manager) manager->read_pointer(scan, this); } manager->read_pointer(scan, this); - + _num_arcs = scan.get_uint16(); for(i = 0; i < _num_arcs; i++) { @@ -464,7 +477,7 @@ fillin(DatagramIterator &scan, BamReader *manager) READ_PTA(manager, scan, IPD_float::read_datagram, temp) _flare_angle_scales.push_back(temp); } - + size = scan.get_uint16(); for(i = 0; i < size; i++) { @@ -493,7 +506,7 @@ fillin(DatagramIterator &scan, BamReader *manager) // Function: LensFlareNode::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int LensFlareNode:: @@ -517,7 +530,7 @@ complete_pointers(vector_typedWritable &plist, BamReader *manager) } _light_node = DCAST(Node, plist[end]); - + return end+1; } @@ -558,7 +571,7 @@ register_with_read_factory() { //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// LensFlareNode:: LensFlareNode(void) : @@ -572,7 +585,7 @@ LensFlareNode(void) : //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_sparkle_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: set_sparkle_fps(float fps) @@ -603,7 +616,7 @@ compute_current(int ¤t_sparkle, vector_texture sparkles) //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::add_sparkle // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: add_sparkle(PT_Node source, PT(Texture) sparkle) @@ -615,16 +628,16 @@ add_sparkle(PT_Node source, PT(Texture) sparkle) //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_sparkles_attributes // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: -set_sparkles_attributes(PT_Node source, vector_float scales, +set_sparkles_attributes(PT_Node source, vector_float scales, vector_float offsets, vector_Colorf colors) { nassertv(scales.size() == offsets.size()); - + set_light(source); - + _sparkle_scales = scales; _sparkle_offsets = offsets; _sparkle_colors = colors; @@ -633,7 +646,7 @@ set_sparkles_attributes(PT_Node source, vector_float scales, //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::set_light // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: set_light(PT_Node light) @@ -648,12 +661,12 @@ set_light(PT_Node light) //////////////////////////////////////////////////////////////////// // Function: LensFlareNode::prepare_sparkles // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LensFlareNode:: prepare_sparkles(vector_relation &arcs, const vector_texture &sparkles, const vector_float &scales, const vector_float &offsets, - const vector_Colorf &colors, const LVector3f &delta, + const vector_Colorf &colors, const LVector3f &delta, const LPoint3f &light, const BoundingVolume &bound, int &old_sparkle) { //Sanity check @@ -704,7 +717,7 @@ prepare_sparkles(vector_relation &arcs, const vector_texture &sparkles, PTA_Colorf sprite_colors(0); coords.push_back(position); tex_scales.push_back(scales[i] * _texel_scale * _global_scale); - + sprite_colors.push_back(colors[i]); sprite->set_coords(coords, G_PER_VERTEX); diff --git a/panda/src/effects/lensFlareNode.h b/panda/src/effects/lensFlareNode.h index bb051b3c16..d1d3a53fcd 100644 --- a/panda/src/effects/lensFlareNode.h +++ b/panda/src/effects/lensFlareNode.h @@ -1,6 +1,19 @@ // Filename: lensFlareNode.h // Created by: jason (18Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LENS_FLARE_NODE @@ -19,12 +32,12 @@ class GraphicsStateGuardian; class ClockObject; -class EXPCL_PANDA LensFlareNode : public Node +class EXPCL_PANDA LensFlareNode : public Node { PUBLISHED: INLINE LensFlareNode(void); - - void add_flare(PT(Texture) flare, PTA_float scales, PTA_float offsets, + + void add_flare(PT(Texture) flare, PTA_float scales, PTA_float offsets, PTA_float angle_scales, PTA_Colorf colors); void add_blind(PT(Texture) blind); @@ -39,10 +52,10 @@ PUBLISHED: public: virtual bool sub_render(const AllAttributesWrapper &attrib, - AllTransitionsWrapper &trans, + AllTransitionsWrapper &trans, RenderTraverser *trav); virtual bool has_sub_render() const; - + private: typedef vector vector_Vfloat; typedef vector vector_Vcolorf; @@ -71,8 +84,8 @@ private: /****Internal functions*****/ //Sub-routines that are defined only for code cleanliness - void prepare_flares(const LVector3f &delta, const LPoint3f &light, const float &angle); - void prepare_blind(const float &angle, const float &tnear); + void prepare_flares(const LVector3f &delta, const LPoint3f &light, const float &angle); + void prepare_blind(const float &angle, const float &tnear); //All of the geometry for halos and blooms is created the same way. //Sparkle geometry is created differently because we cycle through @@ -80,7 +93,7 @@ private: void set_geometry(GeomSprite *sprite, const PTA_float &geom_scales, const PTA_float &geom_offsets, const PTA_float &geom_angle_scales, - const PTA_Colorf &geom_colors, const LVector3f &delta, + const PTA_Colorf &geom_colors, const LVector3f &delta, const LPoint3f &light, const float &angle); @@ -91,8 +104,8 @@ private: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_LensFlareNode(const FactoryParams ¶ms); @@ -125,10 +138,10 @@ private: #endif -/***********OLD SPARKLE CODE. LEFT IN CASE +/***********OLD SPARKLE CODE. LEFT IN CASE public: - void add_sparkle(PT_Node source, PT(Texture) sparkle); - void set_sparkles_attributes(PT_Node source, float angle_scale, vector_float scales, + void add_sparkle(PT_Node source, PT(Texture) sparkle); + void set_sparkles_attributes(PT_Node source, float angle_scale, vector_float scales, vector_float offsets, vector_Colorf colors); void set_sparkle_fps(float fps); @@ -156,7 +169,7 @@ private: void prepare_sparkles(vector_relation &arcs, const vector_texture &sparkles, const vector_float &scales, const vector_float &offsets, const vector_Colorf &colors, const LVector3f &delta, - const LPoint3f &light, const BoundingVolume &bound, int &old_sparkle); + const LPoint3f &light, const BoundingVolume &bound, int &old_sparkle); //Timing function to control sparkle animation int compute_current(int ¤t_sparkle, vector_texture sparkles); diff --git a/panda/src/egg/config_egg.cxx b/panda/src/egg/config_egg.cxx index 7d61c34965..374aa75e83 100644 --- a/panda/src/egg/config_egg.cxx +++ b/panda/src/egg/config_egg.cxx @@ -1,6 +1,19 @@ // Filename: config_egg.cxx // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_egg.h" diff --git a/panda/src/egg/config_egg.h b/panda/src/egg/config_egg.h index 3e4cccd104..795b3c4fd7 100644 --- a/panda/src/egg/config_egg.h +++ b/panda/src/egg/config_egg.h @@ -1,6 +1,19 @@ // Filename: config_egg.h // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_EGG_H diff --git a/panda/src/egg/eggAnimData.I b/panda/src/egg/eggAnimData.I index cd094d21ca..3b56268254 100644 --- a/panda/src/egg/eggAnimData.I +++ b/panda/src/egg/eggAnimData.I @@ -1,6 +1,19 @@ // Filename: eggAnimData.I // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggAnimData::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggAnimData:: EggAnimData(const string &name) : EggNode(name) { @@ -19,11 +32,11 @@ EggAnimData(const string &name) : EggNode(name) { //////////////////////////////////////////////////////////////////// // Function: EggAnimData::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggAnimData:: -EggAnimData(const EggAnimData ©) : - EggNode(copy), _data(copy._data), +EggAnimData(const EggAnimData ©) : + EggNode(copy), _data(copy._data), _fps(copy._fps), _has_fps(copy._has_fps) { } @@ -31,7 +44,7 @@ EggAnimData(const EggAnimData ©) : //////////////////////////////////////////////////////////////////// // Function: EggAnimData::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggAnimData &EggAnimData:: operator = (const EggAnimData ©) { @@ -47,7 +60,7 @@ operator = (const EggAnimData ©) { //////////////////////////////////////////////////////////////////// // Function: EggAnimData::set_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAnimData:: set_fps(double fps) { @@ -59,7 +72,7 @@ set_fps(double fps) { //////////////////////////////////////////////////////////////////// // Function: EggAnimData::clear_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAnimData:: clear_fps() { @@ -69,7 +82,7 @@ clear_fps() { //////////////////////////////////////////////////////////////////// // Function: EggAnimData::has_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggAnimData:: has_fps() const { diff --git a/panda/src/egg/eggAnimData.cxx b/panda/src/egg/eggAnimData.cxx index b53fcf4cc3..9a53f04f92 100644 --- a/panda/src/egg/eggAnimData.cxx +++ b/panda/src/egg/eggAnimData.cxx @@ -1,6 +1,19 @@ // Filename: eggAnimData.cxx // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggAnimData.h" diff --git a/panda/src/egg/eggAnimData.h b/panda/src/egg/eggAnimData.h index 5bd58f7ac0..57888b2f1f 100644 --- a/panda/src/egg/eggAnimData.h +++ b/panda/src/egg/eggAnimData.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGANIMDATA_H #define EGGANIMDATA_H @@ -59,7 +72,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggAttributes.I b/panda/src/egg/eggAttributes.I index b626f73096..9bb3b58a6f 100644 --- a/panda/src/egg/eggAttributes.I +++ b/panda/src/egg/eggAttributes.I @@ -1,6 +1,19 @@ // Filename: eggAttributes.I // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggAttributes::has_normal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggAttributes:: has_normal() const { @@ -19,7 +32,7 @@ has_normal() const { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::get_normal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const Normald &EggAttributes:: get_normal() const { @@ -30,7 +43,7 @@ get_normal() const { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::set_normal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: set_normal(const Normald &normal) { @@ -41,7 +54,7 @@ set_normal(const Normald &normal) { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::clear_normal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: clear_normal() { @@ -51,7 +64,7 @@ clear_normal() { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::has_uv // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggAttributes:: has_uv() const { @@ -61,7 +74,7 @@ has_uv() const { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::get_uv // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const TexCoordd &EggAttributes:: get_uv() const { @@ -72,7 +85,7 @@ get_uv() const { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::set_uv // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: set_uv(const TexCoordd &uv) { @@ -83,7 +96,7 @@ set_uv(const TexCoordd &uv) { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::clear_uv // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: clear_uv() { @@ -93,7 +106,7 @@ clear_uv() { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::has_color // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggAttributes:: has_color() const { @@ -103,7 +116,7 @@ has_color() const { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::get_color // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const Colorf &EggAttributes:: get_color() const { @@ -114,7 +127,7 @@ get_color() const { //////////////////////////////////////////////////////////////////// // Function: EggAttributes:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: set_color(const Colorf &color) { @@ -125,7 +138,7 @@ set_color(const Colorf &color) { //////////////////////////////////////////////////////////////////// // Function: EggAttributes:: // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: clear_color() { diff --git a/panda/src/egg/eggAttributes.cxx b/panda/src/egg/eggAttributes.cxx index 8c05924086..18a790da44 100644 --- a/panda/src/egg/eggAttributes.cxx +++ b/panda/src/egg/eggAttributes.cxx @@ -1,6 +1,19 @@ // Filename: eggAttributes.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggAttributes.h" @@ -17,7 +30,7 @@ TypeHandle EggAttributes::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggAttributes::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggAttributes:: EggAttributes() { @@ -27,7 +40,7 @@ EggAttributes() { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggAttributes:: EggAttributes(const EggAttributes ©) { @@ -37,7 +50,7 @@ EggAttributes(const EggAttributes ©) { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggAttributes &EggAttributes:: operator = (const EggAttributes ©) { @@ -54,7 +67,7 @@ operator = (const EggAttributes ©) { //////////////////////////////////////////////////////////////////// // Function: EggAttributes::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggAttributes:: ~EggAttributes() { @@ -71,7 +84,7 @@ void EggAttributes:: write(ostream &out, int indent_level) const { if (has_normal()) { if (_dnormals.empty()) { - indent(out, indent_level) + indent(out, indent_level) << " { " << get_normal() << " }\n"; } else { indent(out, indent_level) << " {\n"; @@ -82,7 +95,7 @@ write(ostream &out, int indent_level) const { } if (has_uv()) { if (_duvs.empty()) { - indent(out, indent_level) + indent(out, indent_level) << " { " << get_uv() << " }\n"; } else { indent(out, indent_level) << " {\n"; @@ -93,7 +106,7 @@ write(ostream &out, int indent_level) const { } if (has_color()) { if (_drgbas.empty()) { - indent(out, indent_level) + indent(out, indent_level) << " { " << get_color() << " }\n"; } else { indent(out, indent_level) << " {\n"; @@ -103,7 +116,7 @@ write(ostream &out, int indent_level) const { } } } - + //////////////////////////////////////////////////////////////////// // Function: EggAttributes::sorts_less_than @@ -150,7 +163,7 @@ sorts_less_than(const EggAttributes &other) const { return _drgbas < other._drgbas; } } - + return false; } diff --git a/panda/src/egg/eggAttributes.h b/panda/src/egg/eggAttributes.h index 915c68f8c3..0e7b29bb76 100644 --- a/panda/src/egg/eggAttributes.h +++ b/panda/src/egg/eggAttributes.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGATTRIBUTES_H #define EGGATTRIBUTES_H diff --git a/panda/src/egg/eggBin.cxx b/panda/src/egg/eggBin.cxx index ef8c5b82ab..5f439a6715 100644 --- a/panda/src/egg/eggBin.cxx +++ b/panda/src/egg/eggBin.cxx @@ -1,6 +1,19 @@ // Filename: eggBin.cxx // Created by: drose (21Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggBin.h" @@ -12,7 +25,7 @@ TypeHandle EggBin::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggBin::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggBin:: EggBin(const string &name) : EggGroup(name) { @@ -23,7 +36,7 @@ EggBin(const string &name) : EggGroup(name) { //////////////////////////////////////////////////////////////////// // Function: EggBin::EggGroup copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggBin:: EggBin(const EggGroup ©) : EggGroup(copy) { @@ -34,18 +47,18 @@ EggBin(const EggGroup ©) : EggGroup(copy) { //////////////////////////////////////////////////////////////////// // Function: EggBin::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggBin:: EggBin(const EggBin ©) : EggGroup(copy), _bin_number(copy._bin_number) { } - + //////////////////////////////////////////////////////////////////// // Function: EggBin::set_bin_number // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggBin:: set_bin_number(int bin_number) { @@ -55,7 +68,7 @@ set_bin_number(int bin_number) { //////////////////////////////////////////////////////////////////// // Function: EggBin::get_bin_number // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int EggBin:: get_bin_number() const { diff --git a/panda/src/egg/eggBin.h b/panda/src/egg/eggBin.h index 8fa37ad93b..678585c055 100644 --- a/panda/src/egg/eggBin.h +++ b/panda/src/egg/eggBin.h @@ -2,6 +2,19 @@ // Created by: drose (21Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGBIN_H #define EGGBIN_H @@ -44,7 +57,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggBinMaker.cxx b/panda/src/egg/eggBinMaker.cxx index 3ec60b5e9f..de2d8c6820 100644 --- a/panda/src/egg/eggBinMaker.cxx +++ b/panda/src/egg/eggBinMaker.cxx @@ -1,6 +1,19 @@ // Filename: eggBinMaker.cxx // Created by: drose (21Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggBinMaker.h" @@ -212,8 +225,8 @@ make_bins_for_group(EggGroupNode *group, const Bins &bins) { bool collapse = false; - if (group->empty() && - bins.size() == 1 && + if (group->empty() && + bins.size() == 1 && group->get_parent() != NULL && group->is_of_type(EggGroup::get_class_type())) { const Nodes &nodes = bins.front(); diff --git a/panda/src/egg/eggBinMaker.h b/panda/src/egg/eggBinMaker.h index fe7e69e6cb..29ec25cb95 100644 --- a/panda/src/egg/eggBinMaker.h +++ b/panda/src/egg/eggBinMaker.h @@ -2,6 +2,19 @@ // Created by: drose (21Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGBINMAKER_H #define EGGBINMAKER_H @@ -295,5 +308,5 @@ private: }; #endif - - + + diff --git a/panda/src/egg/eggComment.I b/panda/src/egg/eggComment.I index 96deb9e88f..2ec6d0da76 100644 --- a/panda/src/egg/eggComment.I +++ b/panda/src/egg/eggComment.I @@ -1,13 +1,26 @@ // Filename: eggComment.I // Created by: drose (20Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggComment::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggComment:: EggComment(const string &node_name, const string &comment) @@ -17,7 +30,7 @@ EggComment(const string &node_name, const string &comment) //////////////////////////////////////////////////////////////////// // Function: EggComment::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggComment:: EggComment(const EggComment ©) : EggNode(copy), _comment(copy._comment) { @@ -27,7 +40,7 @@ EggComment(const EggComment ©) : EggNode(copy), _comment(copy._comment) { //////////////////////////////////////////////////////////////////// // Function: EggComment::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggComment &EggComment:: operator = (const string &comment) { @@ -39,7 +52,7 @@ operator = (const string &comment) { //////////////////////////////////////////////////////////////////// // Function: EggComment::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggComment &EggComment:: operator = (const EggComment ©) { @@ -51,7 +64,7 @@ operator = (const EggComment ©) { //////////////////////////////////////////////////////////////////// // Function: EggComment::String typecast operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggComment:: operator const string & () const { @@ -62,7 +75,7 @@ operator const string & () const { //////////////////////////////////////////////////////////////////// // Function: EggComment::set_comment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggComment:: set_comment(const string &comment) { @@ -73,7 +86,7 @@ set_comment(const string &comment) { //////////////////////////////////////////////////////////////////// // Function: EggComment::set_comment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string EggComment:: get_comment() const { diff --git a/panda/src/egg/eggComment.cxx b/panda/src/egg/eggComment.cxx index ba8b2a477c..c637841aec 100644 --- a/panda/src/egg/eggComment.cxx +++ b/panda/src/egg/eggComment.cxx @@ -1,6 +1,19 @@ // Filename: eggComment.cxx // Created by: drose (20Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggComment.h" diff --git a/panda/src/egg/eggComment.h b/panda/src/egg/eggComment.h index e1318faae8..0201097b02 100644 --- a/panda/src/egg/eggComment.h +++ b/panda/src/egg/eggComment.h @@ -2,6 +2,19 @@ // Created by: drose (20Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGCOMMENT_H #define EGGCOMMENT_H @@ -24,7 +37,7 @@ public: // You can use the string operators to directly set and manipulate // the comment. - + INLINE EggComment &operator = (const string &comment); INLINE EggComment &operator = (const EggComment ©); @@ -34,7 +47,7 @@ public: INLINE void set_comment(const string &comment); INLINE string get_comment() const; - + virtual void write(ostream &out, int indent_level) const; private: @@ -55,7 +68,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggCoordinateSystem.I b/panda/src/egg/eggCoordinateSystem.I index a69674fac7..711694b11c 100644 --- a/panda/src/egg/eggCoordinateSystem.I +++ b/panda/src/egg/eggCoordinateSystem.I @@ -1,6 +1,19 @@ // Filename: eggCoordinateSystem.I // Created by: drose (20Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggCoordinateSystem::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggCoordinateSystem:: EggCoordinateSystem(CoordinateSystem value) { @@ -19,17 +32,17 @@ EggCoordinateSystem(CoordinateSystem value) { //////////////////////////////////////////////////////////////////// // Function: EggCoordinateSystem::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggCoordinateSystem:: -EggCoordinateSystem(const EggCoordinateSystem ©) +EggCoordinateSystem(const EggCoordinateSystem ©) : EggNode(copy), _value(copy._value) { } - + //////////////////////////////////////////////////////////////////// // Function: EggCoordinateSystem::set_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggCoordinateSystem:: set_value(CoordinateSystem value) { @@ -40,7 +53,7 @@ set_value(CoordinateSystem value) { //////////////////////////////////////////////////////////////////// // Function: EggCoordinateSystem::set_value // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CoordinateSystem EggCoordinateSystem:: get_value() const { diff --git a/panda/src/egg/eggCoordinateSystem.cxx b/panda/src/egg/eggCoordinateSystem.cxx index d326ca5110..468f80ae69 100644 --- a/panda/src/egg/eggCoordinateSystem.cxx +++ b/panda/src/egg/eggCoordinateSystem.cxx @@ -1,6 +1,19 @@ // Filename: eggCoordinateSystem.cxx // Created by: drose (20Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggCoordinateSystem.h" @@ -20,7 +33,7 @@ void EggCoordinateSystem:: write(ostream &out, int indent_level) const { if (get_value() != CS_default && get_value() != CS_invalid) { - indent(out, indent_level) + indent(out, indent_level) << " { "; switch (get_value()) { case CS_zup_right: diff --git a/panda/src/egg/eggCoordinateSystem.h b/panda/src/egg/eggCoordinateSystem.h index 603997a342..8754657482 100644 --- a/panda/src/egg/eggCoordinateSystem.h +++ b/panda/src/egg/eggCoordinateSystem.h @@ -2,6 +2,19 @@ // Created by: drose (20Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGCOORDINATESYSTEM_H #define EGGCOORDINATESYSTEM_H @@ -27,7 +40,7 @@ public: INLINE void set_value(CoordinateSystem value); INLINE CoordinateSystem get_value() const; - + virtual void write(ostream &out, int indent_level) const; private: @@ -48,7 +61,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggCurve.I b/panda/src/egg/eggCurve.I index 1ea693fa97..3d03dfa3dc 100644 --- a/panda/src/egg/eggCurve.I +++ b/panda/src/egg/eggCurve.I @@ -1,13 +1,26 @@ // Filename: eggCurve.I // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggCurve::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggCurve:: EggCurve(const string &name) : EggPrimitive(name) { @@ -18,10 +31,10 @@ EggCurve(const string &name) : EggPrimitive(name) { //////////////////////////////////////////////////////////////////// // Function: EggCurve::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggCurve:: -EggCurve(const EggCurve ©) : +EggCurve(const EggCurve ©) : EggPrimitive(copy), _subdiv(copy._subdiv), _type(copy._type) @@ -31,7 +44,7 @@ EggCurve(const EggCurve ©) : //////////////////////////////////////////////////////////////////// // Function: EggCurve::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggCurve &EggCurve:: operator = (const EggCurve ©) { diff --git a/panda/src/egg/eggCurve.cxx b/panda/src/egg/eggCurve.cxx index 84656a8865..8d01c5ea03 100644 --- a/panda/src/egg/eggCurve.cxx +++ b/panda/src/egg/eggCurve.cxx @@ -1,6 +1,19 @@ // Filename: eggCurve.cxx // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggCurve.h" @@ -33,7 +46,7 @@ string_curve_type(const string &string) { //////////////////////////////////////////////////////////////////// // Function: CurveType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggCurve::CurveType t) { switch (t) { diff --git a/panda/src/egg/eggCurve.h b/panda/src/egg/eggCurve.h index 4b1d40c6ff..8d4a65fdd5 100644 --- a/panda/src/egg/eggCurve.h +++ b/panda/src/egg/eggCurve.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGCURVE_H #define EGGCURVE_H @@ -54,7 +67,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggData.I b/panda/src/egg/eggData.I index 69b5f4eeb5..818bcb1bc8 100644 --- a/panda/src/egg/eggData.I +++ b/panda/src/egg/eggData.I @@ -1,13 +1,26 @@ // Filename: eggData.I // Created by: drose (11Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggData::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggData:: EggData() { @@ -18,19 +31,19 @@ EggData() { //////////////////////////////////////////////////////////////////// // Function: EggData::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggData:: -EggData(const EggData ©) : - EggGroupNode(copy), - _coordsys(copy._coordsys), +EggData(const EggData ©) : + EggGroupNode(copy), + _coordsys(copy._coordsys), _egg_filename(copy._egg_filename) { } //////////////////////////////////////////////////////////////////// // Function: EggData::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggData &EggData:: operator = (const EggData ©) { diff --git a/panda/src/egg/eggData.cxx b/panda/src/egg/eggData.cxx index 1c4756238e..8976127517 100644 --- a/panda/src/egg/eggData.cxx +++ b/panda/src/egg/eggData.cxx @@ -1,6 +1,19 @@ // Filename: eggData.cxx // Created by: drose (20Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggData.h" @@ -147,7 +160,7 @@ int EggData:: collapse_equivalent_textures() { EggTextureCollection textures; textures.find_used_textures(this); - return + return textures.collapse_equivalent_textures(~EggTexture::E_tref_name, this); } @@ -165,7 +178,7 @@ int EggData:: collapse_equivalent_materials() { EggMaterialCollection materials; materials.find_used_materials(this); - return + return materials.collapse_equivalent_materials(~EggMaterial::E_mref_name, this); } @@ -213,7 +226,7 @@ set_coordinate_system(CoordinateSystem new_coordsys) { if (new_coordsys == CS_default) { new_coordsys = default_coordinate_system; } - if (new_coordsys != _coordsys && + if (new_coordsys != _coordsys && (_coordsys != CS_default && _coordsys != CS_invalid)) { // Time to convert the data. r_transform(LMatrix4d::convert_mat(_coordsys, new_coordsys), diff --git a/panda/src/egg/eggData.h b/panda/src/egg/eggData.h index 4cb38504d8..b8587028cd 100644 --- a/panda/src/egg/eggData.h +++ b/panda/src/egg/eggData.h @@ -2,6 +2,19 @@ // Created by: drose (20Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGDATA_H #define EGGDATA_H @@ -36,7 +49,7 @@ public: INLINE EggData(const EggData ©); INLINE EggData &operator = (const EggData ©); - static bool resolve_egg_filename(Filename &egg_filename, + static bool resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath = DSearchPath()); bool read(Filename filename); @@ -82,7 +95,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggExternalReference.I b/panda/src/egg/eggExternalReference.I index 7677516f38..cd8e623e43 100644 --- a/panda/src/egg/eggExternalReference.I +++ b/panda/src/egg/eggExternalReference.I @@ -1,5 +1,18 @@ // Filename: eggExternalReference.I // Created by: drose (11Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/egg/eggExternalReference.cxx b/panda/src/egg/eggExternalReference.cxx index f5664be2b9..96460833c0 100644 --- a/panda/src/egg/eggExternalReference.cxx +++ b/panda/src/egg/eggExternalReference.cxx @@ -1,6 +1,19 @@ // Filename: eggExternalReference.cxx // Created by: drose (11Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggExternalReference.h" @@ -15,27 +28,27 @@ TypeHandle EggExternalReference::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggExternalReference::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggExternalReference:: -EggExternalReference(const string &node_name, const string &filename) +EggExternalReference(const string &node_name, const string &filename) : EggFilenameNode(node_name, filename) { } //////////////////////////////////////////////////////////////////// // Function: EggExternalReference::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggExternalReference:: -EggExternalReference(const EggExternalReference ©) +EggExternalReference(const EggExternalReference ©) : EggFilenameNode(copy) { } //////////////////////////////////////////////////////////////////// // Function: EggExternalReference::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggExternalReference &EggExternalReference:: operator = (const EggExternalReference ©) { diff --git a/panda/src/egg/eggExternalReference.h b/panda/src/egg/eggExternalReference.h index 10fbf20143..a13ea3aeb2 100644 --- a/panda/src/egg/eggExternalReference.h +++ b/panda/src/egg/eggExternalReference.h @@ -2,6 +2,19 @@ // Created by: drose (11Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGEXTERNALREFERENCE_H #define EGGEXTERNALREFERENCE_H @@ -39,7 +52,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggFilenameNode.I b/panda/src/egg/eggFilenameNode.I index d0d38613a0..492744b06f 100644 --- a/panda/src/egg/eggFilenameNode.I +++ b/panda/src/egg/eggFilenameNode.I @@ -1,13 +1,26 @@ // Filename: eggFilenameNode.I // Created by: drose (11Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggFilenameNode::Default constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggFilenameNode:: EggFilenameNode() { @@ -16,10 +29,10 @@ EggFilenameNode() { //////////////////////////////////////////////////////////////////// // Function: EggFilenameNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggFilenameNode:: -EggFilenameNode(const string &node_name, const Filename &filename) : +EggFilenameNode(const string &node_name, const Filename &filename) : EggNode(node_name), _filename(filename) { @@ -28,7 +41,7 @@ EggFilenameNode(const string &node_name, const Filename &filename) : //////////////////////////////////////////////////////////////////// // Function: EggFilenameNode::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggFilenameNode:: EggFilenameNode(const EggFilenameNode ©) : @@ -40,7 +53,7 @@ EggFilenameNode(const EggFilenameNode ©) : //////////////////////////////////////////////////////////////////// // Function: EggFilenameNode::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggFilenameNode &EggFilenameNode:: operator = (const EggFilenameNode ©) { @@ -62,7 +75,7 @@ get_filename() const { //////////////////////////////////////////////////////////////////// // Function: EggFilenameNode::set_filename // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggFilenameNode:: set_filename(const Filename &filename) { diff --git a/panda/src/egg/eggFilenameNode.cxx b/panda/src/egg/eggFilenameNode.cxx index cafc63c7ec..cb8997f9c7 100644 --- a/panda/src/egg/eggFilenameNode.cxx +++ b/panda/src/egg/eggFilenameNode.cxx @@ -1,6 +1,19 @@ // Filename: eggFilenameNode.cxx // Created by: drose (11Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggFilenameNode.h" diff --git a/panda/src/egg/eggFilenameNode.h b/panda/src/egg/eggFilenameNode.h index 79d2f9d969..fa74ffdded 100644 --- a/panda/src/egg/eggFilenameNode.h +++ b/panda/src/egg/eggFilenameNode.h @@ -1,7 +1,20 @@ -// FilenameNode: eggFilenameNode.h +// Filename: eggFilenameNode.h // Created by: drose (11Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGFILENAMENODE_H #define EGGFILENAMENODE_H @@ -47,7 +60,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggGroup.I b/panda/src/egg/eggGroup.I index 0ea54c89a0..2a376a1ba0 100644 --- a/panda/src/egg/eggGroup.I +++ b/panda/src/egg/eggGroup.I @@ -1,13 +1,26 @@ // Filename: eggGroup.I // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_group_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggGroup::GroupType EggGroup:: get_group_type() const { @@ -17,7 +30,7 @@ get_group_type() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_billboard_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_billboard_type(BillboardType type) { @@ -29,7 +42,7 @@ set_billboard_type(BillboardType type) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_billboard_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggGroup::BillboardType EggGroup:: get_billboard_type() const { @@ -66,7 +79,7 @@ set_billboard_center(const LPoint3d &billboard_center) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::clear_billboard_center // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: clear_billboard_center() { @@ -76,7 +89,7 @@ clear_billboard_center() { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_billboard_center // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_billboard_center() const { @@ -86,7 +99,7 @@ has_billboard_center() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_billboard_center // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LPoint3d &EggGroup:: get_billboard_center() const { @@ -97,7 +110,7 @@ get_billboard_center() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_cs_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_cs_type(CollisionSolidType type) { @@ -109,7 +122,7 @@ set_cs_type(CollisionSolidType type) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_cs_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggGroup::CollisionSolidType EggGroup:: get_cs_type() const { @@ -119,7 +132,7 @@ get_cs_type() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_collision_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_collision_name(const string &collision_name) { @@ -129,7 +142,7 @@ set_collision_name(const string &collision_name) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::clear_collision_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: clear_collision_name() { @@ -139,7 +152,7 @@ clear_collision_name() { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_collision_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_collision_name() const { @@ -149,7 +162,7 @@ has_collision_name() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_collision_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &EggGroup:: get_collision_name() const { @@ -159,7 +172,7 @@ get_collision_name() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_collide_flags // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_collide_flags(int flags) { @@ -171,7 +184,7 @@ set_collide_flags(int flags) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_collide_flags // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggGroup::CollideFlags EggGroup:: get_collide_flags() const { @@ -181,7 +194,7 @@ get_collide_flags() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_dcs_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_dcs_flag(bool flag) { @@ -195,7 +208,7 @@ set_dcs_flag(bool flag) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_dcs_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: get_dcs_flag() const { @@ -205,7 +218,7 @@ get_dcs_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_dart_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_dart_type(DartType type) { @@ -217,7 +230,7 @@ set_dart_type(DartType type) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_dart_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggGroup::DartType EggGroup:: get_dart_type() const { @@ -227,7 +240,7 @@ get_dart_type() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_switch_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_switch_flag(bool flag) { @@ -241,7 +254,7 @@ set_switch_flag(bool flag) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_switch_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: get_switch_flag() const { @@ -251,7 +264,7 @@ get_switch_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_switch_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_switch_fps(double fps) { @@ -261,7 +274,7 @@ set_switch_fps(double fps) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_switch_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE double EggGroup:: get_switch_fps() const { @@ -271,7 +284,7 @@ get_switch_fps() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_transform // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_transform() const { @@ -281,7 +294,7 @@ has_transform() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_transform // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LMatrix4d EggGroup:: get_transform() const { @@ -299,14 +312,14 @@ get_transform() const { //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: transform_is_identity() const { - return (!has_transform() || + return (!has_transform() || _transform.almost_equal(LMatrix4d::ident_mat(), 0.0001)); } //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_objecttype // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_objecttype(const string &objecttype) { @@ -316,7 +329,7 @@ set_objecttype(const string &objecttype) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::clear_objecttype // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: clear_objecttype() { @@ -326,7 +339,7 @@ clear_objecttype() { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_objecttype // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_objecttype() const { @@ -336,7 +349,7 @@ has_objecttype() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_objecttype // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &EggGroup:: get_objecttype() const { @@ -346,7 +359,7 @@ get_objecttype() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_model_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_model_flag(bool flag) { @@ -360,7 +373,7 @@ set_model_flag(bool flag) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_model_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: get_model_flag() const { @@ -370,7 +383,7 @@ get_model_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_texlist_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_texlist_flag(bool flag) { @@ -384,7 +397,7 @@ set_texlist_flag(bool flag) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_texlist_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: get_texlist_flag() const { @@ -394,7 +407,7 @@ get_texlist_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_nofog_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_nofog_flag(bool flag) { @@ -408,7 +421,7 @@ set_nofog_flag(bool flag) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_nofog_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: get_nofog_flag() const { @@ -418,7 +431,7 @@ get_nofog_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_decal_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_decal_flag(bool flag) { @@ -432,7 +445,7 @@ set_decal_flag(bool flag) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_decal_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: get_decal_flag() const { @@ -442,7 +455,7 @@ get_decal_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_direct_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_direct_flag(bool flag) { @@ -456,7 +469,7 @@ set_direct_flag(bool flag) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_direct_flag // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: get_direct_flag() const { @@ -467,7 +480,7 @@ get_direct_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_collide_mask(CollideMask mask) { @@ -478,7 +491,7 @@ set_collide_mask(CollideMask mask) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::clear_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: clear_collide_mask() { @@ -488,7 +501,7 @@ clear_collide_mask() { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_collide_mask() const { @@ -498,7 +511,7 @@ has_collide_mask() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollideMask EggGroup:: get_collide_mask() const { @@ -509,7 +522,7 @@ get_collide_mask() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_from_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_from_collide_mask(CollideMask mask) { @@ -520,7 +533,7 @@ set_from_collide_mask(CollideMask mask) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::clear_from_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: clear_from_collide_mask() { @@ -530,7 +543,7 @@ clear_from_collide_mask() { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_from_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_from_collide_mask() const { @@ -540,7 +553,7 @@ has_from_collide_mask() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_from_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollideMask EggGroup:: get_from_collide_mask() const { @@ -551,7 +564,7 @@ get_from_collide_mask() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_into_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_into_collide_mask(CollideMask mask) { @@ -562,7 +575,7 @@ set_into_collide_mask(CollideMask mask) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::clear_into_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: clear_into_collide_mask() { @@ -572,7 +585,7 @@ clear_into_collide_mask() { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_into_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_into_collide_mask() const { @@ -582,7 +595,7 @@ has_into_collide_mask() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_into_collide_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CollideMask EggGroup:: get_into_collide_mask() const { @@ -593,7 +606,7 @@ get_into_collide_mask() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_lod // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggGroup:: set_lod(const EggSwitchCondition &lod) { @@ -603,7 +616,7 @@ set_lod(const EggSwitchCondition &lod) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::has_lod // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggGroup:: has_lod() const { @@ -613,7 +626,7 @@ has_lod() const { //////////////////////////////////////////////////////////////////// // Function: EggGroup::get_lod // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const EggSwitchCondition &EggGroup:: get_lod() const { diff --git a/panda/src/egg/eggGroup.cxx b/panda/src/egg/eggGroup.cxx index ecf0f28af3..4cb92f33b1 100644 --- a/panda/src/egg/eggGroup.cxx +++ b/panda/src/egg/eggGroup.cxx @@ -1,6 +1,19 @@ // Filename: eggGroup.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggGroup.h" @@ -18,7 +31,7 @@ TypeHandle EggGroup::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggGroup::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroup:: EggGroup(const string &name) : EggGroupNode(name) { @@ -31,7 +44,7 @@ EggGroup(const string &name) : EggGroupNode(name) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroup:: EggGroup(const EggGroup ©) { @@ -41,7 +54,7 @@ EggGroup(const EggGroup ©) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroup &EggGroup:: operator = (const EggGroup ©) { @@ -81,7 +94,7 @@ operator = (const EggGroup ©) { //////////////////////////////////////////////////////////////////// // Function: EggGroup::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroup:: ~EggGroup() { @@ -91,7 +104,7 @@ EggGroup:: //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_group_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggGroup:: set_group_type(GroupType type) { @@ -171,7 +184,7 @@ write(ostream &out, int indent_level) const { } if (get_billboard_type() != BT_none) { - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " { " << get_billboard_type() << " }\n"; } @@ -193,21 +206,21 @@ write(ostream &out, int indent_level) const { } if (has_collide_mask()) { - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " collide-mask { 0x"; get_collide_mask().output_hex(out, 0); out << " }\n"; } if (has_from_collide_mask()) { - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " from-collide-mask { 0x"; get_from_collide_mask().output_hex(out, 0); out << " }\n"; } if (has_into_collide_mask()) { - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " into-collide-mask { 0x"; get_into_collide_mask().output_hex(out, 0); out << " }\n"; @@ -235,7 +248,7 @@ write(ostream &out, int indent_level) const { } if (has_objecttype()) { - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " { "; enquote_string(out, get_objecttype()) << " }\n"; } @@ -642,15 +655,15 @@ write_vertex_ref(ostream &out, int indent_level) const { double membership = (*mi).first; const Indices &indices = (*mi).second; - indent(out, indent_level) + indent(out, indent_level) << " {\n"; write_long_list(out, indent_level+2, indices.begin(), indices.end(), "", "", 72); - + // If all vrefs in this group have membership of 1, don't bother // to write out the membership scalar. if (!all_membership_one) { - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " membership { " << membership << " }\n"; } if (pool == (EggVertexPool *)NULL) { @@ -694,7 +707,7 @@ egg_start_parse_body() { void EggGroup:: adjust_under() { // Billboards without an explicit center are an implicit instance. - bool is_billboard_instance = + bool is_billboard_instance = (get_billboard_type() != BT_none && !has_billboard_center()); // If we have our own transform, it carries forward. @@ -706,7 +719,7 @@ adjust_under() { _under_flags |= UF_under_transform; // Our own transform also affects our node frame. - _node_frame = + _node_frame = new MatrixFrame(get_transform() * get_node_frame()); _node_frame_inv = new MatrixFrame(invert(get_node_frame())); @@ -759,7 +772,7 @@ r_transform(const LMatrix4d &mat, const LMatrix4d &inv, LMatrix4d mat1 = mat; LMatrix4d inv1 = inv; - + // If we have a translation component, we should only apply // it to the top matrix. All subsequent matrices get just the // rotational component. @@ -821,7 +834,7 @@ r_flatten_transforms() { //////////////////////////////////////////////////////////////////// // Function: GroupType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggGroup::GroupType t) { switch (t) { @@ -841,7 +854,7 @@ ostream &operator << (ostream &out, EggGroup::GroupType t) { //////////////////////////////////////////////////////////////////// // Function: DartType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggGroup::DartType t) { switch (t) { @@ -861,7 +874,7 @@ ostream &operator << (ostream &out, EggGroup::DartType t) { //////////////////////////////////////////////////////////////////// // Function: BillboardType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggGroup::BillboardType t) { switch (t) { @@ -881,7 +894,7 @@ ostream &operator << (ostream &out, EggGroup::BillboardType t) { //////////////////////////////////////////////////////////////////// // Function: CollisionSolidType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggGroup::CollisionSolidType t) { switch (t) { @@ -907,7 +920,7 @@ ostream &operator << (ostream &out, EggGroup::CollisionSolidType t) { //////////////////////////////////////////////////////////////////// // Function: CollideFlags output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggGroup::CollideFlags t) { if (t == EggGroup::CF_none) { diff --git a/panda/src/egg/eggGroup.h b/panda/src/egg/eggGroup.h index 95aae96ae5..88a50d973c 100644 --- a/panda/src/egg/eggGroup.h +++ b/panda/src/egg/eggGroup.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGGROUP_H #define EGGGROUP_H @@ -243,7 +256,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggGroupNode.I b/panda/src/egg/eggGroupNode.I index a980f47c4e..590b141979 100644 --- a/panda/src/egg/eggGroupNode.I +++ b/panda/src/egg/eggGroupNode.I @@ -1,6 +1,19 @@ // Filename: eggGroupNode.I // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/egg/eggGroupNode.cxx b/panda/src/egg/eggGroupNode.cxx index b7c96fa565..1bc27ad59b 100644 --- a/panda/src/egg/eggGroupNode.cxx +++ b/panda/src/egg/eggGroupNode.cxx @@ -1,6 +1,19 @@ // Filename: eggGroupNode.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggGroupNode.h" @@ -29,7 +42,7 @@ TypeHandle EggGroupNode::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode:: EggGroupNode(const EggGroupNode ©) : EggNode(copy) { @@ -42,7 +55,7 @@ EggGroupNode(const EggGroupNode ©) : EggNode(copy) { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode &EggGroupNode:: operator =(const EggGroupNode ©) { @@ -57,7 +70,7 @@ operator =(const EggGroupNode ©) { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode:: ~EggGroupNode() { @@ -81,7 +94,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::iterator EggGroupNode:: begin() const { @@ -91,7 +104,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::iterator EggGroupNode:: end() const { @@ -101,7 +114,7 @@ end() const { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::rbegin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::reverse_iterator EggGroupNode:: rbegin() const { @@ -111,7 +124,7 @@ rbegin() const { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::rend // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::reverse_iterator EggGroupNode:: rend() const { @@ -121,7 +134,7 @@ rend() const { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool EggGroupNode:: empty() const { @@ -131,7 +144,7 @@ empty() const { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::size_type EggGroupNode:: size() const { @@ -141,7 +154,7 @@ size() const { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::insert // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::iterator EggGroupNode:: insert(iterator position, PT(EggNode) x) { @@ -152,7 +165,7 @@ insert(iterator position, PT(EggNode) x) { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::erase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::iterator EggGroupNode:: erase(iterator position) { @@ -163,7 +176,7 @@ erase(iterator position) { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::erase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode::iterator EggGroupNode:: erase(iterator first, iterator last) { @@ -171,7 +184,7 @@ erase(iterator first, iterator last) { for (i = first; i != last; ++i) { prepare_remove_child(*i); } - return _children.erase((Children::iterator &)first, + return _children.erase((Children::iterator &)first, (Children::iterator &)last); } @@ -194,7 +207,7 @@ replace(iterator position, PT(EggNode) x) { //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::clear // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggGroupNode:: clear() { @@ -368,7 +381,7 @@ recompute_vertex_normals(double threshold, CoordinateSystem cs) { NVertexGroup leftover_group; new_group.push_back(base_ref); ++gi; - + while (gi != group.end()) { const NVertexReference &ref = (*gi); double dot = base_ref._normal.dot(ref._normal); @@ -491,7 +504,7 @@ strip_normals() { prim->set_vertex(i, unique); } } - + } else if (child->is_of_type(EggGroupNode::get_class_type())) { DCAST(EggGroupNode, child)->strip_normals(); } @@ -526,7 +539,7 @@ triangulate_polygons(bool convex_also) { if (child->is_of_type(EggPolygon::get_class_type())) { EggPolygon *poly = DCAST(EggPolygon, child); poly->triangulate_in_place(convex_also); - + } else if (child->is_of_type(EggGroupNode::get_class_type())) { num_produced += DCAST(EggGroupNode, child)->triangulate_polygons(convex_also); } @@ -574,7 +587,7 @@ remove_unused_vertices() { // in the vertex pool, then remove the whole vertex pool. _children.erase(ci); } - + } else if (child->is_of_type(EggGroupNode::get_class_type())) { num_removed += DCAST(EggGroupNode, child)->remove_unused_vertices(); } @@ -610,7 +623,7 @@ remove_invalid_primitives() { _children.erase(ci); num_removed++; } - + } else if (child->is_of_type(EggGroupNode::get_class_type())) { num_removed += DCAST(EggGroupNode, child)->remove_invalid_primitives(); } @@ -661,7 +674,7 @@ update_under(int depth_offset) { // if we are not changing coordinate systems. //////////////////////////////////////////////////////////////////// void EggGroupNode:: -r_transform(const LMatrix4d &mat, const LMatrix4d &inv, +r_transform(const LMatrix4d &mat, const LMatrix4d &inv, CoordinateSystem to_cs) { Children::iterator ci; for (ci = _children.begin(); @@ -764,7 +777,7 @@ find_coordsys_entry() { EggNode *child = *ci; if (child->is_of_type(EggCoordinateSystem::get_class_type())) { - CoordinateSystem new_cs = + CoordinateSystem new_cs = DCAST(EggCoordinateSystem, child)->get_value(); // Now remove the CoordinateSystem entry from our child list. @@ -780,7 +793,7 @@ find_coordsys_entry() { } } else if (child->is_of_type(EggGroupNode::get_class_type())) { - CoordinateSystem new_cs = + CoordinateSystem new_cs = DCAST(EggGroupNode, child)->find_coordsys_entry(); if (new_cs != CS_default) { if (coordsys != CS_default && coordsys != new_cs) { @@ -899,7 +912,7 @@ find_materials(EggMaterialCollection *collection) { // EggData::resolve_externals(). //////////////////////////////////////////////////////////////////// bool EggGroupNode:: -r_resolve_externals(const DSearchPath &searchpath, +r_resolve_externals(const DSearchPath &searchpath, CoordinateSystem coordsys) { bool success = true; @@ -914,10 +927,10 @@ r_resolve_externals(const DSearchPath &searchpath, // Replace the reference with an empty group node. When we load // the external file successfully, we'll put its contents here. Filename filename = ref->get_filename(); - EggGroupNode *new_node = + EggGroupNode *new_node = new EggGroupNode(filename.get_basename_wo_extension()); replace(ci, new_node); - + if (!EggData::resolve_egg_filename(filename, searchpath)) { egg_cat.error() << "Could not locate " << filename << " in " @@ -993,7 +1006,7 @@ prepare_remove_child(EggNode *node) { node->update_under(-(get_depth() + 1)); } - + //////////////////////////////////////////////////////////////////// // Function: EggGroupNode::r_collect_vertex_normals diff --git a/panda/src/egg/eggGroupNode.h b/panda/src/egg/eggGroupNode.h index ce1f1ed0b2..4b337bd9bb 100644 --- a/panda/src/egg/eggGroupNode.h +++ b/panda/src/egg/eggGroupNode.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGGROUPNODE_H #define EGGGROUPNODE_H @@ -161,7 +174,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/egg/eggGroupUniquifier.cxx b/panda/src/egg/eggGroupUniquifier.cxx index 1cbea2221c..eb074b8f45 100644 --- a/panda/src/egg/eggGroupUniquifier.cxx +++ b/panda/src/egg/eggGroupUniquifier.cxx @@ -1,6 +1,19 @@ // Filename: eggGroupUniquifier.cxx // Created by: drose (22Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggGroupUniquifier.h" @@ -16,7 +29,7 @@ TypeHandle EggGroupUniquifier::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggGroupUniquifier::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupUniquifier:: EggGroupUniquifier() { @@ -50,7 +63,7 @@ string EggGroupUniquifier:: filter_name(EggNode *node) { string name = node->get_name(); nassertr(!name.empty(), string()); - + string result; // First, replace characters not A-Z, a-z, 0-9, or '_' with @@ -61,7 +74,7 @@ filter_name(EggNode *node) { if (isalnum(*pi)) { result += *pi; last_underscore = false; - + } else if (!last_underscore) { result += '_'; last_underscore = true; diff --git a/panda/src/egg/eggGroupUniquifier.h b/panda/src/egg/eggGroupUniquifier.h index fa82826625..fa27f13825 100644 --- a/panda/src/egg/eggGroupUniquifier.h +++ b/panda/src/egg/eggGroupUniquifier.h @@ -1,6 +1,19 @@ // Filename: eggGroupUniquifier.h // Created by: drose (22Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef EGGGROUPUNIQUIFIER_H @@ -46,5 +59,5 @@ private: }; #endif - - + + diff --git a/panda/src/egg/eggMaterial.I b/panda/src/egg/eggMaterial.I index 17053e0a3a..8e9d48f850 100644 --- a/panda/src/egg/eggMaterial.I +++ b/panda/src/egg/eggMaterial.I @@ -1,13 +1,26 @@ // Filename: eggMaterial.I // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggMaterial::set_diff // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: set_diff(const Colorf &diff) { @@ -18,7 +31,7 @@ set_diff(const Colorf &diff) { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::clear_diff // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: clear_diff() { @@ -28,7 +41,7 @@ clear_diff() { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::has_diff // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggMaterial:: has_diff() const { @@ -54,7 +67,7 @@ get_diff() const { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::set_amb // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: set_amb(const Colorf &amb) { @@ -65,7 +78,7 @@ set_amb(const Colorf &amb) { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::clear_amb // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: clear_amb() { @@ -75,7 +88,7 @@ clear_amb() { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::has_amb // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggMaterial:: has_amb() const { @@ -101,7 +114,7 @@ get_amb() const { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::set_emit // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: set_emit(const Colorf &emit) { @@ -112,7 +125,7 @@ set_emit(const Colorf &emit) { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::clear_emit // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: clear_emit() { @@ -122,7 +135,7 @@ clear_emit() { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::has_emit // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggMaterial:: has_emit() const { @@ -148,7 +161,7 @@ get_emit() const { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::set_spec // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: set_spec(const Colorf &spec) { @@ -159,7 +172,7 @@ set_spec(const Colorf &spec) { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::clear_spec // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: clear_spec() { @@ -169,7 +182,7 @@ clear_spec() { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::has_spec // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggMaterial:: has_spec() const { @@ -195,7 +208,7 @@ get_spec() const { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::set_shininess // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: set_shininess(double shininess) { @@ -206,7 +219,7 @@ set_shininess(double shininess) { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::clear_shininess // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: clear_shininess() { @@ -216,7 +229,7 @@ clear_shininess() { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::has_shininess // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggMaterial:: has_shininess() const { @@ -226,7 +239,7 @@ has_shininess() const { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::get_shininess // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE double EggMaterial:: get_shininess() const { @@ -240,7 +253,7 @@ get_shininess() const { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::set_local // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: set_local(bool local) { @@ -251,7 +264,7 @@ set_local(bool local) { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::clear_local // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggMaterial:: clear_local() { @@ -261,7 +274,7 @@ clear_local() { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::has_local // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggMaterial:: has_local() const { @@ -271,7 +284,7 @@ has_local() const { //////////////////////////////////////////////////////////////////// // Function: EggMaterial::get_local // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggMaterial:: get_local() const { @@ -285,7 +298,7 @@ get_local() const { //////////////////////////////////////////////////////////////////// // Function: UniqueEggMaterials::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE UniqueEggMaterials:: UniqueEggMaterials(int eq) : _eq(eq) { @@ -294,7 +307,7 @@ UniqueEggMaterials(int eq) : _eq(eq) { //////////////////////////////////////////////////////////////////// // Function: UniqueEggMaterials::Function operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool UniqueEggMaterials:: operator ()(const EggMaterial *t1, const EggMaterial *t2) const { diff --git a/panda/src/egg/eggMaterial.cxx b/panda/src/egg/eggMaterial.cxx index c4a13a0338..4017a74b97 100644 --- a/panda/src/egg/eggMaterial.cxx +++ b/panda/src/egg/eggMaterial.cxx @@ -1,6 +1,19 @@ // Filename: eggMaterial.cxx // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggMaterial.h" @@ -13,7 +26,7 @@ TypeHandle EggMaterial::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggMaterial::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggMaterial:: EggMaterial(const string &mref_name) @@ -25,10 +38,10 @@ EggMaterial(const string &mref_name) //////////////////////////////////////////////////////////////////// // Function: EggMaterial::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggMaterial:: -EggMaterial(const EggMaterial ©) +EggMaterial(const EggMaterial ©) : EggNode(copy), _diff(copy._diff), _flags(copy._flags) diff --git a/panda/src/egg/eggMaterial.h b/panda/src/egg/eggMaterial.h index 8acc18a6d1..ec6259323a 100644 --- a/panda/src/egg/eggMaterial.h +++ b/panda/src/egg/eggMaterial.h @@ -2,6 +2,19 @@ // Created by: drose (29Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGMATERIAL_H #define EGGMATERIAL_H @@ -93,7 +106,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggMaterialCollection.I b/panda/src/egg/eggMaterialCollection.I index 6d0a4cca96..002c1e259b 100644 --- a/panda/src/egg/eggMaterialCollection.I +++ b/panda/src/egg/eggMaterialCollection.I @@ -1,6 +1,19 @@ // Filename: eggMaterialCollection.I // Created by: drose (30Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE EggMaterialCollection::iterator EggMaterialCollection:: @@ -9,17 +22,17 @@ begin() const { _ordered_materials.begin()); return _ordered_materials.begin(); } - + INLINE EggMaterialCollection::iterator EggMaterialCollection:: end() const { return _ordered_materials.end(); } - + INLINE bool EggMaterialCollection:: empty() const { return _ordered_materials.empty(); } - + INLINE EggMaterialCollection::size_type EggMaterialCollection:: size() const { nassertr(_ordered_materials.size() == _materials.size(), 0); diff --git a/panda/src/egg/eggMaterialCollection.cxx b/panda/src/egg/eggMaterialCollection.cxx index 705505fa71..dbfed2b102 100644 --- a/panda/src/egg/eggMaterialCollection.cxx +++ b/panda/src/egg/eggMaterialCollection.cxx @@ -1,6 +1,19 @@ // Filename: eggMaterialCollection.cxx // Created by: drose (30Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggMaterialCollection.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggMaterialCollection::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggMaterialCollection:: EggMaterialCollection() { @@ -24,7 +37,7 @@ EggMaterialCollection() { //////////////////////////////////////////////////////////////////// // Function: EggMaterialCollection::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggMaterialCollection:: EggMaterialCollection(const EggMaterialCollection ©) : @@ -36,7 +49,7 @@ EggMaterialCollection(const EggMaterialCollection ©) : //////////////////////////////////////////////////////////////////// // Function: EggMaterialCollection::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggMaterialCollection &EggMaterialCollection:: operator = (const EggMaterialCollection ©) { @@ -48,7 +61,7 @@ operator = (const EggMaterialCollection ©) { //////////////////////////////////////////////////////////////////// // Function: EggMaterialCollection::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggMaterialCollection:: ~EggMaterialCollection() { @@ -104,8 +117,8 @@ insert_materials(EggGroupNode *node) { EggGroupNode::iterator EggMaterialCollection:: insert_materials(EggGroupNode *node, EggGroupNode::iterator position) { OrderedMaterials::iterator oti; - for (oti = _ordered_materials.begin(); - oti != _ordered_materials.end(); + for (oti = _ordered_materials.begin(); + oti != _ordered_materials.end(); ++oti) { EggMaterial *material = (*oti); position = node->insert(position, material); @@ -163,7 +176,7 @@ find_used_materials(EggNode *node) { } else if (node->is_of_type(EggGroupNode::get_class_type())) { EggGroupNode *group = DCAST(EggGroupNode, node); - + EggGroupNode::iterator ci; for (ci = group->begin(); ci != group->end(); ++ci) { EggNode *child = *ci; @@ -246,8 +259,8 @@ collapse_equivalent_materials(int eq, EggMaterialCollection::MaterialReplacement // First, put all of the materials into the Collapser structure, to // find out the unique materials. OrderedMaterials::const_iterator oti; - for (oti = _ordered_materials.begin(); - oti != _ordered_materials.end(); + for (oti = _ordered_materials.begin(); + oti != _ordered_materials.end(); ++oti) { EggMaterial *tex = (*oti); @@ -319,15 +332,15 @@ uniquify_mrefs() { NameUniquifier nu(".mref", "mref"); OrderedMaterials::const_iterator oti; - for (oti = _ordered_materials.begin(); - oti != _ordered_materials.end(); + for (oti = _ordered_materials.begin(); + oti != _ordered_materials.end(); ++oti) { EggMaterial *tex = (*oti); tex->set_name(nu.add_name(tex->get_name())); } } - + //////////////////////////////////////////////////////////////////// // Function: EggMaterialCollection::sort_by_mref // Access: Public @@ -412,8 +425,8 @@ create_unique_material(const EggMaterial ©, int eq) { // This requires a complete linear traversal, not terribly // efficient. OrderedMaterials::const_iterator oti; - for (oti = _ordered_materials.begin(); - oti != _ordered_materials.end(); + for (oti = _ordered_materials.begin(); + oti != _ordered_materials.end(); ++oti) { EggMaterial *tex = (*oti); if (copy.is_equivalent_to(*tex, eq)) { @@ -437,8 +450,8 @@ find_mref(const string &mref_name) const { // This requires a complete linear traversal, not terribly // efficient. OrderedMaterials::const_iterator oti; - for (oti = _ordered_materials.begin(); - oti != _ordered_materials.end(); + for (oti = _ordered_materials.begin(); + oti != _ordered_materials.end(); ++oti) { EggMaterial *tex = (*oti); if (tex->get_name() == mref_name) { diff --git a/panda/src/egg/eggMaterialCollection.h b/panda/src/egg/eggMaterialCollection.h index 8426dc843c..5b5d4f0ba0 100644 --- a/panda/src/egg/eggMaterialCollection.h +++ b/panda/src/egg/eggMaterialCollection.h @@ -1,6 +1,19 @@ // Filename: eggMaterialCollection.h // Created by: drose (30Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef EGGMATERIALCOLLECTION_H diff --git a/panda/src/egg/eggMiscFuncs.I b/panda/src/egg/eggMiscFuncs.I index add13b04cc..91e3cf46fa 100644 --- a/panda/src/egg/eggMiscFuncs.I +++ b/panda/src/egg/eggMiscFuncs.I @@ -1,5 +1,18 @@ // Filename: eggMiscFuncs.I // Created by: drose (29Jan99) -// +// //////////////////////////////////////////////////////////////////// - +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + diff --git a/panda/src/egg/eggMiscFuncs.cxx b/panda/src/egg/eggMiscFuncs.cxx index f8a063ebc9..f8e8a3ccb4 100644 --- a/panda/src/egg/eggMiscFuncs.cxx +++ b/panda/src/egg/eggMiscFuncs.cxx @@ -1,6 +1,19 @@ // Filename: eggMiscFuncs.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -35,7 +48,7 @@ enquote_string(ostream &out, const string &str, int indent_level, } else { out << '"'; - + for (p = str.begin(); p != str.end(); ++p) { switch (*p) { case '"': diff --git a/panda/src/egg/eggMiscFuncs.h b/panda/src/egg/eggMiscFuncs.h index e3f326896a..918cd958a2 100644 --- a/panda/src/egg/eggMiscFuncs.h +++ b/panda/src/egg/eggMiscFuncs.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGMISCFUNCS_H #define EGGMISCFUNCS_H diff --git a/panda/src/egg/eggMorph.I b/panda/src/egg/eggMorph.I index c63e0e6491..9461051fc7 100644 --- a/panda/src/egg/eggMorph.I +++ b/panda/src/egg/eggMorph.I @@ -1,17 +1,30 @@ // Filename: eggMorph.I // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggMorph::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorph:: -EggMorph(const string &name, const Parameter &offset) +EggMorph(const string &name, const Parameter &offset) : Namable(name), _offset(offset) { } @@ -20,7 +33,7 @@ EggMorph(const string &name, const Parameter &offset) //////////////////////////////////////////////////////////////////// // Function: EggMorph::set_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void EggMorph:: @@ -32,7 +45,7 @@ set_offset(const Parameter &offset) { //////////////////////////////////////////////////////////////////// // Function: EggMorph::get_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE const Parameter &EggMorph:: @@ -44,7 +57,7 @@ get_offset() const { //////////////////////////////////////////////////////////////////// // Function: EggMorph::Ordering operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool EggMorph:: @@ -56,7 +69,7 @@ operator < (const EggMorph &other) const { //////////////////////////////////////////////////////////////////// // Function: EggMorph::Equality operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool EggMorph:: @@ -67,7 +80,7 @@ operator == (const EggMorph &other) const { //////////////////////////////////////////////////////////////////// // Function: EggMorph::Inequality operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool EggMorph:: @@ -78,7 +91,7 @@ operator != (const EggMorph &other) const { //////////////////////////////////////////////////////////////////// // Function: EggMorphVertex output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ostream &operator << (ostream &out, const EggMorphVertex &m) { return out << " " << m.get_name() << " { " << m.get_offset() << " }"; @@ -88,7 +101,7 @@ INLINE ostream &operator << (ostream &out, const EggMorphVertex &m) { /* //////////////////////////////////////////////////////////////////// // Function: EggMorphNormal output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ostream &operator << (ostream &out, const EggMorphNormal &m) { return out << " " << m.get_name() << " { " << m.get_offset() << " }"; @@ -98,7 +111,7 @@ INLINE ostream &operator << (ostream &out, const EggMorphNormal &m) { //////////////////////////////////////////////////////////////////// // Function: EggMorphTexCoord output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ostream &operator << (ostream &out, const EggMorphTexCoord &m) { return out << " " << m.get_name() << " { " << m.get_offset() << " }"; @@ -107,7 +120,7 @@ INLINE ostream &operator << (ostream &out, const EggMorphTexCoord &m) { //////////////////////////////////////////////////////////////////// // Function: EggMorphColor output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ostream &operator << (ostream &out, const EggMorphColor &m) { return out << " " << m.get_name() << " { " << m.get_offset() << " }"; diff --git a/panda/src/egg/eggMorph.h b/panda/src/egg/eggMorph.h index 47a68c5291..353de5ba9a 100644 --- a/panda/src/egg/eggMorph.h +++ b/panda/src/egg/eggMorph.h @@ -2,6 +2,19 @@ // Created by: drose (29Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGMORPH_H #define EGGMORPH_H diff --git a/panda/src/egg/eggMorphList.I b/panda/src/egg/eggMorphList.I index ceda097819..5450cdcb5f 100644 --- a/panda/src/egg/eggMorphList.I +++ b/panda/src/egg/eggMorphList.I @@ -1,13 +1,26 @@ // Filename: eggMorphList.I // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggMorphList::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList:: @@ -17,7 +30,7 @@ EggMorphList() { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList:: @@ -29,7 +42,7 @@ EggMorphList(const EggMorphList ©) : //////////////////////////////////////////////////////////////////// // Function: EggMorphList::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void EggMorphList:: @@ -40,7 +53,7 @@ operator = (const EggMorphList ©) { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList:: @@ -48,9 +61,9 @@ INLINE EggMorphList:: } //////////////////////////////////////////////////////////////////// -// Function: EggMorphList::operator == +// Function: EggMorphList::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool EggMorphList:: @@ -59,9 +72,9 @@ operator == (const EggMorphList &other) const { } //////////////////////////////////////////////////////////////////// -// Function: EggMorphList::operator != +// Function: EggMorphList::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool EggMorphList:: @@ -70,9 +83,9 @@ operator != (const EggMorphList &other) const { } //////////////////////////////////////////////////////////////////// -// Function: EggMorphList::operator < +// Function: EggMorphList::operator < // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool EggMorphList:: @@ -83,7 +96,7 @@ operator < (const EggMorphList &other) const { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList::iterator EggMorphList:: @@ -94,7 +107,7 @@ begin() { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList::const_iterator EggMorphList:: @@ -105,7 +118,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList::iterator EggMorphList:: @@ -116,7 +129,7 @@ end() { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList::const_iterator EggMorphList:: @@ -127,7 +140,7 @@ end() const { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE EggMorphList::size_type EggMorphList:: @@ -138,7 +151,7 @@ size() const { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool EggMorphList:: @@ -181,7 +194,7 @@ insert(const MorphType &value) { //////////////////////////////////////////////////////////////////// // Function: EggMorphList::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void EggMorphList:: diff --git a/panda/src/egg/eggMorphList.cxx b/panda/src/egg/eggMorphList.cxx index 046e37e14f..9c136ceb4e 100644 --- a/panda/src/egg/eggMorphList.cxx +++ b/panda/src/egg/eggMorphList.cxx @@ -2,25 +2,38 @@ // Created by: drose (15May01) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "eggMorphList.h" // Continue all of the vector import definitions. -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG #define TYPE LVector3d #define NAME vector_LVector3d #include -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG #define TYPE LVector2d #define NAME vector_LVector2d #include -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG #define TYPE LVector4f #define NAME vector_LVector4f #include diff --git a/panda/src/egg/eggMorphList.h b/panda/src/egg/eggMorphList.h index 95766fc8af..1ebbcc5a87 100644 --- a/panda/src/egg/eggMorphList.h +++ b/panda/src/egg/eggMorphList.h @@ -2,6 +2,19 @@ // Created by: drose (29Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGMORPHLIST_H #define EGGMORPHLIST_H @@ -55,20 +68,20 @@ private: // Export all of the vectors. -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG #define TYPE LVector3d #define NAME vector_LVector3d #include -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG #define TYPE LVector2d #define NAME vector_LVector2d #include -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG #define TYPE LVector4f #define NAME vector_LVector4f #include diff --git a/panda/src/egg/eggNameUniquifier.cxx b/panda/src/egg/eggNameUniquifier.cxx index 98f27ed283..e345a43020 100644 --- a/panda/src/egg/eggNameUniquifier.cxx +++ b/panda/src/egg/eggNameUniquifier.cxx @@ -1,6 +1,19 @@ // Filename: eggNameUniquifier.cxx // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggNameUniquifier.h" @@ -15,7 +28,7 @@ TypeHandle EggNameUniquifier::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggNameUniquifier::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggNameUniquifier:: EggNameUniquifier() { @@ -25,7 +38,7 @@ EggNameUniquifier() { //////////////////////////////////////////////////////////////////// // Function: EggNameUniquifier::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggNameUniquifier:: ~EggNameUniquifier() { diff --git a/panda/src/egg/eggNameUniquifier.h b/panda/src/egg/eggNameUniquifier.h index 564768b8e8..efe2710670 100644 --- a/panda/src/egg/eggNameUniquifier.h +++ b/panda/src/egg/eggNameUniquifier.h @@ -1,6 +1,19 @@ // Filename: eggNameUniquifier.h // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef EGGNAMEUNIQUIFIER_H @@ -123,5 +136,5 @@ private: }; #endif - - + + diff --git a/panda/src/egg/eggNamedObject.I b/panda/src/egg/eggNamedObject.I index 4c3d966512..0ef5d2a663 100644 --- a/panda/src/egg/eggNamedObject.I +++ b/panda/src/egg/eggNamedObject.I @@ -1,13 +1,26 @@ // Filename: eggNamedObject.I // Created by: drose (10Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggNamedObject::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNamedObject:: EggNamedObject(const string &name) : Namable(name) { @@ -17,7 +30,7 @@ EggNamedObject(const string &name) : Namable(name) { //////////////////////////////////////////////////////////////////// // Function: EggNamedObject::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNamedObject:: EggNamedObject(const EggNamedObject ©) : EggObject(copy), Namable(copy) { @@ -27,7 +40,7 @@ EggNamedObject(const EggNamedObject ©) : EggObject(copy), Namable(copy) { //////////////////////////////////////////////////////////////////// // Function: EggNamedObject::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNamedObject &EggNamedObject:: operator = (const EggNamedObject ©) { diff --git a/panda/src/egg/eggNamedObject.cxx b/panda/src/egg/eggNamedObject.cxx index e3a23fd580..3399c73ee3 100644 --- a/panda/src/egg/eggNamedObject.cxx +++ b/panda/src/egg/eggNamedObject.cxx @@ -1,6 +1,19 @@ // Filename: eggNamedObject.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggNamedObject.h" diff --git a/panda/src/egg/eggNamedObject.h b/panda/src/egg/eggNamedObject.h index 456006c2a8..db0ad09bd1 100644 --- a/panda/src/egg/eggNamedObject.h +++ b/panda/src/egg/eggNamedObject.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGNAMEDOBJECT_H #define EGGNAMEDOBJECT_H diff --git a/panda/src/egg/eggNode.I b/panda/src/egg/eggNode.I index 9ca6c32ab4..43487ea815 100644 --- a/panda/src/egg/eggNode.I +++ b/panda/src/egg/eggNode.I @@ -1,13 +1,26 @@ // Filename: eggNode.I // Created by: drose (10Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNode:: EggNode(const string &name) : EggNamedObject(name) { @@ -19,10 +32,10 @@ EggNode(const string &name) : EggNamedObject(name) { //////////////////////////////////////////////////////////////////// // Function: EggNode::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNode:: -EggNode(const EggNode ©) : EggNamedObject(copy) { +EggNode(const EggNode ©) : EggNamedObject(copy) { _parent = NULL; _depth = 0; _under_flags = 0; @@ -32,7 +45,7 @@ EggNode(const EggNode ©) : EggNamedObject(copy) { //////////////////////////////////////////////////////////////////// // Function: EggNode::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNode &EggNode:: operator = (const EggNode ©) { @@ -45,11 +58,11 @@ operator = (const EggNode ©) { //////////////////////////////////////////////////////////////////// // Function: EggNode::get_parent // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggGroupNode *EggNode:: -get_parent() const { - return _parent; +get_parent() const { + return _parent; } //////////////////////////////////////////////////////////////////// @@ -59,8 +72,8 @@ get_parent() const { // egg hierarchy. //////////////////////////////////////////////////////////////////// INLINE int EggNode:: -get_depth() const { - return _depth; +get_depth() const { + return _depth; } diff --git a/panda/src/egg/eggNode.cxx b/panda/src/egg/eggNode.cxx index 81843f9c35..67f20a5d76 100644 --- a/panda/src/egg/eggNode.cxx +++ b/panda/src/egg/eggNode.cxx @@ -1,6 +1,19 @@ // Filename: eggNode.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggNode.h" diff --git a/panda/src/egg/eggNode.h b/panda/src/egg/eggNode.h index 4883a25a02..37720c355b 100644 --- a/panda/src/egg/eggNode.h +++ b/panda/src/egg/eggNode.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGNODE_H #define EGGNODE_H @@ -115,7 +128,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/egg/eggNurbsCurve.I b/panda/src/egg/eggNurbsCurve.I index 8b41720257..b6508e4003 100644 --- a/panda/src/egg/eggNurbsCurve.I +++ b/panda/src/egg/eggNurbsCurve.I @@ -1,12 +1,25 @@ // Filename: eggNurbsCurve.I // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggNurbsCurve::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNurbsCurve:: EggNurbsCurve(const string &name) : EggCurve(name) { @@ -16,10 +29,10 @@ EggNurbsCurve(const string &name) : EggCurve(name) { //////////////////////////////////////////////////////////////////// // Function: EggNurbsCurve::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNurbsCurve:: -EggNurbsCurve(const EggNurbsCurve ©) : +EggNurbsCurve(const EggNurbsCurve ©) : EggCurve(copy), _knots(copy._knots), _order(copy._order) @@ -29,7 +42,7 @@ EggNurbsCurve(const EggNurbsCurve ©) : //////////////////////////////////////////////////////////////////// // Function: EggNurbsCurve::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNurbsCurve &EggNurbsCurve:: operator = (const EggNurbsCurve ©) { diff --git a/panda/src/egg/eggNurbsCurve.cxx b/panda/src/egg/eggNurbsCurve.cxx index 6d485d6ae3..9da5e5d920 100644 --- a/panda/src/egg/eggNurbsCurve.cxx +++ b/panda/src/egg/eggNurbsCurve.cxx @@ -1,6 +1,19 @@ // Filename: eggNurbsCurve.cxx // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggNurbsCurve.h" @@ -133,7 +146,7 @@ write(ostream &out, int indent_level) const { } indent(out, indent_level + 2) << " { " << get_order() << " }\n"; - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " {\n"; write_long_list(out, indent_level+4, _knots.begin(), _knots.end(), "", "", 72); diff --git a/panda/src/egg/eggNurbsCurve.h b/panda/src/egg/eggNurbsCurve.h index 4a4b5d7c1b..85be2e3ce1 100644 --- a/panda/src/egg/eggNurbsCurve.h +++ b/panda/src/egg/eggNurbsCurve.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGNURBSCURVE_H #define EGGNURBSCURVE_H @@ -61,10 +74,10 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; - + }; #include "eggNurbsCurve.I" diff --git a/panda/src/egg/eggNurbsSurface.I b/panda/src/egg/eggNurbsSurface.I index 3d46bf9a6e..32103947d3 100644 --- a/panda/src/egg/eggNurbsSurface.I +++ b/panda/src/egg/eggNurbsSurface.I @@ -1,12 +1,25 @@ // Filename: eggNurbsSurface.I // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggNurbsSurface::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNurbsSurface:: EggNurbsSurface(const string &name) : EggSurface(name) { @@ -17,10 +30,10 @@ EggNurbsSurface(const string &name) : EggSurface(name) { //////////////////////////////////////////////////////////////////// // Function: EggNurbsSurface::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNurbsSurface:: -EggNurbsSurface(const EggNurbsSurface ©) : +EggNurbsSurface(const EggNurbsSurface ©) : EggSurface(copy), _u_knots(copy._u_knots), _v_knots(copy._v_knots), @@ -32,7 +45,7 @@ EggNurbsSurface(const EggNurbsSurface ©) : //////////////////////////////////////////////////////////////////// // Function: EggNurbsSurface::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggNurbsSurface &EggNurbsSurface:: operator = (const EggNurbsSurface ©) { diff --git a/panda/src/egg/eggNurbsSurface.cxx b/panda/src/egg/eggNurbsSurface.cxx index a7e11e149a..3e9ceb6474 100644 --- a/panda/src/egg/eggNurbsSurface.cxx +++ b/panda/src/egg/eggNurbsSurface.cxx @@ -1,6 +1,19 @@ // Filename: eggNurbsSurface.cxx // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggNurbsSurface.h" @@ -204,16 +217,16 @@ write(ostream &out, int indent_level) const { if (get_v_subdiv() != 0) { indent(out, indent_level + 2) << " V-subdiv { " << get_v_subdiv() << " }\n"; - } + } indent(out, indent_level + 2) << " { " << get_u_order() << " " << get_v_order() << " }\n"; - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " {\n"; write_long_list(out, indent_level+4, _u_knots.begin(), _u_knots.end(), "", "", 72); indent(out, indent_level + 2) << "}\n"; - indent(out, indent_level + 2) + indent(out, indent_level + 2) << " {\n"; write_long_list(out, indent_level+4, _v_knots.begin(), _v_knots.end(), "", "", 72); diff --git a/panda/src/egg/eggNurbsSurface.h b/panda/src/egg/eggNurbsSurface.h index be8f9bc410..67ffdaf132 100644 --- a/panda/src/egg/eggNurbsSurface.h +++ b/panda/src/egg/eggNurbsSurface.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGNURBSSURFACE_H #define EGGNURBSSURFACE_H @@ -95,10 +108,10 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; - + }; #include "eggNurbsSurface.I" diff --git a/panda/src/egg/eggObject.I b/panda/src/egg/eggObject.I index 94b11e3595..49cd52070e 100644 --- a/panda/src/egg/eggObject.I +++ b/panda/src/egg/eggObject.I @@ -1,23 +1,36 @@ // Filename: eggObject.I // Created by: drose (10Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggObject::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggObject:: -EggObject() { +EggObject() { } //////////////////////////////////////////////////////////////////// // Function: EggObject::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggObject:: EggObject(const EggObject ©) : TypedReferenceCount(copy) { @@ -27,7 +40,7 @@ EggObject(const EggObject ©) : TypedReferenceCount(copy) { //////////////////////////////////////////////////////////////////// // Function: EggObject::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggObject &EggObject:: operator = (const EggObject ©) { diff --git a/panda/src/egg/eggObject.cxx b/panda/src/egg/eggObject.cxx index d125db245d..13410b746f 100644 --- a/panda/src/egg/eggObject.cxx +++ b/panda/src/egg/eggObject.cxx @@ -1,6 +1,19 @@ // Filename: eggObject.cxx // Created by: drose (17Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggObject.h" @@ -11,8 +24,8 @@ TypeHandle EggObject::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggObject::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggObject:: -~EggObject() { +~EggObject() { } diff --git a/panda/src/egg/eggObject.h b/panda/src/egg/eggObject.h index 4b127f4e53..4dce73ea41 100644 --- a/panda/src/egg/eggObject.h +++ b/panda/src/egg/eggObject.h @@ -2,6 +2,19 @@ // Created by: drose (17Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGOBJECT_H #define EGGOBJECT_H diff --git a/panda/src/egg/eggParameters.cxx b/panda/src/egg/eggParameters.cxx index bf9942ed56..979d61af30 100644 --- a/panda/src/egg/eggParameters.cxx +++ b/panda/src/egg/eggParameters.cxx @@ -1,6 +1,19 @@ // Filename: eggParameters.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggParameters.h" @@ -30,7 +43,7 @@ EggParameters() { //////////////////////////////////////////////////////////////////// // Function: EggParameters::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggParameters:: EggParameters(const EggParameters &other) { diff --git a/panda/src/egg/eggParameters.h b/panda/src/egg/eggParameters.h index 1c21ddb262..b37c7b54fa 100644 --- a/panda/src/egg/eggParameters.h +++ b/panda/src/egg/eggParameters.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGPARAMETERS_H #define EGGPARAMETERS_H diff --git a/panda/src/egg/eggPoint.I b/panda/src/egg/eggPoint.I index 6cdb293d19..b730d1899a 100644 --- a/panda/src/egg/eggPoint.I +++ b/panda/src/egg/eggPoint.I @@ -1,6 +1,19 @@ // Filename: eggPoint.I // Created by: drose (15Dec99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggPoint::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPoint:: EggPoint(const string &name) : EggPrimitive(name) { @@ -17,7 +30,7 @@ EggPoint(const string &name) : EggPrimitive(name) { //////////////////////////////////////////////////////////////////// // Function: EggPoint::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPoint:: EggPoint(const EggPoint ©) : EggPrimitive(copy) { @@ -26,7 +39,7 @@ EggPoint(const EggPoint ©) : EggPrimitive(copy) { //////////////////////////////////////////////////////////////////// // Function: EggPoint::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPoint &EggPoint:: operator = (const EggPoint ©) { diff --git a/panda/src/egg/eggPoint.cxx b/panda/src/egg/eggPoint.cxx index be0957e0f0..36db3cb582 100644 --- a/panda/src/egg/eggPoint.cxx +++ b/panda/src/egg/eggPoint.cxx @@ -1,6 +1,19 @@ // Filename: eggPoint.cxx // Created by: drose (15Dec99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggPoint.h" diff --git a/panda/src/egg/eggPoint.h b/panda/src/egg/eggPoint.h index 27005d4d9d..663f6f3d04 100644 --- a/panda/src/egg/eggPoint.h +++ b/panda/src/egg/eggPoint.h @@ -2,6 +2,19 @@ // Created by: drose (15Dec99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGPOINT_H #define EGGPOINT_H @@ -39,10 +52,10 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; - + }; #include "eggPoint.I" diff --git a/panda/src/egg/eggPolygon.I b/panda/src/egg/eggPolygon.I index 26d755dc6a..b97cf62137 100644 --- a/panda/src/egg/eggPolygon.I +++ b/panda/src/egg/eggPolygon.I @@ -1,6 +1,19 @@ // Filename: eggPolygon.I // Created by: drose (10Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggPolygon::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPolygon:: EggPolygon(const string &name) : EggPrimitive(name) { @@ -17,7 +30,7 @@ EggPolygon(const string &name) : EggPrimitive(name) { //////////////////////////////////////////////////////////////////// // Function: EggPolygon::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPolygon:: EggPolygon(const EggPolygon ©) : EggPrimitive(copy) { @@ -26,7 +39,7 @@ EggPolygon(const EggPolygon ©) : EggPrimitive(copy) { //////////////////////////////////////////////////////////////////// // Function: EggPolygon::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPolygon &EggPolygon:: operator = (const EggPolygon ©) { diff --git a/panda/src/egg/eggPolygon.cxx b/panda/src/egg/eggPolygon.cxx index 82da1445f1..d8a87edf4c 100644 --- a/panda/src/egg/eggPolygon.cxx +++ b/panda/src/egg/eggPolygon.cxx @@ -1,6 +1,19 @@ // Filename: eggPolygon.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggPolygon.h" @@ -160,7 +173,7 @@ decomp_concave(EggGroupNode *container, int asum, int x, int y) const { int num_verts = size(); nassertr(num_verts >= 3, false); - + /* Make linked list of verts */ vert = (DecompVtx *) alloca(sizeof(DecompVtx)); vert->index = 0; @@ -190,9 +203,9 @@ decomp_concave(EggGroupNode *container, int asum, int x, int y) const { while (p0 != p2->next) { /* Polygon is self-intersecting so punt */ - if (chek && - m[0] == p0 && - m[1] == p1 && + if (chek && + m[0] == p0 && + m[1] == p1 && m[2] == p2) { return false; @@ -204,9 +217,9 @@ decomp_concave(EggGroupNode *container, int asum, int x, int y) const { b[0] = VX(p2, x) - VX(p1, x); a[2] = VX(p0, y) - VX(p1, y); b[2] = VX(p1, x) - VX(p0, x); - + csum = ((b[0] * a[2] - b[2] * a[0] >= 0.0) ? 1 : 0); - + if (csum ^ asum) { /* current angle is concave */ p0 = p1; @@ -218,19 +231,19 @@ decomp_concave(EggGroupNode *container, int asum, int x, int y) const { xmin = (VX(p0, x) < VX(p1, x)) ? VX(p0, x) : VX(p1, x); if (xmin > VX(p2, x)) xmin = VX(p2, x); - + xmax = (VX(p0, x) > VX(p1, x)) ? VX(p0, x) : VX(p1, x); if (xmax < VX(p2, x)) xmax = VX(p2, x); - + ymin = (VX(p0, y) < VX(p1, y)) ? VX(p0, y) : VX(p1, y); if (ymin > VX(p2, y)) ymin = VX(p2, y); - + ymax = (VX(p0, y) > VX(p1, y)) ? VX(p0, y) : VX(p1, y); if (ymax < VX(p2, y)) ymax = VX(p2, y); - + for (init = 1, t0 = p2->next; t0 != p0; t0 = t0->next) { if (VX(t0, x) >= xmin && VX(t0, x) <= xmax && VX(t0, y) >= ymin && VX(t0, y) <= ymax) { @@ -256,7 +269,7 @@ decomp_concave(EggGroupNode *container, int asum, int x, int y) const { } } } - + if (t0 != p0) { p0 = p1; p1 = p2; @@ -329,7 +342,7 @@ triangulate_poly(EggGroupNode *container, bool convex_also) { if (!cleanup()) { return false; } - + // First see if the polygon is already a triangle int num_verts = size(); if (num_verts == 3) { @@ -381,12 +394,12 @@ triangulate_poly(EggGroupNode *container, bool convex_also) { x = 0; y = 1; break; - + case 1: x = 0; y = 2; break; - + case 2: x = 1; y = 2; @@ -394,7 +407,7 @@ triangulate_poly(EggGroupNode *container, bool convex_also) { } /* concave check */ - p0 = get_vertex(0)->get_pos3(); + p0 = get_vertex(0)->get_pos3(); p1 = get_vertex(1)->get_pos3(); dx1 = p1[x] - p0[x]; dy1 = p1[y] - p0[y]; @@ -431,10 +444,10 @@ triangulate_poly(EggGroupNode *container, bool convex_also) { v0 = 0; v1 = 1; v = num_verts - 1; - + even = 1; - - /* + + /* * Convert to triangles only. Do not fan out from a single vertex * but zigzag into triangle strip. */ @@ -468,9 +481,9 @@ triangulate_poly(EggGroupNode *container, bool convex_also) { v1 = v; v = v0 - 1; } - + even = !even; } - + return true; } diff --git a/panda/src/egg/eggPolygon.h b/panda/src/egg/eggPolygon.h index 4835c22a4a..1e64d1bd2f 100644 --- a/panda/src/egg/eggPolygon.h +++ b/panda/src/egg/eggPolygon.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGPOLYGON_H #define EGGPOLYGON_H @@ -48,10 +61,10 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; - + }; #include "eggPolygon.I" diff --git a/panda/src/egg/eggPoolUniquifier.cxx b/panda/src/egg/eggPoolUniquifier.cxx index c583cbe9ca..53bdfc6863 100644 --- a/panda/src/egg/eggPoolUniquifier.cxx +++ b/panda/src/egg/eggPoolUniquifier.cxx @@ -1,6 +1,19 @@ // Filename: eggPoolUniquifier.cxx // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggPoolUniquifier.h" @@ -17,7 +30,7 @@ TypeHandle EggPoolUniquifier::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggPoolUniquifier::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggPoolUniquifier:: EggPoolUniquifier() { diff --git a/panda/src/egg/eggPoolUniquifier.h b/panda/src/egg/eggPoolUniquifier.h index dd2759ec95..9888c67ad3 100644 --- a/panda/src/egg/eggPoolUniquifier.h +++ b/panda/src/egg/eggPoolUniquifier.h @@ -1,6 +1,19 @@ // Filename: eggPoolUniquifier.h // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef EGGPOOLUNIQUIFIER_H @@ -44,5 +57,5 @@ private: }; #endif - - + + diff --git a/panda/src/egg/eggPrimitive.I b/panda/src/egg/eggPrimitive.I index d04ed44b0a..06f3d39201 100644 --- a/panda/src/egg/eggPrimitive.I +++ b/panda/src/egg/eggPrimitive.I @@ -1,6 +1,19 @@ // Filename: eggPrimitive.I // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive:: EggPrimitive(const string &name): EggNode(name) { @@ -18,15 +31,15 @@ EggPrimitive(const string &name): EggNode(name) { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive:: EggPrimitive(const EggPrimitive ©) : - EggNode(copy), - EggAttributes(copy), + EggNode(copy), + EggAttributes(copy), _texture(copy._texture), _material(copy._material), - _bface(copy._bface) + _bface(copy._bface) { copy_vertices(copy); } @@ -34,7 +47,7 @@ EggPrimitive(const EggPrimitive ©) : //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive &EggPrimitive:: operator = (const EggPrimitive ©) { @@ -50,7 +63,7 @@ operator = (const EggPrimitive ©) { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive:: ~EggPrimitive() { @@ -175,7 +188,7 @@ get_bface_flag() const { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive::iterator EggPrimitive:: begin() const { @@ -185,7 +198,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive::iterator EggPrimitive:: end() const { @@ -195,7 +208,7 @@ end() const { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::rbegin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive::reverse_iterator EggPrimitive:: rbegin() const { @@ -205,7 +218,7 @@ rbegin() const { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::rend // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive::reverse_iterator EggPrimitive:: rend() const { @@ -215,7 +228,7 @@ rend() const { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggPrimitive:: empty() const { @@ -225,7 +238,7 @@ empty() const { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive::size_type EggPrimitive:: size() const { @@ -247,7 +260,7 @@ operator [] (int index) const { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::insert // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive::iterator EggPrimitive:: insert(iterator position, EggVertex *x) { @@ -261,7 +274,7 @@ insert(iterator position, EggVertex *x) { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::erase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggPrimitive::iterator EggPrimitive:: erase(iterator position) { @@ -293,7 +306,7 @@ replace(iterator position, EggVertex *x) { //////////////////////////////////////////////////////////////////// // Function: EggPrimitive::clear // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggPrimitive:: clear() { diff --git a/panda/src/egg/eggPrimitive.cxx b/panda/src/egg/eggPrimitive.cxx index 39396898be..89278650a3 100644 --- a/panda/src/egg/eggPrimitive.cxx +++ b/panda/src/egg/eggPrimitive.cxx @@ -1,6 +1,19 @@ // Filename: eggPrimitive.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggPrimitive.h" @@ -49,7 +62,7 @@ determine_depth_write_mode() { if (get_depth_write_mode() != DWM_unspecified) { return this; } - if (has_texture() && + if (has_texture() && get_texture()->get_depth_write_mode() != DWM_unspecified) { return get_texture(); } @@ -70,7 +83,7 @@ determine_depth_test_mode() { if (get_depth_test_mode() != DTM_unspecified) { return this; } - if (has_texture() && + if (has_texture() && get_texture()->get_depth_test_mode() != DTM_unspecified) { return get_texture(); } @@ -240,7 +253,7 @@ erase(iterator first, iterator last) { for (i = first; i != last; ++i) { prepare_remove_vertex(*i); } - iterator result = _vertices.erase((Vertices::iterator &)first, + iterator result = _vertices.erase((Vertices::iterator &)first, (Vertices::iterator &)last); test_vref_integrity(); return result; @@ -404,7 +417,7 @@ prepare_remove_vertex(EggVertex *vertex) { // can't just use the simple erase() function, since that will // remove all instances of this primitive from the pref; instead, we // must find one instance and remove that. - + EggVertex::PrimitiveRef::iterator pri = vertex->_pref.find(this); // We should have found the primitive in the vertex's pref. If we @@ -430,7 +443,7 @@ write_body(ostream &out, int indent_level) const { if (has_texture()) { EggTexture *texture = get_texture(); - + // Make sure the texture is named. nassertv(texture->has_name()); @@ -441,7 +454,7 @@ write_body(ostream &out, int indent_level) const { if (has_material()) { EggMaterial *material = get_material(); - + // Make sure the material is named. nassertv(material->has_name()); @@ -495,7 +508,7 @@ write_body(ostream &out, int indent_level) const { indices.push_back(vert->get_index()); } - + indent(out, indent_level) << " {\n"; write_long_list(out, indent_level+2, indices.begin(), indices.end(), "", "", 72); @@ -555,7 +568,7 @@ r_flatten_transforms() { for (size_t i = 0; i < num_vertices; i++) { EggVertex *vertex = get_vertex(i); EggVertexPool *pool = vertex->get_pool(); - + EggVertex new_vertex(*vertex); new_vertex.transform(mat); EggVertex *unique = pool->create_unique_vertex(new_vertex); diff --git a/panda/src/egg/eggPrimitive.h b/panda/src/egg/eggPrimitive.h index 6187e6fecf..dda10ecf05 100644 --- a/panda/src/egg/eggPrimitive.h +++ b/panda/src/egg/eggPrimitive.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGPRIMITIVE_H #define EGGPRIMITIVE_H @@ -142,7 +155,7 @@ private: void prepare_add_vertex(EggVertex *vertex); void prepare_remove_vertex(EggVertex *vertex); - + protected: void write_body(ostream &out, int indent_level) const; @@ -176,7 +189,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggRenderMode.I b/panda/src/egg/eggRenderMode.I index 7a2aa38520..d3533f09cf 100644 --- a/panda/src/egg/eggRenderMode.I +++ b/panda/src/egg/eggRenderMode.I @@ -1,13 +1,26 @@ // Filename: eggRenderMode.I // Created by: drose (20Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggRenderMode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggRenderMode:: EggRenderMode() { @@ -22,7 +35,7 @@ EggRenderMode() { //////////////////////////////////////////////////////////////////// // Function: EggRenderMode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggRenderMode:: EggRenderMode(const EggRenderMode ©) { @@ -32,7 +45,7 @@ EggRenderMode(const EggRenderMode ©) { //////////////////////////////////////////////////////////////////// // Function: EggRenderMode::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggRenderMode &EggRenderMode:: operator = (const EggRenderMode ©) { @@ -228,7 +241,7 @@ clear_bin() { //////////////////////////////////////////////////////////////////// // Function: EggRenderMode::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggRenderMode:: operator != (const EggRenderMode &other) const { diff --git a/panda/src/egg/eggRenderMode.cxx b/panda/src/egg/eggRenderMode.cxx index 5cbb882125..ddc5779792 100644 --- a/panda/src/egg/eggRenderMode.cxx +++ b/panda/src/egg/eggRenderMode.cxx @@ -1,6 +1,19 @@ // Filename: eggRenderMode.cxx // Created by: drose (20Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggRenderMode.h" @@ -43,7 +56,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: EggRenderMode::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool EggRenderMode:: operator == (const EggRenderMode &other) const { @@ -70,7 +83,7 @@ operator == (const EggRenderMode &other) const { //////////////////////////////////////////////////////////////////// // Function: EggRenderMode::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool EggRenderMode:: operator < (const EggRenderMode &other) const { @@ -168,7 +181,7 @@ string_depth_test_mode(const string &string) { //////////////////////////////////////////////////////////////////// // Function: AlphaMode output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggRenderMode::AlphaMode mode) { switch (mode) { @@ -194,7 +207,7 @@ ostream &operator << (ostream &out, EggRenderMode::AlphaMode mode) { //////////////////////////////////////////////////////////////////// // Function: DepthWriteMode output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggRenderMode::DepthWriteMode mode) { switch (mode) { @@ -212,7 +225,7 @@ ostream &operator << (ostream &out, EggRenderMode::DepthWriteMode mode) { //////////////////////////////////////////////////////////////////// // Function: DepthTestMode output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggRenderMode::DepthTestMode mode) { switch (mode) { @@ -228,4 +241,4 @@ ostream &operator << (ostream &out, EggRenderMode::DepthTestMode mode) { return out << "(**invalid**)"; } - + diff --git a/panda/src/egg/eggRenderMode.h b/panda/src/egg/eggRenderMode.h index 6b10bfe53a..64c68adf3e 100644 --- a/panda/src/egg/eggRenderMode.h +++ b/panda/src/egg/eggRenderMode.h @@ -2,6 +2,19 @@ // Created by: drose (20Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGRENDERMODE_H #define EGGRENDERMODE_H diff --git a/panda/src/egg/eggSAnimData.I b/panda/src/egg/eggSAnimData.I index e8f3e7b428..323f2253e1 100644 --- a/panda/src/egg/eggSAnimData.I +++ b/panda/src/egg/eggSAnimData.I @@ -1,13 +1,26 @@ // Filename: eggSAnimData.I // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggSAnimData::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggSAnimData:: EggSAnimData(const string &name) : EggAnimData(name) { @@ -17,7 +30,7 @@ EggSAnimData(const string &name) : EggAnimData(name) { //////////////////////////////////////////////////////////////////// // Function: EggSAnimData::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggSAnimData:: EggSAnimData(const EggSAnimData ©) : EggAnimData(copy) { @@ -27,7 +40,7 @@ EggSAnimData(const EggSAnimData ©) : EggAnimData(copy) { //////////////////////////////////////////////////////////////////// // Function: EggSAnimData::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggSAnimData &EggSAnimData:: operator = (const EggSAnimData ©) { diff --git a/panda/src/egg/eggSAnimData.cxx b/panda/src/egg/eggSAnimData.cxx index b741b782a3..8fb9273536 100644 --- a/panda/src/egg/eggSAnimData.cxx +++ b/panda/src/egg/eggSAnimData.cxx @@ -1,6 +1,19 @@ // Filename: eggSAnimData.cxx // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggSAnimData.h" @@ -72,7 +85,7 @@ write(ostream &out, int indent_level) const { // out over multiple lines. write_header(out, indent_level, ""); - + if (has_fps()) { indent(out, indent_level + 2) << " fps { " << get_fps() << " }\n"; diff --git a/panda/src/egg/eggSAnimData.h b/panda/src/egg/eggSAnimData.h index 6d0e49a9e4..4f97b5d7bc 100644 --- a/panda/src/egg/eggSAnimData.h +++ b/panda/src/egg/eggSAnimData.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGSANIMDATA_H #define EGGSANIMDATA_H @@ -44,7 +57,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggSurface.I b/panda/src/egg/eggSurface.I index e1a506544a..5843a995e4 100644 --- a/panda/src/egg/eggSurface.I +++ b/panda/src/egg/eggSurface.I @@ -1,13 +1,26 @@ // Filename: eggSurface.I // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggSurface::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggSurface:: EggSurface(const string &name) : EggPrimitive(name) { @@ -18,10 +31,10 @@ EggSurface(const string &name) : EggPrimitive(name) { //////////////////////////////////////////////////////////////////// // Function: EggSurface::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggSurface:: -EggSurface(const EggSurface ©) : +EggSurface(const EggSurface ©) : EggPrimitive(copy), _u_subdiv(copy._u_subdiv), _v_subdiv(copy._v_subdiv) @@ -31,7 +44,7 @@ EggSurface(const EggSurface ©) : //////////////////////////////////////////////////////////////////// // Function: EggSurface::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggSurface &EggSurface:: operator = (const EggSurface ©) { diff --git a/panda/src/egg/eggSurface.cxx b/panda/src/egg/eggSurface.cxx index 4cac69c576..14a601a768 100644 --- a/panda/src/egg/eggSurface.cxx +++ b/panda/src/egg/eggSurface.cxx @@ -1,6 +1,19 @@ // Filename: eggSurface.cxx // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggSurface.h" diff --git a/panda/src/egg/eggSurface.h b/panda/src/egg/eggSurface.h index be07b22fb3..ff6c02d76f 100644 --- a/panda/src/egg/eggSurface.h +++ b/panda/src/egg/eggSurface.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGSURFACE_H #define EGGSURFACE_H @@ -44,10 +57,10 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; - + }; #include "eggSurface.I" diff --git a/panda/src/egg/eggSwitchCondition.cxx b/panda/src/egg/eggSwitchCondition.cxx index b2cec552d1..dddeac360b 100644 --- a/panda/src/egg/eggSwitchCondition.cxx +++ b/panda/src/egg/eggSwitchCondition.cxx @@ -1,6 +1,19 @@ // Filename: eggSwitchCondition.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggSwitchCondition.h" @@ -14,7 +27,7 @@ TypeHandle EggSwitchConditionDistance::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggSwitchConditionDistance::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggSwitchConditionDistance:: EggSwitchConditionDistance(double switch_in, double switch_out, @@ -29,7 +42,7 @@ EggSwitchConditionDistance(double switch_in, double switch_out, //////////////////////////////////////////////////////////////////// // Function: EggSwitchConditionDistance::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggSwitchCondition *EggSwitchConditionDistance:: make_copy() const { @@ -40,7 +53,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: EggSwitchConditionDistance::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggSwitchConditionDistance:: write(ostream &out, int indent_level) const { diff --git a/panda/src/egg/eggSwitchCondition.h b/panda/src/egg/eggSwitchCondition.h index 782e3c4355..59a148d8e4 100644 --- a/panda/src/egg/eggSwitchCondition.h +++ b/panda/src/egg/eggSwitchCondition.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGSWITCHCONDITION #define EGGSWITCHCONDITION @@ -43,7 +56,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; @@ -80,7 +93,7 @@ public: virtual TypeHandle get_type() const { return get_class_type(); } - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggTable.I b/panda/src/egg/eggTable.I index f89e6f8f98..ad4c9a3a2c 100644 --- a/panda/src/egg/eggTable.I +++ b/panda/src/egg/eggTable.I @@ -1,13 +1,26 @@ // Filename: eggTable.I // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggTable::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTable:: EggTable(const string &name) : EggGroupNode(name) { @@ -18,7 +31,7 @@ EggTable(const string &name) : EggGroupNode(name) { //////////////////////////////////////////////////////////////////// // Function: EggTable::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTable:: EggTable(const EggTable ©) : EggGroupNode(copy), _type(copy._type) { @@ -28,7 +41,7 @@ EggTable(const EggTable ©) : EggGroupNode(copy), _type(copy._type) { //////////////////////////////////////////////////////////////////// // Function: EggTable::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTable &EggTable:: operator = (const EggTable ©) { @@ -42,7 +55,7 @@ operator = (const EggTable ©) { //////////////////////////////////////////////////////////////////// // Function: EggTable::set_table_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTable:: set_table_type(TableType type) { @@ -53,7 +66,7 @@ set_table_type(TableType type) { //////////////////////////////////////////////////////////////////// // Function: EggTable::get_table_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTable::TableType EggTable:: get_table_type() const { diff --git a/panda/src/egg/eggTable.cxx b/panda/src/egg/eggTable.cxx index f17e541a3c..0658494ca1 100644 --- a/panda/src/egg/eggTable.cxx +++ b/panda/src/egg/eggTable.cxx @@ -1,6 +1,19 @@ // Filename: eggTable.cxx // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggTable.h" @@ -33,7 +46,7 @@ write(ostream &out, int indent_level) const { // invalid table type nassertv(false); } - + EggGroupNode::write(out, indent_level + 2); indent(out, indent_level) << "}\n"; } @@ -60,7 +73,7 @@ string_table_type(const string &string) { //////////////////////////////////////////////////////////////////// // Function: TableType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggTable::TableType t) { switch (t) { diff --git a/panda/src/egg/eggTable.h b/panda/src/egg/eggTable.h index b7ce85e1eb..efb19171eb 100644 --- a/panda/src/egg/eggTable.h +++ b/panda/src/egg/eggTable.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGTABLE_H #define EGGTABLE_H @@ -33,7 +46,7 @@ public: INLINE void set_table_type(TableType type); INLINE TableType get_table_type() const; - + virtual void write(ostream &out, int indent_level) const; static TableType string_table_type(const string &string); @@ -56,7 +69,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggTexture.I b/panda/src/egg/eggTexture.I index 0cfbc556b7..b8106128cd 100644 --- a/panda/src/egg/eggTexture.I +++ b/panda/src/egg/eggTexture.I @@ -1,13 +1,26 @@ // Filename: eggTexture.I // Created by: drose (18Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_format // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_format(Format format) { @@ -17,7 +30,7 @@ set_format(Format format) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_format // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTexture::Format EggTexture:: get_format() const { @@ -27,7 +40,7 @@ get_format() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_wrap_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_wrap_mode(WrapMode mode) { @@ -37,7 +50,7 @@ set_wrap_mode(WrapMode mode) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_wrap_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTexture::WrapMode EggTexture:: get_wrap_mode() const { @@ -47,7 +60,7 @@ get_wrap_mode() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_wrap_u // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_wrap_u(WrapMode mode) { @@ -81,7 +94,7 @@ determine_wrap_u() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_wrap_v // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_wrap_v(WrapMode mode) { @@ -115,7 +128,7 @@ determine_wrap_v() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_minfilter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_minfilter(FilterType type) { @@ -125,7 +138,7 @@ set_minfilter(FilterType type) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_minfilter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTexture::FilterType EggTexture:: get_minfilter() const { @@ -135,7 +148,7 @@ get_minfilter() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_magfilter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_magfilter(FilterType type) { @@ -145,7 +158,7 @@ set_magfilter(FilterType type) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_magfilter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTexture::FilterType EggTexture:: get_magfilter() const { @@ -155,7 +168,7 @@ get_magfilter() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_magfilteralpha // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_magfilteralpha(FilterType type) { @@ -165,7 +178,7 @@ set_magfilteralpha(FilterType type) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_magfilteralpha // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTexture::FilterType EggTexture:: get_magfilteralpha() const { @@ -175,7 +188,7 @@ get_magfilteralpha() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_magfiltercolor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_magfiltercolor(FilterType type) { @@ -185,7 +198,7 @@ set_magfiltercolor(FilterType type) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_magfiltercolor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTexture::FilterType EggTexture:: get_magfiltercolor() const { @@ -246,7 +259,7 @@ get_anisotropic_degree() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_env_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_env_type(EnvType type) { @@ -256,7 +269,7 @@ set_env_type(EnvType type) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_env_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggTexture::EnvType EggTexture:: get_env_type() const { @@ -267,7 +280,7 @@ get_env_type() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_transform // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: set_transform(const LMatrix3d &transform) { @@ -278,7 +291,7 @@ set_transform(const LMatrix3d &transform) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::clear_transform // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: clear_transform() { @@ -301,7 +314,7 @@ has_transform() const { //////////////////////////////////////////////////////////////////// // Function: EggTexture::get_transform // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LMatrix3d EggTexture:: get_transform() const { @@ -319,7 +332,7 @@ get_transform() const { //////////////////////////////////////////////////////////////////// INLINE bool EggTexture:: transform_is_identity() const { - return (!has_transform() || + return (!has_transform() || _transform.almost_equal(LMatrix3d::ident_mat(), 0.0001)); } @@ -341,7 +354,7 @@ set_alpha_file(const Filename &alpha_file) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::clear_alpha_file // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggTexture:: clear_alpha_file() { @@ -392,7 +405,7 @@ update_alpha_file() { //////////////////////////////////////////////////////////////////// // Function: UniqueEggTextures::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE UniqueEggTextures:: UniqueEggTextures(int eq) : _eq(eq) { @@ -401,7 +414,7 @@ UniqueEggTextures(int eq) : _eq(eq) { //////////////////////////////////////////////////////////////////// // Function: UniqueEggTextures::Function operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool UniqueEggTextures:: operator ()(const EggTexture *t1, const EggTexture *t2) const { diff --git a/panda/src/egg/eggTexture.cxx b/panda/src/egg/eggTexture.cxx index 3003d4dd1d..1698d998cd 100644 --- a/panda/src/egg/eggTexture.cxx +++ b/panda/src/egg/eggTexture.cxx @@ -1,6 +1,19 @@ // Filename: eggTexture.cxx // Created by: drose (18Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggTexture.h" @@ -16,11 +29,11 @@ TypeHandle EggTexture::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggTexture::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggTexture:: -EggTexture(const string &tref_name, const string &filename) - : EggFilenameNode(tref_name, filename) +EggTexture(const string &tref_name, const string &filename) + : EggFilenameNode(tref_name, filename) { _format = F_unspecified; _wrap_mode = WM_unspecified; @@ -39,7 +52,7 @@ EggTexture(const string &tref_name, const string &filename) //////////////////////////////////////////////////////////////////// // Function: EggTexture::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggTexture:: EggTexture(const EggTexture ©) { @@ -49,13 +62,13 @@ EggTexture(const EggTexture ©) { //////////////////////////////////////////////////////////////////// // Function: EggTexture::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggTexture &EggTexture:: operator = (const EggTexture ©) { EggFilenameNode::operator = (copy); EggRenderMode::operator = (copy); - + _format = copy._format; _wrap_mode = copy._wrap_mode; _wrap_u = copy._wrap_u; @@ -170,7 +183,7 @@ write(ostream &out, int indent_level) const { // EggTexture::E_dirname: // The directory prefix of the texture filename. // -// EggTexture::E_complete_filename: +// EggTexture::E_complete_filename: // The union of the above three; that is, the complete // filename, with directory, basename, and extension. // @@ -215,7 +228,7 @@ is_equivalent_to(const EggTexture &other, int eq) const { if (transform_is_identity() != other.transform_is_identity()) { return false; } - + if (has_transform() && other.has_transform()) { if (!_transform.almost_equal(other._transform, 0.0001)) { return false; @@ -508,7 +521,7 @@ egg_start_parse_body() { //////////////////////////////////////////////////////////////////// // Function: Format output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggTexture::Format format) { switch (format) { @@ -561,7 +574,7 @@ ostream &operator << (ostream &out, EggTexture::Format format) { //////////////////////////////////////////////////////////////////// // Function: WrapMode output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggTexture::WrapMode mode) { switch (mode) { @@ -579,7 +592,7 @@ ostream &operator << (ostream &out, EggTexture::WrapMode mode) { //////////////////////////////////////////////////////////////////// // Function: FilterType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggTexture::FilterType type) { switch (type) { @@ -607,7 +620,7 @@ ostream &operator << (ostream &out, EggTexture::FilterType type) { //////////////////////////////////////////////////////////////////// // Function: EnvType output operator -// Description: +// Description: //////////////////////////////////////////////////////////////////// ostream &operator << (ostream &out, EggTexture::EnvType type) { switch (type) { diff --git a/panda/src/egg/eggTexture.h b/panda/src/egg/eggTexture.h index 3ed82ba1d4..1e35b80d7d 100644 --- a/panda/src/egg/eggTexture.h +++ b/panda/src/egg/eggTexture.h @@ -2,6 +2,19 @@ // Created by: drose (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGTEXTURE_H #define EGGTEXTURE_H @@ -24,7 +37,7 @@ public: EggTexture(const string &tref_name, const string &filename); EggTexture(const EggTexture ©); EggTexture &operator = (const EggTexture ©); - + virtual void write(ostream &out, int indent_level) const; enum Equivalence { @@ -43,10 +56,10 @@ public: bool has_alpha_channel(int num_components) const; enum Format { - F_unspecified, + F_unspecified, F_rgba, F_rgbm, F_rgba12, F_rgba8, F_rgba4, F_rgba5, F_rgb, F_rgb12, F_rgb8, F_rgb5, F_rgb332, - F_red, F_green, F_blue, F_alpha, F_luminance, + F_red, F_green, F_blue, F_alpha, F_luminance, F_luminance_alpha, F_luminance_alphamask }; enum WrapMode { @@ -62,7 +75,7 @@ public: // Mag Filter and Min Filter FT_nearest, FT_linear, - + // Min Filter Only FT_nearest_mipmap_nearest, // "mipmap point" FT_linear_mipmap_nearest, // "mipmap linear" @@ -159,7 +172,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggTextureCollection.I b/panda/src/egg/eggTextureCollection.I index 3cf6a7eb50..f7ef51bf34 100644 --- a/panda/src/egg/eggTextureCollection.I +++ b/panda/src/egg/eggTextureCollection.I @@ -1,6 +1,19 @@ // Filename: eggTextureCollection.I // Created by: drose (16Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE EggTextureCollection::iterator EggTextureCollection:: @@ -9,17 +22,17 @@ begin() const { _ordered_textures.begin()); return _ordered_textures.begin(); } - + INLINE EggTextureCollection::iterator EggTextureCollection:: end() const { return _ordered_textures.end(); } - + INLINE bool EggTextureCollection:: empty() const { return _ordered_textures.empty(); } - + INLINE EggTextureCollection::size_type EggTextureCollection:: size() const { nassertr(_ordered_textures.size() == _textures.size(), 0); diff --git a/panda/src/egg/eggTextureCollection.cxx b/panda/src/egg/eggTextureCollection.cxx index 6d28be334b..9282944823 100644 --- a/panda/src/egg/eggTextureCollection.cxx +++ b/panda/src/egg/eggTextureCollection.cxx @@ -1,6 +1,19 @@ // Filename: eggTextureCollection.cxx // Created by: drose (15Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggTextureCollection.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggTextureCollection::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggTextureCollection:: EggTextureCollection() { @@ -24,7 +37,7 @@ EggTextureCollection() { //////////////////////////////////////////////////////////////////// // Function: EggTextureCollection::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggTextureCollection:: EggTextureCollection(const EggTextureCollection ©) : @@ -36,7 +49,7 @@ EggTextureCollection(const EggTextureCollection ©) : //////////////////////////////////////////////////////////////////// // Function: EggTextureCollection::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggTextureCollection &EggTextureCollection:: operator = (const EggTextureCollection ©) { @@ -48,7 +61,7 @@ operator = (const EggTextureCollection ©) { //////////////////////////////////////////////////////////////////// // Function: EggTextureCollection::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggTextureCollection:: ~EggTextureCollection() { @@ -104,8 +117,8 @@ insert_textures(EggGroupNode *node) { EggGroupNode::iterator EggTextureCollection:: insert_textures(EggGroupNode *node, EggGroupNode::iterator position) { OrderedTextures::iterator oti; - for (oti = _ordered_textures.begin(); - oti != _ordered_textures.end(); + for (oti = _ordered_textures.begin(); + oti != _ordered_textures.end(); ++oti) { EggTexture *texture = (*oti); position = node->insert(position, texture); @@ -163,7 +176,7 @@ find_used_textures(EggNode *node) { } else if (node->is_of_type(EggGroupNode::get_class_type())) { EggGroupNode *group = DCAST(EggGroupNode, node); - + EggGroupNode::iterator ci; for (ci = group->begin(); ci != group->end(); ++ci) { EggNode *child = *ci; @@ -246,8 +259,8 @@ collapse_equivalent_textures(int eq, EggTextureCollection::TextureReplacement &r // First, put all of the textures into the Collapser structure, to // find out the unique textures. OrderedTextures::const_iterator oti; - for (oti = _ordered_textures.begin(); - oti != _ordered_textures.end(); + for (oti = _ordered_textures.begin(); + oti != _ordered_textures.end(); ++oti) { EggTexture *tex = (*oti); @@ -319,15 +332,15 @@ uniquify_trefs() { NameUniquifier nu(".tref", "tref"); OrderedTextures::const_iterator oti; - for (oti = _ordered_textures.begin(); - oti != _ordered_textures.end(); + for (oti = _ordered_textures.begin(); + oti != _ordered_textures.end(); ++oti) { EggTexture *tex = (*oti); tex->set_name(nu.add_name(tex->get_name())); } } - + //////////////////////////////////////////////////////////////////// // Function: EggTextureCollection::sort_by_tref // Access: Public @@ -412,8 +425,8 @@ create_unique_texture(const EggTexture ©, int eq) { // This requires a complete linear traversal, not terribly // efficient. OrderedTextures::const_iterator oti; - for (oti = _ordered_textures.begin(); - oti != _ordered_textures.end(); + for (oti = _ordered_textures.begin(); + oti != _ordered_textures.end(); ++oti) { EggTexture *tex = (*oti); if (copy.is_equivalent_to(*tex, eq)) { @@ -437,8 +450,8 @@ find_tref(const string &tref_name) const { // This requires a complete linear traversal, not terribly // efficient. OrderedTextures::const_iterator oti; - for (oti = _ordered_textures.begin(); - oti != _ordered_textures.end(); + for (oti = _ordered_textures.begin(); + oti != _ordered_textures.end(); ++oti) { EggTexture *tex = (*oti); if (tex->get_name() == tref_name) { @@ -460,8 +473,8 @@ find_filename(const Filename &filename) const { // This requires a complete linear traversal, not terribly // efficient. OrderedTextures::const_iterator oti; - for (oti = _ordered_textures.begin(); - oti != _ordered_textures.end(); + for (oti = _ordered_textures.begin(); + oti != _ordered_textures.end(); ++oti) { EggTexture *tex = (*oti); if (tex->get_filename() == filename) { diff --git a/panda/src/egg/eggTextureCollection.h b/panda/src/egg/eggTextureCollection.h index 8b1b0b8dce..dd84e464cb 100644 --- a/panda/src/egg/eggTextureCollection.h +++ b/panda/src/egg/eggTextureCollection.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGTEXTURECOLLECTION_H #define EGGTEXTURECOLLECTION_H diff --git a/panda/src/egg/eggUtilities.I b/panda/src/egg/eggUtilities.I index b8c94697e7..920912e03b 100644 --- a/panda/src/egg/eggUtilities.I +++ b/panda/src/egg/eggUtilities.I @@ -1,6 +1,19 @@ // Filename: eggUtilities.I // Created by: drose (10Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggGroup.h" diff --git a/panda/src/egg/eggUtilities.cxx b/panda/src/egg/eggUtilities.cxx index e334f64b3a..d082cf1664 100644 --- a/panda/src/egg/eggUtilities.cxx +++ b/panda/src/egg/eggUtilities.cxx @@ -1,6 +1,19 @@ // Filename: eggUtilities.cxx // Created by: drose (28Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggUtilities.h" diff --git a/panda/src/egg/eggUtilities.h b/panda/src/egg/eggUtilities.h index 9c82930f06..693c716b68 100644 --- a/panda/src/egg/eggUtilities.h +++ b/panda/src/egg/eggUtilities.h @@ -2,6 +2,19 @@ // Created by: drose (28Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGUTILITIES_H #define EGGUTILITIES_H diff --git a/panda/src/egg/eggVertex.I b/panda/src/egg/eggVertex.I index 4763f71965..802ea67330 100644 --- a/panda/src/egg/eggVertex.I +++ b/panda/src/egg/eggVertex.I @@ -1,6 +1,19 @@ // Filename: eggVertex.I // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggVertex::get_pool // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggVertexPool *EggVertex:: get_pool() const { @@ -262,7 +275,7 @@ pref_size() const { //////////////////////////////////////////////////////////////////// // Function: UniqueEggVertices::Function operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool UniqueEggVertices:: operator ()(const EggVertex *v1, const EggVertex *v2) const { diff --git a/panda/src/egg/eggVertex.cxx b/panda/src/egg/eggVertex.cxx index 9e356df252..a2aa97ee9e 100644 --- a/panda/src/egg/eggVertex.cxx +++ b/panda/src/egg/eggVertex.cxx @@ -1,6 +1,19 @@ // Filename: eggVertex.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggVertex.h" @@ -24,7 +37,7 @@ TypeHandle EggVertex::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggVertex::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggVertex:: EggVertex() { @@ -42,7 +55,7 @@ EggVertex() { // pool, index number, and group membership. //////////////////////////////////////////////////////////////////// EggVertex:: -EggVertex(const EggVertex ©) +EggVertex(const EggVertex ©) : EggObject(copy), EggAttributes(copy), _dxyzs(copy._dxyzs), _pos(copy._pos), @@ -78,7 +91,7 @@ operator = (const EggVertex ©) { //////////////////////////////////////////////////////////////////// // Function: EggVertex::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggVertex:: ~EggVertex() { @@ -153,7 +166,7 @@ write(ostream &out, int indent_level) const { if (!_gref.empty()) { // We need to build a list of group entries. set gre; - + GroupRef::const_iterator gi; for (gi = _gref.begin(); gi != _gref.end(); ++gi) { gre.insert(GroupRefEntry(*gi, (*gi)->get_vertex_membership(this))); @@ -405,7 +418,7 @@ test_pref_integrity() const { //////////////////////////////////////////////////////////////////// // Function: EggVertex::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggVertex:: output(ostream &out) const { diff --git a/panda/src/egg/eggVertex.h b/panda/src/egg/eggVertex.h index 3720add717..332c3cf925 100644 --- a/panda/src/egg/eggVertex.h +++ b/panda/src/egg/eggVertex.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGVERTEX_H #define EGGVERTEX_H @@ -147,4 +160,4 @@ public: #endif - + diff --git a/panda/src/egg/eggVertexPool.I b/panda/src/egg/eggVertexPool.I index 67a505bc84..c9926eb626 100644 --- a/panda/src/egg/eggVertexPool.I +++ b/panda/src/egg/eggVertexPool.I @@ -1,6 +1,19 @@ // Filename: eggVertexPool.I // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/egg/eggVertexPool.cxx b/panda/src/egg/eggVertexPool.cxx index aed8c96501..b3266e0a60 100644 --- a/panda/src/egg/eggVertexPool.cxx +++ b/panda/src/egg/eggVertexPool.cxx @@ -1,6 +1,19 @@ // Filename: eggVertexPool.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggVertexPool.h" @@ -14,7 +27,7 @@ TypeHandle EggVertexPool::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EggVertexPool::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggVertexPool:: EggVertexPool(const string &name) : EggNode(name) { @@ -40,7 +53,7 @@ EggVertexPool(const EggVertexPool ©) : EggNode(copy) { //////////////////////////////////////////////////////////////////// // Function: EggVertexPool::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggVertexPool:: ~EggVertexPool() { @@ -110,7 +123,7 @@ begin() const { iterator(_index_vertices.begin())); return iterator(_index_vertices.begin()); } - + //////////////////////////////////////////////////////////////////// // Function: EggVertexPool::end() // Access: Public @@ -121,7 +134,7 @@ EggVertexPool::iterator EggVertexPool:: end() const { return iterator(_index_vertices.end()); } - + //////////////////////////////////////////////////////////////////// // Function: EggVertexPool::empty() // Access: Public @@ -131,7 +144,7 @@ bool EggVertexPool:: empty() const { return _index_vertices.empty(); } - + //////////////////////////////////////////////////////////////////// // Function: EggVertexPool::size() // Access: Public @@ -289,7 +302,7 @@ public: return (prim->is_local_coord() ? 1 : 0); } }; - + //////////////////////////////////////////////////////////////////// // Function: EggVertexPool::transform // Access: Public @@ -324,18 +337,18 @@ transform(const LMatrix4d &mat) { // First, transform the global vertices. Get a copy of the list // of vertices in this pool. We must have a copy because we might // be modifying the list as we traverse it. - + typedef vector Verts; Verts verts; verts.reserve(size()); copy(begin(), end(), back_inserter(verts)); - + Verts::const_iterator vi; for (vi = verts.begin(); vi != verts.end(); ++vi) { EggVertex *vert = *vi; int num_local_coord = vert->get_num_local_coord(); int num_global_coord = vert->get_num_global_coord(); - + if (num_global_coord != 0) { // This vertex will be transformed. if (num_local_coord != 0) { @@ -346,12 +359,12 @@ transform(const LMatrix4d &mat) { vert->transform(mat); } } - + // Now transform the local vertices. We can walk through the list // directly now, because we won't be modifying the list this time. LMatrix4d local_mat = mat; local_mat.set_row(3, LVector3d(0.0, 0.0, 0.0)); - + iterator i; for (i = begin(); i != end(); ++i) { EggVertex *vert = *i; diff --git a/panda/src/egg/eggVertexPool.h b/panda/src/egg/eggVertexPool.h index 901c56538e..21eec7bc80 100644 --- a/panda/src/egg/eggVertexPool.h +++ b/panda/src/egg/eggVertexPool.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGVERTEXPOOL_H #define EGGVERTEXPOOL_H @@ -125,7 +138,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/egg/eggXfmAnimData.I b/panda/src/egg/eggXfmAnimData.I index 04abe5d0db..b3ae2b0eae 100644 --- a/panda/src/egg/eggXfmAnimData.I +++ b/panda/src/egg/eggXfmAnimData.I @@ -1,13 +1,26 @@ // Filename: eggXfmAnimData.I // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggXfmAnimData:: EggXfmAnimData(const string &name, CoordinateSystem cs) : EggAnimData(name) { @@ -18,10 +31,10 @@ EggXfmAnimData(const string &name, CoordinateSystem cs) : EggAnimData(name) { //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggXfmAnimData:: -EggXfmAnimData(const EggXfmAnimData ©) +EggXfmAnimData(const EggXfmAnimData ©) : EggAnimData(copy), _order(copy._order), _contents(copy._contents), @@ -32,7 +45,7 @@ EggXfmAnimData(const EggXfmAnimData ©) //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggXfmAnimData &EggXfmAnimData:: operator = (const EggXfmAnimData ©) { @@ -48,7 +61,7 @@ operator = (const EggXfmAnimData ©) { //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::set_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmAnimData:: set_order(const string &order) { @@ -58,7 +71,7 @@ set_order(const string &order) { //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::clear_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmAnimData:: clear_order() { @@ -68,17 +81,17 @@ clear_order() { //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::has_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggXfmAnimData:: has_order() const { return !_order.empty(); } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::get_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &EggXfmAnimData:: get_order() const { @@ -106,7 +119,7 @@ get_standard_order() { //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::set_contents // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmAnimData:: set_contents(const string &contents) { @@ -116,7 +129,7 @@ set_contents(const string &contents) { //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::clear_contents // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmAnimData:: clear_contents() { @@ -126,17 +139,17 @@ clear_contents() { //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::has_contents // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggXfmAnimData:: has_contents() const { return !_contents.empty(); } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::get_contents // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &EggXfmAnimData:: get_contents() const { diff --git a/panda/src/egg/eggXfmAnimData.cxx b/panda/src/egg/eggXfmAnimData.cxx index 7915d9e8ee..a4e577034c 100644 --- a/panda/src/egg/eggXfmAnimData.cxx +++ b/panda/src/egg/eggXfmAnimData.cxx @@ -1,6 +1,19 @@ // Filename: eggXfmAnimData.cxx // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggXfmAnimData.h" @@ -25,7 +38,7 @@ TypeHandle EggXfmAnimData::_type_handle; //////////////////////////////////////////////////////////////////// EggXfmAnimData:: EggXfmAnimData(const EggXfmSAnim &convert_from) - : EggAnimData(convert_from.get_name()) + : EggAnimData(convert_from.get_name()) { if (convert_from.has_order()) { set_order(convert_from.get_order()); @@ -69,7 +82,7 @@ EggXfmAnimData(const EggXfmSAnim &convert_from) } } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::get_value // Access: Public @@ -91,39 +104,39 @@ get_value(int row, LMatrix4d &mat) const { case 'i': scale[0] = value; break; - + case 'j': scale[1] = value; break; - + case 'k': scale[2] = value; break; - + case 'h': hpr[0] = value; break; - + case 'p': hpr[1] = value; break; - + case 'r': hpr[2] = value; break; - + case 'x': translate[0] = value; break; - + case 'y': translate[1] = value; break; - + case 'z': translate[2] = value; break; - + default: // The contents string contained an invalid letter. nassertv(false); @@ -144,7 +157,7 @@ get_value(int row, LMatrix4d &mat) const { void EggXfmAnimData:: write(ostream &out, int indent_level) const { write_header(out, indent_level, ""); - + if (has_fps()) { indent(out, indent_level + 2) << " fps { " << get_fps() << " }\n"; @@ -166,7 +179,7 @@ write(ostream &out, int indent_level) const { indent(out, indent_level + 2) << "}\n"; indent(out, indent_level) << "}\n"; } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmAnimData::r_transform // Access: Protected, Virtual @@ -206,7 +219,7 @@ r_transform(const LMatrix4d &mat, const LMatrix4d &inv, if (!result) { egg_cat.error() - << "Transform from " << _coordsys << " to " << to_cs + << "Transform from " << _coordsys << " to " << to_cs << " failed!\n"; LVector3d scale, hpr, trans; bool d = decompose_matrix(orig_mat, scale, hpr, trans, _coordsys); diff --git a/panda/src/egg/eggXfmAnimData.h b/panda/src/egg/eggXfmAnimData.h index fb5a0dcf14..a1caae8733 100644 --- a/panda/src/egg/eggXfmAnimData.h +++ b/panda/src/egg/eggXfmAnimData.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGXFMANIMDATA_H #define EGGXFMANIMDATA_H @@ -74,7 +87,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/eggXfmSAnim.I b/panda/src/egg/eggXfmSAnim.I index 1211e68779..60096c7852 100644 --- a/panda/src/egg/eggXfmSAnim.I +++ b/panda/src/egg/eggXfmSAnim.I @@ -1,13 +1,26 @@ // Filename: eggXfmSAnim.I // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggXfmSAnim:: EggXfmSAnim(const string &name, CoordinateSystem cs) : EggGroupNode(name) { @@ -19,11 +32,11 @@ EggXfmSAnim(const string &name, CoordinateSystem cs) : EggGroupNode(name) { //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggXfmSAnim:: -EggXfmSAnim(const EggXfmSAnim ©) - : EggGroupNode(copy), +EggXfmSAnim(const EggXfmSAnim ©) + : EggGroupNode(copy), _fps(copy._fps), _has_fps(copy._has_fps), _order(copy._order), @@ -34,7 +47,7 @@ EggXfmSAnim(const EggXfmSAnim ©) //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EggXfmSAnim &EggXfmSAnim:: operator = (const EggXfmSAnim ©) { @@ -51,7 +64,7 @@ operator = (const EggXfmSAnim ©) { //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::set_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmSAnim:: set_fps(double fps) { @@ -63,7 +76,7 @@ set_fps(double fps) { //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::clear_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmSAnim:: clear_fps() { @@ -73,7 +86,7 @@ clear_fps() { //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::has_fps // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggXfmSAnim:: has_fps() const { @@ -94,7 +107,7 @@ get_fps() const { //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::set_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmSAnim:: set_order(const string &order) { @@ -104,7 +117,7 @@ set_order(const string &order) { //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::clear_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void EggXfmSAnim:: clear_order() { @@ -114,17 +127,17 @@ clear_order() { //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::has_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool EggXfmSAnim:: has_order() const { return !_order.empty(); } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::get_order // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &EggXfmSAnim:: get_order() const { diff --git a/panda/src/egg/eggXfmSAnim.cxx b/panda/src/egg/eggXfmSAnim.cxx index dfdb5c3c71..99833637c2 100644 --- a/panda/src/egg/eggXfmSAnim.cxx +++ b/panda/src/egg/eggXfmSAnim.cxx @@ -1,6 +1,19 @@ // Filename: eggXfmSAnim.cxx // Created by: drose (19Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggXfmSAnim.h" @@ -32,7 +45,7 @@ string EggXfmSAnim::_standard_order = "sphrt"; // newer-style XfmSAnim table. //////////////////////////////////////////////////////////////////// EggXfmSAnim:: -EggXfmSAnim(const EggXfmAnimData &convert_from) +EggXfmSAnim(const EggXfmAnimData &convert_from) : EggGroupNode(convert_from.get_name()) { _has_fps = false; @@ -172,7 +185,7 @@ write(ostream &out, int indent_level) const { // the string. //////////////////////////////////////////////////////////////////// void EggXfmSAnim:: -compose_with_order(LMatrix4d &mat, +compose_with_order(LMatrix4d &mat, const LVecBase3d &scale, const LVecBase3d &hpr, const LVecBase3d &trans, @@ -196,15 +209,15 @@ compose_with_order(LMatrix4d &mat, case 's': mat = mat * LMatrix4d::scale_mat(scale); break; - + case 'h': mat = mat * LMatrix4d::rotate_mat_normaxis(hpr[0], LVector3d::up(cs), cs); break; - + case 'p': mat = mat * LMatrix4d::rotate_mat_normaxis(hpr[1], LVector3d::right(cs), cs); break; - + case 'r': if (reverse_roll) { mat = mat * LMatrix4d::rotate_mat_normaxis(-hpr[2], LVector3d::forward(cs), cs); @@ -212,18 +225,18 @@ compose_with_order(LMatrix4d &mat, mat = mat * LMatrix4d::rotate_mat_normaxis(hpr[2], LVector3d::forward(cs), cs); } break; - + case 't': mat = mat * LMatrix4d::translate_mat(trans); break; - + default: egg_cat.warning() << "Invalid letter in order string: " << *pi << "\n"; } } } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::get_num_rows // Access: Public @@ -255,7 +268,7 @@ get_num_rows() const { return min_rows; } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::get_value // Access: Public @@ -323,7 +336,7 @@ get_value(int row, LMatrix4d &mat) const { case 'x': translate[0] = value; break; - + case 'y': translate[1] = value; break; @@ -342,7 +355,7 @@ get_value(int row, LMatrix4d &mat) const { // So now we've got the nine components; build a matrix. compose_with_order(mat, scale, hpr, translate, get_order(), _coordsys); } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::set_value // Access: Public @@ -360,7 +373,7 @@ get_value(int row, LMatrix4d &mat) const { bool EggXfmSAnim:: set_value(int row, const LMatrix4d &mat) { nassertr(get_order() == get_standard_order(), false); - + LVector3d scale, hpr, translate; bool result = decompose_matrix(mat, scale, hpr, translate, _coordsys); if (!result) { @@ -420,7 +433,7 @@ set_value(int row, const LMatrix4d &mat) { case 'x': sanim->set_value(row, translate[0]); break; - + case 'y': sanim->set_value(row, translate[1]); break; @@ -439,7 +452,7 @@ set_value(int row, const LMatrix4d &mat) { nassertr(num_tables == 9, false); return true; } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::add_data // Access: Public @@ -546,7 +559,7 @@ add_data(const LMatrix4d &mat) { case 'x': sanim->add_data(translate[0]); break; - + case 'y': sanim->add_data(translate[1]); break; @@ -565,7 +578,7 @@ add_data(const LMatrix4d &mat) { nassertr(num_tables == 9, false); return true; } - + //////////////////////////////////////////////////////////////////// // Function: EggXfmSAnim::r_transform // Access: Protected, Virtual @@ -638,14 +651,14 @@ normalize_by_rebuilding() { EggXfmSAnim original; original.steal_children(*this); original = (*this); - + // Now we have no children, so our data is clear. Rebuild it. int num_rows = original.get_num_rows(); LMatrix4d orig_mat; for (int r = 0; r < num_rows; r++) { original.get_value(r, orig_mat); bool result = add_data(orig_mat); - + // If this assertion fails, we somehow got a matrix out of the // original table that we could not represent in the new table. // That shouldn't be possible; there's probably something wrong @@ -672,17 +685,17 @@ normalize_by_expanding() { int num_tables = 0; int table_length = 1; string remaining_tables = "ijkhprxyz"; - + for (ci = begin(); ci != end(); ++ci) { if ((*ci)->is_of_type(EggSAnimData::get_class_type())) { EggSAnimData *sanim = DCAST(EggSAnimData, *ci); - + nassertv(sanim->get_name().length() == 1); char name = sanim->get_name()[0]; size_t p = remaining_tables.find(name); nassertv(p != string::npos); remaining_tables[p] = ' '; - + num_tables++; if (sanim->get_num_rows() > 1) { if (table_length == 1) { @@ -717,7 +730,7 @@ normalize_by_expanding() { } } } - + // Now expand any one-row tables as needed. for (ci = begin(); ci != end(); ++ci) { if ((*ci)->is_of_type(EggSAnimData::get_class_type())) { diff --git a/panda/src/egg/eggXfmSAnim.h b/panda/src/egg/eggXfmSAnim.h index 082dc7227e..8f6401cc83 100644 --- a/panda/src/egg/eggXfmSAnim.h +++ b/panda/src/egg/eggXfmSAnim.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGXFMSANIM_H #define EGGXFMSANIM_H @@ -56,7 +69,7 @@ public: virtual void write(ostream &out, int indent_level) const; - static void compose_with_order(LMatrix4d &mat, + static void compose_with_order(LMatrix4d &mat, const LVecBase3d &scale, const LVecBase3d &hpr, const LVecBase3d &trans, @@ -78,7 +91,7 @@ private: bool _has_fps; string _order; CoordinateSystem _coordsys; - + static string _standard_order; public: @@ -95,7 +108,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg/lexerDefs.h b/panda/src/egg/lexerDefs.h index 7596d0ea34..5711a3a9f4 100644 --- a/panda/src/egg/lexerDefs.h +++ b/panda/src/egg/lexerDefs.h @@ -2,6 +2,19 @@ // Created by: drose (17Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LEXER_H #define LEXER_H diff --git a/panda/src/egg/parserDefs.h b/panda/src/egg/parserDefs.h index 3a1da83658..3785a0ae6c 100644 --- a/panda/src/egg/parserDefs.h +++ b/panda/src/egg/parserDefs.h @@ -2,6 +2,19 @@ // Created by: drose (17Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PARSER_H #define PARSER_H diff --git a/panda/src/egg/pt_EggMaterial.cxx b/panda/src/egg/pt_EggMaterial.cxx index eb15c6a351..3b950fb735 100644 --- a/panda/src/egg/pt_EggMaterial.cxx +++ b/panda/src/egg/pt_EggMaterial.cxx @@ -1,6 +1,19 @@ // Filename: pt_EggMaterial.cxx // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pt_EggMaterial.h" diff --git a/panda/src/egg/pt_EggMaterial.h b/panda/src/egg/pt_EggMaterial.h index 4e639f3b06..73346ef45c 100644 --- a/panda/src/egg/pt_EggMaterial.h +++ b/panda/src/egg/pt_EggMaterial.h @@ -1,6 +1,19 @@ // Filename: pt_EggMaterial.h // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_EGGMATERIAL_H diff --git a/panda/src/egg/pt_EggTexture.cxx b/panda/src/egg/pt_EggTexture.cxx index eb8634ee22..88f123c4ef 100644 --- a/panda/src/egg/pt_EggTexture.cxx +++ b/panda/src/egg/pt_EggTexture.cxx @@ -1,6 +1,19 @@ // Filename: pt_EggTexture.cxx // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pt_EggTexture.h" diff --git a/panda/src/egg/pt_EggTexture.h b/panda/src/egg/pt_EggTexture.h index 2d232d4dff..6fc65f2768 100644 --- a/panda/src/egg/pt_EggTexture.h +++ b/panda/src/egg/pt_EggTexture.h @@ -1,6 +1,19 @@ // Filename: pt_EggTexture.h // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_EGGTEXTURE_H diff --git a/panda/src/egg/pt_EggVertex.cxx b/panda/src/egg/pt_EggVertex.cxx index 21538e744b..8402b1f786 100644 --- a/panda/src/egg/pt_EggVertex.cxx +++ b/panda/src/egg/pt_EggVertex.cxx @@ -1,6 +1,19 @@ // Filename: pt_EggVertex.cxx // Created by: drose (22Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pt_EggVertex.h" diff --git a/panda/src/egg/pt_EggVertex.h b/panda/src/egg/pt_EggVertex.h index 82ac8e1675..7cfb8d344b 100644 --- a/panda/src/egg/pt_EggVertex.h +++ b/panda/src/egg/pt_EggVertex.h @@ -1,6 +1,19 @@ // Filename: pt_EggVertex.h // Created by: drose (22Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_EGGVERTEX_H diff --git a/panda/src/egg/test_egg.cxx b/panda/src/egg/test_egg.cxx index 6730fc24ea..24bc107421 100644 --- a/panda/src/egg/test_egg.cxx +++ b/panda/src/egg/test_egg.cxx @@ -1,6 +1,19 @@ // Filename: test_egg.cxx // Created by: drose (16Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggData.h" diff --git a/panda/src/egg/vector_PT_EggMaterial.cxx b/panda/src/egg/vector_PT_EggMaterial.cxx index fccb377550..ad20a92ea8 100644 --- a/panda/src/egg/vector_PT_EggMaterial.cxx +++ b/panda/src/egg/vector_PT_EggMaterial.cxx @@ -1,12 +1,25 @@ // Filename: vector_PT_EggMaterial.cxx // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_PT_EggMaterial.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE PT_EggMaterial #define NAME vector_PT_EggMaterial diff --git a/panda/src/egg/vector_PT_EggMaterial.h b/panda/src/egg/vector_PT_EggMaterial.h index 00b55e5cf8..e1fee29d2b 100644 --- a/panda/src/egg/vector_PT_EggMaterial.h +++ b/panda/src/egg/vector_PT_EggMaterial.h @@ -1,6 +1,19 @@ // Filename: vector_PT_EggMaterial.h // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_PT_EGGMATERIAL_H diff --git a/panda/src/egg/vector_PT_EggTexture.cxx b/panda/src/egg/vector_PT_EggTexture.cxx index f64a155cd8..0872498195 100644 --- a/panda/src/egg/vector_PT_EggTexture.cxx +++ b/panda/src/egg/vector_PT_EggTexture.cxx @@ -1,12 +1,25 @@ // Filename: vector_PT_EggTexture.cxx // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_PT_EggTexture.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE PT_EggTexture #define NAME vector_PT_EggTexture diff --git a/panda/src/egg/vector_PT_EggTexture.h b/panda/src/egg/vector_PT_EggTexture.h index 4ab9fdb43b..c6d9f8ebee 100644 --- a/panda/src/egg/vector_PT_EggTexture.h +++ b/panda/src/egg/vector_PT_EggTexture.h @@ -1,6 +1,19 @@ // Filename: vector_PT_EggTexture.h // Created by: drose (01May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_PT_EGGTEXTURE_H diff --git a/panda/src/egg/vector_PT_EggVertex.cxx b/panda/src/egg/vector_PT_EggVertex.cxx index 4dee5fe53b..d2ff123a36 100644 --- a/panda/src/egg/vector_PT_EggVertex.cxx +++ b/panda/src/egg/vector_PT_EggVertex.cxx @@ -1,12 +1,25 @@ // Filename: vector_PT_EggVertex.cxx // Created by: drose (22Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_PT_EggVertex.h" #define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPTP EXPTP_PANDAEGG #define TYPE PT_EggVertex #define NAME vector_PT_EggVertex diff --git a/panda/src/egg/vector_PT_EggVertex.h b/panda/src/egg/vector_PT_EggVertex.h index 1d3f34842d..b22d9a7c57 100644 --- a/panda/src/egg/vector_PT_EggVertex.h +++ b/panda/src/egg/vector_PT_EggVertex.h @@ -1,6 +1,19 @@ // Filename: vector_PT_EggVertex.h // Created by: drose (22Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_PT_EGGVERTEX_H diff --git a/panda/src/egg2sg/animBundleMaker.cxx b/panda/src/egg2sg/animBundleMaker.cxx index 6b0076c8fc..9ffdab30b5 100644 --- a/panda/src/egg2sg/animBundleMaker.cxx +++ b/panda/src/egg2sg/animBundleMaker.cxx @@ -1,6 +1,19 @@ // Filename: animBundleMaker.cxx // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "animBundleMaker.h" @@ -20,7 +33,7 @@ //////////////////////////////////////////////////////////////////// // Function: AnimBundleMaker::Construtor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// AnimBundleMaker:: AnimBundleMaker(EggTable *root) : _root(root) { @@ -29,7 +42,7 @@ AnimBundleMaker(EggTable *root) : _root(root) { _ok_fps = true; _ok_num_frames = true; - + inspect_tree(root); if (!_ok_fps) { @@ -54,7 +67,7 @@ AnimBundleMaker(EggTable *root) : _root(root) { //////////////////////////////////////////////////////////////////// // Function: AnimBundleMaker::make_node // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// AnimBundleNode *AnimBundleMaker:: make_node() { @@ -64,7 +77,7 @@ make_node() { //////////////////////////////////////////////////////////////////// // Function: AnimBundleMaker::make_bundle // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// AnimBundle *AnimBundleMaker:: make_bundle() { @@ -184,7 +197,7 @@ build_hierarchy(EggTable *egg_table, AnimGroup *parent) { this_node = create_xfm_channel((*ci), egg_table->get_name(), parent); } else { egg2sg_cat.warning() - << "Duplicate xform table under node " + << "Duplicate xform table under node " << egg_table->get_name() << "\n"; } } @@ -222,7 +235,7 @@ build_hierarchy(EggTable *egg_table, AnimGroup *parent) { AnimChannelScalarTable *AnimBundleMaker:: create_s_channel(EggSAnimData *egg_anim, const string &name, AnimGroup *parent) { - AnimChannelScalarTable *table + AnimChannelScalarTable *table = new AnimChannelScalarTable(parent, name); // First we have to copy the table data from PTA_double to @@ -231,10 +244,10 @@ create_s_channel(EggSAnimData *egg_anim, const string &name, for (int i = 0; i < egg_anim->get_num_rows(); i++) { new_data[i] = (float)egg_anim->get_value(i); } - + // Now we can assign the table. table->set_table(new_data); - + return table; } @@ -278,7 +291,7 @@ create_xfm_channel(EggXfmSAnim *egg_anim, const string &name, // order. egg_anim->optimize_to_standard_order(); - AnimChannelMatrixXfmTable *table + AnimChannelMatrixXfmTable *table = new AnimChannelMatrixXfmTable(parent, name); // The EggXfmSAnim structure has a number of children which are @@ -323,6 +336,6 @@ create_xfm_channel(EggXfmSAnim *egg_anim, const string &name, } } } - + return table; } diff --git a/panda/src/egg2sg/animBundleMaker.h b/panda/src/egg2sg/animBundleMaker.h index 3e83281724..ef903e6285 100644 --- a/panda/src/egg2sg/animBundleMaker.h +++ b/panda/src/egg2sg/animBundleMaker.h @@ -2,6 +2,19 @@ // Created by: drose (22Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ANIMBUNDLEMAKER_H #define ANIMBUNDLEMAKER_H diff --git a/panda/src/egg2sg/characterMaker.cxx b/panda/src/egg2sg/characterMaker.cxx index 02ba91b1de..0a12f50dc6 100644 --- a/panda/src/egg2sg/characterMaker.cxx +++ b/panda/src/egg2sg/characterMaker.cxx @@ -1,6 +1,19 @@ // Filename: characterMaker.cxx // Created by: drose (23Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "characterMaker.h" @@ -21,7 +34,7 @@ //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::Construtor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CharacterMaker:: CharacterMaker(EggGroup *root, EggLoader &loader) @@ -37,7 +50,7 @@ CharacterMaker(EggGroup *root, EggLoader &loader) //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::make_node // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Character *CharacterMaker:: make_node() { @@ -126,7 +139,7 @@ create_slider(const string &name) { //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::make_bundle // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// CharacterJointBundle *CharacterMaker:: make_bundle() { @@ -145,7 +158,7 @@ make_bundle() { //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::build_hierarchy // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CharacterMaker:: build_joint_hierarchy(EggNode *egg_node, PartGroup *part) { @@ -181,7 +194,7 @@ build_joint_hierarchy(EggNode *egg_node, PartGroup *part) { part = joint; } - + EggGroup::const_iterator ci; for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { build_joint_hierarchy((*ci), part); @@ -218,7 +231,7 @@ parent_joint_nodes(PartGroup *part) { //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::make_geometry // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CharacterMaker:: make_geometry(EggNode *egg_node) { @@ -253,15 +266,15 @@ make_geometry(EggNode *egg_node) { //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::make_static_primitive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CharacterMaker:: make_static_primitive(EggPrimitive *egg_primitive, EggGroupNode *prim_home) { NamedNode *node = part_to_node(egg_to_part(prim_home)); - + // We need this funny transform to convert from the coordinate // space of the original vertices to that of the new joint node. - LMatrix4d transform = + LMatrix4d transform = egg_primitive->get_vertex_frame() * prim_home->get_node_frame_inv(); @@ -271,13 +284,13 @@ make_static_primitive(EggPrimitive *egg_primitive, EggGroupNode *prim_home) { //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::make_dynamic_primitive // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CharacterMaker:: make_dynamic_primitive(EggPrimitive *egg_primitive, EggGroupNode *prim_home) { NamedNode *node = part_to_node(egg_to_part(prim_home)); - - LMatrix4d transform = + + LMatrix4d transform = egg_primitive->get_vertex_frame() * prim_home->get_node_frame_inv(); @@ -288,7 +301,7 @@ make_dynamic_primitive(EggPrimitive *egg_primitive, EggGroupNode *prim_home) { //////////////////////////////////////////////////////////////////// // Function: CharacterMaker::determine_primitive_home // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggGroupNode *CharacterMaker:: determine_primitive_home(EggPrimitive *egg_primitive) { @@ -350,7 +363,7 @@ determine_primitive_home(EggPrimitive *egg_primitive) { if (home->is_of_type(EggGroup::get_class_type())) { egg_group = DCAST(EggGroup, home); } - while (egg_group != (EggGroup *)NULL && + while (egg_group != (EggGroup *)NULL && egg_group->get_group_type() != EggGroup::GT_joint && egg_group->get_dart_type() == EggGroup::DT_none) { nassertr(egg_group->get_parent() != (EggGroupNode *)NULL, NULL); diff --git a/panda/src/egg2sg/characterMaker.h b/panda/src/egg2sg/characterMaker.h index 7de51516d6..034ac990f1 100644 --- a/panda/src/egg2sg/characterMaker.h +++ b/panda/src/egg2sg/characterMaker.h @@ -2,6 +2,19 @@ // Created by: drose (23Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CHARACTERMAKER_H #define CHARACTERMAKER_H diff --git a/panda/src/egg2sg/computedVerticesMaker.I b/panda/src/egg2sg/computedVerticesMaker.I index 134ce28cc7..a9789a3765 100644 --- a/panda/src/egg2sg/computedVerticesMaker.I +++ b/panda/src/egg2sg/computedVerticesMaker.I @@ -1,4 +1,17 @@ // Filename: computedVerticesMaker.I // Created by: drose (01Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/egg2sg/computedVerticesMaker.cxx b/panda/src/egg2sg/computedVerticesMaker.cxx index fb40715943..bb7223c5ac 100644 --- a/panda/src/egg2sg/computedVerticesMaker.cxx +++ b/panda/src/egg2sg/computedVerticesMaker.cxx @@ -1,6 +1,19 @@ // Filename: computedVerticesMaker.cxx // Created by: drose (01Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "computedVerticesMaker.h" @@ -18,7 +31,7 @@ //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMaker::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ComputedVerticesMaker:: ComputedVerticesMaker() : @@ -92,7 +105,7 @@ add_vertex_joints(EggVertex *vertex, EggNode *object) { if (egg_joint->is_of_type(EggGroup::get_class_type())) { egg_group = DCAST(EggGroup, egg_joint); } - while (egg_group != (EggGroup *)NULL && + while (egg_group != (EggGroup *)NULL && egg_group->get_group_type() != EggGroup::GT_joint && egg_group->get_dart_type() == EggGroup::DT_none) { nassertv(egg_group->get_parent() != (EggGroupNode *)NULL); @@ -104,7 +117,7 @@ add_vertex_joints(EggVertex *vertex, EggNode *object) { } add_joint(egg_joint, 1.0); - + } else { // This vertex belongs in the joint or joints that reference it. EggVertex::GroupRef::const_iterator gri; @@ -327,7 +340,7 @@ make_computed_vertices(Character *character, CharacterMaker &char_maker) { ComputedVertices::VertexTransform new_vt; new_vt._joint_index = joint_index; new_vt._effect = (float)weight; - + // This will either insert the VertexTransform into the set and // return its newly-created iterator, or it will return the // iterator referring to the previously-inserted VertexTransform @@ -341,9 +354,9 @@ make_computed_vertices(Character *character, CharacterMaker &char_maker) { (ComputedVertices::VertexTransform &)*vti; // Now add in all the vertices and normals. - copy(vc._vindex.begin(), vc._vindex.end(), + copy(vc._vindex.begin(), vc._vindex.end(), back_inserter(insert_vt._vindex)); - copy(vc._nindex.begin(), vc._nindex.end(), + copy(vc._nindex.begin(), vc._nindex.end(), back_inserter(insert_vt._nindex)); } } @@ -351,7 +364,7 @@ make_computed_vertices(Character *character, CharacterMaker &char_maker) { // Ok, now we have the set of all VertexTransforms. Create a // ComputedVertices object that reflects this. ComputedVertices *comp_verts = new ComputedVertices; - copy(transforms.begin(), transforms.end(), + copy(transforms.begin(), transforms.end(), back_inserter(comp_verts->_transforms)); character->_cv._coords = _coords; @@ -426,7 +439,7 @@ make_computed_vertices(Character *character, CharacterMaker &char_maker) { } } } - + comp_verts->make_orig(character); return comp_verts; } @@ -435,11 +448,11 @@ make_computed_vertices(Character *character, CharacterMaker &char_maker) { //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMaker::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMaker:: write(ostream &out) const { - out << "ComputedVerticesMaker, " + out << "ComputedVerticesMaker, " << _transforms.size() << " transform spaces, " << _coords.size() << " vertices, " << _norms.size() << " normals, " @@ -458,7 +471,7 @@ write(ostream &out) const { for (mi = _morphs.begin(); mi != _morphs.end(); ++mi) { const string &name = (*mi).first; const MorphList &mlist = (*mi).second; - out << name << " morphs " + out << name << " morphs " << mlist._vmorphs.size() << " vertices, " << mlist._nmorphs.size() << " normals, " << mlist._tmorphs.size() << " uvs, and " @@ -470,7 +483,7 @@ write(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMaker::JointWeights::Ordering operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool ComputedVerticesMaker::JointWeights:: operator < (const JointWeights &other) const { @@ -506,7 +519,7 @@ operator < (const JointWeights &other) const { //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMaker::JointWeights::normalize_weights // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMaker::JointWeights:: normalize_weights() { @@ -531,7 +544,7 @@ normalize_weights() { //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMaker::JointWeights::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ComputedVerticesMaker::JointWeights:: output(ostream &out) const { diff --git a/panda/src/egg2sg/computedVerticesMaker.h b/panda/src/egg2sg/computedVerticesMaker.h index 556b12910a..ec9aeccfae 100644 --- a/panda/src/egg2sg/computedVerticesMaker.h +++ b/panda/src/egg2sg/computedVerticesMaker.h @@ -2,6 +2,19 @@ // Created by: drose (01Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COMPUTEDVERTICESMAKER_H #define COMPUTEDVERTICESMAKER_H @@ -50,7 +63,7 @@ class EggVertex; class EXPCL_PANDAEGG ComputedVerticesMaker { public: ComputedVerticesMaker(); - + void begin_new_space(); void add_joint(EggNode *joint, double membership); void add_vertex_joints(EggVertex *vertex, EggNode *object); @@ -146,4 +159,4 @@ operator << (ostream &out, const ComputedVerticesMaker::JointWeights &jw) { #include "computedVerticesMaker.I" #endif - + diff --git a/panda/src/egg2sg/computedVerticesMakerEntity.I b/panda/src/egg2sg/computedVerticesMakerEntity.I index 93edac83cc..fed50ac4e2 100644 --- a/panda/src/egg2sg/computedVerticesMakerEntity.I +++ b/panda/src/egg2sg/computedVerticesMakerEntity.I @@ -1,6 +1,19 @@ // Filename: computedVerticesMakerEntity.I // Created by: drose (02Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMakerEntity::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ComputedVerticesMakerEntity:: @@ -19,7 +32,7 @@ ComputedVerticesMakerEntity(const ValueType &value, const MorphType &morphs) //////////////////////////////////////////////////////////////////// // Function: ComputedVerticesMakerEntity::Ordering operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template bool ComputedVerticesMakerEntity:: diff --git a/panda/src/egg2sg/computedVerticesMakerEntity.h b/panda/src/egg2sg/computedVerticesMakerEntity.h index d664a7da03..01262f8a3e 100644 --- a/panda/src/egg2sg/computedVerticesMakerEntity.h +++ b/panda/src/egg2sg/computedVerticesMakerEntity.h @@ -2,6 +2,19 @@ // Created by: drose (02Mar99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COMPUTEDVERTICESMAKERENTITY_H #define COMPUTEDVERTICESMAKERENTITY_H @@ -48,7 +61,7 @@ class EXPCL_PANDAEGG ComputedVerticesMakerEntityMap { public: int add_value(const ValueType &value, const MorphType &morphs, PTA(ValueType) &table); - + typedef map, int> MapType; MapType _map; }; diff --git a/panda/src/egg2sg/config_egg2sg.cxx b/panda/src/egg2sg/config_egg2sg.cxx index cb986ae289..42bae36d75 100644 --- a/panda/src/egg2sg/config_egg2sg.cxx +++ b/panda/src/egg2sg/config_egg2sg.cxx @@ -1,6 +1,19 @@ // Filename: config_egg2sg.cxx // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_egg2sg.h" @@ -93,7 +106,7 @@ init_libegg2sg() { << "Unexpected egg-coordinate-system string: " << csstr << "\n"; cs = CS_default; } - egg_coordinate_system = (cs == CS_default) ? + egg_coordinate_system = (cs == CS_default) ? default_coordinate_system : cs; LoaderFileTypeRegistry *reg = LoaderFileTypeRegistry::get_ptr(); diff --git a/panda/src/egg2sg/config_egg2sg.h b/panda/src/egg2sg/config_egg2sg.h index f2fe600ac7..856cc4ce6f 100644 --- a/panda/src/egg2sg/config_egg2sg.h +++ b/panda/src/egg2sg/config_egg2sg.h @@ -2,6 +2,19 @@ // Created by: drose (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_EGG2SG_H #define CONFIG_EGG2SG_H diff --git a/panda/src/egg2sg/deferredArcProperty.cxx b/panda/src/egg2sg/deferredArcProperty.cxx index 685e522903..55770f6dcf 100644 --- a/panda/src/egg2sg/deferredArcProperty.cxx +++ b/panda/src/egg2sg/deferredArcProperty.cxx @@ -1,6 +1,19 @@ // Filename: deferredArcProperty.cxx // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "deferredArcProperty.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: DeferredArcProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DeferredArcProperty:: DeferredArcProperty() { @@ -20,7 +33,7 @@ DeferredArcProperty() { //////////////////////////////////////////////////////////////////// // Function: DeferredArcProperty::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DeferredArcProperty:: DeferredArcProperty(const DeferredArcProperty ©) : @@ -33,7 +46,7 @@ DeferredArcProperty(const DeferredArcProperty ©) : //////////////////////////////////////////////////////////////////// // Function: DeferredArcProperty::Copy Assignment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DeferredArcProperty:: operator = (const DeferredArcProperty ©) { @@ -85,6 +98,6 @@ apply_to_node(Node *node) { if ((_flags & F_has_into_collide_mask) != 0) { cnode->set_into_collide_mask(_into_collide_mask); } - } + } } diff --git a/panda/src/egg2sg/deferredArcProperty.h b/panda/src/egg2sg/deferredArcProperty.h index e60ff38480..9d660c5319 100644 --- a/panda/src/egg2sg/deferredArcProperty.h +++ b/panda/src/egg2sg/deferredArcProperty.h @@ -1,6 +1,19 @@ // Filename: deferredArcProperty.h // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DEFERREDARCPROPERTY_H @@ -35,7 +48,7 @@ public: void apply_to_arc(NodeRelation *arc); void apply_to_node(Node *node); - + public: enum Flags { diff --git a/panda/src/egg2sg/deferredArcTraverser.cxx b/panda/src/egg2sg/deferredArcTraverser.cxx index 80d132dd9c..7916f5df8f 100644 --- a/panda/src/egg2sg/deferredArcTraverser.cxx +++ b/panda/src/egg2sg/deferredArcTraverser.cxx @@ -1,6 +1,19 @@ // Filename: deferredArcTraverser.cxx // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "deferredArcTraverser.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: DeferredArcTraverser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DeferredArcTraverser:: DeferredArcTraverser(const DeferredArcs &deferred_arcs) : @@ -19,7 +32,7 @@ DeferredArcTraverser(const DeferredArcs &deferred_arcs) : //////////////////////////////////////////////////////////////////// // Function: DeferredArcTraverser::forward_arc // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool DeferredArcTraverser:: forward_arc(NodeRelation *arc, NullTransitionWrapper &, diff --git a/panda/src/egg2sg/deferredArcTraverser.h b/panda/src/egg2sg/deferredArcTraverser.h index 8abfc104d7..2ee8968f64 100644 --- a/panda/src/egg2sg/deferredArcTraverser.h +++ b/panda/src/egg2sg/deferredArcTraverser.h @@ -1,6 +1,19 @@ // Filename: deferredArcTraverser.h // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DEFERREDARCTRAVERSER_H diff --git a/panda/src/egg2sg/eggBinner.cxx b/panda/src/egg2sg/eggBinner.cxx index 5f5b54e5e8..4e654f4d4a 100644 --- a/panda/src/egg2sg/eggBinner.cxx +++ b/panda/src/egg2sg/eggBinner.cxx @@ -1,6 +1,19 @@ // Filename: eggBinner.cxx // Created by: drose (17Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eggBinner.h" @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// // Function: EggBinner::get_bin_number // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int EggBinner:: get_bin_number(const EggNode *node) { @@ -23,7 +36,7 @@ get_bin_number(const EggNode *node) { return (int)BN_lod; } } - + return (int)BN_none; } @@ -31,7 +44,7 @@ get_bin_number(const EggNode *node) { //////////////////////////////////////////////////////////////////// // Function: EggBinner::sorts_less // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool EggBinner:: sorts_less(int bin_number, const EggNode *a, const EggNode *b) { @@ -40,13 +53,13 @@ sorts_less(int bin_number, const EggNode *a, const EggNode *b) { const EggGroup *ga = DCAST(EggGroup, a); const EggGroup *gb = DCAST(EggGroup, b); - const EggSwitchCondition &swa = ga->get_lod(); - const EggSwitchCondition &swb = gb->get_lod(); + const EggSwitchCondition &swa = ga->get_lod(); + const EggSwitchCondition &swb = gb->get_lod(); // For now, this is the only kind of switch condition there is. - const EggSwitchConditionDistance &swda = + const EggSwitchConditionDistance &swda = *DCAST(EggSwitchConditionDistance, &swa); - const EggSwitchConditionDistance &swdb = + const EggSwitchConditionDistance &swdb = *DCAST(EggSwitchConditionDistance, &swb); // Group LOD nodes in order by switching center. @@ -56,7 +69,7 @@ sorts_less(int bin_number, const EggNode *a, const EggNode *b) { //////////////////////////////////////////////////////////////////// // Function: EggBinner::collapse_group // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool EggBinner:: collapse_group(const EggGroup *group, int) { diff --git a/panda/src/egg2sg/eggBinner.h b/panda/src/egg2sg/eggBinner.h index 18aa2710f7..7b2c03ccfc 100644 --- a/panda/src/egg2sg/eggBinner.h +++ b/panda/src/egg2sg/eggBinner.h @@ -2,6 +2,19 @@ // Created by: drose (17Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGBINNER_H #define EGGBINNER_H diff --git a/panda/src/egg2sg/eggLoader.cxx b/panda/src/egg2sg/eggLoader.cxx index 652d930915..73761d32cb 100644 --- a/panda/src/egg2sg/eggLoader.cxx +++ b/panda/src/egg2sg/eggLoader.cxx @@ -1,6 +1,19 @@ // Filename: eggLoader.cxx // Created by: drose (21Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -87,16 +100,16 @@ LODInstance(EggNode *egg_node, RenderRelation *arc) { EggGroup *egg_group = DCAST(EggGroup, egg_node); assert(egg_group->has_lod()); const EggSwitchCondition &sw = egg_group->get_lod(); - + // For now, this is the only kind of switch condition there is. _d = DCAST(EggSwitchConditionDistance, &sw); } - + //////////////////////////////////////////////////////////////////// // Function: EggLoader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggLoader:: EggLoader() { @@ -104,11 +117,11 @@ EggLoader() { _data.set_coordinate_system(egg_coordinate_system); _error = false; } - + //////////////////////////////////////////////////////////////////// // Function: EggLoader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EggLoader:: EggLoader(const EggData &data) : @@ -117,11 +130,11 @@ EggLoader(const EggData &data) : _error = false; } - + //////////////////////////////////////////////////////////////////// // Function: EggLoader::build_graph // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggLoader:: build_graph() { @@ -146,7 +159,7 @@ build_graph() { apply_deferred_arcs(_root); } - + //////////////////////////////////////////////////////////////////// // Function: EggLoader::reparent_decals // Access: Public @@ -166,10 +179,10 @@ reparent_decals() { // First, search for the GeomNode. GeomNode *geom = NULL; - int num_children = + int num_children = node->get_num_children(RenderRelation::get_class_type()); for (int i = 0; i < num_children; i++) { - NodeRelation *child_arc = + NodeRelation *child_arc = node->get_child(RenderRelation::get_class_type(), i); nassertv(child_arc != (NodeRelation *)NULL); Node *child = child_arc->get_child(); @@ -179,7 +192,7 @@ reparent_decals() { if (geom != (GeomNode *)NULL) { // Oops, too many GeomNodes. egg2sg_cat.error() - << "Decal onto " << node->get_name() + << "Decal onto " << node->get_name() << " uses base geometry with multiple states.\n"; _error = true; } @@ -199,7 +212,7 @@ reparent_decals() { // list. int i = 0; while (i < num_children) { - NodeRelation *child_arc = + NodeRelation *child_arc = node->get_child(RenderRelation::get_class_type(), i); nassertv(child_arc != (NodeRelation *)NULL); Node *child = child_arc->get_child(); @@ -215,7 +228,7 @@ reparent_decals() { } } } - + //////////////////////////////////////////////////////////////////// // Function: EggLoader::reset_directs // Access: Public @@ -241,7 +254,7 @@ reset_directs() { GeomNode *geom = NULL; NodeRelation *child_arc = NULL; - int num_children = + int num_children = node->get_num_children(RenderRelation::get_class_type()); for (int i = 0; i < num_children && geom == (GeomNode *)NULL; i++) { child_arc = node->get_child(RenderRelation::get_class_type(), i); @@ -266,7 +279,7 @@ reset_directs() { //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_nonindexed_primitive // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggLoader:: make_nonindexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, @@ -287,7 +300,7 @@ make_nonindexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, if (egg_prim->is_of_type(EggPoint::get_class_type())) { bprim.set_type(BPT_point); } - + if (egg_prim->has_normal()) { Normald norm = egg_prim->get_normal() * mat; norm.normalize(); @@ -302,7 +315,7 @@ make_nonindexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, for (vi = egg_prim->begin(); vi != egg_prim->end(); ++vi) { EggVertex *egg_vert = *vi; BuilderVertex bvert(LCAST(float, egg_vert->get_pos3() * mat)); - + if (egg_vert->has_normal()) { Normald norm = egg_vert->get_normal() * mat; norm.normalize(); @@ -317,14 +330,14 @@ make_nonindexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, } if (egg_vert->has_uv()) { TexCoordd uv = egg_vert->get_uv(); - if (egg_prim->has_texture() && + if (egg_prim->has_texture() && egg_prim->get_texture()->has_transform()) { // If we have a texture matrix, apply it. uv = uv * egg_prim->get_texture()->get_transform(); } bvert.set_texcoord(LCAST(float, uv)); } - + bprim.add_vertex(bvert); } @@ -333,14 +346,14 @@ make_nonindexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, if (!egg_prim->has_color() && !has_vert_color && !egg_false_color) { bprim.set_color(Colorf(1.0, 1.0, 1.0, 1.0)); } - + _builder.add_prim(bucket, bprim); } //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_indexed_primitive // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggLoader:: make_indexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, @@ -405,7 +418,7 @@ make_indexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, _comp_verts_maker.mark_space(); int vindex = - _comp_verts_maker.add_vertex(egg_vert->get_pos3(), + _comp_verts_maker.add_vertex(egg_vert->get_pos3(), egg_vert->_dxyzs, mat); BuilderVertexI bvert(vindex); @@ -432,7 +445,7 @@ make_indexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, TexCoordd uv = egg_vert->get_uv(); LMatrix3d mat; - if (egg_prim->has_texture() && + if (egg_prim->has_texture() && egg_prim->get_texture()->has_transform()) { // If we have a texture matrix, apply it. mat = egg_prim->get_texture()->get_transform(); @@ -456,14 +469,14 @@ make_indexed_primitive(EggPrimitive *egg_prim, NamedNode *parent, EggMorphColorList()); bprim.set_color(cindex); } - + _builder.add_prim(bucket, bprim); } //////////////////////////////////////////////////////////////////// // Function: EggLoader::load_textures // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggLoader:: load_textures() { @@ -504,7 +517,7 @@ load_textures() { //////////////////////////////////////////////////////////////////// // Function: EggLoader::load_texture // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool EggLoader:: load_texture(TextureDef &def, const EggTexture *egg_tex) { @@ -528,7 +541,7 @@ load_texture(TextureDef &def, const EggTexture *egg_tex) { } } - PT(TextureApplyTransition) apply = + PT(TextureApplyTransition) apply = new TextureApplyTransition(TextureApplyProperty::M_modulate); apply_texture_attributes(tex, egg_tex); @@ -544,7 +557,7 @@ load_texture(TextureDef &def, const EggTexture *egg_tex) { //////////////////////////////////////////////////////////////////// // Function: EggLoader::apply_texture_attributes // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggLoader:: apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { @@ -602,7 +615,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { case EggTexture::FT_nearest: tex->set_minfilter(Texture::FT_nearest); break; - + case EggTexture::FT_linear: if (egg_ignore_filters) { egg2sg_cat.warning() @@ -612,7 +625,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { tex->set_minfilter(Texture::FT_linear); } break; - + case EggTexture::FT_nearest_mipmap_nearest: if (egg_ignore_filters) { egg2sg_cat.warning() @@ -626,7 +639,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { tex->set_minfilter(Texture::FT_nearest_mipmap_nearest); } break; - + case EggTexture::FT_linear_mipmap_nearest: if (egg_ignore_filters) { egg2sg_cat.warning() @@ -640,7 +653,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { tex->set_minfilter(Texture::FT_linear_mipmap_nearest); } break; - + case EggTexture::FT_nearest_mipmap_linear: if (egg_ignore_filters) { egg2sg_cat.warning() @@ -654,7 +667,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { tex->set_minfilter(Texture::FT_nearest_mipmap_linear); } break; - + case EggTexture::FT_linear_mipmap_linear: if (egg_ignore_filters) { egg2sg_cat.warning() @@ -684,7 +697,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { case EggTexture::FT_nearest_mipmap_linear: tex->set_magfilter(Texture::FT_nearest); break; - + case EggTexture::FT_linear: case EggTexture::FT_linear_mipmap_nearest: case EggTexture::FT_linear_mipmap_linear: @@ -772,7 +785,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { } break; case EggTexture::F_rgb8: - case EggTexture::F_rgba8: + case EggTexture::F_rgba8: // We'll quietly accept RGBA8 for a 3-component texture, since // flt2egg generates these for 3-component as well as for // 4-component textures. @@ -836,7 +849,7 @@ apply_texture_attributes(Texture *tex, const EggTexture *egg_tex) { //////////////////////////////////////////////////////////////////// // Function: EggLoader::apply_texture_apply_attributes // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggLoader:: apply_texture_apply_attributes(TextureApplyTransition *apply, @@ -849,7 +862,7 @@ apply_texture_apply_attributes(TextureApplyTransition *apply, case EggTexture::ET_modulate: apply->set_mode(TextureApplyProperty::M_modulate); break; - + case EggTexture::ET_decal: apply->set_mode(TextureApplyProperty::M_decal); break; @@ -909,7 +922,7 @@ get_material_transition(const EggMaterial *egg_mat, bool bface) { } mat->set_twoside(bface); - + // Now get a global Material pointer, shared with other models. const Material *shared_mat = MaterialPool::get_material(mat); @@ -924,10 +937,10 @@ get_material_transition(const EggMaterial *egg_mat, bool bface) { //////////////////////////////////////////////////////////////////// // Function: EggLoader::setup_bucket // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EggLoader:: -setup_bucket(BuilderBucket &bucket, NamedNode *parent, +setup_bucket(BuilderBucket &bucket, NamedNode *parent, EggPrimitive *egg_prim) { bucket._node = parent; bucket._mesh = egg_mesh; @@ -995,7 +1008,7 @@ setup_bucket(BuilderBucket &bucket, NamedNode *parent, bucket._trans.set_transition(new TextureTransition(TextureTransition::off())); if (egg_prim->has_texture()) { PT(EggTexture) egg_tex = egg_prim->get_texture(); - + const TextureDef &def = _textures[egg_tex]; if (def._texture != (TextureTransition *)NULL) { bucket._trans.set_transition(def._texture); @@ -1020,7 +1033,7 @@ setup_bucket(BuilderBucket &bucket, NamedNode *parent, egg_prim->get_bface_flag()); bucket._trans.set_transition(mt); } - + // Also check the color of the primitive to see if we should assume // alpha based on the alpha values specified in the egg file. @@ -1031,7 +1044,7 @@ setup_bucket(BuilderBucket &bucket, NamedNode *parent, } } EggPrimitive::const_iterator vi; - for (vi = egg_prim->begin(); + for (vi = egg_prim->begin(); !implicit_alpha && vi != egg_prim->end(); ++vi) { if ((*vi)->has_color()) { @@ -1040,7 +1053,7 @@ setup_bucket(BuilderBucket &bucket, NamedNode *parent, } } } - + if (implicit_alpha) { am = EggRenderMode::AM_on; } @@ -1121,7 +1134,7 @@ setup_bucket(BuilderBucket &bucket, NamedNode *parent, //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_node // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// RenderRelation *EggLoader:: make_node(EggNode *egg_node, NamedNode *parent) { @@ -1134,7 +1147,7 @@ make_node(EggNode *egg_node, NamedNode *parent) { } else if (egg_node->is_of_type(EggGroup::get_class_type())) { return make_node(DCAST(EggGroup, egg_node), parent); } else if (egg_node->is_of_type(EggTable::get_class_type())) { - return make_node(DCAST(EggTable, egg_node), parent); + return make_node(DCAST(EggTable, egg_node), parent); } else if (egg_node->is_of_type(EggGroupNode::get_class_type())) { return make_node(DCAST(EggGroupNode, egg_node), parent); } @@ -1145,7 +1158,7 @@ make_node(EggNode *egg_node, NamedNode *parent) { //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_node (EggNurbsCurve) // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// RenderRelation *EggLoader:: make_node(EggNurbsCurve *egg_curve, NamedNode *parent) { @@ -1153,7 +1166,7 @@ make_node(EggNurbsCurve *egg_curve, NamedNode *parent) { assert(!parent->is_of_type(GeomNode::get_class_type())); PT(ParametricCurve) curve; - + if (egg_load_classic_nurbs_curves) { curve = new ClassicNurbsCurve; } else { @@ -1187,7 +1200,7 @@ make_node(EggNurbsCurve *egg_curve, NamedNode *parent) { _error = true; return (RenderRelation *)NULL; } - + for (int i = 0; i < num_knots; i++) { nurbs->set_knot(i, egg_curve->get_knot(i)); } @@ -1223,7 +1236,7 @@ make_node(EggNurbsCurve *egg_curve, NamedNode *parent) { //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_node (EggPrimitive) // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// RenderRelation *EggLoader:: make_node(EggPrimitive *egg_prim, NamedNode *parent) { @@ -1235,11 +1248,11 @@ make_node(EggPrimitive *egg_prim, NamedNode *parent) { } return (RenderRelation *)NULL; } - + //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_node (EggBin) // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// RenderRelation *EggLoader:: make_node(EggBin *egg_bin, NamedNode *parent) { @@ -1293,7 +1306,7 @@ make_node(EggBin *egg_bin, NamedNode *parent) { //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_node (EggGroup) // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// RenderRelation *EggLoader:: make_node(EggGroup *egg_group, NamedNode *parent) { @@ -1330,7 +1343,7 @@ make_node(EggGroup *egg_group, NamedNode *parent) { string egg_syntax = config_egg2sg.GetString("egg-object-type-" + objecttype, "none"); - + if (egg_syntax == "none") { // It wasn't defined in a config file. Maybe it's built in? @@ -1376,7 +1389,7 @@ make_node(EggGroup *egg_group, NamedNode *parent) { if (!egg_syntax.empty()) { if (!egg_group->parse_egg(egg_syntax)) { egg2sg_cat.error() - << "Error while parsing definition for ObjectType " + << "Error while parsing definition for ObjectType " << objecttype << "\n"; _error = true; } @@ -1394,7 +1407,7 @@ make_node(EggGroup *egg_group, NamedNode *parent) { // A collision group: create collision geometry. node = new CollisionNode; node->set_name(egg_group->get_name()); - + make_collision_solids(egg_group, egg_group, (CollisionNode *)node); if ((egg_group->get_collide_flags() & EggGroup::CF_keep) != 0) { // If we also specified to keep the geometry, continue the @@ -1412,12 +1425,12 @@ make_node(EggGroup *egg_group, NamedNode *parent) { } return arc; - } else if (egg_group->get_switch_flag() && + } else if (egg_group->get_switch_flag() && egg_group->get_switch_fps() != 0.0) { // Create a sequence node. node = new SequenceNode(1.0 / egg_group->get_switch_fps()); node->set_name(egg_group->get_name()); - + EggGroup::const_iterator ci; for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { make_node(*ci, node); @@ -1429,7 +1442,7 @@ make_node(EggGroup *egg_group, NamedNode *parent) { node->set_name(egg_group->get_name()); DCAST(ModelNode, node)->set_preserve_transform(egg_group->get_dcs_flag()); - + EggGroup::const_iterator ci; for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { make_node(*ci, node); @@ -1439,7 +1452,7 @@ make_node(EggGroup *egg_group, NamedNode *parent) { // A normal group; just create a normal node, and traverse. node = new NamedNode; node->set_name(egg_group->get_name()); - + EggGroup::const_iterator ci; for (ci = egg_group->begin(); ci != egg_group->end(); ++ci) { make_node(*ci, node); @@ -1490,7 +1503,7 @@ create_group_arc(EggGroup *egg_group, NamedNode *parent, NamedNode *node) { if (egg_group->get_decal_flag()) { if (egg_ignore_decals) { - egg2sg_cat.error() + egg2sg_cat.error() << "Ignoring decal flag on " << egg_group->get_name() << "\n"; _error = true; } @@ -1527,7 +1540,7 @@ create_group_arc(EggGroup *egg_group, NamedNode *parent, NamedNode *node) { if (egg_group->has_collide_mask()) { def._from_collide_mask = egg_group->get_collide_mask(); def._into_collide_mask = egg_group->get_collide_mask(); - def._flags |= + def._flags |= DeferredArcProperty::F_has_from_collide_mask | DeferredArcProperty::F_has_into_collide_mask; } @@ -1543,14 +1556,14 @@ create_group_arc(EggGroup *egg_group, NamedNode *parent, NamedNode *node) { if (def._flags != 0) { _deferred_arcs[arc] = def; } - + return arc; } //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_node (EggTable) // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// RenderRelation *EggLoader:: make_node(EggTable *egg_table, NamedNode *parent) { @@ -1571,7 +1584,7 @@ make_node(EggTable *egg_table, NamedNode *parent) { //////////////////////////////////////////////////////////////////// // Function: EggLoader::make_node (EggGroupNode) // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// RenderRelation *EggLoader:: make_node(EggGroupNode *egg_group, NamedNode *parent) { @@ -1595,7 +1608,7 @@ make_node(EggGroupNode *egg_group, NamedNode *parent) { // below. //////////////////////////////////////////////////////////////////// void EggLoader:: -make_collision_solids(EggGroup *start_group, EggGroup *egg_group, +make_collision_solids(EggGroup *start_group, EggGroup *egg_group, CollisionNode *cnode) { if (egg_group->get_cs_type() != EggGroup::CST_none) { start_group = egg_group; @@ -1609,8 +1622,8 @@ make_collision_solids(EggGroup *start_group, EggGroup *egg_group, case EggGroup::CST_inverse_sphere: // These aren't presently supported. - egg2sg_cat.error() - << "Not presently supported: { " + egg2sg_cat.error() + << "Not presently supported: { " << egg_group->get_cs_type() << " }\n"; _error = true; break; @@ -1684,7 +1697,7 @@ make_collision_polygon(EggGroup *egg_group, CollisionNode *cnode, EggGroup::const_iterator ci; for (ci = geom_group->begin(); ci != geom_group->end(); ++ci) { if ((*ci)->is_of_type(EggPolygon::get_class_type())) { - create_collision_polygons(cnode, DCAST(EggPolygon, *ci), + create_collision_polygons(cnode, DCAST(EggPolygon, *ci), egg_group, flags); } } @@ -1705,7 +1718,7 @@ make_collision_polyset(EggGroup *egg_group, CollisionNode *cnode, EggGroup::const_iterator ci; for (ci = geom_group->begin(); ci != geom_group->end(); ++ci) { if ((*ci)->is_of_type(EggPolygon::get_class_type())) { - create_collision_polygons(cnode, DCAST(EggPolygon, *ci), + create_collision_polygons(cnode, DCAST(EggPolygon, *ci), egg_group, flags); } } @@ -1759,7 +1772,7 @@ make_collision_sphere(EggGroup *egg_group, CollisionNode *cnode, if (num_vertices > 0) { center /= (double)num_vertices; - + // And the furthest vertex determines the radius. double radius2 = 0.0; for (vi = vertices.begin(); vi != vertices.end(); ++vi) { @@ -1778,7 +1791,7 @@ make_collision_sphere(EggGroup *egg_group, CollisionNode *cnode, } float radius = sqrtf(radius2); - CollisionSphere *cssphere = + CollisionSphere *cssphere = new CollisionSphere(LCAST(float, center), radius); apply_collision_flags(cssphere, flags); cnode->add_solid(cssphere); @@ -1793,8 +1806,8 @@ make_collision_sphere(EggGroup *egg_group, CollisionNode *cnode, // appropriate, based on the settings of the given // CollideFlags. //////////////////////////////////////////////////////////////////// -void EggLoader:: -apply_collision_flags(CollisionSolid *solid, +void EggLoader:: +apply_collision_flags(CollisionSolid *solid, EggGroup::CollideFlags flags) { if ((flags & EggGroup::CF_intangible) != 0) { solid->set_tangible(false); @@ -1859,10 +1872,10 @@ create_collision_plane(EggPolygon *egg_poly, EggGroup *parent_group) { if (!egg_poly->empty()) { EggPolygon::const_iterator vi; vi = egg_poly->begin(); - + Vertexd vert = (*vi)->get_pos3(); vertices.push_back(LCAST(float, vert)); - + Vertexd last_vert = vert; ++vi; while (vi != egg_poly->end()) { @@ -1870,7 +1883,7 @@ create_collision_plane(EggPolygon *egg_poly, EggGroup *parent_group) { if (!vert.almost_equal(last_vert)) { vertices.push_back(LCAST(float, vert)); } - + last_vert = vert; ++vi; } @@ -1891,8 +1904,8 @@ create_collision_plane(EggPolygon *egg_poly, EggGroup *parent_group) { // CollisionNode. //////////////////////////////////////////////////////////////////// void EggLoader:: -create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, - EggGroup *parent_group, +create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, + EggGroup *parent_group, EggGroup::CollideFlags flags) { PT(EggGroup) group = new EggGroup; @@ -1920,10 +1933,10 @@ create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, if (!poly->empty()) { EggPolygon::const_iterator vi; vi = poly->begin(); - + Vertexd vert = (*vi)->get_pos3(); vertices.push_back(LCAST(float, vert)); - + Vertexd last_vert = vert; ++vi; while (vi != poly->end()) { @@ -1940,7 +1953,7 @@ create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, if (vertices.size() >= 3) { const Vertexf *vertices_begin = &vertices[0]; const Vertexf *vertices_end = vertices_begin + vertices.size(); - CollisionPolygon *cspoly = + CollisionPolygon *cspoly = new CollisionPolygon(vertices_begin, vertices_end); apply_collision_flags(cspoly, flags); cnode->add_solid(cspoly); diff --git a/panda/src/egg2sg/eggLoader.h b/panda/src/egg2sg/eggLoader.h index a04b68fe27..87ce781a70 100644 --- a/panda/src/egg2sg/eggLoader.h +++ b/panda/src/egg2sg/eggLoader.h @@ -2,6 +2,19 @@ // Created by: drose (21Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EGGLOADER_H #define EGGLOADER_H @@ -75,10 +88,10 @@ private: void load_textures(); bool load_texture(TextureDef &def, const EggTexture *egg_tex); void apply_texture_attributes(Texture *tex, const EggTexture *egg_tex); - void apply_texture_apply_attributes(TextureApplyTransition *apply, + void apply_texture_apply_attributes(TextureApplyTransition *apply, const EggTexture *egg_tex); - MaterialTransition *get_material_transition(const EggMaterial *egg_mat, + MaterialTransition *get_material_transition(const EggMaterial *egg_mat, bool bface); void setup_bucket(BuilderBucket &bucket, NamedNode *parent, @@ -94,7 +107,7 @@ private: RenderRelation *make_node(EggTable *egg_table, NamedNode *parent); RenderRelation *make_node(EggGroupNode *egg_group, NamedNode *parent); - void make_collision_solids(EggGroup *start_group, EggGroup *egg_group, + void make_collision_solids(EggGroup *start_group, EggGroup *egg_group, CollisionNode *cnode); void make_collision_plane(EggGroup *egg_group, CollisionNode *cnode, EggGroup::CollideFlags flags); @@ -104,12 +117,12 @@ private: EggGroup::CollideFlags flags); void make_collision_sphere(EggGroup *egg_group, CollisionNode *cnode, EggGroup::CollideFlags flags); - void apply_collision_flags(CollisionSolid *solid, + void apply_collision_flags(CollisionSolid *solid, EggGroup::CollideFlags flags); EggGroup *find_collision_geometry(EggGroup *egg_group); CollisionPlane *create_collision_plane(EggPolygon *egg_poly, EggGroup *parent_group); - void create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, + void create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, EggGroup *parent_group, EggGroup::CollideFlags flags); @@ -136,7 +149,7 @@ private: DeferredArcs _deferred_arcs; -public: +public: PT_NamedNode _root; EggData _data; bool _error; diff --git a/panda/src/egg2sg/load_egg_file.cxx b/panda/src/egg2sg/load_egg_file.cxx index 25e8856b6a..55c76b636d 100644 --- a/panda/src/egg2sg/load_egg_file.cxx +++ b/panda/src/egg2sg/load_egg_file.cxx @@ -1,6 +1,19 @@ // Filename: load_egg_file.cxx // Created by: drose (09Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "load_egg_file.h" @@ -81,7 +94,7 @@ load_egg_file(const string &filename, CoordinateSystem cs) { // EggData structure. The structure is destroyed in the // loading. //////////////////////////////////////////////////////////////////// -PT_NamedNode +PT_NamedNode load_egg_data(EggData &data) { // We temporarily shuttle the children to a holding node so we can // copy them into the EggLoader's structure without it complaining. diff --git a/panda/src/egg2sg/load_egg_file.h b/panda/src/egg2sg/load_egg_file.h index e25c8ed983..201fb957b8 100644 --- a/panda/src/egg2sg/load_egg_file.h +++ b/panda/src/egg2sg/load_egg_file.h @@ -2,6 +2,19 @@ // Created by: drose (09Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LOAD_EGG_FILE_H #define LOAD_EGG_FILE_H @@ -24,7 +37,7 @@ class EggData; // Also see the EggLoader class, which can exercise a // bit more manual control over the loading process. //////////////////////////////////////////////////////////////////// -EXPCL_PANDAEGG PT_NamedNode +EXPCL_PANDAEGG PT_NamedNode load_egg_file(const string &filename, CoordinateSystem cs = CS_default); //////////////////////////////////////////////////////////////////// @@ -34,7 +47,7 @@ load_egg_file(const string &filename, CoordinateSystem cs = CS_default); // EggData structure. The structure is destroyed in the // loading. //////////////////////////////////////////////////////////////////// -EXPCL_PANDAEGG PT_NamedNode +EXPCL_PANDAEGG PT_NamedNode load_egg_data(EggData &data); #endif diff --git a/panda/src/egg2sg/loaderFileTypeEgg.cxx b/panda/src/egg2sg/loaderFileTypeEgg.cxx index 59d000fb28..b15031a714 100644 --- a/panda/src/egg2sg/loaderFileTypeEgg.cxx +++ b/panda/src/egg2sg/loaderFileTypeEgg.cxx @@ -1,6 +1,19 @@ // Filename: loaderFileTypeEgg.cxx // Created by: drose (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loaderFileTypeEgg.h" @@ -13,7 +26,7 @@ TypeHandle LoaderFileTypeEgg::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeEgg::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// LoaderFileTypeEgg:: LoaderFileTypeEgg() { @@ -22,7 +35,7 @@ LoaderFileTypeEgg() { //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeEgg::get_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string LoaderFileTypeEgg:: get_name() const { @@ -32,7 +45,7 @@ get_name() const { //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeEgg::get_extension // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string LoaderFileTypeEgg:: get_extension() const { @@ -54,7 +67,7 @@ resolve_filename(Filename &path) const { //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeEgg::load_file // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PT_Node LoaderFileTypeEgg:: load_file(const Filename &path, bool) const { diff --git a/panda/src/egg2sg/loaderFileTypeEgg.h b/panda/src/egg2sg/loaderFileTypeEgg.h index 6cabea48d3..2fc62c3a56 100644 --- a/panda/src/egg2sg/loaderFileTypeEgg.h +++ b/panda/src/egg2sg/loaderFileTypeEgg.h @@ -1,6 +1,19 @@ // Filename: loaderFileTypeEgg.h // Created by: drose (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LOADERFILETYPEEGG_H @@ -37,7 +50,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/egg2sg/test_loader.cxx b/panda/src/egg2sg/test_loader.cxx index 493920d886..20250029f6 100644 --- a/panda/src/egg2sg/test_loader.cxx +++ b/panda/src/egg2sg/test_loader.cxx @@ -1,6 +1,19 @@ // Filename: test_loader.cxx // Created by: drose (21Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "load_egg_file.h" @@ -28,7 +41,7 @@ #include -class PrintNodes : +class PrintNodes : public TraverserVisitor { public: PrintNodes() { @@ -37,7 +50,7 @@ public: bool reached_node(Node *node, AttributeWrapper &state, NullLevelState &) { if (node->is_of_type(GeomNode::get_class_type())) { GeomNode *geomNode = (GeomNode *)node; - indent(nout, _indent_level) + indent(nout, _indent_level) << *geomNode << ", " << geomNode->get_num_geoms() << " geoms:\n"; int num_geoms = geomNode->get_num_geoms(); @@ -90,10 +103,10 @@ main(int argc, char *argv[]) { new RenderRelation(root, egg_root); } - + PrintNodes pn; df_traverse(root, pn, AllAttributesWrapper(), NullLevelState(), RenderRelation::get_class_type()); - + return(0); } diff --git a/panda/src/event/config_event.cxx b/panda/src/event/config_event.cxx index 136564f6f1..f7131d96e3 100644 --- a/panda/src/event/config_event.cxx +++ b/panda/src/event/config_event.cxx @@ -1,6 +1,19 @@ // Filename: config_event.cxx // Created by: drose (14Dec99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_event.h" diff --git a/panda/src/event/config_event.h b/panda/src/event/config_event.h index 129ce1f070..f7512a52c5 100644 --- a/panda/src/event/config_event.h +++ b/panda/src/event/config_event.h @@ -2,6 +2,19 @@ // Created by: drose (14Dec99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_EVENT_H #define CONFIG_EVENT_H diff --git a/panda/src/event/event.I b/panda/src/event/event.I index b83de2d728..12dd260179 100644 --- a/panda/src/event/event.I +++ b/panda/src/event/event.I @@ -1,13 +1,26 @@ // Filename: event.I // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Event::set_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void Event:: set_name(const string &name) { @@ -19,7 +32,7 @@ set_name(const string &name) { // Access: Public // Description: Resets the Event's name to empty. //////////////////////////////////////////////////////////////////// -INLINE void Event:: +INLINE void Event:: clear_name() { _name = ""; } @@ -38,7 +51,7 @@ has_name() const { //////////////////////////////////////////////////////////////////// // Function: Event::get_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &Event:: get_name() const { diff --git a/panda/src/event/event.cxx b/panda/src/event/event.cxx index e94f59a741..17b04959aa 100644 --- a/panda/src/event/event.cxx +++ b/panda/src/event/event.cxx @@ -1,6 +1,19 @@ // Filename: event.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "event.h" @@ -11,7 +24,7 @@ TypeHandle Event::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Event::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Event:: Event(const string &event_name, EventReceiver *receiver) : @@ -23,10 +36,10 @@ Event(const string &event_name, EventReceiver *receiver) : //////////////////////////////////////////////////////////////////// // Function: Event::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Event:: -Event(const Event ©) : +Event(const Event ©) : _parameters(copy._parameters), _receiver(copy._receiver), _name(copy._name) @@ -36,7 +49,7 @@ Event(const Event ©) : //////////////////////////////////////////////////////////////////// // Function: Event::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Event:: operator = (const Event ©) { @@ -48,7 +61,7 @@ operator = (const Event ©) { //////////////////////////////////////////////////////////////////// // Function: Event::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Event:: ~Event() { @@ -57,7 +70,7 @@ Event:: //////////////////////////////////////////////////////////////////// // Function: Event::add_parameter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Event:: add_parameter(const EventParameter &obj) { @@ -68,7 +81,7 @@ add_parameter(const EventParameter &obj) { //////////////////////////////////////////////////////////////////// // Function: Event::get_num_parameters // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int Event:: get_num_parameters() const { @@ -78,7 +91,7 @@ get_num_parameters() const { //////////////////////////////////////////////////////////////////// // Function: Event::get_parameter // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EventParameter Event:: get_parameter(int n) const { @@ -90,7 +103,7 @@ get_parameter(int n) const { //////////////////////////////////////////////////////////////////// // Function: Event::has_receiver // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool Event:: has_receiver() const { @@ -100,7 +113,7 @@ has_receiver() const { //////////////////////////////////////////////////////////////////// // Function: Event::get_receiver // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EventReceiver *Event:: get_receiver() const { @@ -110,7 +123,7 @@ get_receiver() const { //////////////////////////////////////////////////////////////////// // Function: Event::set_receiver // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Event:: set_receiver(EventReceiver *receiver) { @@ -120,7 +133,7 @@ set_receiver(EventReceiver *receiver) { //////////////////////////////////////////////////////////////////// // Function: Event::clear_receiver // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Event:: clear_receiver() { @@ -130,9 +143,9 @@ clear_receiver() { //////////////////////////////////////////////////////////////////// // Function: Event::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Event:: output(ostream &out) const { out << get_name(); -} +} diff --git a/panda/src/event/event.h b/panda/src/event/event.h index b4b801514a..c26656f82b 100644 --- a/panda/src/event/event.h +++ b/panda/src/event/event.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EVENT_H #define EVENT_H diff --git a/panda/src/event/eventHandler.cxx b/panda/src/event/eventHandler.cxx index a75de8722a..dd68adc4ae 100644 --- a/panda/src/event/eventHandler.cxx +++ b/panda/src/event/eventHandler.cxx @@ -1,6 +1,19 @@ // Filename: eventHandler.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eventHandler.h" @@ -12,7 +25,7 @@ TypeHandle EventHandler::_type_handle; //////////////////////////////////////////////////////////////////// // Function: EventHandler::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EventHandler:: EventHandler(EventQueue *queue) : _queue(*queue) { @@ -80,7 +93,7 @@ dispatch_event(const CPT_Event &event) { //////////////////////////////////////////////////////////////////// // Function: EventHandler::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EventHandler:: write(ostream &out) const { @@ -198,7 +211,7 @@ remove_all_hooks() { //////////////////////////////////////////////////////////////////// // Function: EventHandler::write_hook // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EventHandler:: write_hook(ostream &out, const EventHandler::Hooks::value_type &hook) const { @@ -210,7 +223,7 @@ write_hook(ostream &out, const EventHandler::Hooks::value_type &hook) const { //////////////////////////////////////////////////////////////////// // Function: EventHandler::write_cbhook // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EventHandler:: write_cbhook(ostream &out, const EventHandler::CallbackHooks::value_type &hook) const { diff --git a/panda/src/event/eventHandler.h b/panda/src/event/eventHandler.h index 2cf550d40d..de3cad4ec5 100644 --- a/panda/src/event/eventHandler.h +++ b/panda/src/event/eventHandler.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EVENTHANDLER_H #define EVENTHANDLER_H diff --git a/panda/src/event/eventParameter.I b/panda/src/event/eventParameter.I index 60a502a035..81c421d8db 100644 --- a/panda/src/event/eventParameter.I +++ b/panda/src/event/eventParameter.I @@ -1,6 +1,19 @@ // Filename: eventParameter.I // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -63,7 +76,7 @@ EventParameter(const LVecBase3f &value) : _ptr(new EventStoreVec3(value)) { } //////////////////////////////////////////////////////////////////// // Function: EventParameter::Copy constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EventParameter:: EventParameter(const EventParameter &other) : _ptr(other._ptr) { } @@ -72,7 +85,7 @@ EventParameter(const EventParameter &other) : _ptr(other._ptr) { } //////////////////////////////////////////////////////////////////// // Function: EventParameter::Copy assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE EventParameter &EventParameter:: operator = (const EventParameter &other) { diff --git a/panda/src/event/eventParameter.cxx b/panda/src/event/eventParameter.cxx index b579532be1..eb3dec0275 100644 --- a/panda/src/event/eventParameter.cxx +++ b/panda/src/event/eventParameter.cxx @@ -1,6 +1,19 @@ // Filename: eventParameter.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eventParameter.h" diff --git a/panda/src/event/eventParameter.h b/panda/src/event/eventParameter.h index 3f0c69ded1..b08196c816 100644 --- a/panda/src/event/eventParameter.h +++ b/panda/src/event/eventParameter.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EVENTPARAMETER_H #define EVENTPARAMETER_H diff --git a/panda/src/event/eventQueue.I b/panda/src/event/eventQueue.I index 1564687dec..d3e4b44977 100644 --- a/panda/src/event/eventQueue.I +++ b/panda/src/event/eventQueue.I @@ -1,6 +1,19 @@ // Filename: eventQueue.I // Created by: drose (05May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/event/eventQueue.cxx b/panda/src/event/eventQueue.cxx index ec495eac78..b1e1c8a2a7 100644 --- a/panda/src/event/eventQueue.cxx +++ b/panda/src/event/eventQueue.cxx @@ -1,6 +1,19 @@ // Filename: eventQueue.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eventQueue.h" @@ -12,7 +25,7 @@ EventQueue *EventQueue::_global_event_queue = NULL; //////////////////////////////////////////////////////////////////// // Function: EventQueue::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EventQueue:: EventQueue() { @@ -21,7 +34,7 @@ EventQueue() { //////////////////////////////////////////////////////////////////// // Function: EventQueue::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// EventQueue:: ~EventQueue() { @@ -30,7 +43,7 @@ EventQueue:: //////////////////////////////////////////////////////////////////// // Function: EventQueue::queue_event // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EventQueue:: queue_event(CPT_Event event) { @@ -58,7 +71,7 @@ queue_event(CPT_Event event) { //////////////////////////////////////////////////////////////////// // Function: EventQueue::is_queue_empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool EventQueue:: is_queue_empty() const { @@ -69,7 +82,7 @@ is_queue_empty() const { //////////////////////////////////////////////////////////////////// // Function: EventQueue::dequeue_event // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CPT_Event EventQueue:: dequeue_event() { @@ -81,7 +94,7 @@ dequeue_event() { //////////////////////////////////////////////////////////////////// // Function: EventQueue::make_global_event_queue // Access: Protected, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void EventQueue:: make_global_event_queue() { diff --git a/panda/src/event/eventQueue.h b/panda/src/event/eventQueue.h index 0bbdc62c45..b40ea0b339 100644 --- a/panda/src/event/eventQueue.h +++ b/panda/src/event/eventQueue.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EVENTQUEUE_H #define EVENTQUEUE_H @@ -42,7 +55,7 @@ PUBLISHED: protected: CircBuffer _queue; - + static void make_global_event_queue(); static EventQueue *_global_event_queue; diff --git a/panda/src/event/eventReceiver.cxx b/panda/src/event/eventReceiver.cxx index 1d461c2b4e..d33b04f980 100644 --- a/panda/src/event/eventReceiver.cxx +++ b/panda/src/event/eventReceiver.cxx @@ -1,6 +1,19 @@ // Filename: eventReceiver.cxx // Created by: drose (14Dec99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "eventReceiver.h" diff --git a/panda/src/event/eventReceiver.h b/panda/src/event/eventReceiver.h index 712da6561c..a9c3740e0b 100644 --- a/panda/src/event/eventReceiver.h +++ b/panda/src/event/eventReceiver.h @@ -2,6 +2,19 @@ // Created by: drose (14Dec99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef EVENTRECEIVER_H #define EVENTRECEIVER_H @@ -26,7 +39,7 @@ public: static void init_type() { register_type(_type_handle, "EventReceiver"); } - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/event/pt_Event.cxx b/panda/src/event/pt_Event.cxx index fa7e2ec52c..296050a1d7 100644 --- a/panda/src/event/pt_Event.cxx +++ b/panda/src/event/pt_Event.cxx @@ -1,6 +1,19 @@ // Filename: pt_Event.cxx // Created by: drose (26May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pt_Event.h" diff --git a/panda/src/event/pt_Event.h b/panda/src/event/pt_Event.h index f9273437b1..dddbaa3186 100644 --- a/panda/src/event/pt_Event.h +++ b/panda/src/event/pt_Event.h @@ -1,6 +1,19 @@ // Filename: pt_Event.h // Created by: drose (26May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_EVENT_H diff --git a/panda/src/event/throw_event.I b/panda/src/event/throw_event.I index b8cda3d077..a52154e3e2 100644 --- a/panda/src/event/throw_event.I +++ b/panda/src/event/throw_event.I @@ -1,6 +1,19 @@ // Filename: throw_event.I // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -23,7 +36,7 @@ throw_event(const string &event_name, } INLINE void -throw_event(const string &event_name, +throw_event(const string &event_name, const EventParameter &p1, const EventParameter &p2) { Event *event = new Event(event_name); @@ -33,7 +46,7 @@ throw_event(const string &event_name, } INLINE void -throw_event(const string &event_name, +throw_event(const string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3) { @@ -69,7 +82,7 @@ throw_event_directly(EventHandler& handler, INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const string &event_name, const EventParameter &p1, const EventParameter &p2) { Event *event = new Event(event_name); @@ -80,7 +93,7 @@ throw_event_directly(EventHandler& handler, INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3) { diff --git a/panda/src/event/throw_event.h b/panda/src/event/throw_event.h index 181b9c0263..807bb122ee 100644 --- a/panda/src/event/throw_event.h +++ b/panda/src/event/throw_event.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef THROW_EVENT_H #define THROW_EVENT_H diff --git a/panda/src/express/bigEndian.h b/panda/src/express/bigEndian.h index d0ed6ea269..0b71fd067e 100644 --- a/panda/src/express/bigEndian.h +++ b/panda/src/express/bigEndian.h @@ -1,6 +1,19 @@ // Filename: bigEndian.h // Created by: drose (23Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BIGENDIAN_H diff --git a/panda/src/express/buffer.I b/panda/src/express/buffer.I index eada2d41eb..12e02a1b69 100644 --- a/panda/src/express/buffer.I +++ b/panda/src/express/buffer.I @@ -2,9 +2,22 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: Buffer::get_length +// Function: Buffer::get_length // Access: Public // Description: //////////////////////////////////////////////////////////////////// @@ -14,7 +27,7 @@ get_length(void) const { } //////////////////////////////////////////////////////////////////// -// Function: Ramfile::constructor +// Function: Ramfile::constructor // Access: Published // Description: //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/buffer.cxx b/panda/src/express/buffer.cxx index 3d26fadb04..33c4e96788 100644 --- a/panda/src/express/buffer.cxx +++ b/panda/src/express/buffer.cxx @@ -2,19 +2,18 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97,98 -// Walt Disney Imagineering, Inc. // -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. -//////////////////////////////////////////////////////////////////// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . // -//////////////////////////////////////////////////////////////////// -// Includes //////////////////////////////////////////////////////////////////// #include "buffer.h" diff --git a/panda/src/express/buffer.h b/panda/src/express/buffer.h index 4b1529b67b..546f169f32 100644 --- a/panda/src/express/buffer.h +++ b/panda/src/express/buffer.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUFFER_H #define BUFFER_H // @@ -14,7 +26,7 @@ #include "referenceCount.h" //////////////////////////////////////////////////////////////////// -// Class : Buffer +// Class : Buffer // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS Buffer : public ReferenceCount { @@ -35,7 +47,7 @@ private: }; //////////////////////////////////////////////////////////////////// -// Class : Ramfile +// Class : Ramfile // Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS Ramfile { diff --git a/panda/src/express/checksumHashGenerator.I b/panda/src/express/checksumHashGenerator.I index 8f246c04dd..5206e80b7c 100644 --- a/panda/src/express/checksumHashGenerator.I +++ b/panda/src/express/checksumHashGenerator.I @@ -1,6 +1,19 @@ // Filename: checksumHashGenerator.I // Created by: drose (14May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/checksumHashGenerator.cxx b/panda/src/express/checksumHashGenerator.cxx index 48e5f7ef1a..8872ecf634 100644 --- a/panda/src/express/checksumHashGenerator.cxx +++ b/panda/src/express/checksumHashGenerator.cxx @@ -1,6 +1,19 @@ // Filename: checksumHashGenerator.cxx // Created by: drose (14May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/checksumHashGenerator.h b/panda/src/express/checksumHashGenerator.h index 91d5b858c6..50db266041 100644 --- a/panda/src/express/checksumHashGenerator.h +++ b/panda/src/express/checksumHashGenerator.h @@ -1,6 +1,19 @@ // Filename: checksumHashGenerator.h // Created by: drose (14May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CHECKSUMHASHGENERATOR_H diff --git a/panda/src/express/circBuffer.I b/panda/src/express/circBuffer.I index 020297e89d..515dd11b18 100644 --- a/panda/src/express/circBuffer.I +++ b/panda/src/express/circBuffer.I @@ -1,6 +1,19 @@ // Filename: circBuffer.I // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: CircBuffer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE CircBuffer:: @@ -24,7 +37,7 @@ CircBuffer() { //////////////////////////////////////////////////////////////////// // Function: CircBuffer::is_empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool CircBuffer:: @@ -36,7 +49,7 @@ is_empty() const { //////////////////////////////////////////////////////////////////// // Function: CircBuffer::is_full // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool CircBuffer:: @@ -48,7 +61,7 @@ is_full() const { //////////////////////////////////////////////////////////////////// // Function: CircBuffer::peek // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE const Thing &CircBuffer:: @@ -61,7 +74,7 @@ peek() const { //////////////////////////////////////////////////////////////////// // Function: CircBuffer::extract // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE Thing CircBuffer:: @@ -78,12 +91,12 @@ extract() { _out = (_out+1)%(max_size+1); return temp; } - + //////////////////////////////////////////////////////////////////// // Function: CircBuffer::insert // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void CircBuffer:: diff --git a/panda/src/express/circBuffer.h b/panda/src/express/circBuffer.h index dbcafcd1a8..22a230cfe8 100644 --- a/panda/src/express/circBuffer.h +++ b/panda/src/express/circBuffer.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CIRCBUFFER_H #define CIRCBUFFER_H diff --git a/panda/src/express/clockObject.I b/panda/src/express/clockObject.I index 90ee6cd9e6..6ecd7b77bb 100644 --- a/panda/src/express/clockObject.I +++ b/panda/src/express/clockObject.I @@ -1,12 +1,25 @@ // Filename: clockObject.I // Created by: drose (17Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClockObject::Destructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClockObject:: ~ClockObject() { diff --git a/panda/src/express/clockObject.cxx b/panda/src/express/clockObject.cxx index 1bad0741b7..f3b64150f3 100644 --- a/panda/src/express/clockObject.cxx +++ b/panda/src/express/clockObject.cxx @@ -1,6 +1,19 @@ // Filename: clockObject.cxx // Created by: drose (17Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clockObject.h" @@ -11,7 +24,7 @@ ClockObject *ClockObject::_global_clock = (ClockObject *)NULL; //////////////////////////////////////////////////////////////////// // Function: ClockObject::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// ClockObject:: ClockObject() { @@ -58,7 +71,7 @@ tick() { } //////////////////////////////////////////////////////////////////// -// Function: get_time_of_day +// Function: get_time_of_day // Description: //////////////////////////////////////////////////////////////////// void get_time_of_day(TimeVal &tv) { diff --git a/panda/src/express/clockObject.h b/panda/src/express/clockObject.h index e0d88f14b6..4996401734 100644 --- a/panda/src/express/clockObject.h +++ b/panda/src/express/clockObject.h @@ -2,6 +2,19 @@ // Created by: drose (19Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CLOCKOBJECT_H #define CLOCKOBJECT_H diff --git a/panda/src/express/config_express.cxx b/panda/src/express/config_express.cxx index 59b7dda54d..738281a197 100644 --- a/panda/src/express/config_express.cxx +++ b/panda/src/express/config_express.cxx @@ -1,6 +1,19 @@ // Filename: config_express.cxx // Created by: cary (04Jan00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_express.h" @@ -43,7 +56,7 @@ get_leak_memory() { leak_memory = config_express.GetBool("leak-memory", false); got_leak_memory = true; } - + return leak_memory; } @@ -64,7 +77,7 @@ get_never_destruct() { never_destruct = config_express.GetBool("never-destruct", false); got_never_destruct = true; } - + return never_destruct; } @@ -81,7 +94,7 @@ get_use_high_res_clock() { use_high_res_clock = config_express.GetBool("use-high-res-clock", true); got_use_high_res_clock = true; } - + return use_high_res_clock; } diff --git a/panda/src/express/config_express.h b/panda/src/express/config_express.h index 473605df11..cdc1846e88 100644 --- a/panda/src/express/config_express.h +++ b/panda/src/express/config_express.h @@ -2,6 +2,19 @@ // Created by: cary (04Jan00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CONFIG_EXPRESS_H__ #define __CONFIG_EXPRESS_H__ diff --git a/panda/src/express/crypto_utils.cxx b/panda/src/express/crypto_utils.cxx index c1463f8448..245cbb9d36 100644 --- a/panda/src/express/crypto_utils.cxx +++ b/panda/src/express/crypto_utils.cxx @@ -2,6 +2,19 @@ // Created by: drose (07Nov00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// // This file is compiled only if we have crypto++ installed. diff --git a/panda/src/express/crypto_utils.h b/panda/src/express/crypto_utils.h index cd68469dd2..9fa6f2b16b 100644 --- a/panda/src/express/crypto_utils.h +++ b/panda/src/express/crypto_utils.h @@ -2,6 +2,19 @@ // Created by: drose (07Nov00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CRYPTO_UTILS_H #define CRYPTO_UTILS_H diff --git a/panda/src/express/datagram.I b/panda/src/express/datagram.I index d788099ef8..20c618ebb0 100644 --- a/panda/src/express/datagram.I +++ b/panda/src/express/datagram.I @@ -1,6 +1,19 @@ // Filename: datagram.I // Created by: drose (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -33,7 +46,7 @@ Datagram(const string &data) : _message(data) { //////////////////////////////////////////////////////////////////// // Function: Datagram::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Datagram:: Datagram(const Datagram ©) : @@ -44,7 +57,7 @@ Datagram(const Datagram ©) : //////////////////////////////////////////////////////////////////// // Function: Datagram::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void Datagram:: operator = (const Datagram ©) { @@ -383,9 +396,9 @@ get_length() const { } //////////////////////////////////////////////////////////////////// -// Function: Datagram::operator == +// Function: Datagram::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool Datagram:: operator == (const Datagram &other) const { @@ -393,9 +406,9 @@ operator == (const Datagram &other) const { } //////////////////////////////////////////////////////////////////// -// Function: Datagram::operator != +// Function: Datagram::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool Datagram:: operator != (const Datagram &other) const { @@ -405,7 +418,7 @@ operator != (const Datagram &other) const { //////////////////////////////////////////////////////////////////// // Function: Datagram::operator < // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool Datagram:: operator < (const Datagram &other) const { diff --git a/panda/src/express/datagram.cxx b/panda/src/express/datagram.cxx index 9508a074d3..21c2497bb5 100644 --- a/panda/src/express/datagram.cxx +++ b/panda/src/express/datagram.cxx @@ -1,6 +1,19 @@ // Filename: datagram.cxx // Created by: drose (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "datagram.h" @@ -14,7 +27,7 @@ TypeHandle Datagram::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Datagram::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// Datagram:: ~Datagram() { diff --git a/panda/src/express/datagram.h b/panda/src/express/datagram.h index 3c5f184108..a82f5036f1 100644 --- a/panda/src/express/datagram.h +++ b/panda/src/express/datagram.h @@ -1,6 +1,19 @@ // Filename: datagram.h // Created by: drose (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DATAGRAM_H diff --git a/panda/src/express/datagramGenerator.I b/panda/src/express/datagramGenerator.I index 19a09f1a06..7d5da6d710 100644 --- a/panda/src/express/datagramGenerator.I +++ b/panda/src/express/datagramGenerator.I @@ -1,6 +1,20 @@ // Filename: datagramGenerator.I // Created by: jason (07Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/datagramGenerator.cxx b/panda/src/express/datagramGenerator.cxx index 4297a7867d..8d67797307 100644 --- a/panda/src/express/datagramGenerator.cxx +++ b/panda/src/express/datagramGenerator.cxx @@ -1,6 +1,20 @@ // Filename: datagramGenerator.cxx // Created by: jason (07Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/express/datagramGenerator.h b/panda/src/express/datagramGenerator.h index 2d724b1cfb..a0367b410b 100644 --- a/panda/src/express/datagramGenerator.h +++ b/panda/src/express/datagramGenerator.h @@ -1,6 +1,20 @@ // Filename: datagramGenerator.h // Created by: jason (07Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAMGENERATOR_H #define DATAGRAMGENERATOR_H @@ -19,7 +33,7 @@ class EXPCL_PANDAEXPRESS DatagramGenerator { public: INLINE DatagramGenerator(); virtual ~DatagramGenerator(); - + virtual bool get_datagram(Datagram &data) = 0; virtual bool is_eof() = 0; virtual bool is_error() = 0; diff --git a/panda/src/express/datagramInputFile.I b/panda/src/express/datagramInputFile.I index d1f59e947d..a9e1c059e9 100644 --- a/panda/src/express/datagramInputFile.I +++ b/panda/src/express/datagramInputFile.I @@ -1,13 +1,26 @@ // Filename: datagramInputFile.I // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DatagramInputFile::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DatagramInputFile:: DatagramInputFile() { diff --git a/panda/src/express/datagramInputFile.cxx b/panda/src/express/datagramInputFile.cxx index bf9256570c..234af4028c 100644 --- a/panda/src/express/datagramInputFile.cxx +++ b/panda/src/express/datagramInputFile.cxx @@ -1,6 +1,19 @@ -// Filename: datagramInputFile.h +// Filename: datagramInputFile.cxx // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "datagramInputFile.h" diff --git a/panda/src/express/datagramInputFile.h b/panda/src/express/datagramInputFile.h index de556233c7..2841cfec8c 100644 --- a/panda/src/express/datagramInputFile.h +++ b/panda/src/express/datagramInputFile.h @@ -1,6 +1,19 @@ // Filename: datagramInputFile.h // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DATAGRAMINPUTFILE_H diff --git a/panda/src/express/datagramIterator.I b/panda/src/express/datagramIterator.I index ab1ee91005..b7ccaea4cb 100644 --- a/panda/src/express/datagramIterator.I +++ b/panda/src/express/datagramIterator.I @@ -1,13 +1,26 @@ // Filename: datagramIterator.I // Created by: drose (08May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DatagramIterator::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DatagramIterator:: DatagramIterator() : @@ -19,7 +32,7 @@ DatagramIterator() : //////////////////////////////////////////////////////////////////// // Function: DatagramIterator::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DatagramIterator:: DatagramIterator(const Datagram &datagram, size_t offset) : @@ -32,7 +45,7 @@ DatagramIterator(const Datagram &datagram, size_t offset) : //////////////////////////////////////////////////////////////////// // Function: DatagramIterator::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DatagramIterator:: DatagramIterator(const DatagramIterator ©) : @@ -44,7 +57,7 @@ DatagramIterator(const DatagramIterator ©) : //////////////////////////////////////////////////////////////////// // Function: DatagramIterator::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DatagramIterator:: operator = (const DatagramIterator ©) { @@ -55,7 +68,7 @@ operator = (const DatagramIterator ©) { //////////////////////////////////////////////////////////////////// // Function: DatagramIterator::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DatagramIterator:: ~DatagramIterator() { diff --git a/panda/src/express/datagramIterator.cxx b/panda/src/express/datagramIterator.cxx index 0a6c671451..0612d8b1cc 100644 --- a/panda/src/express/datagramIterator.cxx +++ b/panda/src/express/datagramIterator.cxx @@ -1,6 +1,20 @@ // Filename: datagramIterator.cxx // Created by: jns (07Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "datagramIterator.h" #include "littleEndian.h" @@ -21,7 +35,7 @@ get_string() { nassertr(_datagram != (const Datagram *)NULL && _current_index + s_len <= _datagram->get_length(), ""); - string s = + string s = _datagram->get_message().substr(_current_index, s_len); nassertr(s.length() == s_len, ""); @@ -42,7 +56,7 @@ get_fixed_string(size_t size) { nassertr(_datagram != (const Datagram *)NULL && _current_index + size <= _datagram->get_length(), ""); - string s = + string s = _datagram->get_message().substr(_current_index, size); _current_index += size; diff --git a/panda/src/express/datagramIterator.h b/panda/src/express/datagramIterator.h index 5535305db8..7a2a973e70 100644 --- a/panda/src/express/datagramIterator.h +++ b/panda/src/express/datagramIterator.h @@ -1,6 +1,20 @@ // Filename: datagramIterator.h // Created by: jns (07Feb00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAMITERATOR_H #define DATAGRAMITERATOR_H @@ -58,12 +72,12 @@ PUBLISHED: INLINE const Datagram &get_datagram() const; INLINE size_t get_current_index() const; - + private: const Datagram *_datagram; size_t _current_index; }; - + #include "datagramIterator.I" #endif diff --git a/panda/src/express/datagramOutputFile.I b/panda/src/express/datagramOutputFile.I index bf4a867a6f..59c786377e 100644 --- a/panda/src/express/datagramOutputFile.I +++ b/panda/src/express/datagramOutputFile.I @@ -1,13 +1,26 @@ // Filename: datagramOutputFile.I // Created by: drose (27Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DatagramOutputFile::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DatagramOutputFile:: DatagramOutputFile() { diff --git a/panda/src/express/datagramOutputFile.cxx b/panda/src/express/datagramOutputFile.cxx index 9148f3519f..2936f92533 100644 --- a/panda/src/express/datagramOutputFile.cxx +++ b/panda/src/express/datagramOutputFile.cxx @@ -1,6 +1,19 @@ -// Filename: datagramOutputFile.h +// Filename: datagramOutputFile.cxx // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "datagramOutputFile.h" diff --git a/panda/src/express/datagramOutputFile.h b/panda/src/express/datagramOutputFile.h index f318b5835c..c5876fac26 100644 --- a/panda/src/express/datagramOutputFile.h +++ b/panda/src/express/datagramOutputFile.h @@ -1,6 +1,19 @@ // Filename: datagramOutputFile.h // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DATAGRAMOUTPUTFILE_H diff --git a/panda/src/express/datagramSink.I b/panda/src/express/datagramSink.I index 8eba958f07..2816fe33df 100644 --- a/panda/src/express/datagramSink.I +++ b/panda/src/express/datagramSink.I @@ -1,6 +1,20 @@ // Filename: datagramSink.I // Created by: jason (07Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/datagramSink.cxx b/panda/src/express/datagramSink.cxx index 95b9849920..2ee825cd01 100644 --- a/panda/src/express/datagramSink.cxx +++ b/panda/src/express/datagramSink.cxx @@ -1,6 +1,20 @@ // Filename: datagramSink.cxx // Created by: jason (07Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/express/datagramSink.h b/panda/src/express/datagramSink.h index 70dc38f083..3959e91518 100644 --- a/panda/src/express/datagramSink.h +++ b/panda/src/express/datagramSink.h @@ -1,6 +1,20 @@ // Filename: datagramSink.h // Created by: jason (07Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAMSINK_H #define DATAGRAMSINK_H @@ -19,7 +33,7 @@ class EXPCL_PANDAEXPRESS DatagramSink { public: INLINE DatagramSink(void); virtual ~DatagramSink(void); - + virtual bool put_datagram(const Datagram &data) = 0; virtual bool is_error() = 0; }; diff --git a/panda/src/express/error_utils.cxx b/panda/src/express/error_utils.cxx index 85361923ad..e697b2324e 100644 --- a/panda/src/express/error_utils.cxx +++ b/panda/src/express/error_utils.cxx @@ -2,6 +2,19 @@ // Created by: mike (07Nov00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "error_utils.h" #include "config_express.h" diff --git a/panda/src/express/error_utils.h b/panda/src/express/error_utils.h index 89ec0c4e10..a377a8d3f8 100644 --- a/panda/src/express/error_utils.h +++ b/panda/src/express/error_utils.h @@ -2,6 +2,19 @@ // Created by: mike (07Nov00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ERROR_UTILS_H #define ERROR_UTILS_H diff --git a/panda/src/express/get_config_path.cxx b/panda/src/express/get_config_path.cxx index 2022bbc44c..a938231737 100644 --- a/panda/src/express/get_config_path.cxx +++ b/panda/src/express/get_config_path.cxx @@ -1,6 +1,19 @@ // Filename: get_config_path.cxx // Created by: drose (01Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "get_config_path.h" diff --git a/panda/src/express/get_config_path.h b/panda/src/express/get_config_path.h index 4a298f6703..a21c2748ee 100644 --- a/panda/src/express/get_config_path.h +++ b/panda/src/express/get_config_path.h @@ -1,6 +1,19 @@ // Filename: get_config_path.h // Created by: drose (01Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GET_CONFIG_PATH_H diff --git a/panda/src/express/hashGeneratorBase.I b/panda/src/express/hashGeneratorBase.I index 53b0756450..2a42d68752 100644 --- a/panda/src/express/hashGeneratorBase.I +++ b/panda/src/express/hashGeneratorBase.I @@ -1,13 +1,26 @@ // Filename: hashGeneratorBase.I // Created by: drose (14May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: HashGeneratorBase::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE HashGeneratorBase:: HashGeneratorBase() { @@ -17,7 +30,7 @@ HashGeneratorBase() { //////////////////////////////////////////////////////////////////// // Function: HashGeneratorBase::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE HashGeneratorBase:: ~HashGeneratorBase() { diff --git a/panda/src/express/hashGeneratorBase.cxx b/panda/src/express/hashGeneratorBase.cxx index b1469c7158..09dfc33341 100644 --- a/panda/src/express/hashGeneratorBase.cxx +++ b/panda/src/express/hashGeneratorBase.cxx @@ -1,6 +1,19 @@ // Filename: hashGeneratorBase.cxx // Created by: drose (14May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "hashGeneratorBase.h" diff --git a/panda/src/express/hashGeneratorBase.h b/panda/src/express/hashGeneratorBase.h index b0c3b0cb93..18f7705707 100644 --- a/panda/src/express/hashGeneratorBase.h +++ b/panda/src/express/hashGeneratorBase.h @@ -1,6 +1,19 @@ // Filename: hashGeneratorBase.h // Created by: drose (14May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef HASHGENERATORBASE_H diff --git a/panda/src/express/hashVal.I b/panda/src/express/hashVal.I index f33c1a7b1c..85d0ba27a8 100644 --- a/panda/src/express/hashVal.I +++ b/panda/src/express/hashVal.I @@ -2,12 +2,25 @@ // Created by: drose (14Nov00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: HashVal::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE HashVal:: HashVal(void) { @@ -17,11 +30,11 @@ HashVal(void) { //////////////////////////////////////////////////////////////////// // Function: HashVal::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool HashVal:: operator == (const HashVal &other) const { - return (hv[0] == other.hv[0] && + return (hv[0] == other.hv[0] && hv[1] == other.hv[1] && hv[2] == other.hv[2] && hv[3] == other.hv[3]); @@ -54,7 +67,7 @@ set_value(int val, uint hash) { //////////////////////////////////////////////////////////////////// // Function: HashVal::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void HashVal:: output(ostream &out) const { diff --git a/panda/src/express/hashVal.cxx b/panda/src/express/hashVal.cxx index f78cf3ac15..b9938607f6 100644 --- a/panda/src/express/hashVal.cxx +++ b/panda/src/express/hashVal.cxx @@ -2,6 +2,19 @@ // Created by: drose (14Nov00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "hashVal.h" diff --git a/panda/src/express/hashVal.h b/panda/src/express/hashVal.h index f4069d69c1..e583ae9ab0 100644 --- a/panda/src/express/hashVal.h +++ b/panda/src/express/hashVal.h @@ -2,6 +2,19 @@ // Created by: drose (14Nov00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef HASHVAL_H #define HASHVAL_H diff --git a/panda/src/express/indent.I b/panda/src/express/indent.I index 28bede4630..811a5706bc 100644 --- a/panda/src/express/indent.I +++ b/panda/src/express/indent.I @@ -1,6 +1,19 @@ // Filename: indent.I // Created by: drose (15Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -38,7 +51,7 @@ write_long_list(ostream &out, int indent_level, ostringstream item; item << *first; string str = item.str(); - + col += 1 + str.length(); if (col > max_col) { out << "\n"; diff --git a/panda/src/express/indent.cxx b/panda/src/express/indent.cxx index 0ccd4d5ef4..812f0b84b0 100644 --- a/panda/src/express/indent.cxx +++ b/panda/src/express/indent.cxx @@ -1,12 +1,25 @@ // Filename: indent.cxx // Created by: drose (05May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "indent.h" //////////////////////////////////////////////////////////////////// -// Function: indent +// Function: indent // Description: //////////////////////////////////////////////////////////////////// ostream & diff --git a/panda/src/express/indent.h b/panda/src/express/indent.h index 146aebfceb..6e9efb9338 100644 --- a/panda/src/express/indent.h +++ b/panda/src/express/indent.h @@ -2,6 +2,19 @@ // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef INDENT_H #define INDENT_H @@ -39,4 +52,4 @@ write_long_list(ostream &out, int indent_level, #endif - + diff --git a/panda/src/express/littleEndian.h b/panda/src/express/littleEndian.h index 653c413fc4..4da5a08d47 100644 --- a/panda/src/express/littleEndian.h +++ b/panda/src/express/littleEndian.h @@ -2,6 +2,19 @@ // Created by: drose (09Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LITTLEENDIAN_H #define LITTLEENDIAN_H diff --git a/panda/src/express/memoryUsage.I b/panda/src/express/memoryUsage.I index 1a5779c3cf..700a69d02b 100644 --- a/panda/src/express/memoryUsage.I +++ b/panda/src/express/memoryUsage.I @@ -1,6 +1,19 @@ // Filename: memoryUsage.I // Created by: drose (25May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifdef NDEBUG @@ -153,7 +166,7 @@ get_pointers_of_age(MemoryUsagePointers &result, double from, double to) { // Description: Fills the indicated MemoryUsagePointers with the set // of all currently active pointers (that is, pointers // allocated since the last call to freeze(), and not -// yet freed) that have a zero reference count. +// yet freed) that have a zero reference count. // // Generally, an undeleted pointer with a zero reference // count means its reference count has never been diff --git a/panda/src/express/memoryUsage.cxx b/panda/src/express/memoryUsage.cxx index 41bccfc401..f339a13eca 100644 --- a/panda/src/express/memoryUsage.cxx +++ b/panda/src/express/memoryUsage.cxx @@ -1,6 +1,19 @@ // Filename: memoryUsage.cxx // Created by: drose (25May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "memoryUsage.h" @@ -25,7 +38,7 @@ double MemoryUsage::AgeHistogram::_cutoff[MemoryUsage::AgeHistogram::num_buckets 10.0, 60.0, }; - + //////////////////////////////////////////////////////////////////// // Function: MemoryUsage::MemoryInfo::get_type // Access: Public @@ -57,7 +70,7 @@ get_type() { return type; } - + //////////////////////////////////////////////////////////////////// // Function: MemoryUsage::MemoryInfo::determine_dynamic_type // Access: Public @@ -85,24 +98,24 @@ determine_dynamic_type() { // we are being called within the destructor or constructor of // this object. TypeHandle got_type = _typed_ptr->get_type(); - + if (got_type == TypeHandle::none()) { express_cat.warning() << "Found an unregistered type in a " << _static_type << " pointer:\n" - << "Check derived types of " << _static_type + << "Check derived types of " << _static_type << " and make sure that all are being initialized.\n"; _dynamic_type = _static_type; _reconsider_dynamic_type = false; return; } - + update_type_handle(_dynamic_type, got_type); } } } - + //////////////////////////////////////////////////////////////////// // Function: MemoryUsage::MemoryInfo::update_type_handle // Access: Public @@ -114,20 +127,20 @@ void MemoryUsage::MemoryInfo:: update_type_handle(TypeHandle &destination, TypeHandle refined) { if (refined == TypeHandle::none()) { express_cat.error() - << "Attempt to update type of " << (void *)_ptr - << "(type is " << get_type() + << "Attempt to update type of " << (void *)_ptr + << "(type is " << get_type() << ") to an undefined type!\n"; - + } else if (destination == refined) { // Updating with the same type, no problem. - + } else if (destination.is_derived_from(refined)) { // Updating with a less-specific type, no problem. - + } else if (refined.is_derived_from(destination)) { // Updating with a more-specific type, no problem. destination = refined; - + } else { express_cat.error() << "Pointer " << (void *)_ptr << " previously indicated as type " @@ -200,7 +213,7 @@ clear() { //////////////////////////////////////////////////////////////////// // Function: MemoryUsage::AgeHistogram::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// MemoryUsage::AgeHistogram:: AgeHistogram() { @@ -227,10 +240,10 @@ add_info(double age) { void MemoryUsage::AgeHistogram:: show() const { for (int i = 0; i < num_buckets - 1; i++) { - nout << _cutoff[i] << " to " << _cutoff[i + 1] << " seconds old : " + nout << _cutoff[i] << " to " << _cutoff[i + 1] << " seconds old : " << _counts[i] << " pointers.\n"; } - nout << _cutoff[num_buckets - 1] << " seconds old and up : " + nout << _cutoff[num_buckets - 1] << " seconds old and up : " << _counts[num_buckets - 1] << " pointers.\n"; } @@ -321,14 +334,14 @@ remove_pointer(ReferenceCount *ptr) { //////////////////////////////////////////////////////////////////// // Function: MemoryUsage::Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// MemoryUsage:: MemoryUsage() { // We must get this here instead of in config_express.cxx, because we // need to know it at static init time, and who knows when the code // in config_express will be executed. - _track_memory_usage = + _track_memory_usage = config_express.GetBool("track-memory-usage", false); _freeze_index = 0; @@ -395,7 +408,7 @@ ns_update_type(ReferenceCount *ptr, TypeHandle type) { Table::iterator ti; ti = _table.find(ptr); if (ti == _table.end()) { - express_cat.error() + express_cat.error() << "Attempt to update type to " << type << " for unrecorded pointer " << (void *)ptr << "!\n"; return; @@ -423,7 +436,7 @@ ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr) { Table::iterator ti; ti = _table.find(ptr); if (ti == _table.end()) { - express_cat.error() + express_cat.error() << "Attempt to update type to " << typed_ptr->get_type() << " for unrecorded pointer " << (void *)ptr << "!\n"; @@ -469,7 +482,7 @@ ns_remove_pointer(ReferenceCount *ptr) { _trend_types.add_info(info.get_type()); _trend_ages.add_info(now - info._time); } - + _table.erase(ti); } } @@ -501,7 +514,7 @@ ns_get_pointers(MemoryUsagePointers &result) { for (ti = _table.begin(); ti != _table.end(); ++ti) { MemoryInfo &info = (*ti).second; if (info._freeze_index == _freeze_index) { - result.add_entry(info._ptr, info._typed_ptr, info.get_type(), + result.add_entry(info._ptr, info._typed_ptr, info.get_type(), now - info._time); } } @@ -542,7 +555,7 @@ ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) { // of the indicated number of seconds ago. //////////////////////////////////////////////////////////////////// void MemoryUsage:: -ns_get_pointers_of_age(MemoryUsagePointers &result, +ns_get_pointers_of_age(MemoryUsagePointers &result, double from, double to) { nassertv(_track_memory_usage); result.clear(); @@ -553,7 +566,7 @@ ns_get_pointers_of_age(MemoryUsagePointers &result, MemoryInfo &info = (*ti).second; if (info._freeze_index == _freeze_index) { double age = now - info._time; - if ((age >= from && age <= to) || + if ((age >= from && age <= to) || (age >= to && age <= from)) { result.add_entry(info._ptr, info._typed_ptr, info.get_type(), age); } @@ -567,7 +580,7 @@ ns_get_pointers_of_age(MemoryUsagePointers &result, // Description: Fills the indicated MemoryUsagePointers with the set // of all currently active pointers (that is, pointers // allocated since the last call to freeze(), and not -// yet freed) that have a zero reference count. +// yet freed) that have a zero reference count. // // Generally, an undeleted pointer with a zero reference // count means its reference count has never been diff --git a/panda/src/express/memoryUsage.h b/panda/src/express/memoryUsage.h index f5e1c171f8..f27e2fe077 100644 --- a/panda/src/express/memoryUsage.h +++ b/panda/src/express/memoryUsage.h @@ -1,6 +1,19 @@ // Filename: memoryUsage.h // Created by: drose (25May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MEMORYUSAGE_H @@ -52,9 +65,9 @@ PUBLISHED: #ifndef NDEBUG INLINE static int get_num_pointers(); INLINE static void get_pointers(MemoryUsagePointers &result); - INLINE static void get_pointers_of_type(MemoryUsagePointers &result, + INLINE static void get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type); - INLINE static void get_pointers_of_age(MemoryUsagePointers &result, + INLINE static void get_pointers_of_age(MemoryUsagePointers &result, double from, double to); INLINE static void get_pointers_with_zero_count(MemoryUsagePointers &result); @@ -68,7 +81,7 @@ PUBLISHED: private: MemoryUsage(); static MemoryUsage *get_global_ptr(); - + void ns_record_pointer(ReferenceCount *ptr); void ns_update_type(ReferenceCount *ptr, TypeHandle type); void ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr); @@ -76,9 +89,9 @@ private: int ns_get_num_pointers(); void ns_get_pointers(MemoryUsagePointers &result); - void ns_get_pointers_of_type(MemoryUsagePointers &result, + void ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type); - void ns_get_pointers_of_age(MemoryUsagePointers &result, + void ns_get_pointers_of_age(MemoryUsagePointers &result, double from, double to); void ns_get_pointers_with_zero_count(MemoryUsagePointers &result); void ns_freeze(); @@ -100,7 +113,7 @@ private: TypedObject *_typed_ptr; TypeHandle _static_type; TypeHandle _dynamic_type; - + double _time; int _freeze_index; bool _reconsider_dynamic_type; diff --git a/panda/src/express/memoryUsagePointers.I b/panda/src/express/memoryUsagePointers.I index 1c66ec1627..3211db744a 100644 --- a/panda/src/express/memoryUsagePointers.I +++ b/panda/src/express/memoryUsagePointers.I @@ -1,12 +1,25 @@ // Filename: memoryUsagePointers.I // Created by: drose (25May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: MemoryUsagePointers::Entry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MemoryUsagePointers::Entry:: Entry(ReferenceCount *ptr, TypedObject *typed_ptr, @@ -22,7 +35,7 @@ Entry(ReferenceCount *ptr, TypedObject *typed_ptr, //////////////////////////////////////////////////////////////////// // Function: MemoryUsagePointers::Entry::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MemoryUsagePointers::Entry:: Entry(const Entry ©) : @@ -37,7 +50,7 @@ Entry(const Entry ©) : //////////////////////////////////////////////////////////////////// // Function: MemoryUsagePointers::Entry::Copy Assigment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void MemoryUsagePointers::Entry:: operator = (const Entry ©) { @@ -56,7 +69,7 @@ operator = (const Entry ©) { //////////////////////////////////////////////////////////////////// // Function: MemoryUsagePointers::Entry::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MemoryUsagePointers::Entry:: ~Entry() { diff --git a/panda/src/express/memoryUsagePointers.cxx b/panda/src/express/memoryUsagePointers.cxx index fd51e8158f..e27bdcd36c 100644 --- a/panda/src/express/memoryUsagePointers.cxx +++ b/panda/src/express/memoryUsagePointers.cxx @@ -1,6 +1,19 @@ // Filename: memoryUsagePointers.cxx // Created by: drose (25May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "memoryUsagePointers.h" @@ -16,7 +29,7 @@ //////////////////////////////////////////////////////////////////// // Function: MemoryUsagePointers::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// MemoryUsagePointers:: MemoryUsagePointers() { @@ -25,7 +38,7 @@ MemoryUsagePointers() { //////////////////////////////////////////////////////////////////// // Function: MemoryUsagePointers::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// MemoryUsagePointers:: ~MemoryUsagePointers() { @@ -85,7 +98,7 @@ get_typed_pointer(int n) const { // RTTI can't help us here, because ReferenceCount has no virtual // functions, so we can't use C++'s new dynamic_cast feature. - if (type != TypeHandle::none() && + if (type != TypeHandle::none() && type.is_derived_from(TypedReferenceCount::get_class_type())) { return (TypedReferenceCount *)ptr; } @@ -147,7 +160,7 @@ clear() { // only by MemoryUsage. //////////////////////////////////////////////////////////////////// void MemoryUsagePointers:: -add_entry(ReferenceCount *ptr, TypedObject *typed_ptr, +add_entry(ReferenceCount *ptr, TypedObject *typed_ptr, TypeHandle type, double age) { // We can't safly add pointers with a zero reference count. They // might be statically-allocated or something, and if we try to add diff --git a/panda/src/express/memoryUsagePointers.h b/panda/src/express/memoryUsagePointers.h index aa6c7f835a..02936e9eac 100644 --- a/panda/src/express/memoryUsagePointers.h +++ b/panda/src/express/memoryUsagePointers.h @@ -1,6 +1,19 @@ // Filename: memoryUsagePointers.h // Created by: drose (25May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MEMORYUSAGEPOINTERS_H @@ -18,7 +31,7 @@ //////////////////////////////////////////////////////////////////// // Class : MemoryUsagePointers // Description : This is a list of pointers returned by a MemoryUsage -// object in response to some query. +// object in response to some query. // // Warning: once pointers are stored in a // MemoryUsagePointers object, they are @@ -40,7 +53,7 @@ class EXPCL_PANDAEXPRESS MemoryUsagePointers { PUBLISHED: MemoryUsagePointers(); ~MemoryUsagePointers(); - + int get_num_pointers() const; ReferenceCount *get_pointer(int n) const; TypedObject *get_typed_pointer(int n) const; diff --git a/panda/src/express/multifile.I b/panda/src/express/multifile.I index 13ad5de5d3..b0986d272b 100644 --- a/panda/src/express/multifile.I +++ b/panda/src/express/multifile.I @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Multifile::write_header @@ -20,7 +33,7 @@ write_header(ofstream &write_stream) { //////////////////////////////////////////////////////////////////// // Function: Multifile::get_header_length -// Access: Public +// Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE int Multifile:: diff --git a/panda/src/express/multifile.cxx b/panda/src/express/multifile.cxx index 1dce7f51a0..bdd5319157 100644 --- a/panda/src/express/multifile.cxx +++ b/panda/src/express/multifile.cxx @@ -2,19 +2,18 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97,98 -// Walt Disney Imagineering, Inc. // -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. -//////////////////////////////////////////////////////////////////// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . // -//////////////////////////////////////////////////////////////////// -// Includes //////////////////////////////////////////////////////////////////// #include #include "multifile.h" @@ -104,7 +103,7 @@ parse_header_length(char *&start, int &size) { size -= (_header_length_buf_length - bytes_so_far); DatagramIterator di(_datagram); - _header_length = di.get_int32(); + _header_length = di.get_int32(); express_cat.debug() << "Multifile::Memfile::parse_header_length() - header length: " @@ -120,7 +119,7 @@ parse_header_length(char *&start, int &size) { //////////////////////////////////////////////////////////////////// // Function: Multifile::Memfile::parse_header // Access: Public -// Description: Returns true when a complete header has been parsed. +// Description: Returns true when a complete header has been parsed. // Advances the start pointer to the end of the header. //////////////////////////////////////////////////////////////////// bool Multifile::Memfile:: @@ -194,10 +193,10 @@ read(const Filename &name) { sizeof(_buffer_length); _name = name; - // Determine the length of the file + // Determine the length of the file read_stream.seekg(0, ios::end); _buffer_length = read_stream.tellg(); - _buffer = new char[_buffer_length]; + _buffer = new char[_buffer_length]; // Read the file read_stream.seekg(0, ios::beg); @@ -298,7 +297,7 @@ write_to_multifile(ofstream &write_stream) { // Function: Multifile::Memfile::write // Access: Public // Description: Returns true when the memfile has been parsed and -// written to disk. +// written to disk. // Advances the start pointer as it writes. //////////////////////////////////////////////////////////////////// int Multifile::Memfile:: @@ -434,7 +433,7 @@ parse_header(char *&start, int &size) { PN_uint32 magic_number = di.get_uint32(); if (magic_number != _magic_number) { express_cat.error() - << "Multifile::parse_header() - Invalid magic number: " + << "Multifile::parse_header() - Invalid magic number: " << magic_number << " (" << _magic_number << ")" << endl; return EU_error_abort; } @@ -466,10 +465,10 @@ bool Multifile:: add(const Filename &name) { Memfile *mfile = new Memfile; if (mfile->read(name)) { - _files.push_back(mfile); + _files.push_back(mfile); return true; } - return false; + return false; } //////////////////////////////////////////////////////////////////// @@ -540,7 +539,7 @@ read(Filename &name) { // Read all the Memfiles for (int i = 0; i < _num_mfiles; i++) { Memfile *mfile = new Memfile; - mfile->read_from_multifile(read_stream); + mfile->read_from_multifile(read_stream); _files.push_back(mfile); } @@ -587,7 +586,7 @@ write(Filename name) { //////////////////////////////////////////////////////////////////// // Function: Multifile::write // Access: Public -// Description: Returns true when all the memfiles have been +// Description: Returns true when all the memfiles have been // written. // Advances the start pointer as it writes. //////////////////////////////////////////////////////////////////// @@ -625,7 +624,7 @@ write(char *&start, int &size, const Filename &rel_path) { //////////////////////////////////////////////////////////////////// // Function: Multifile::write_extract // Access: Public -// Description: Returns true when entire Multifile has been +// Description: Returns true when entire Multifile has been // extracted to disk files. //////////////////////////////////////////////////////////////////// bool Multifile:: diff --git a/panda/src/express/multifile.h b/panda/src/express/multifile.h index a76807c55f..c8e8624af5 100644 --- a/panda/src/express/multifile.h +++ b/panda/src/express/multifile.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MULTIFILE_H #define MULTIFILE_H // @@ -20,8 +32,8 @@ #include //////////////////////////////////////////////////////////////////// -// Class : Multifile -// Description : A file that contains a set of files. +// Class : Multifile +// Description : A file that contains a set of files. //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEXPRESS Multifile { PUBLISHED: @@ -54,13 +66,13 @@ PUBLISHED: private: - INLINE void write_header(ofstream &write_stream); + INLINE void write_header(ofstream &write_stream); class Memfile { public: Memfile(void); ~Memfile(void); - bool parse_header_length(char *&start, int &size); + bool parse_header_length(char *&start, int &size); bool parse_header(char *&start, int &size); bool read(const Filename &name); @@ -108,7 +120,7 @@ private: Datagram _datagram; int _header_length; int _mfiles_written; - + static PN_uint32 _magic_number; }; diff --git a/panda/src/express/namable.I b/panda/src/express/namable.I index c1f2748a19..16499a2bea 100644 --- a/panda/src/express/namable.I +++ b/panda/src/express/namable.I @@ -1,34 +1,47 @@ // Filename: namable.I // Created by: drose (16Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Namable::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Namable:: -Namable(const string &initial_name) : - _name(initial_name) -{ +Namable(const string &initial_name) : + _name(initial_name) +{ } //////////////////////////////////////////////////////////////////// // Function: Namable::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Namable:: -Namable(const Namable ©) : - _name(copy._name) +Namable(const Namable ©) : + _name(copy._name) { } //////////////////////////////////////////////////////////////////// // Function: Namable::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Namable &Namable:: operator = (const Namable &other) { @@ -39,7 +52,7 @@ operator = (const Namable &other) { //////////////////////////////////////////////////////////////////// // Function: Namable::set_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void Namable:: set_name(const string &name) { @@ -51,7 +64,7 @@ set_name(const string &name) { // Access: Public // Description: Resets the Namable's name to empty. //////////////////////////////////////////////////////////////////// -INLINE void Namable:: +INLINE void Namable:: clear_name() { _name = ""; } @@ -70,7 +83,7 @@ has_name() const { //////////////////////////////////////////////////////////////////// // Function: Namable::get_name // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const string &Namable:: get_name() const { @@ -87,7 +100,7 @@ get_name() const { INLINE void Namable:: output(ostream &out) const { out << get_name(); -} +} INLINE ostream &operator << (ostream &out, const Namable &n) { @@ -98,7 +111,7 @@ INLINE ostream &operator << (ostream &out, const Namable &n) { //////////////////////////////////////////////////////////////////// // Function: NamableOrderByName::Function operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool NamableOrderByName:: operator ()(const Namable *n1, const Namable *n2) const { diff --git a/panda/src/express/namable.cxx b/panda/src/express/namable.cxx index 2c7f626e2e..dcfd9664b9 100644 --- a/panda/src/express/namable.cxx +++ b/panda/src/express/namable.cxx @@ -1,6 +1,19 @@ // Filename: namable.cxx // Created by: drose (15Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "namable.h" diff --git a/panda/src/express/namable.h b/panda/src/express/namable.h index 6a3ede4f6b..449a2c3b20 100644 --- a/panda/src/express/namable.h +++ b/panda/src/express/namable.h @@ -1,6 +1,20 @@ // Filename: namable.h // Created by: drose (15Jan99) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NAMABLE_H #define NAMABLE_H @@ -64,4 +78,4 @@ public: #endif - + diff --git a/panda/src/express/nativeNumericData.I b/panda/src/express/nativeNumericData.I index 7c4277d866..7d931d0ea5 100644 --- a/panda/src/express/nativeNumericData.I +++ b/panda/src/express/nativeNumericData.I @@ -1,6 +1,19 @@ // Filename: nativeNumericData.I // Created by: drose (09May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/nativeNumericData.cxx b/panda/src/express/nativeNumericData.cxx index 3d3d057685..f6c8cbf4b0 100644 --- a/panda/src/express/nativeNumericData.cxx +++ b/panda/src/express/nativeNumericData.cxx @@ -1,6 +1,19 @@ // Filename: nativeNumericData.cxx // Created by: drose (09May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nativeNumericData.h" diff --git a/panda/src/express/nativeNumericData.h b/panda/src/express/nativeNumericData.h index a3f91cfb6b..ff315c769c 100644 --- a/panda/src/express/nativeNumericData.h +++ b/panda/src/express/nativeNumericData.h @@ -1,6 +1,19 @@ // Filename: nativeNumericData.h // Created by: drose (09May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NATIVENUMERICDATA_H diff --git a/panda/src/express/numeric_types.h b/panda/src/express/numeric_types.h index aab4b0f686..096c7c5f4f 100644 --- a/panda/src/express/numeric_types.h +++ b/panda/src/express/numeric_types.h @@ -1,6 +1,19 @@ // Filename: numeric_types.h // Created by: drose (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NUMERIC_TYPES_H diff --git a/panda/src/express/patchfile.I b/panda/src/express/patchfile.I index fd6ab7ac3f..953e4b5b42 100644 --- a/panda/src/express/patchfile.I +++ b/panda/src/express/patchfile.I @@ -2,6 +2,19 @@ // Created by: darren, mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //#include "config_downloader.h" diff --git a/panda/src/express/patchfile.cxx b/panda/src/express/patchfile.cxx index 5e2ddd94fb..ab766f16be 100644 --- a/panda/src/express/patchfile.cxx +++ b/panda/src/express/patchfile.cxx @@ -2,19 +2,18 @@ // Created by: darren, mike (09Jan97) // //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97,98 -// Walt Disney Imagineering, Inc. // -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. -//////////////////////////////////////////////////////////////////// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . // -//////////////////////////////////////////////////////////////////// -// Includes //////////////////////////////////////////////////////////////////// #include "patchfile.h" #include "config_express.h" diff --git a/panda/src/express/patchfile.h b/panda/src/express/patchfile.h index e71af039fb..5bce37280d 100644 --- a/panda/src/express/patchfile.h +++ b/panda/src/express/patchfile.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PATCHFILE_H #define PATCHFILE_H // diff --git a/panda/src/express/pointerTo.I b/panda/src/express/pointerTo.I index 63862c105a..42b766af30 100644 --- a/panda/src/express/pointerTo.I +++ b/panda/src/express/pointerTo.I @@ -1,13 +1,26 @@ // Filename: pointerTo.I // Created by: drose (10Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToBase:: @@ -19,7 +32,7 @@ PointerToBase(To *ptr) { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Copy Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToBase:: @@ -31,7 +44,7 @@ PointerToBase(const PointerToBase ©) { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Destructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToBase:: @@ -56,7 +69,7 @@ reassign(To *ptr) { // inadvertently delete the new one. (Don't laugh--it's // happened!) To *old_ptr = _ptr; - + _ptr = ptr; if (_ptr != (To *)NULL) { _ptr->ref(); @@ -86,7 +99,7 @@ reassign(To *ptr) { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::reassign // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerToBase:: @@ -99,7 +112,7 @@ reassign(const PointerToBase ©) { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Equivalence operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -110,7 +123,7 @@ operator == (const To *other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Nonequivalence operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -121,7 +134,7 @@ operator != (const To *other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Greater-than operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -132,7 +145,7 @@ operator > (const To *other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Less-than-or-equal operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -143,7 +156,7 @@ operator <= (const To *other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Greater-than-or-equal operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -154,7 +167,7 @@ operator >= (const To *other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Equivalence operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -165,7 +178,7 @@ operator == (const PointerToBase &other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Nonequivalence operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -176,7 +189,7 @@ operator != (const PointerToBase &other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Greater-than operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -187,7 +200,7 @@ operator > (const PointerToBase &other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Less-than-or-equal operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -198,7 +211,7 @@ operator <= (const PointerToBase &other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Greater-than-or-equal operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -210,7 +223,7 @@ operator >= (const PointerToBase &other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Less-than operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -221,7 +234,7 @@ operator < (const To *other) const { //////////////////////////////////////////////////////////////////// // Function: PointerToBase::Less-than operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToBase:: @@ -277,29 +290,29 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: PointerTo::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerTo:: -PointerTo(To *ptr) : PointerToBase(ptr) { +PointerTo(To *ptr) : PointerToBase(ptr) { } //////////////////////////////////////////////////////////////////// // Function: PointerTo::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerTo:: -PointerTo(const PointerTo ©) : - PointerToBase((const PointerToBase &)copy) -{ +PointerTo(const PointerTo ©) : + PointerToBase((const PointerToBase &)copy) +{ } //////////////////////////////////////////////////////////////////// // Function: PointerTo::Dereference operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerTo::To &PointerTo:: @@ -310,7 +323,7 @@ operator *() const { //////////////////////////////////////////////////////////////////// // Function: PointerTo::Member access operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerTo::To *PointerTo:: @@ -350,7 +363,7 @@ p() const { //////////////////////////////////////////////////////////////////// // Function: PointerTo::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerTo &PointerTo:: @@ -362,7 +375,7 @@ operator = (To *ptr) { //////////////////////////////////////////////////////////////////// // Function: PointerTo::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerTo &PointerTo:: @@ -374,43 +387,43 @@ operator = (const PointerTo ©) { //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerTo:: -ConstPointerTo(const To *ptr) : - PointerToBase((ConstPointerTo::To *)ptr) +ConstPointerTo(const To *ptr) : + PointerToBase((ConstPointerTo::To *)ptr) { } //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerTo:: -ConstPointerTo(const PointerTo ©) : - PointerToBase((const PointerToBase &)copy) +ConstPointerTo(const PointerTo ©) : + PointerToBase((const PointerToBase &)copy) { } //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerTo:: -ConstPointerTo(const ConstPointerTo ©) : - PointerToBase((const PointerToBase &)copy) +ConstPointerTo(const ConstPointerTo ©) : + PointerToBase((const PointerToBase &)copy) { } //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Dereference operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE const ConstPointerTo::To &ConstPointerTo:: @@ -421,7 +434,7 @@ operator *() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Member access operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE const ConstPointerTo::To *ConstPointerTo:: @@ -461,7 +474,7 @@ p() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerTo &ConstPointerTo:: @@ -473,7 +486,7 @@ operator = (const To *ptr) { //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerTo &ConstPointerTo:: @@ -485,7 +498,7 @@ operator = (const ConstPointerTo ©) { //////////////////////////////////////////////////////////////////// // Function: ConstPointerTo::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerTo &ConstPointerTo:: diff --git a/panda/src/express/pointerTo.h b/panda/src/express/pointerTo.h index a0e60c8550..cf3e436e9e 100644 --- a/panda/src/express/pointerTo.h +++ b/panda/src/express/pointerTo.h @@ -2,6 +2,19 @@ // Created by: drose (23Oct98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef POINTERTO_H #define POINTERTO_H @@ -149,7 +162,7 @@ PUBLISHED: // your code look a bit cleaner. // e.g. instead of (MyType *)(BaseClass *)ptr, use (MyType *)ptr.p() - + // If your base class is a derivative of TypedObject, you might want // to use the DCAST macro defined in typedObject.h instead, // e.g. DCAST(MyType, ptr). This provides a clean downcast that diff --git a/panda/src/express/profileTimer.I b/panda/src/express/profileTimer.I index 48aa0b760c..5f9cd28aca 100644 --- a/panda/src/express/profileTimer.I +++ b/panda/src/express/profileTimer.I @@ -1,4 +1,20 @@ -// ProfileTimer.I +// Filename: profileTimer.I +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// INLINE void ProfileTimer:: on() { diff --git a/panda/src/express/profileTimer.cxx b/panda/src/express/profileTimer.cxx index b30690b3f7..15d9384fc5 100644 --- a/panda/src/express/profileTimer.cxx +++ b/panda/src/express/profileTimer.cxx @@ -1,4 +1,20 @@ -// ProfileTimer.cxx +// Filename: profileTimer.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "profileTimer.h" #include using namespace std; @@ -102,19 +118,19 @@ consolidateTo(ostream &out) const { entries[te._tag]+=te._time; } out << "-------------------------------------------------------------------\n" - << "Profile Timing of " << _name + << "Profile Timing of " << _name << "\n\n"; // ...should print data and time too. double total=0; { map::const_iterator i=entries.begin(); for (;i!=entries.end(); ++i) { - out << " " << setw(50) << i->first << ": " + out << " " << setw(50) << i->first << ": " << setiosflags(ios::fixed) << setprecision(6) << setw(10) << i->second << "\n"; total+=i->second; } } - out << "\n [Total Time: " - << setiosflags(ios::fixed) << setprecision(6) << total + out << "\n [Total Time: " + << setiosflags(ios::fixed) << setprecision(6) << total << " seconds]\n" << "-------------------------------------------------------------------\n"; out << endl; @@ -132,25 +148,25 @@ printAllTo(ostream &out) { void ProfileTimer:: printTo(ostream &out) const { out << "-------------------------------------------------------------------\n" - << "Profile Timing of " << _name + << "Profile Timing of " << _name << "\n\n"; // ...should print data and time too. double total=0; int i; for (i=0; i<_entryCount; ++i) { TimerEntry& te=_entries[i]; - out << " " << setw(50) << te._tag << ": " + out << " " << setw(50) << te._tag << ": " << setiosflags(ios::fixed) << setprecision(6) << setw(10) << te._time << "\n"; total+=te._time; } - out << "\n [Total Time: " - << setiosflags(ios::fixed) << setprecision(6) << total + out << "\n [Total Time: " + << setiosflags(ios::fixed) << setprecision(6) << total << " seconds]\n" << "-------------------------------------------------------------------\n"; out << endl; } ProfileTimer::AutoTimer::AutoTimer(ProfileTimer& profile, const char* tag) : - _profile(profile) { + _profile(profile) { _tag=tag; if (_profile._autoTimerCount) { // ...this is a nested call to another AutoTimer. diff --git a/panda/src/express/profileTimer.h b/panda/src/express/profileTimer.h index a039da29ef..5010ccc2dd 100644 --- a/panda/src/express/profileTimer.h +++ b/panda/src/express/profileTimer.h @@ -1,4 +1,20 @@ -// ProfileTimer.h +// Filename: profileTimer.h +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PROFILETIMER_H //[ #define PROFILETIMER_H @@ -7,7 +23,7 @@ /* ProfileTimer - + HowTo: Create a ProfileTimer and hold onto it. Call init() whenever you like (the timer doesn't @@ -17,9 +33,9 @@ in the code you are timing. You can turn the timer off() and on() to skip things you don't want to time. - When your timing is finished, call printTo() to see the + When your timing is finished, call printTo() to see the results (e.g. myTimer.printTo(cerr)). - + Notes: You should be able to time things down to the millisecond well enough, but if you call on() and off() within micro- @@ -32,14 +48,14 @@ PUBLISHED: ProfileTimer(const char* name=0, int maxEntries=MaxEntriesDefault); ProfileTimer(const ProfileTimer& other); ~ProfileTimer(); - + void init(const char* name, int maxEntries=MaxEntriesDefault); - + void on(); void mark(const char* tag); void off(); void off(const char* tag); - + // Don't call any of the following during timing: // (Because they are slow, not because anything will break). double getTotalTime() const; @@ -60,7 +76,7 @@ public: public: AutoTimer(ProfileTimer& profile, const char* tag); ~AutoTimer(); - + protected: ProfileTimer& _profile; const char* _tag; @@ -83,7 +99,7 @@ protected: int _autoTimerCount; // see class AutoTimer double getTime(); - + friend ProfileTimer::AutoTimer; }; diff --git a/panda/src/express/referenceCount.I b/panda/src/express/referenceCount.I index 56f64620f1..0824ab38b1 100644 --- a/panda/src/express/referenceCount.I +++ b/panda/src/express/referenceCount.I @@ -1,6 +1,19 @@ // Filename: referenceCount.I // Created by: drose (23Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// template @@ -58,7 +71,7 @@ ReferenceCount(const ReferenceCount &) { INLINE void ReferenceCount:: operator = (const ReferenceCount &) { nassertv(this != NULL); - + // If this assertion fails, our own pointer was recently deleted. // Yikes! nassertv(_ref_count != -100); @@ -95,30 +108,30 @@ INLINE ReferenceCount:: INLINE void ReferenceCount:: prepare_delete() { nassertv(this != NULL); - + // If this assertion fails, we're trying to delete an object that // was just deleted. Probably you've accidentally made a bitwise // copy of a PointerTo, by forgetting to write a copy constructor // for a class that contains PointerTo's. nassertv(_ref_count != -100); - + // If this assertion fails, the reference counts are all screwed // up altogether. Maybe some errant code stomped all over memory // somewhere. nassertv(_ref_count >= 0); - + // If this assertion fails, someone tried to delete this object // while its reference count was still positive. Maybe you tried // to point a PointerTo at a static object (a local variable, // instead of one allocated via new)? The test below against 0x7f // is supposed to check for that, but it's a pretty hokey test. - + // Another possibility is you inadvertently omitted a copy // constructor for a ReferenceCount object, and then bitwise // copied a dynamically allocated value--reference count and // all--onto a locally allocated one. nassertv(_ref_count == 0); - + // Ok, all clear to delete. Now set the reference count to -100, // so we'll have a better chance of noticing if we happen to have // a stray pointer to it still out there. @@ -183,7 +196,7 @@ ref() const { // define a copy constructor for a class that contains // PointerTo's. nassertv(_ref_count != -100); - + // If this assertion fails, the reference counts are all screwed // up altogether. Maybe some errant code stomped all over memory // somewhere. @@ -199,9 +212,9 @@ ref() const { // any local variables! nassertv(((long)this & 0xff000000) != 0x7f000000); #endif - + ((ReferenceCount *)this)->_ref_count++; - + // If this assertion fails, we have just wrapped! Either there // are actually 2^32 pointers to this thing somewhere, or // something is really screwy. @@ -239,12 +252,12 @@ unref() const { // define a copy constructor for a class that contains // PointerTo's. nassertv(_ref_count != -100); - + // If this assertion fails, the reference counts are all screwed // up altogether. Maybe some errant code stomped all over memory // somewhere. nassertv(_ref_count >= 0); - + // If this assertion fails, you tried to unref an object with a // zero reference count. Are you using ref() and unref() // directly? Are you sure you can't use PointerTo's? @@ -271,7 +284,7 @@ test_ref_count_integrity() const { // define a copy constructor for a class that contains // PointerTo's. nassertv(_ref_count != -100); - + // If this assertion fails, the reference counts are all screwed // up altogether. Maybe some errant code stomped all over memory // somewhere. @@ -316,27 +329,27 @@ unref_delete(RefCountType *ptr) { //////////////////////////////////////////////////////////////////// // Function: RefCountProxy::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE RefCountProxy:: -RefCountProxy() { +RefCountProxy() { } //////////////////////////////////////////////////////////////////// // Function: RefCountProxy::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE RefCountProxy:: -RefCountProxy(const Base ©) : _base(copy) { +RefCountProxy(const Base ©) : _base(copy) { } //////////////////////////////////////////////////////////////////// // Function: RefCountProxy::Base Typecast Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE RefCountProxy:: @@ -347,7 +360,7 @@ operator Base &() { //////////////////////////////////////////////////////////////////// // Function: RefCountProxy::Base Typecast Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE RefCountProxy:: @@ -358,13 +371,13 @@ operator const Base &() const { //////////////////////////////////////////////////////////////////// // Function: RefCountProxy::init_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void RefCountProxy:: init_type() { do_init_type(Base); - register_type(_type_handle, + register_type(_type_handle, "RefCountProxy<" + get_type_handle(Base).get_name() + ">", get_type_handle(Base)); } @@ -373,28 +386,28 @@ init_type() { //////////////////////////////////////////////////////////////////// // Function: RefCountObj::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE RefCountObj:: -RefCountObj() { +RefCountObj() { } //////////////////////////////////////////////////////////////////// // Function: RefCountObj::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE RefCountObj:: -RefCountObj(const Base ©) : Base(copy) { +RefCountObj(const Base ©) : Base(copy) { } //////////////////////////////////////////////////////////////////// // Function: RefCountObj::init_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void RefCountObj:: diff --git a/panda/src/express/referenceCount.cxx b/panda/src/express/referenceCount.cxx index b2aa1d4e90..b148561f4a 100644 --- a/panda/src/express/referenceCount.cxx +++ b/panda/src/express/referenceCount.cxx @@ -1,6 +1,19 @@ // Filename: referenceCount.cxx // Created by: drose (23Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "referenceCount.h" diff --git a/panda/src/express/referenceCount.h b/panda/src/express/referenceCount.h index cf775bb918..e9c3f5096b 100644 --- a/panda/src/express/referenceCount.h +++ b/panda/src/express/referenceCount.h @@ -1,16 +1,20 @@ // Filename: referenceCount.h // Created by: drose (23Oct98) // -/////////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97,98 Walt Disney Imagineering, Inc. +//////////////////////////////////////////////////////////////////// // -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. -/////////////////////////////////////////////////////////////////////// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef REFERENCECOUNT_H #define REFERENCECOUNT_H diff --git a/panda/src/express/reversedNumericData.I b/panda/src/express/reversedNumericData.I index 45241e0895..a4501332e2 100644 --- a/panda/src/express/reversedNumericData.I +++ b/panda/src/express/reversedNumericData.I @@ -1,6 +1,19 @@ // Filename: reversedNumericData.I // Created by: drose (09May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/reversedNumericData.cxx b/panda/src/express/reversedNumericData.cxx index 0c7ef3d1ea..40d59c4100 100644 --- a/panda/src/express/reversedNumericData.cxx +++ b/panda/src/express/reversedNumericData.cxx @@ -1,6 +1,19 @@ // Filename: reversedNumericData.cxx // Created by: drose (09May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "reversedNumericData.h" diff --git a/panda/src/express/reversedNumericData.h b/panda/src/express/reversedNumericData.h index 91da440dd3..bb447062e2 100644 --- a/panda/src/express/reversedNumericData.h +++ b/panda/src/express/reversedNumericData.h @@ -1,6 +1,19 @@ // Filename: reversedNumericData.h // Created by: drose (09May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef REVERSEDNUMERICDATA_H diff --git a/panda/src/express/tokenBoard.I b/panda/src/express/tokenBoard.I index 721aae3a8a..32a3dc9f0e 100644 --- a/panda/src/express/tokenBoard.I +++ b/panda/src/express/tokenBoard.I @@ -2,21 +2,24 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// -// Copyright (C) 1992,93,94,95,96,97,98 -// Walt Disney Imagineering, Inc. // -// These coded instructions, statements, data structures and -// computer programs contain unpublished proprietary information of -// Walt Disney Imagineering and are protected by Federal copyright -// law. They may not be disclosed to third parties or copied or -// duplicated in any form, in whole or in part, without the prior -// written consent of Walt Disney Imagineering Inc. +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: TokenBoard::is_done_token() +// Function: TokenBoard::is_done_token() // Access: Public -// Description: Returns true if the indicated token id is on the +// Description: Returns true if the indicated token id is on the // done queue, false otherwise. //////////////////////////////////////////////////////////////////// template diff --git a/panda/src/express/tokenBoard.h b/panda/src/express/tokenBoard.h index 156650dfc6..191b7393ad 100644 --- a/panda/src/express/tokenBoard.h +++ b/panda/src/express/tokenBoard.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TOKENBOARD_H #define TOKENBOARD_H // @@ -36,7 +48,7 @@ public: const int MAX_TOKENBOARD_REQUESTS = 100; //////////////////////////////////////////////////////////////////// -// Class : TokenBoard +// Class : TokenBoard // Description : //////////////////////////////////////////////////////////////////// template diff --git a/panda/src/express/trueClock.I b/panda/src/express/trueClock.I index 2f2b44a731..850b789267 100644 --- a/panda/src/express/trueClock.I +++ b/panda/src/express/trueClock.I @@ -1,6 +1,19 @@ // Filename: trueClock.I // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/trueClock.cxx b/panda/src/express/trueClock.cxx index 45273dc1a3..4ec22109c1 100644 --- a/panda/src/express/trueClock.cxx +++ b/panda/src/express/trueClock.cxx @@ -1,6 +1,19 @@ // Filename: trueClock.cxx // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "trueClock.h" @@ -173,7 +186,7 @@ void get_true_time_of_day(ulong &sec, ulong &msec) { return; } sec = tv.tv_sec; - msec = tv.tv_usec; + msec = tv.tv_usec; } double TrueClock:: diff --git a/panda/src/express/trueClock.h b/panda/src/express/trueClock.h index 8280c9b10e..709375aeea 100644 --- a/panda/src/express/trueClock.h +++ b/panda/src/express/trueClock.h @@ -1,6 +1,19 @@ // Filename: trueClock.h // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRUECLOCK_H @@ -38,5 +51,5 @@ protected: void get_true_time_of_day(ulong &sec, ulong &usec); #include "trueClock.I" - + #endif diff --git a/panda/src/express/typeHandle.I b/panda/src/express/typeHandle.I index 39ae443ecc..d7d2447d61 100644 --- a/panda/src/express/typeHandle.I +++ b/panda/src/express/typeHandle.I @@ -1,6 +1,19 @@ // Filename: typeHandle.I // Created by: drose (22Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_express.h" @@ -24,22 +37,22 @@ // previously by another static initializer! //////////////////////////////////////////////////////////////////// INLINE TypeHandle:: -TypeHandle() { +TypeHandle() { } //////////////////////////////////////////////////////////////////// // Function: TypeHandle::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeHandle:: -TypeHandle(const TypeHandle ©) : _index(copy._index) { +TypeHandle(const TypeHandle ©) : _index(copy._index) { } - + //////////////////////////////////////////////////////////////////// // Function: TypeHandle::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TypeHandle:: operator == (const TypeHandle &other) const { @@ -49,7 +62,7 @@ operator == (const TypeHandle &other) const { //////////////////////////////////////////////////////////////////// // Function: TypeHandle::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TypeHandle:: operator != (const TypeHandle &other) const { @@ -59,7 +72,7 @@ operator != (const TypeHandle &other) const { //////////////////////////////////////////////////////////////////// // Function: TypeHandle::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TypeHandle:: operator < (const TypeHandle &other) const { @@ -278,7 +291,7 @@ register_dynamic_type(const string &name) { } INLINE TypeHandle register_dynamic_type(const string &name, TypeHandle parent1) { - TypeHandle type_handle = + TypeHandle type_handle = TypeRegistry::ptr()->register_dynamic_type(name); TypeRegistry::ptr()->record_derivation(type_handle, parent1); return type_handle; @@ -286,7 +299,7 @@ register_dynamic_type(const string &name, TypeHandle parent1) { INLINE TypeHandle register_dynamic_type(const string &name, TypeHandle parent1, TypeHandle parent2) { - TypeHandle type_handle = + TypeHandle type_handle = TypeRegistry::ptr()->register_dynamic_type(name); TypeRegistry::ptr()->record_derivation(type_handle, parent1); TypeRegistry::ptr()->record_derivation(type_handle, parent2); @@ -296,7 +309,7 @@ INLINE TypeHandle register_dynamic_type(const string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3) { - TypeHandle type_handle = + TypeHandle type_handle = TypeRegistry::ptr()->register_dynamic_type(name); TypeRegistry::ptr()->record_derivation(type_handle, parent1); TypeRegistry::ptr()->record_derivation(type_handle, parent2); @@ -307,7 +320,7 @@ INLINE TypeHandle register_dynamic_type(const string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3, TypeHandle parent4) { - TypeHandle type_handle = + TypeHandle type_handle = TypeRegistry::ptr()->register_dynamic_type(name); TypeRegistry::ptr()->record_derivation(type_handle, parent1); TypeRegistry::ptr()->record_derivation(type_handle, parent2); @@ -324,7 +337,7 @@ register_dynamic_type(const string &name, // support function for _dcast, below. //////////////////////////////////////////////////////////////////// template -INLINE TypeHandle +INLINE TypeHandle _dcast_get_typehandle(WantType *) { TypeHandle handle = WantType::get_class_type(); if (handle == TypeHandle::none()) { @@ -353,7 +366,7 @@ _dcast(WantType *, TypedObject *ptr) { #ifndef NDEBUG TypeHandle want_handle = _dcast_get_typehandle((WantType *)0); #if defined(_DEBUG) && defined(_WIN32) - if ((ptr == (TypedObject *)NULL) || IsBadWritePtr(ptr,sizeof(TypedObject))) { + if ((ptr == (TypedObject *)NULL) || IsBadWritePtr(ptr,sizeof(TypedObject))) { #else if (ptr == (TypedObject *)NULL) { #endif diff --git a/panda/src/express/typeHandle.cxx b/panda/src/express/typeHandle.cxx index 51732a1e8e..04dde372a9 100644 --- a/panda/src/express/typeHandle.cxx +++ b/panda/src/express/typeHandle.cxx @@ -1,6 +1,19 @@ // Filename: typeHandle.cxx // Created by: drose (23Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "typeHandle.h" @@ -49,7 +62,7 @@ void init_system_type_handles() { register_type(bool_type_handle, "bool"); register_type(double_type_handle, "double"); register_type(float_type_handle, "float"); - + register_type(int_p_type_handle, "int*"); register_type(short_p_type_handle, "short*"); register_type(char_p_type_handle, "char*"); @@ -64,11 +77,11 @@ void init_system_type_handles() { //////////////////////////////////////////////////////////////////// // Function: TypeRegistry::RegistryNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// TypeRegistry::RegistryNode:: RegistryNode(TypeHandle handle, const string &name, TypeHandle &ref) : - _handle(handle), _name(name), _ref(ref) { + _handle(handle), _name(name), _ref(ref) { } //////////////////////////////////////////////////////////////////// @@ -109,7 +122,7 @@ register_type(TypeHandle &type_handle, const string &name) { express_cat->spam() << "Registering type " << name << "\n"; } #endif - + TypeHandle new_handle; new_handle._index = _handle_registry.size(); @@ -122,7 +135,7 @@ register_type(TypeHandle &type_handle, const string &name) { } RegistryNode *rnode = (*ri).second; nassertr(rnode->_name == (*ri).first, false); - nassertr(rnode->_handle._index >= 0 && + nassertr(rnode->_handle._index >= 0 && rnode->_handle._index < (int)_handle_registry.size(), false); nassertr(_handle_registry[rnode->_handle._index] == rnode, false); nassertr(rnode->_handle._index != 0, false); @@ -186,7 +199,7 @@ register_dynamic_type(const string &name) { express_cat->spam() << "Registering type " << name << "\n"; } #endif - + // We must dynamically allocate a new handle so the RegistryNode // has something unique to point to. This doesn't really mean // anything, though. @@ -245,7 +258,7 @@ void TypeRegistry:: record_alternate_name(TypeHandle type, const string &name) { RegistryNode *rnode = look_up(type, (TypedObject *)NULL); if (rnode != (RegistryNode *)NULL) { - NameRegistry::iterator ri = + NameRegistry::iterator ri = _name_registry.insert(NameRegistry::value_type(name, rnode)).first; if ((*ri).second != rnode) { express_cat.warning() @@ -452,8 +465,8 @@ void TypeRegistry:: reregister_types() { HandleRegistry::iterator ri; TypeRegistry *reg = ptr(); - for (ri = reg->_handle_registry.begin(); - ri != reg->_handle_registry.end(); + for (ri = reg->_handle_registry.begin(); + ri != reg->_handle_registry.end(); ++ri) { RegistryNode *rnode = (*ri); if (rnode != NULL && rnode->_handle != rnode->_ref) { @@ -503,7 +516,7 @@ ptr() { //////////////////////////////////////////////////////////////////// // Function: TypeRegistry::Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// TypeRegistry:: TypeRegistry() { @@ -511,7 +524,7 @@ TypeRegistry() { // TypeHandles whose index number is zero, and are therefore // (probably) uninitialized. _handle_registry.push_back(NULL); - + _root_classes_fresh = false; } @@ -572,12 +585,12 @@ write_node(ostream &out, int indent_level, const RegistryNode *node) const { } } out << "\n"; - + for (int i = 0; i < (int)node->_child_classes.size(); i++) { write_node(out, indent_level + 2, node->_child_classes[i]); } } - + //////////////////////////////////////////////////////////////////// // Function: TypeRegistry::look_up @@ -635,7 +648,7 @@ look_up(TypeHandle handle, TypedObject *object) const { if (handle._index < 0 || handle._index >= (int)_handle_registry.size()) { express_cat->fatal() - << "Invalid TypeHandle index " << handle._index + << "Invalid TypeHandle index " << handle._index << "! Is memory corrupt?\n"; nassertr(false, NULL); } diff --git a/panda/src/express/typeHandle.h b/panda/src/express/typeHandle.h index 934d00e42e..e0ce29d1b7 100644 --- a/panda/src/express/typeHandle.h +++ b/panda/src/express/typeHandle.h @@ -2,6 +2,19 @@ // Created by: drose (23Oct98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TYPEHANDLE_H #define TYPEHANDLE_H @@ -83,7 +96,7 @@ class EXPCL_PANDAEXPRESS TypeHandle { PUBLISHED: INLINE TypeHandle(); INLINE TypeHandle(const TypeHandle ©); - + INLINE bool operator == (const TypeHandle &other) const; INLINE bool operator != (const TypeHandle &other) const; INLINE bool operator < (const TypeHandle &other) const; @@ -139,7 +152,7 @@ protected: TypeHandle _handle; string _name; TypeHandle &_ref; - typedef vector Classes; + typedef vector Classes; Classes _parent_classes; Classes _child_classes; }; @@ -172,10 +185,10 @@ PUBLISHED: int get_num_child_classes(TypeHandle child, TypedObject *child_object) const; TypeHandle get_child_class(TypeHandle child, int index) const; - + TypeHandle get_parent_towards(TypeHandle child, TypeHandle ancestor, TypedObject *child_object) const; - + static void reregister_types(); void write(ostream &out) const; diff --git a/panda/src/express/typedObject.I b/panda/src/express/typedObject.I index 5cabcfd4db..a5a813e347 100644 --- a/panda/src/express/typedObject.I +++ b/panda/src/express/typedObject.I @@ -1,35 +1,48 @@ // Filename: typedObject.I // Created by: drose (11May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TypedObject::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedObject:: -TypedObject() { +TypedObject() { } //////////////////////////////////////////////////////////////////// // Function: TypedObject::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedObject:: -TypedObject(const TypedObject &) { +TypedObject(const TypedObject &) { } //////////////////////////////////////////////////////////////////// // Function: TypedObject::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TypedObject:: operator = (const TypedObject &) { -} +} //////////////////////////////////////////////////////////////////// // Function: TypedObject::get_type_index diff --git a/panda/src/express/typedObject.cxx b/panda/src/express/typedObject.cxx index 55c45a50ca..5688dcd46d 100644 --- a/panda/src/express/typedObject.cxx +++ b/panda/src/express/typedObject.cxx @@ -1,6 +1,19 @@ // Filename: typedObject.cxx // Created by: drose (11May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "typedObject.h" @@ -8,21 +21,21 @@ TypeHandle TypedObject::_type_handle; - + //////////////////////////////////////////////////////////////////// // Function: TypedObject::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// TypedObject:: -~TypedObject() { +~TypedObject() { } - + //////////////////////////////////////////////////////////////////// // Function: TypedObject::get_type // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// TypeHandle TypedObject:: get_type() const { diff --git a/panda/src/express/typedObject.h b/panda/src/express/typedObject.h index 3566d8e900..6997d01b23 100644 --- a/panda/src/express/typedObject.h +++ b/panda/src/express/typedObject.h @@ -1,6 +1,19 @@ // Filename: typedObject.h // Created by: drose (11May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TYPEDOBJECT_H @@ -27,7 +40,7 @@ public: INLINE TypedObject(const TypedObject ©); INLINE void operator = (const TypedObject ©); -PUBLISHED: +PUBLISHED: // A virtual destructor is just a good idea. virtual ~TypedObject(); diff --git a/panda/src/express/typedReferenceCount.I b/panda/src/express/typedReferenceCount.I index a2af5618ed..d09d14097a 100644 --- a/panda/src/express/typedReferenceCount.I +++ b/panda/src/express/typedReferenceCount.I @@ -1,28 +1,41 @@ // Filename: typedReferenceCount.I // Created by: drose (25May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TypedReferenceCount::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedReferenceCount:: -TypedReferenceCount() { +TypedReferenceCount() { MemoryUsage::update_type(this, this); } //////////////////////////////////////////////////////////////////// // Function: TypedReferenceCount::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedReferenceCount:: -TypedReferenceCount(const TypedReferenceCount ©) : - TypedObject(copy), - ReferenceCount(copy) +TypedReferenceCount(const TypedReferenceCount ©) : + TypedObject(copy), + ReferenceCount(copy) { MemoryUsage::update_type(this, this); } @@ -30,7 +43,7 @@ TypedReferenceCount(const TypedReferenceCount ©) : //////////////////////////////////////////////////////////////////// // Function: TypedReferenceCount::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TypedReferenceCount:: operator = (const TypedReferenceCount ©) { diff --git a/panda/src/express/typedReferenceCount.cxx b/panda/src/express/typedReferenceCount.cxx index 885fb747fa..f014180f17 100644 --- a/panda/src/express/typedReferenceCount.cxx +++ b/panda/src/express/typedReferenceCount.cxx @@ -1,6 +1,20 @@ // Filename: typedReferenceCount.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "typedReferenceCount.h" diff --git a/panda/src/express/typedReferenceCount.h b/panda/src/express/typedReferenceCount.h index a7f48116cb..a13ba5a612 100644 --- a/panda/src/express/typedReferenceCount.h +++ b/panda/src/express/typedReferenceCount.h @@ -1,6 +1,20 @@ // Filename: typedReferenceCount.h // Created by: drose (08Feb99) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TYPEDREFERENCECOUNT_H #define TYPEDREFERENCECOUNT_H @@ -53,4 +67,4 @@ private: #include "typedReferenceCount.I" #endif - + diff --git a/panda/src/express/typedef.h b/panda/src/express/typedef.h index 86ef220a8d..fbb0995e58 100644 --- a/panda/src/express/typedef.h +++ b/panda/src/express/typedef.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TYPEDEF_H #define TYPEDEF_H diff --git a/panda/src/framework/config_framework.cxx b/panda/src/framework/config_framework.cxx index 5d8f54926f..9871bbb14e 100644 --- a/panda/src/framework/config_framework.cxx +++ b/panda/src/framework/config_framework.cxx @@ -1,6 +1,19 @@ // Filename: config_framework.cxx // Created by: drose (06Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_framework.h" diff --git a/panda/src/framework/config_framework.h b/panda/src/framework/config_framework.h index 8e95048d70..5f7bbe5150 100644 --- a/panda/src/framework/config_framework.h +++ b/panda/src/framework/config_framework.h @@ -1,6 +1,19 @@ // Filename: config_framework.h // Created by: drose (06Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_FRAMEWORK_H diff --git a/panda/src/framework/framework.cxx b/panda/src/framework/framework.cxx index f1acc5b648..600417f6a9 100644 --- a/panda/src/framework/framework.cxx +++ b/panda/src/framework/framework.cxx @@ -1,6 +1,19 @@ // Filename: framework.cxx // Created by: cary (25Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // We need to include bitMask.h first to avoid a VC++ compiler bug @@ -199,7 +212,7 @@ TypeHandle GeomNorms::_type_handle; // Since the Normal*Traversers don't care about state, we don't need // to accumulate the RenderTransitions, so it will template on // NullTransition. -class NormalAddTraverser : +class NormalAddTraverser : public TraverserVisitor { public: NormalAddTraverser(GraphicsStateGuardian *gsg) : _gsg(gsg) {} @@ -268,7 +281,7 @@ reached_node(Node *node, NullAttributeWrapper &, NullLevelState &) { return true; } -class NormalDelTraverser : +class NormalDelTraverser : public TraverserVisitor { public: NormalDelTraverser(GraphicsStateGuardian *gsg) : _gsg(gsg) {} @@ -629,7 +642,7 @@ void event_w(CPT_Event) { initial_state.set_attribute(CullFaceTransition::get_class_type(), cfa); } else { - // Set the initial state up for wireframe mode. + // Set the initial state up for wireframe mode. RenderModeAttribute *rma = new RenderModeAttribute; rma->set_mode(RenderModeProperty::M_wireframe); CullFaceAttribute *cfa = new CullFaceAttribute; @@ -691,7 +704,7 @@ void event_grave(CPT_Event) { int width = dr->get_pixel_width(); int height = dr->get_pixel_height(); - PixelBuffer p(width, height, 3, 1, PixelBuffer::T_unsigned_byte, + PixelBuffer p(width, height, 3, 1, PixelBuffer::T_unsigned_byte, PixelBuffer::F_rgb); nout << "Capturing frame.\n"; @@ -750,7 +763,7 @@ void event_N(CPT_Event) { static void switch_trackball(Node *trackball) { if (current_trackball != NULL) { - remove_child(mouse_watcher, current_trackball, + remove_child(mouse_watcher, current_trackball, DataRelation::get_class_type()); } current_trackball = trackball; @@ -783,7 +796,7 @@ start_drive() { } hpr[1] = 0.0; hpr[2] = 0.0; - + drive_interface->set_pos(xyz); drive_interface->set_hpr(hpr); @@ -962,7 +975,7 @@ static int gridwidth; // cells/side #define MIN_WANDERAREA_DIMENSION 120.0 static float grid_pos_offset; // origin of grid -static float wander_area_pos_offset; +static float wander_area_pos_offset; // making these fns to get around ridiculous VC++ matrix inlining bugs at Opt2 static void move_gridded_stuff(GriddedMotionType gridmotiontype,gridded_file_info *InfoArr, RenderRelation **pRRptrArr, int size) { @@ -988,7 +1001,7 @@ static void move_gridded_stuff(GriddedMotionType gridmotiontype,gridded_file_inf DO_FP_MODULUS(InfoArr[i].ang2,360.0); // xforms happen left to right - LVector2f new_center = LVector2f(InfoArr[i].radius,0.0) * + LVector2f new_center = LVector2f(InfoArr[i].radius,0.0) * LMatrix3f::rotate_mat(InfoArr[i].ang1); LVector3f translate_vec(InfoArr[i].xcenter+new_center._v.v._0, @@ -1056,7 +1069,7 @@ int framework_main(int argc, char *argv[]) { framework_cat.error() << "Unable to open " << framework_notify_output << " for output.\n"; } else { - framework_cat.info() + framework_cat.info() << "Sending Notify output to " << framework_notify_output << "\n"; } } @@ -1098,11 +1111,11 @@ int framework_main(int argc, char *argv[]) { ((argv[a])[0] != '+') && ((argv[a])[0] != '#')) pFileCollection->push_back(Filename::from_os_specific(argv[a])); else switch((argv[a])[1]) { - case 'r': + case 'r': gridmotiontype = Rotation; break; - case 'm': + case 'm': gridmotiontype = LinearMotion; break; @@ -1175,7 +1188,7 @@ int framework_main(int argc, char *argv[]) { assert(main_win != (GraphicsWindow*)0L); // is ok if this doesn't work or returns NULL - if (rib_pipe != (GraphicsPipe*)0L) { + if (rib_pipe != (GraphicsPipe*)0L) { Node *rib_cameras = new NamedNode("rib_cameras"); new RenderRelation(render, rib_cameras); rib_win = ChanConfig(rib_pipe, "single", rib_cameras, render, override); @@ -1269,7 +1282,7 @@ int framework_main(int argc, char *argv[]) { if (files.empty() && gridded_files.empty() && framework.GetBool("have-omnitriangle", true)) { // The user did not specify a model file to load. Create some // default geometry. - + PTA_Vertexf coords; PTA_TexCoordf uvs; PTA_Normalf norms; @@ -1420,12 +1433,12 @@ int framework_main(int argc, char *argv[]) { } // xforms happen left to right - LVector2f new_center = LVector2f(InfoArr[filenum].radius,0.0) * + LVector2f new_center = LVector2f(InfoArr[filenum].radius,0.0) * LMatrix3f::rotate_mat(InfoArr[filenum].ang1); const LVector3f rotate_axis(0.0, 0.0, 1.0); - LVector3f translate_vec(xpos+new_center._v.v._0, + LVector3f translate_vec(xpos+new_center._v.v._0, ypos+new_center._v.v._1, 0.0); @@ -1558,7 +1571,7 @@ int framework_main(int argc, char *argv[]) { draw_thread = thread::create(draw_loop); for (;;) icb.idle(); - } else + } else #endif { main_win->set_idle_callback(&icb); diff --git a/panda/src/framework/framework.h b/panda/src/framework/framework.h index 1658010c8c..5f23c2bc6a 100644 --- a/panda/src/framework/framework.h +++ b/panda/src/framework/framework.h @@ -2,6 +2,19 @@ // Created by: drose (04May00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FRAMEWORK_H #define FRAMEWORK_H diff --git a/panda/src/glgsg/config_glgsg.cxx b/panda/src/glgsg/config_glgsg.cxx index a04933e430..db73164d5f 100644 --- a/panda/src/glgsg/config_glgsg.cxx +++ b/panda/src/glgsg/config_glgsg.cxx @@ -1,6 +1,19 @@ // Filename: config_glgsg.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_glgsg.h" @@ -86,7 +99,7 @@ init_libglgsg() { if (!decal_type.empty()) { gl_decal_type = parse_decal_type(decal_type); } - + GLGraphicsStateGuardian::init_type(); GLSavedFrameBuffer::init_type(); GLTextureContext::init_type(); diff --git a/panda/src/glgsg/config_glgsg.h b/panda/src/glgsg/config_glgsg.h index e17e41b508..5bfa8b5e3c 100644 --- a/panda/src/glgsg/config_glgsg.h +++ b/panda/src/glgsg/config_glgsg.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_GLGSG_H #define CONFIG_GLGSG_H diff --git a/panda/src/glgsg/glGraphicsStateGuardian.I b/panda/src/glgsg/glGraphicsStateGuardian.I index 6bea793dfa..4f4eef85e3 100644 --- a/panda/src/glgsg/glGraphicsStateGuardian.I +++ b/panda/src/glgsg/glGraphicsStateGuardian.I @@ -1,6 +1,19 @@ // Filename: glGraphicsStateGuardian.I // Created by: drose (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_glgsg.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::LightInfo::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GLGraphicsStateGuardian::LightInfo:: LightInfo() { @@ -39,7 +52,7 @@ activate() { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::call_glClearColor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: call_glClearColor(GLclampf red, GLclampf green, GLclampf blue, @@ -59,7 +72,7 @@ call_glClearColor(GLclampf red, GLclampf green, GLclampf blue, //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::call_glClearDepth // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: call_glClearDepth(GLclampd depth) { @@ -77,7 +90,7 @@ call_glClearDepth(GLclampd depth) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::call_glClearStencil // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: call_glClearStencil(GLint s) { @@ -90,7 +103,7 @@ call_glClearStencil(GLint s) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::call_glClearAccum // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: call_glClearAccum(GLclampf red, GLclampf green, GLclampf blue, @@ -110,7 +123,7 @@ call_glClearAccum(GLclampf red, GLclampf green, GLclampf blue, //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::call_glDrawBuffer // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: call_glDrawBuffer(GLenum mode) { @@ -119,31 +132,31 @@ call_glDrawBuffer(GLenum mode) { glgsg_cat.debug() << "glDrawBuffer("; switch (mode) { case GL_FRONT: - glgsg_cat.debug(false) << "GL_FRONT)"; + glgsg_cat.debug(false) << "GL_FRONT)"; break; case GL_BACK: - glgsg_cat.debug(false) << "GL_BACK)"; + glgsg_cat.debug(false) << "GL_BACK)"; break; case GL_RIGHT: - glgsg_cat.debug(false) << "GL_RIGHT)"; + glgsg_cat.debug(false) << "GL_RIGHT)"; break; case GL_LEFT: - glgsg_cat.debug(false) << "GL_LEFT)"; + glgsg_cat.debug(false) << "GL_LEFT)"; break; case GL_FRONT_RIGHT: - glgsg_cat.debug(false) << "GL_FRONT_RIGHT)"; + glgsg_cat.debug(false) << "GL_FRONT_RIGHT)"; break; case GL_FRONT_LEFT: - glgsg_cat.debug(false) << "GL_FRONT_LEFT)"; + glgsg_cat.debug(false) << "GL_FRONT_LEFT)"; break; case GL_BACK_RIGHT: - glgsg_cat.debug(false) << "GL_BACK_RIGHT)"; + glgsg_cat.debug(false) << "GL_BACK_RIGHT)"; break; case GL_BACK_LEFT: - glgsg_cat.debug(false) << "GL_BACK_LEFT)"; + glgsg_cat.debug(false) << "GL_BACK_LEFT)"; break; case GL_FRONT_AND_BACK: - glgsg_cat.debug(false) << "GL_FRONT_AND_BACK)"; + glgsg_cat.debug(false) << "GL_FRONT_AND_BACK)"; break; } glgsg_cat.debug(false) << endl; @@ -156,7 +169,7 @@ call_glDrawBuffer(GLenum mode) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::call_glReadBuffer // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: call_glReadBuffer(GLenum mode) { @@ -207,7 +220,7 @@ call_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { if ( _viewport_x != x || _viewport_y != y || _viewport_width != width || _viewport_height != height ) - { + { _viewport_x = x; _viewport_y = y; _viewport_width = width; _viewport_height = height; glViewport( x, y, width, height ); @@ -254,7 +267,7 @@ call_glLightModelLocal(GLboolean local) //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: call_glLightModelTwoSide(GLboolean twoside) -{ +{ if (_lmodel_twoside != twoside) { _lmodel_twoside = twoside; #ifdef GSG_VERBOSE @@ -278,31 +291,31 @@ call_glStencilFunc(GLenum func) { glgsg_cat.debug() << "glStencilFunc("; switch (func) { case GL_NEVER: - glgsg_cat.debug(false) << "GL_NEVER, "; + glgsg_cat.debug(false) << "GL_NEVER, "; break; case GL_LESS: - glgsg_cat.debug(false) << "GL_LESS, "; + glgsg_cat.debug(false) << "GL_LESS, "; break; case GL_EQUAL: - glgsg_cat.debug(false) << "GL_EQUAL, "; + glgsg_cat.debug(false) << "GL_EQUAL, "; break; case GL_LEQUAL: - glgsg_cat.debug(false) << "GL_LEQUAL, "; + glgsg_cat.debug(false) << "GL_LEQUAL, "; break; case GL_GREATER: - glgsg_cat.debug(false) << "GL_GREATER, "; + glgsg_cat.debug(false) << "GL_GREATER, "; break; case GL_NOTEQUAL: - glgsg_cat.debug(false) << "GL_NOTEQUAL, "; + glgsg_cat.debug(false) << "GL_NOTEQUAL, "; break; case GL_GEQUAL: - glgsg_cat.debug(false) << "GL_GEQUAL, "; + glgsg_cat.debug(false) << "GL_GEQUAL, "; break; case GL_ALWAYS: - glgsg_cat.debug(false) << "GL_ALWAYS, "; + glgsg_cat.debug(false) << "GL_ALWAYS, "; break; default: - glgsg_cat.debug(false) << "unknown, "; + glgsg_cat.debug(false) << "unknown, "; break; } glgsg_cat.debug(false) << "1, 1)" << endl; @@ -324,25 +337,25 @@ call_glStencilOp(GLenum op) { glgsg_cat.debug() << "glStencilOp(GL_KEEP, GL_KEEP, "; switch (op) { case GL_KEEP: - glgsg_cat.debug(false) << "GL_KEEP)"; + glgsg_cat.debug(false) << "GL_KEEP)"; break; case GL_ZERO: - glgsg_cat.debug(false) << "GL_ZERO)"; + glgsg_cat.debug(false) << "GL_ZERO)"; break; case GL_REPLACE: - glgsg_cat.debug(false) << "GL_REPLACE)"; + glgsg_cat.debug(false) << "GL_REPLACE)"; break; case GL_INCR: - glgsg_cat.debug(false) << "GL_INCR)"; + glgsg_cat.debug(false) << "GL_INCR)"; break; case GL_DECR: - glgsg_cat.debug(false) << "GL_DECR)"; + glgsg_cat.debug(false) << "GL_DECR)"; break; case GL_INVERT: - glgsg_cat.debug(false) << "GL_INVERT)"; + glgsg_cat.debug(false) << "GL_INVERT)"; break; default: - glgsg_cat.debug(false) << "unknown)"; + glgsg_cat.debug(false) << "unknown)"; break; } glgsg_cat.debug(false) << endl; @@ -399,64 +412,64 @@ call_glBlendFunc(GLenum sfunc, GLenum dfunc) { glgsg_cat.debug() << "glBlendFunc("; switch (sfunc) { case GL_ZERO: - glgsg_cat.debug(false) << "GL_ZERO, "; + glgsg_cat.debug(false) << "GL_ZERO, "; break; case GL_ONE: - glgsg_cat.debug(false) << "GL_ONE, "; + glgsg_cat.debug(false) << "GL_ONE, "; break; case GL_DST_COLOR: - glgsg_cat.debug(false) << "GL_DST_COLOR, "; + glgsg_cat.debug(false) << "GL_DST_COLOR, "; break; case GL_ONE_MINUS_DST_COLOR: - glgsg_cat.debug(false) << "GL_ONE_MINUS_DST_COLOR, "; + glgsg_cat.debug(false) << "GL_ONE_MINUS_DST_COLOR, "; break; case GL_SRC_ALPHA: - glgsg_cat.debug(false) << "GL_SRC_ALPHA, "; + glgsg_cat.debug(false) << "GL_SRC_ALPHA, "; break; case GL_ONE_MINUS_SRC_ALPHA: - glgsg_cat.debug(false) << "GL_ONE_MINUS_SRC_ALPHA, "; + glgsg_cat.debug(false) << "GL_ONE_MINUS_SRC_ALPHA, "; break; case GL_DST_ALPHA: - glgsg_cat.debug(false) << "GL_DST_ALPHA, "; + glgsg_cat.debug(false) << "GL_DST_ALPHA, "; break; case GL_ONE_MINUS_DST_ALPHA: - glgsg_cat.debug(false) << "GL_ONE_MINUS_DST_ALPHA, "; + glgsg_cat.debug(false) << "GL_ONE_MINUS_DST_ALPHA, "; break; case GL_SRC_ALPHA_SATURATE: - - glgsg_cat.debug(false) << "GL_SRC_ALPHA_SATURATE, "; + + glgsg_cat.debug(false) << "GL_SRC_ALPHA_SATURATE, "; break; default: - glgsg_cat.debug(false) << "unknown, "; + glgsg_cat.debug(false) << "unknown, "; break; } switch (dfunc) { case GL_ZERO: - glgsg_cat.debug(false) << "GL_ZERO)"; + glgsg_cat.debug(false) << "GL_ZERO)"; break; case GL_ONE: - glgsg_cat.debug(false) << "GL_ONE)"; + glgsg_cat.debug(false) << "GL_ONE)"; break; case GL_SRC_COLOR: - glgsg_cat.debug(false) << "GL_SRC_COLOR)"; + glgsg_cat.debug(false) << "GL_SRC_COLOR)"; break; case GL_ONE_MINUS_SRC_COLOR: - glgsg_cat.debug(false) << "GL_ONE_MINUS_SRC_COLOR)"; + glgsg_cat.debug(false) << "GL_ONE_MINUS_SRC_COLOR)"; break; case GL_SRC_ALPHA: - glgsg_cat.debug(false) << "GL_SRC_ALPHA)"; + glgsg_cat.debug(false) << "GL_SRC_ALPHA)"; break; case GL_ONE_MINUS_SRC_ALPHA: - glgsg_cat.debug(false) << "GL_ONE_MINUS_SRC_ALPHA)"; + glgsg_cat.debug(false) << "GL_ONE_MINUS_SRC_ALPHA)"; break; case GL_DST_ALPHA: - glgsg_cat.debug(false) << "GL_DST_ALPHA)"; + glgsg_cat.debug(false) << "GL_DST_ALPHA)"; break; case GL_ONE_MINUS_DST_ALPHA: - glgsg_cat.debug(false) << "GL_ONE_MINUS_DST_ALPHA)"; + glgsg_cat.debug(false) << "GL_ONE_MINUS_DST_ALPHA)"; break; default: - glgsg_cat.debug(false) << "unknown)"; + glgsg_cat.debug(false) << "unknown)"; break; } glgsg_cat.debug(false) << endl; @@ -495,21 +508,21 @@ call_glFogMode(GLint mode) { glgsg_cat.debug() << "glFog(GL_FOG_MODE, "; switch(mode) { case GL_LINEAR: - glgsg_cat.debug(false) << "GL_LINEAR)" << endl; + glgsg_cat.debug(false) << "GL_LINEAR)" << endl; break; case GL_EXP: - glgsg_cat.debug(false) << "GL_EXP)" << endl; + glgsg_cat.debug(false) << "GL_EXP)" << endl; break; case GL_EXP2: - glgsg_cat.debug(false) << "GL_EXP2)" << endl; + glgsg_cat.debug(false) << "GL_EXP2)" << endl; break; #ifdef GL_FOG_FUNC_SGIS case GL_FOG_FUNC_SGIS: - glgsg_cat.debug(false) << "GL_FOG_FUNC_SGIS)" << endl; + glgsg_cat.debug(false) << "GL_FOG_FUNC_SGIS)" << endl; break; #endif default: - glgsg_cat.debug(false) << "unknown)" << endl; + glgsg_cat.debug(false) << "unknown)" << endl; break; } #endif @@ -599,33 +612,33 @@ call_glAlphaFunc(GLenum func, GLclampf ref) { glgsg_cat.debug() << "glAlphaFunc("; switch (func) { case GL_NEVER: - glgsg_cat.debug(false) << "GL_NEVER, "; + glgsg_cat.debug(false) << "GL_NEVER, "; break; case GL_LESS: - glgsg_cat.debug(false) << "GL_LESS, "; + glgsg_cat.debug(false) << "GL_LESS, "; break; case GL_EQUAL: - glgsg_cat.debug(false) << "GL_EQUAL, "; + glgsg_cat.debug(false) << "GL_EQUAL, "; break; case GL_LEQUAL: - glgsg_cat.debug(false) << "GL_LEQUAL, "; + glgsg_cat.debug(false) << "GL_LEQUAL, "; break; case GL_GREATER: - glgsg_cat.debug(false) << "GL_GREATER, "; + glgsg_cat.debug(false) << "GL_GREATER, "; break; case GL_NOTEQUAL: - glgsg_cat.debug(false) << "GL_NOTEQUAL, "; + glgsg_cat.debug(false) << "GL_NOTEQUAL, "; break; case GL_GEQUAL: - glgsg_cat.debug(false) << "GL_GEQUAL, "; + glgsg_cat.debug(false) << "GL_GEQUAL, "; break; case GL_ALWAYS: - glgsg_cat.debug(false) << "GL_ALWAYS, "; + glgsg_cat.debug(false) << "GL_ALWAYS, "; break; } glgsg_cat.debug() << ref << ")" << endl; #endif - glAlphaFunc(func, ref); + glAlphaFunc(func, ref); } } @@ -642,13 +655,13 @@ call_glPolygonMode(GLenum mode) { glgsg_cat.debug() << "glPolygonMode(GL_BACK_AND_FRONT, "; switch (mode) { case GL_POINT: - glgsg_cat.debug(false) << "GL_POINT)" << endl; + glgsg_cat.debug(false) << "GL_POINT)" << endl; break; case GL_LINE: - glgsg_cat.debug(false) << "GL_LINE)" << endl; + glgsg_cat.debug(false) << "GL_LINE)" << endl; break; case GL_FILL: - glgsg_cat.debug(false) << "GL_FILL)" << endl; + glgsg_cat.debug(false) << "GL_FILL)" << endl; break; } #endif @@ -672,11 +685,11 @@ set_pack_alignment(GLint alignment) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::set_unpack_alignment // Access: -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: set_unpack_alignment(GLint alignment) { - if (_unpack_alignment != alignment) { + if (_unpack_alignment != alignment) { glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); _unpack_alignment = alignment; } @@ -689,7 +702,7 @@ set_unpack_alignment(GLint alignment) { //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: enable_multisample(bool val) { - if (_multisample_enabled != val) { + if (_multisample_enabled != val) { _multisample_enabled = val; if (val) { #ifdef GL_MULTISAMPLE_SGIS @@ -712,7 +725,7 @@ enable_multisample(bool val) { //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: enable_line_smooth(bool val) { - if (_line_smooth_enabled != val) { + if (_line_smooth_enabled != val) { _line_smooth_enabled = val; if (val) { glEnable(GL_LINE_SMOOTH); @@ -730,7 +743,7 @@ enable_line_smooth(bool val) { //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: enable_point_smooth(bool val) { - if (_point_smooth_enabled != val) { + if (_point_smooth_enabled != val) { _point_smooth_enabled = val; if (val) { glEnable(GL_POINT_SMOOTH); @@ -749,7 +762,7 @@ enable_point_smooth(bool val) { //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: enable_lighting(bool val) { - if (_lighting_enabled != val) { + if (_lighting_enabled != val) { _lighting_enabled = val; if (val) { #ifdef GSG_VERBOSE @@ -826,7 +839,7 @@ enable_stencil_test(bool val) { INLINE GLenum GLGraphicsStateGuardian::get_light_id(int index) const { switch( index ) - { + { case 0: return GL_LIGHT0; case 1: return GL_LIGHT1; case 2: return GL_LIGHT2; @@ -903,7 +916,7 @@ INLINE void GLGraphicsStateGuardian::enable_light(int light, bool val) //////////////////////////////////////////////////////////////////// INLINE void GLGraphicsStateGuardian:: enable_texturing(bool val) { - if (_texturing_enabled != val) { + if (_texturing_enabled != val) { _texturing_enabled = val; if (val) { #ifdef GSG_VERBOSE diff --git a/panda/src/glgsg/glGraphicsStateGuardian.cxx b/panda/src/glgsg/glGraphicsStateGuardian.cxx index 541857b560..3b1eb1c89a 100644 --- a/panda/src/glgsg/glGraphicsStateGuardian.cxx +++ b/panda/src/glgsg/glGraphicsStateGuardian.cxx @@ -1,6 +1,19 @@ // Filename: glGraphicsStateGuardian.cxx // Created by: drose (02Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glGraphicsStateGuardian.h" @@ -134,7 +147,7 @@ issue_transformed_color_gl(const Geom *geom, Geom::ColorIterator &citerator, // scaled and offsetted. LPoint3f temp(color[0], color[1], color[2]); temp = temp * glgsg->get_current_color_mat(); - float alpha = (color[3] * glgsg->get_current_alpha_scale()) + + float alpha = (color[3] * glgsg->get_current_alpha_scale()) + glgsg->get_current_alpha_offset(); Colorf transformed(temp[0], temp[1], temp[2], alpha); @@ -148,20 +161,20 @@ issue_transformed_color_gl(const Geom *geom, Geom::ColorIterator &citerator, //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GLGraphicsStateGuardian:: GLGraphicsStateGuardian(GraphicsWindow *win) : GraphicsStateGuardian(win) { _light_info = (LightInfo *)NULL; _clip_plane_enabled = (bool *)NULL; _cur_clip_plane_enabled = (bool *)NULL; - + // Create a default RenderTraverser. if (gl_cull_traversal) { - _render_traverser = + _render_traverser = new CullTraverser(this, RenderRelation::get_class_type()); } else { - _render_traverser = + _render_traverser = new DirectRenderTraverser(this, RenderRelation::get_class_type()); } @@ -171,7 +184,7 @@ GLGraphicsStateGuardian(GraphicsWindow *win) : GraphicsStateGuardian(win) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GLGraphicsStateGuardian:: ~GLGraphicsStateGuardian() { @@ -215,15 +228,15 @@ reset() { // Set up our clear values to invalid values, so the glClear* calls // will be made initially. - _clear_color_red = -1.0f; + _clear_color_red = -1.0f; _clear_color_green = -1.0f; - _clear_color_blue = -1.0f; + _clear_color_blue = -1.0f; _clear_color_alpha = -1.0f; _clear_depth = -1.0f; _clear_stencil = -1; _clear_accum_red = -1.0f; _clear_accum_green = -1.0f; - _clear_accum_blue = -1.0f; + _clear_accum_blue = -1.0f; _clear_accum_alpha = -1.0f; // Set up the specific state values to GL's known initial values. @@ -330,7 +343,7 @@ reset() { } // use per-vertex fog if per-pixel fog requires SW renderer - glHint(GL_FOG_HINT,GL_DONT_CARE); + glHint(GL_FOG_HINT,GL_DONT_CARE); } @@ -444,9 +457,9 @@ prepare_display_region() { GLint y = GLint(b); GLsizei width = GLsizei(w); GLsizei height = GLsizei(h); - + enable_scissor( true ); - call_glScissor( x, y, width, height ); + call_glScissor( x, y, width, height ); call_glViewport( x, y, width, height ); } } @@ -464,7 +477,7 @@ void GLGraphicsStateGuardian:: render_frame(const AllAttributesWrapper &initial_state) { #ifdef GSG_VERBOSE glgsg_cat.debug() - << "begin frame " << ClockObject::get_global_clock()->get_frame_count() + << "begin frame " << ClockObject::get_global_clock()->get_frame_count() << " --------------------------------------------" << endl; #endif @@ -489,7 +502,7 @@ render_frame(const AllAttributesWrapper &initial_state) { if (_clear_buffer_type != 0) { // First, clear the entire window. - PT(DisplayRegion) win_dr = + PT(DisplayRegion) win_dr = _win->make_scratch_display_region(_win->get_width(), _win->get_height()); nassertv(win_dr != (DisplayRegion*)NULL); DisplayRegionStack old_dr = push_display_region(win_dr); @@ -515,7 +528,7 @@ render_frame(const AllAttributesWrapper &initial_state) { Camera *cam = dr->get_camera(); // For each display region, render from the camera's view. - if (dr->is_active() && cam != (Camera *)NULL && + if (dr->is_active() && cam != (Camera *)NULL && cam->is_active() && cam->get_scene() != (Node *)NULL) { DisplayRegionStack old_dr = push_display_region(dr); prepare_display_region(); @@ -536,19 +549,19 @@ render_frame(const AllAttributesWrapper &initial_state) { // Let's turn off all the lights we had on, and clear the light // cache--to force the lights to be reissued next frame, in case // their parameters or positions have changed between frames. - + for (int i = 0; i < _max_lights; i++) { enable_light(i, false); _light_info[i]._light = (Light *)NULL; } - + // Also force the lighting state to unlit, so that issue_light() // will be guaranteed to be called next frame even if we have the // same set of light pointers we had this frame. NodeAttributes state; state.set_attribute(LightTransition::get_class_type(), new LightAttribute); set_state(state, false); - + // All this work to undo the lighting state each frame doesn't seem // ideal--there may be a better way. Maybe if the lights were just // more aware of whether their parameters or positions have changed @@ -582,7 +595,7 @@ render_scene(Node *root, ProjectionNode *projnode, #ifdef GSG_VERBOSE _pass_number = 0; glgsg_cat.debug() - << "begin scene - - - - - - - - - - - - - - - - - - - - - - - - -" + << "begin scene - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif _current_root_node = root; @@ -592,7 +605,7 @@ render_scene(Node *root, ProjectionNode *projnode, #ifdef GSG_VERBOSE glgsg_cat.debug() - << "done scene - - - - - - - - - - - - - - - - - - - - - - - - -" + << "done scene - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif } @@ -626,7 +639,7 @@ render_subgraph(RenderTraverser *traverser, // a coordinate system. Sigh. In order to implement a Z-up // coordinate system, we'll store the Z-up conversion in the // modelview matrix. - LMatrix4f projection_mat = + LMatrix4f projection_mat = projnode->get_projection()->get_projection_mat(CS_yup_right); _current_projection_mat = projection_mat; @@ -648,7 +661,7 @@ render_subgraph(RenderTraverser *traverser, if (_coordinate_system != CS_yup_right) { // Now we build the coordinate system conversion into the // modelview matrix (as described in the paragraph above). - modelview_mat = modelview_mat * + modelview_mat = modelview_mat * LMatrix4f::convert_mat(_coordinate_system, CS_yup_right); } @@ -684,23 +697,23 @@ render_subgraph(RenderTraverser *traverser, // render process. //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: -render_subgraph(RenderTraverser *traverser, Node *subgraph, +render_subgraph(RenderTraverser *traverser, Node *subgraph, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans) { #ifdef GSG_VERBOSE glgsg_cat.debug() - << "begin subgraph (pass " << ++_pass_number + << "begin subgraph (pass " << ++_pass_number << ") - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif // activate(); - + nassertv(traverser != (RenderTraverser *)NULL); traverser->traverse(subgraph, initial_state, net_trans); #ifdef GSG_VERBOSE glgsg_cat.debug() - << "end subgraph (pass " << _pass_number - << ") - - - - - - - - - - - - - - - - - - - - - - - - -" + << "end subgraph (pass " << _pass_number + << ") - - - - - - - - - - - - - - - - - - - - - - - - -" << endl; #endif } @@ -708,7 +721,7 @@ render_subgraph(RenderTraverser *traverser, Node *subgraph, //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_point // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_point(const GeomPoint *geom) { @@ -744,7 +757,7 @@ draw_point(const GeomPoint *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - issuer.issue_normal(G_OVERALL, ni); + issuer.issue_normal(G_OVERALL, ni); glBegin(GL_POINTS); @@ -752,7 +765,7 @@ draw_point(const GeomPoint *geom) { // Draw per primitive issuer.issue_color(G_PER_PRIM, ci); issuer.issue_normal(G_PER_PRIM, ni); - + // Draw per vertex, same thing. issuer.issue_color(G_PER_VERTEX, ci); issuer.issue_normal(G_PER_VERTEX, ni); @@ -767,19 +780,19 @@ draw_point(const GeomPoint *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_line // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_line(const GeomLine* geom) { // activate(); - + #ifdef GSG_VERBOSE glgsg_cat.debug() << "draw_line()" << endl; #endif _vertices_other_pcollector.add_level(geom->get_num_vertices()); - + call_glLineWidth(geom->get_width()); - + int nprims = geom->get_num_prims(); Geom::VertexIterator vi = geom->make_vertex_iterator(); Geom::ColorIterator ci = geom->make_color_iterator(); @@ -807,7 +820,7 @@ draw_line(const GeomLine* geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - + glBegin(GL_LINES); for (int i = 0; i < nprims; i++) { @@ -876,7 +889,7 @@ draw_linestrip(const GeomLinestrip* geom) { int num_verts = *(plen++); nassertv(num_verts >= 2); - + glBegin(GL_LINE_STRIP); // Per-component attributes for the first line segment? @@ -911,7 +924,7 @@ draw_linestrip(const GeomLinestrip* geom) { //////////////////////////////////////////////////////////////////// // this class exists because an alpha sort is necessary for correct -// sprite rendering, and we can't simply sort the vertex arrays as +// sprite rendering, and we can't simply sort the vertex arrays as // each vertex may or may not have corresponding information in the // x/y texel-world-ratio and rotation arrays. class WrappedSprite { @@ -925,7 +938,7 @@ public: // this struct exists because the STL can sort faster than i can. struct draw_sprite_vertex_less { - INLINE bool operator ()(const WrappedSprite& v0, + INLINE bool operator ()(const WrappedSprite& v0, const WrappedSprite& v1) const { return v0._v[2] < v1._v[2]; } }; @@ -937,12 +950,12 @@ draw_sprite(const GeomSprite *geom) { // of sprites all facing the screen. Performing the billboard math // for ~1000 sprites is way too slow. Ideally, we want one // matrix transformation that will handle everything, and this is - // just about what ends up happening. We're getting the front-facing + // just about what ends up happening. We're getting the front-facing // effect by setting up a new frustum (of the same z-depth as the // current one) that is very small in x and y. This way regularly // rendered triangles that might not be EXACTLY facing the camera // will certainly look close enough. Then, we transform to camera-space - // by hand and apply the inverse frustum to the transformed point. + // by hand and apply the inverse frustum to the transformed point. // For some cracked out reason, this actually works. #ifdef GSG_VERBOSE @@ -1003,7 +1016,7 @@ draw_sprite(const GeomSprite *geom) { glLoadIdentity(); glFrustum(-1.0f, 1.0f, -1.0f, 1.0f, tnear, tfar); #endif - + // load up our own matrices glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -1133,7 +1146,7 @@ draw_sprite(const GeomSprite *geom) { // notice that alphas may be screwy. It's ok though, because this is fast. // if you want accuracy, use billboards and take the speed hit. if (alpha) { - sort(cameraspace_vector.begin(), cameraspace_vector.end(), + sort(cameraspace_vector.begin(), cameraspace_vector.end(), draw_sprite_vertex_less()); } @@ -1214,7 +1227,7 @@ draw_sprite(const GeomSprite *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_polygon // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_polygon(const GeomPolygon *geom) { @@ -1249,7 +1262,7 @@ draw_polygon(const GeomPolygon *geom) { // If we have per-vertex colors or normals, we need smooth shading. // Otherwise we want flat shading for performance reasons. - if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || + if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || (geom->get_binding(G_NORMAL) == G_PER_VERTEX && wants_normals())) { call_glShadeModel(GL_SMOOTH); } else { @@ -1258,7 +1271,7 @@ draw_polygon(const GeomPolygon *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - issuer.issue_normal(G_OVERALL, ni); + issuer.issue_normal(G_OVERALL, ni); for (int i = 0; i < nprims; i++) { // Draw per primitive @@ -1287,7 +1300,7 @@ draw_polygon(const GeomPolygon *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_tri // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_tri(const GeomTri *geom) { @@ -1321,7 +1334,7 @@ draw_tri(const GeomTri *geom) { // If we have per-vertex colors or normals, we need smooth shading. // Otherwise we want flat shading for performance reasons. - if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || + if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || (geom->get_binding(G_NORMAL) == G_PER_VERTEX && wants_normals())) { call_glShadeModel(GL_SMOOTH); } else { @@ -1330,15 +1343,15 @@ draw_tri(const GeomTri *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - issuer.issue_normal(G_OVERALL, ni); - + issuer.issue_normal(G_OVERALL, ni); + glBegin(GL_TRIANGLES); - + for (int i = 0; i < nprims; i++) { // Draw per primitive issuer.issue_color(G_PER_PRIM, ci); issuer.issue_normal(G_PER_PRIM, ni); - + for (int j = 0; j < 3; j++) { // Draw per vertex issuer.issue_color(G_PER_VERTEX, ci); @@ -1355,7 +1368,7 @@ draw_tri(const GeomTri *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_quad // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_quad(const GeomQuad *geom) { @@ -1389,7 +1402,7 @@ draw_quad(const GeomQuad *geom) { // If we have per-vertex colors or normals, we need smooth shading. // Otherwise we want flat shading for performance reasons. - if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || + if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || (geom->get_binding(G_NORMAL) == G_PER_VERTEX && wants_normals())) { call_glShadeModel(GL_SMOOTH); } else { @@ -1398,15 +1411,15 @@ draw_quad(const GeomQuad *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - issuer.issue_normal(G_OVERALL, ni); - + issuer.issue_normal(G_OVERALL, ni); + glBegin(GL_QUADS); - + for (int i = 0; i < nprims; i++) { // Draw per primitive issuer.issue_color(G_PER_PRIM, ci); issuer.issue_normal(G_PER_PRIM, ni); - + for (int j = 0; j < 4; j++) { // Draw per vertex issuer.issue_color(G_PER_VERTEX, ci); @@ -1423,7 +1436,7 @@ draw_quad(const GeomQuad *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_tristrip // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_tristrip(const GeomTristrip *geom) { @@ -1458,7 +1471,7 @@ draw_tristrip(const GeomTristrip *geom) { // If we have per-vertex colors or normals, we need smooth shading. // Otherwise we want flat shading for performance reasons. - if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || + if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || (geom->get_binding(G_NORMAL) == G_PER_VERTEX && wants_normals())) { call_glShadeModel(GL_SMOOTH); } else { @@ -1467,7 +1480,7 @@ draw_tristrip(const GeomTristrip *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - issuer.issue_normal(G_OVERALL, ni); + issuer.issue_normal(G_OVERALL, ni); for (int i = 0; i < nprims; i++) { // Draw per primitive @@ -1482,7 +1495,7 @@ draw_tristrip(const GeomTristrip *geom) { // Per-component attributes for the first triangle? issuer.issue_color(G_PER_COMPONENT, ci); issuer.issue_normal(G_PER_COMPONENT, ni); - + // Draw the first three vertices. int v; for (v = 0; v < 3; v++) { @@ -1491,14 +1504,14 @@ draw_tristrip(const GeomTristrip *geom) { issuer.issue_texcoord(G_PER_VERTEX, ti); issuer.issue_vertex(G_PER_VERTEX, vi); } - + // Now draw each of the remaining vertices. Each vertex from // this point on defines a new triangle. for (v = 3; v < num_verts; v++) { // Per-component attributes? issuer.issue_color(G_PER_COMPONENT, ci); issuer.issue_normal(G_PER_COMPONENT, ni); - + // Per-vertex attributes. issuer.issue_color(G_PER_VERTEX, ci); issuer.issue_normal(G_PER_VERTEX, ni); @@ -1513,7 +1526,7 @@ draw_tristrip(const GeomTristrip *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_trifan // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_trifan(const GeomTrifan *geom) { @@ -1548,7 +1561,7 @@ draw_trifan(const GeomTrifan *geom) { // If we have per-vertex colors or normals, we need smooth shading. // Otherwise we want flat shading for performance reasons. - if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || + if ((geom->get_binding(G_COLOR) == G_PER_VERTEX && wants_colors()) || (geom->get_binding(G_NORMAL) == G_PER_VERTEX && wants_normals())) { call_glShadeModel(GL_SMOOTH); } else { @@ -1572,7 +1585,7 @@ draw_trifan(const GeomTrifan *geom) { // Per-component attributes for the first triangle? issuer.issue_color(G_PER_COMPONENT, ci); issuer.issue_normal(G_PER_COMPONENT, ni); - + // Draw the first three vertices. int v; for (v = 0; v < 3; v++) { @@ -1604,17 +1617,17 @@ draw_trifan(const GeomTrifan *geom) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_sphere(const GeomSphere *geom) { // activate(); - + #ifdef GSG_VERBOSE glgsg_cat.debug() << "draw_sphere()" << endl; #endif _vertices_other_pcollector.add_level(geom->get_num_vertices()); - + int nprims = geom->get_num_prims(); Geom::VertexIterator vi = geom->make_vertex_iterator(); Geom::ColorIterator ci = geom->make_color_iterator(); @@ -1642,7 +1655,7 @@ draw_sphere(const GeomSphere *geom) { // Draw overall issuer.issue_color(G_OVERALL, ci); - + GLUquadricObj *sph = gluNewQuadric(); gluQuadricNormals(sph, wants_normals() ? (GLenum)GLU_SMOOTH : (GLenum)GLU_NONE); gluQuadricTexture(sph, wants_texcoords() ? (GLenum)GL_TRUE : (GLenum)GL_FALSE); @@ -1709,7 +1722,7 @@ prepare_texture(Texture *tex) { // which shouldn't be possible, since the texture itself should // detect this. nassertr(inserted, NULL); - + report_errors(); return gtc; } @@ -1809,7 +1822,7 @@ copy_texture(TextureContext *tc, const DisplayRegion *dr) { bind_texture(tc); - glCopyTexImage2D( GL_TEXTURE_2D, tex->get_level(), + glCopyTexImage2D( GL_TEXTURE_2D, tex->get_level(), get_internal_image_format(pb->get_format()), pb->get_xorg(), pb->get_yorg(), pb->get_xsize(), pb->get_ysize(), pb->get_border() ); @@ -1830,7 +1843,7 @@ copy_texture(TextureContext *tc, const DisplayRegion *dr, const RenderBuffer &rb //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_texture(TextureContext *tc, const DisplayRegion *dr) { @@ -1854,7 +1867,7 @@ draw_texture(TextureContext *tc, const DisplayRegion *dr) { TextureApplyAttribute *taa = new TextureApplyAttribute; taa->set_mode(TextureApplyProperty::M_decal); - state.set_attribute(LightTransition::get_class_type(), + state.set_attribute(LightTransition::get_class_type(), new LightAttribute); state.set_attribute(ColorMaskTransition::get_class_type(), new ColorMaskAttribute); @@ -1909,7 +1922,7 @@ draw_texture(TextureContext *tc, const DisplayRegion *dr) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_texture(TextureContext *tc, const DisplayRegion *dr, const RenderBuffer &rb) { @@ -1951,13 +1964,13 @@ texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb) { // Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: -texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb, +texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb, const DisplayRegion *dr) { nassertv(tc != NULL && pb != NULL && dr != NULL); // activate(); Texture *tex = tc->_texture; - + // Do a deep copy to initialize the pixel buffer pb->copy(tex->_pbuffer); @@ -1976,7 +1989,7 @@ texture_to_pixel_buffer(TextureContext *tc, PixelBuffer *pb, //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::copy_pixel_buffer // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { @@ -1990,7 +2003,7 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { // for glReadPixels() to work // NOTE: reading the depth buffer is *much* slower than reading the // color buffer - state.set_attribute(TextureTransition::get_class_type(), + state.set_attribute(TextureTransition::get_class_type(), new TextureAttribute); set_state(state, false); @@ -2003,28 +2016,28 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { << ", " << pb->get_xsize() << ", " << pb->get_ysize() << ", "; switch (get_external_image_format(pb->get_format())) { - case GL_DEPTH_COMPONENT: - glgsg_cat.debug(false) << "GL_DEPTH_COMPONENT, "; + case GL_DEPTH_COMPONENT: + glgsg_cat.debug(false) << "GL_DEPTH_COMPONENT, "; break; case GL_RGB: glgsg_cat.debug(false) << "GL_RGB, "; break; case GL_RGBA: - glgsg_cat.debug(false) << "GL_RGBA, "; + glgsg_cat.debug(false) << "GL_RGBA, "; break; - default: - glgsg_cat.debug(false) << "unknown, "; + default: + glgsg_cat.debug(false) << "unknown, "; break; } switch (get_image_type(pb->get_image_type())) { - case GL_UNSIGNED_BYTE: + case GL_UNSIGNED_BYTE: glgsg_cat.debug(false) << "GL_UNSIGNED_BYTE, "; break; - case GL_FLOAT: - glgsg_cat.debug(false) << "GL_FLOAT, "; + case GL_FLOAT: + glgsg_cat.debug(false) << "GL_FLOAT, "; break; - default: - glgsg_cat.debug(false) << "unknown, "; + default: + glgsg_cat.debug(false) << "unknown, "; break; } glgsg_cat.debug(false) @@ -2033,8 +2046,8 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { // pixelbuffer "origin" represents upper left screen point at which // pixelbuffer should be drawn using draw_pixel_buffer - glReadPixels(pb->get_xorg() + xo, pb->get_yorg() + yo, - pb->get_xsize(), pb->get_ysize(), + glReadPixels(pb->get_xorg() + xo, pb->get_yorg() + yo, + pb->get_xsize(), pb->get_ysize(), get_external_image_format(pb->get_format()), get_image_type(pb->get_image_type()), pb->_image.p() ); @@ -2049,7 +2062,7 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr) { // Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: -copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, +copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, const RenderBuffer &rb) { // activate(); set_read_buffer(rb); @@ -2059,7 +2072,7 @@ copy_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::draw_pixel_buffer // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, @@ -2072,19 +2085,19 @@ draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, prepare_display_region(); NodeAttributes state(na); - state.set_attribute(LightTransition::get_class_type(), + state.set_attribute(LightTransition::get_class_type(), new LightAttribute); - state.set_attribute(TextureTransition::get_class_type(), + state.set_attribute(TextureTransition::get_class_type(), new TextureAttribute); - state.set_attribute(TransformTransition::get_class_type(), + state.set_attribute(TransformTransition::get_class_type(), new TransformAttribute); - //state.set_attribute(ColorBlendTransition::get_class_type(), + //state.set_attribute(ColorBlendTransition::get_class_type(), // new ColorBlendAttribute); - state.set_attribute(StencilTransition::get_class_type(), + state.set_attribute(StencilTransition::get_class_type(), new StencilAttribute); switch (pb->get_format()) { - case PixelBuffer::F_depth_component: + case PixelBuffer::F_depth_component: { ColorMaskAttribute *cma = new ColorMaskAttribute; cma->set_mask(0); @@ -2097,7 +2110,7 @@ draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, state.set_attribute(DepthWriteTransition::get_class_type(), dwa); } break; - + case PixelBuffer::F_rgb: case PixelBuffer::F_rgb5: case PixelBuffer::F_rgb8: @@ -2140,28 +2153,28 @@ draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, << "glDrawPixels(" << pb->get_xsize() << ", " << pb->get_ysize() << ", "; switch (get_external_image_format(pb->get_format())) { - case GL_DEPTH_COMPONENT: - glgsg_cat.debug(false) << "GL_DEPTH_COMPONENT, "; - break; + case GL_DEPTH_COMPONENT: + glgsg_cat.debug(false) << "GL_DEPTH_COMPONENT, "; + break; case GL_RGB: - glgsg_cat.debug(false) << "GL_RGB, "; + glgsg_cat.debug(false) << "GL_RGB, "; break; - case GL_RGBA: - glgsg_cat.debug(false) << "GL_RGBA, "; + case GL_RGBA: + glgsg_cat.debug(false) << "GL_RGBA, "; break; - default: + default: glgsg_cat.debug(false) << "unknown, "; break; } switch (get_image_type(pb->get_image_type())) { - case GL_UNSIGNED_BYTE: - glgsg_cat.debug(false) << "GL_UNSIGNED_BYTE, "; + case GL_UNSIGNED_BYTE: + glgsg_cat.debug(false) << "GL_UNSIGNED_BYTE, "; break; case GL_FLOAT: glgsg_cat.debug(false) << "GL_FLOAT, "; break; - default: - glgsg_cat.debug(false) << "unknown, "; + default: + glgsg_cat.debug(false) << "unknown, "; break; } glgsg_cat.debug(false) @@ -2169,11 +2182,11 @@ draw_pixel_buffer(PixelBuffer *pb, const DisplayRegion *dr, #endif glRasterPos2i( pb->get_xorg(), pb->get_yorg() ); - glDrawPixels( pb->get_xsize(), pb->get_ysize(), + glDrawPixels( pb->get_xsize(), pb->get_ysize(), get_external_image_format(pb->get_format()), get_image_type(pb->get_image_type()), pb->_image.p() ); - + glMatrixMode( GL_PROJECTION ); glPopMatrix(); @@ -2205,7 +2218,7 @@ void GLGraphicsStateGuardian::apply_material(const Material *material) { glMaterialfv(face, GL_SPECULAR, material->get_specular().get_data()); glMaterialfv(face, GL_EMISSION, material->get_emission().get_data()); glMaterialf(face, GL_SHININESS, material->get_shininess()); - + if (material->has_ambient() && material->has_diffuse()) { // The material has both an ambient and diffuse specified. This // means we do not need glMaterialColor(). @@ -2233,7 +2246,7 @@ void GLGraphicsStateGuardian::apply_material(const Material *material) { glColorMaterial(face, GL_AMBIENT_AND_DIFFUSE); glEnable(GL_COLOR_MATERIAL); } - + call_glLightModelLocal(material->get_local()); call_glLightModelTwoSide(material->get_twoside()); report_errors(); @@ -2353,9 +2366,9 @@ void GLGraphicsStateGuardian::apply_light( DirectionalLight* light ) glLightfv(id, GL_DIFFUSE, light->get_color().get_data()); glLightfv(id, GL_SPECULAR, light->get_specular().get_data()); - // Position needs to specify x, y, z, and w + // Position needs to specify x, y, z, and w // w == 0 implies light is at infinity - LPoint3f dir = get_rel_forward( light, _current_projection_node, + LPoint3f dir = get_rel_forward( light, _current_projection_node, _coordinate_system ); LPoint4f pos( -dir[0], -dir[1], -dir[2], 0 ); glLightfv( id, GL_POSITION, pos.get_data() ); @@ -2417,17 +2430,17 @@ void GLGraphicsStateGuardian::apply_light( Spotlight* light ) LPoint4f fpos( pos[0], pos[1], pos[2], 1 ); glLightfv( id, GL_POSITION, fpos.get_data() ); - glLightfv( id, GL_SPOT_DIRECTION, + glLightfv( id, GL_SPOT_DIRECTION, get_rel_forward( light, _current_projection_node, _coordinate_system ).get_data() ); glLightf( id, GL_SPOT_EXPONENT, light->get_exponent() ); - glLightf( id, GL_SPOT_CUTOFF, + glLightf( id, GL_SPOT_CUTOFF, light->get_cutoff_angle() ); - glLightf( id, GL_CONSTANT_ATTENUATION, + glLightf( id, GL_CONSTANT_ATTENUATION, light->get_constant_attenuation() ); - glLightf( id, GL_LINEAR_ATTENUATION, + glLightf( id, GL_LINEAR_ATTENUATION, light->get_linear_attenuation() ); - glLightf( id, GL_QUADRATIC_ATTENUATION, + glLightf( id, GL_QUADRATIC_ATTENUATION, light->get_quadratic_attenuation() ); glPopMatrix(); @@ -2451,7 +2464,7 @@ void GLGraphicsStateGuardian::apply_light( AmbientLight* ) //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_transform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: issue_transform(const TransformAttribute *attrib) { @@ -2471,12 +2484,12 @@ issue_transform(const TransformAttribute *attrib) { enable_texturing(false); glBegin(GL_LINES); - + // X axis in red glColor3f(1.0f, 0.0f, 0.0f); glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(1.0f, 0.0f, 0.0f); - + // Y axis in green glColor3f(0.0f, 1.0f, 0.0f); glVertex3f(0.0f, 0.0f, 0.0f); @@ -2486,7 +2499,7 @@ issue_transform(const TransformAttribute *attrib) { glColor3f(0.0f, 0.0f, 1.0f); glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(0.0f, 0.0f, 1.0f); - + glEnd(); enable_lighting(lighting_was_enabled); enable_texturing(texturing_was_enabled); @@ -2498,7 +2511,7 @@ issue_transform(const TransformAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_color_transform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: issue_color_transform(const ColorMatrixAttribute *attrib) { @@ -2515,7 +2528,7 @@ issue_color_transform(const ColorMatrixAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_alpha_transform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: issue_alpha_transform(const AlphaTransformAttribute *attrib) { @@ -2533,7 +2546,7 @@ issue_alpha_transform(const AlphaTransformAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_matrix // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: issue_tex_matrix(const TexMatrixAttribute *attrib) { @@ -2550,7 +2563,7 @@ issue_tex_matrix(const TexMatrixAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_color // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: issue_color(const ColorAttribute *attrib) { @@ -2565,7 +2578,7 @@ issue_color(const ColorAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: issue_texture(const TextureAttribute *attrib) { @@ -2617,7 +2630,7 @@ issue_tex_gen(const TexGenAttribute *attrib) { glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); } break; - + case TexGenProperty::M_sphere_map: glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); @@ -2626,7 +2639,7 @@ issue_tex_gen(const TexGenAttribute *attrib) { glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); break; - + default: glgsg_cat.error() << "Unknown texgen mode " << (int)mode << endl; @@ -2674,7 +2687,7 @@ issue_fog(const FogAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::issue_render_mode // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: issue_render_mode(const RenderModeAttribute *attrib) { @@ -2686,7 +2699,7 @@ issue_render_mode(const RenderModeAttribute *attrib) { case RenderModeProperty::M_filled: call_glPolygonMode(GL_FILL); break; - + case RenderModeProperty::M_wireframe: // Make sure line width is back to default (1 pixel) call_glLineWidth(attrib->get_line_width()); @@ -2729,7 +2742,7 @@ void GLGraphicsStateGuardian::issue_light(const LightAttribute *attrib ) if (light->get_light_type() == AmbientLight::get_class_type()) { // Ambient lights don't require specific light ids; simply add // in the ambient contribution to the current total - cur_ambient_light += light->get_color(); + cur_ambient_light += light->get_color(); } else { // Check to see if this light has already been bound to an id @@ -2744,8 +2757,8 @@ void GLGraphicsStateGuardian::issue_light(const LightAttribute *attrib ) break; } } - - // See if there are any unbound light ids + + // See if there are any unbound light ids if (_cur_light_id == -1) { for (i = 0; i < _max_lights; i++) { if (_light_info[i]._light == (Light *)NULL) { @@ -2755,16 +2768,16 @@ void GLGraphicsStateGuardian::issue_light(const LightAttribute *attrib ) } } } - + // If there were no unbound light ids, see if we can replace - // a currently unused but previously bound id + // a currently unused but previously bound id if (_cur_light_id == -1) { for (i = 0; i < _max_lights; i++) { if (attrib->is_off(_light_info[i]._light)) { _light_info[i]._light = light; _cur_light_id = i; break; - } + } } } @@ -2889,7 +2902,7 @@ issue_depth_test(const DepthTestAttribute *attrib) { void GLGraphicsStateGuardian:: issue_depth_write(const DepthWriteAttribute *attrib) { // activate(); - + call_glDepthMask(attrib->is_on()); report_errors(); } @@ -2974,7 +2987,7 @@ issue_clip_plane(const ClipPlaneAttribute *attrib) _cur_clip_plane_id = -1; num_enabled++; - + // Check to see if this clip plane has already been bound to an id for (i = 0; i < _max_clip_planes; i++) { if (_available_clip_plane_ids[i] == plane_node) { @@ -2997,7 +3010,7 @@ issue_clip_plane(const ClipPlaneAttribute *attrib) } } } - + // If there were no unbound clip plane ids, see if we can replace // a currently unused but previously bound id if (_cur_clip_plane_id == -1) { @@ -3009,7 +3022,7 @@ issue_clip_plane(const ClipPlaneAttribute *attrib) } } } - + if (_cur_clip_plane_id >= 0) { enable_clip_plane(_cur_clip_plane_id, true); _cur_clip_plane_enabled[_cur_clip_plane_id] = true; @@ -3031,7 +3044,7 @@ issue_clip_plane(const ClipPlaneAttribute *attrib) } } - // Disable all unused clip planes + // Disable all unused clip planes for (i = 0; i < _max_clip_planes; i++) { if (_cur_clip_plane_enabled[i] == false) enable_clip_plane(i, false); @@ -3058,7 +3071,7 @@ issue_transparency(const TransparencyAttribute *attrib ) enable_blend(false); enable_alpha_test(false); break; - case TransparencyProperty::M_alpha: + case TransparencyProperty::M_alpha: case TransparencyProperty::M_alpha_sorted: // Should we really have an "alpha" and an "alpha_sorted" mode, // like Performer does? (The difference is that "alpha" is with @@ -3159,7 +3172,7 @@ issue_polygon_offset(const PolygonOffsetAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::wants_normals // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool GLGraphicsStateGuardian:: wants_normals() const { @@ -3169,7 +3182,7 @@ wants_normals() const { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::wants_texcoords // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool GLGraphicsStateGuardian:: wants_texcoords() const { @@ -3183,7 +3196,7 @@ wants_texcoords() const { // commands, false otherwise. //////////////////////////////////////////////////////////////////// bool GLGraphicsStateGuardian:: -wants_colors() const { +wants_colors() const { // If we have scene graph color enabled, return false to indicate we // shouldn't bother issuing geometry color commands. @@ -3221,7 +3234,7 @@ begin_decal(GeomNode *base_geom) { // Just draw the base geometry normally. base_geom->draw(this); -#if 0 +#if 0 // Note: code below does not work since state engine resets PolygonOffsetAttrib // before decal geom is rendered @@ -3242,14 +3255,14 @@ begin_decal(GeomNode *base_geom) { if (_decal_level > 1) { // If we're already decaling, just draw the geometry. base_geom->draw(this); - + } else { // Turn off writing the depth buffer to render the base geometry. call_glDepthMask(false); - + // Now render the base geometry. base_geom->draw(this); - + // Render all of the decal geometry, too. We'll keep the depth // buffer write off during this. } @@ -3326,9 +3339,9 @@ end_decal(GeomNode *base_geom) { // No need to have texturing on for this. enable_texturing(false); - + base_geom->draw(this); - + // Finally, restore the depth write and color mask states to the // way they're supposed to be. DepthWriteAttribute *depth_write; @@ -3350,7 +3363,7 @@ end_decal(GeomNode *base_geom) { glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } } - + enable_texturing(was_textured); } } @@ -3407,35 +3420,35 @@ set_draw_buffer(const RenderBuffer &rb) { case RenderBuffer::T_front: call_glDrawBuffer(GL_FRONT); break; - + case RenderBuffer::T_back: call_glDrawBuffer(GL_BACK); break; - + case RenderBuffer::T_right: call_glDrawBuffer(GL_RIGHT); break; - + case RenderBuffer::T_left: call_glDrawBuffer(GL_LEFT); break; - + case RenderBuffer::T_front_right: call_glDrawBuffer(GL_FRONT_RIGHT); break; - + case RenderBuffer::T_front_left: call_glDrawBuffer(GL_FRONT_LEFT); break; - + case RenderBuffer::T_back_right: call_glDrawBuffer(GL_BACK_RIGHT); break; - + case RenderBuffer::T_back_left: call_glDrawBuffer(GL_BACK_LEFT); break; - + default: call_glDrawBuffer(GL_FRONT_AND_BACK); } @@ -3456,35 +3469,35 @@ set_read_buffer(const RenderBuffer &rb) { case RenderBuffer::T_front: call_glReadBuffer(GL_FRONT); break; - + case RenderBuffer::T_back: call_glReadBuffer(GL_BACK); break; - + case RenderBuffer::T_right: call_glReadBuffer(GL_RIGHT); break; - + case RenderBuffer::T_left: call_glReadBuffer(GL_LEFT); break; - + case RenderBuffer::T_front_right: call_glReadBuffer(GL_FRONT_RIGHT); break; - + case RenderBuffer::T_front_left: call_glReadBuffer(GL_FRONT_LEFT); break; - + case RenderBuffer::T_back_right: call_glReadBuffer(GL_BACK_RIGHT); break; - + case RenderBuffer::T_back_left: call_glReadBuffer(GL_BACK_LEFT); break; - + default: call_glReadBuffer(GL_FRONT_AND_BACK); } @@ -3495,7 +3508,7 @@ set_read_buffer(const RenderBuffer &rb) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::bind_texture // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: bind_texture(TextureContext *tc) { @@ -3515,22 +3528,22 @@ bind_texture(TextureContext *tc) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::specify_texture // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: specify_texture(Texture *tex) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, get_texture_wrap_mode(tex->get_wrapu())); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, get_texture_wrap_mode(tex->get_wrapv())); if (gl_force_mipmaps) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, get_texture_filter_type(tex->get_minfilter())); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, get_texture_filter_type(tex->get_magfilter())); @@ -3542,7 +3555,7 @@ specify_texture(Texture *tex) { //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::apply_texture_immediate // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GLGraphicsStateGuardian:: apply_texture_immediate(Texture *tex) { @@ -3802,7 +3815,7 @@ get_texture_apply_mode_type( TextureApplyProperty::Mode am ) const //////////////////////////////////////////////////////////////////// // Function: GLGraphicsStateGuardian::get_depth_func_type // Access: Protected -// Description: Maps from the depth func modes to gl version +// Description: Maps from the depth func modes to gl version //////////////////////////////////////////////////////////////////// GLenum GLGraphicsStateGuardian:: get_depth_func_type(DepthTestProperty::Mode m) const @@ -3894,7 +3907,7 @@ get_fog_mode_type(Fog::Mode m) const { } //////////////////////////////////////////////////////////////////// -// Function: GLGraphicsStateGuardian::print_gfx_visual +// Function: GLGraphicsStateGuardian::print_gfx_visual // Access: Public // Description: Prints a description of the current visual selected. //////////////////////////////////////////////////////////////////// @@ -3924,13 +3937,13 @@ print_gfx_visual() { glGetIntegerv( GL_ALPHA_BITS, &i ); cout << "Alpha: " << i << endl; glGetIntegerv( GL_STENCIL_BITS, &i ); cout << "Stencil: " << i << endl; - glGetBooleanv( GL_DOUBLEBUFFER, &j ); cout << "DoubleBuffer? " + glGetBooleanv( GL_DOUBLEBUFFER, &j ); cout << "DoubleBuffer? " << (int)j << endl; glGetBooleanv( GL_STEREO, &j ); cout << "Stereo? " << (int)j << endl; #ifdef GL_MULTISAMPLE_SGIS - glGetBooleanv( GL_MULTISAMPLE_SGIS, &j ); cout << "Multisample? " + glGetBooleanv( GL_MULTISAMPLE_SGIS, &j ); cout << "Multisample? " << (int)j << endl; #endif #ifdef GL_SAMPLES_SGIS @@ -3938,9 +3951,9 @@ print_gfx_visual() { #endif glGetBooleanv( GL_BLEND, &j ); cout << "Blend? " << (int)j << endl; - glGetBooleanv( GL_POINT_SMOOTH, &j ); cout << "Point Smooth? " + glGetBooleanv( GL_POINT_SMOOTH, &j ); cout << "Point Smooth? " << (int)j << endl; - glGetBooleanv( GL_LINE_SMOOTH, &j ); cout << "Line Smooth? " + glGetBooleanv( GL_LINE_SMOOTH, &j ); cout << "Line Smooth? " << (int)j << endl; glGetIntegerv( GL_AUX_BUFFERS, &i ); cout << "Aux Buffers: " << i << endl; @@ -3985,7 +3998,7 @@ save_frame_buffer(const RenderBuffer &buffer, if (buffer._buffer_type & RenderBuffer::T_depth) { // Save the depth buffer. - sfb->_depth = + sfb->_depth = new PixelBuffer(PixelBuffer::depth_buffer(dr->get_pixel_width(), dr->get_pixel_height())); copy_pixel_buffer(sfb->_depth, dr, buffer); @@ -4037,7 +4050,7 @@ build_phony_mipmaps(Texture *tex) { int xsize = pb->get_xsize(); int ysize = pb->get_ysize(); - glgsg_cat.info() + glgsg_cat.info() << "Building phony mipmap levels for " << tex->get_name() << "\n"; int level = 0; while (xsize > 0 && ysize > 0) { @@ -4119,7 +4132,7 @@ build_phony_mipmap_level(int level, int xsize, int ysize) { glgsg_cat.info(false) << " " << filename << " cannot be read, making solid color mipmap.\n"; image_sized.fill(level_colors[level][0], - level_colors[level][1], + level_colors[level][1], level_colors[level][2]); } @@ -4178,7 +4191,7 @@ dump_state(void) int i; ostream &dump = glgsg_cat.debug(false); glgsg_cat.debug() << "Dumping GL State" << endl; - + dump << "\t\t" << "GL_LINE_SMOOTH " << _line_smooth_enabled << " " << (bool)glIsEnabled(GL_LINE_SMOOTH) << "\n"; dump << "\t\t" << "GL_POINT_SMOOTH " << _point_smooth_enabled << " " << (bool)glIsEnabled(GL_POINT_SMOOTH) << "\n"; dump << "\t\t" << "GL_LIGHTING " << _lighting_enabled << " " << (bool)glIsEnabled(GL_LIGHTING) << "\n"; @@ -4200,7 +4213,7 @@ dump_state(void) dump << "\t\t" << "GL_FOG " << _fog_enabled << " " << (bool)glIsEnabled(GL_FOG) << "\n"; dump << "\t\t" << "GL_ALPHA_TEST " << _alpha_test_enabled << " " << (bool)glIsEnabled(GL_ALPHA_TEST) << "\n"; dump << "\t\t" << "GL_POLYGON_OFFSET_FILL " << _polygon_offset_enabled << " " << (bool)glIsEnabled(GL_POLYGON_OFFSET_FILL) << "\n"; - + dump << endl; } } @@ -4222,1171 +4235,1171 @@ dump_state(void) // debugging. ostream &output_gl_enum(ostream &out, GLenum v) { switch (v) { - case GL_FALSE: + case GL_FALSE: return out << "GL_FALSE"; - case GL_TRUE: + case GL_TRUE: return out << "GL_TRUE"; - + /* Data types */ - case GL_BYTE: + case GL_BYTE: return out << "GL_BYTE"; - case GL_UNSIGNED_BYTE: + case GL_UNSIGNED_BYTE: return out << "GL_UNSIGNED_BYTE"; - case GL_SHORT: + case GL_SHORT: return out << "GL_SHORT"; - case GL_UNSIGNED_SHORT: + case GL_UNSIGNED_SHORT: return out << "GL_UNSIGNED_SHORT"; - case GL_INT: + case GL_INT: return out << "GL_INT"; - case GL_UNSIGNED_INT: + case GL_UNSIGNED_INT: return out << "GL_UNSIGNED_INT"; - case GL_FLOAT: + case GL_FLOAT: return out << "GL_FLOAT"; - case GL_DOUBLE: + case GL_DOUBLE: return out << "GL_DOUBLE"; - case GL_2_BYTES: + case GL_2_BYTES: return out << "GL_2_BYTES"; - case GL_3_BYTES: + case GL_3_BYTES: return out << "GL_3_BYTES"; - case GL_4_BYTES: + case GL_4_BYTES: return out << "GL_4_BYTES"; /* Primitives */ /* - case GL_LINES: + case GL_LINES: return out << "GL_LINES"; - case GL_POINTS: + case GL_POINTS: return out << "GL_POINTS"; */ - case GL_LINE_STRIP: + case GL_LINE_STRIP: return out << "GL_LINE_STRIP"; - case GL_LINE_LOOP: + case GL_LINE_LOOP: return out << "GL_LINE_LOOP"; - case GL_TRIANGLES: + case GL_TRIANGLES: return out << "GL_TRIANGLES"; - case GL_TRIANGLE_STRIP: + case GL_TRIANGLE_STRIP: return out << "GL_TRIANGLE_STRIP"; - case GL_TRIANGLE_FAN: + case GL_TRIANGLE_FAN: return out << "GL_TRIANGLE_FAN"; - case GL_QUADS: + case GL_QUADS: return out << "GL_QUADS"; - case GL_QUAD_STRIP: + case GL_QUAD_STRIP: return out << "GL_QUAD_STRIP"; - case GL_POLYGON: + case GL_POLYGON: return out << "GL_POLYGON"; - case GL_EDGE_FLAG: + case GL_EDGE_FLAG: return out << "GL_EDGE_FLAG"; /* Vertex Arrays */ - case GL_VERTEX_ARRAY: + case GL_VERTEX_ARRAY: return out << "GL_VERTEX_ARRAY"; - case GL_NORMAL_ARRAY: + case GL_NORMAL_ARRAY: return out << "GL_NORMAL_ARRAY"; - case GL_COLOR_ARRAY: + case GL_COLOR_ARRAY: return out << "GL_COLOR_ARRAY"; - case GL_INDEX_ARRAY: + case GL_INDEX_ARRAY: return out << "GL_INDEX_ARRAY"; - case GL_TEXTURE_COORD_ARRAY: + case GL_TEXTURE_COORD_ARRAY: return out << "GL_TEXTURE_COORD_ARRAY"; - case GL_EDGE_FLAG_ARRAY: + case GL_EDGE_FLAG_ARRAY: return out << "GL_EDGE_FLAG_ARRAY"; - case GL_VERTEX_ARRAY_SIZE: + case GL_VERTEX_ARRAY_SIZE: return out << "GL_VERTEX_ARRAY_SIZE"; - case GL_VERTEX_ARRAY_TYPE: + case GL_VERTEX_ARRAY_TYPE: return out << "GL_VERTEX_ARRAY_TYPE"; - case GL_VERTEX_ARRAY_STRIDE: + case GL_VERTEX_ARRAY_STRIDE: return out << "GL_VERTEX_ARRAY_STRIDE"; - case GL_NORMAL_ARRAY_TYPE: + case GL_NORMAL_ARRAY_TYPE: return out << "GL_NORMAL_ARRAY_TYPE"; - case GL_NORMAL_ARRAY_STRIDE: + case GL_NORMAL_ARRAY_STRIDE: return out << "GL_NORMAL_ARRAY_STRIDE"; - case GL_COLOR_ARRAY_SIZE: + case GL_COLOR_ARRAY_SIZE: return out << "GL_COLOR_ARRAY_SIZE"; - case GL_COLOR_ARRAY_TYPE: + case GL_COLOR_ARRAY_TYPE: return out << "GL_COLOR_ARRAY_TYPE"; - case GL_COLOR_ARRAY_STRIDE: + case GL_COLOR_ARRAY_STRIDE: return out << "GL_COLOR_ARRAY_STRIDE"; - case GL_INDEX_ARRAY_TYPE: + case GL_INDEX_ARRAY_TYPE: return out << "GL_INDEX_ARRAY_TYPE"; - case GL_INDEX_ARRAY_STRIDE: + case GL_INDEX_ARRAY_STRIDE: return out << "GL_INDEX_ARRAY_STRIDE"; - case GL_TEXTURE_COORD_ARRAY_SIZE: + case GL_TEXTURE_COORD_ARRAY_SIZE: return out << "GL_TEXTURE_COORD_ARRAY_SIZE"; - case GL_TEXTURE_COORD_ARRAY_TYPE: + case GL_TEXTURE_COORD_ARRAY_TYPE: return out << "GL_TEXTURE_COORD_ARRAY_TYPE"; - case GL_TEXTURE_COORD_ARRAY_STRIDE: + case GL_TEXTURE_COORD_ARRAY_STRIDE: return out << "GL_TEXTURE_COORD_ARRAY_STRIDE"; - case GL_EDGE_FLAG_ARRAY_STRIDE: + case GL_EDGE_FLAG_ARRAY_STRIDE: return out << "GL_EDGE_FLAG_ARRAY_STRIDE"; - case GL_VERTEX_ARRAY_POINTER: + case GL_VERTEX_ARRAY_POINTER: return out << "GL_VERTEX_ARRAY_POINTER"; - case GL_NORMAL_ARRAY_POINTER: + case GL_NORMAL_ARRAY_POINTER: return out << "GL_NORMAL_ARRAY_POINTER"; - case GL_COLOR_ARRAY_POINTER: + case GL_COLOR_ARRAY_POINTER: return out << "GL_COLOR_ARRAY_POINTER"; - case GL_INDEX_ARRAY_POINTER: + case GL_INDEX_ARRAY_POINTER: return out << "GL_INDEX_ARRAY_POINTER"; - case GL_TEXTURE_COORD_ARRAY_POINTER: + case GL_TEXTURE_COORD_ARRAY_POINTER: return out << "GL_TEXTURE_COORD_ARRAY_POINTER"; - case GL_EDGE_FLAG_ARRAY_POINTER: + case GL_EDGE_FLAG_ARRAY_POINTER: return out << "GL_EDGE_FLAG_ARRAY_POINTER"; - case GL_V2F: + case GL_V2F: return out << "GL_V2F"; - case GL_V3F: + case GL_V3F: return out << "GL_V3F"; - case GL_C4UB_V2F: + case GL_C4UB_V2F: return out << "GL_C4UB_V2F"; - case GL_C4UB_V3F: + case GL_C4UB_V3F: return out << "GL_C4UB_V3F"; - case GL_C3F_V3F: + case GL_C3F_V3F: return out << "GL_C3F_V3F"; - case GL_N3F_V3F: + case GL_N3F_V3F: return out << "GL_N3F_V3F"; - case GL_C4F_N3F_V3F: + case GL_C4F_N3F_V3F: return out << "GL_C4F_N3F_V3F"; - case GL_T2F_V3F: + case GL_T2F_V3F: return out << "GL_T2F_V3F"; - case GL_T4F_V4F: + case GL_T4F_V4F: return out << "GL_T4F_V4F"; - case GL_T2F_C4UB_V3F: + case GL_T2F_C4UB_V3F: return out << "GL_T2F_C4UB_V3F"; - case GL_T2F_C3F_V3F: + case GL_T2F_C3F_V3F: return out << "GL_T2F_C3F_V3F"; - case GL_T2F_N3F_V3F: + case GL_T2F_N3F_V3F: return out << "GL_T2F_N3F_V3F"; - case GL_T2F_C4F_N3F_V3F: + case GL_T2F_C4F_N3F_V3F: return out << "GL_T2F_C4F_N3F_V3F"; - case GL_T4F_C4F_N3F_V4F: + case GL_T4F_C4F_N3F_V4F: return out << "GL_T4F_C4F_N3F_V4F"; /* Matrix Mode */ - case GL_MATRIX_MODE: + case GL_MATRIX_MODE: return out << "GL_MATRIX_MODE"; - case GL_MODELVIEW: + case GL_MODELVIEW: return out << "GL_MODELVIEW"; - case GL_PROJECTION: + case GL_PROJECTION: return out << "GL_PROJECTION"; - case GL_TEXTURE: + case GL_TEXTURE: return out << "GL_TEXTURE"; /* Points */ - case GL_POINT_SMOOTH: + case GL_POINT_SMOOTH: return out << "GL_POINT_SMOOTH"; - case GL_POINT_SIZE: + case GL_POINT_SIZE: return out << "GL_POINT_SIZE"; - case GL_POINT_SIZE_GRANULARITY: + case GL_POINT_SIZE_GRANULARITY: return out << "GL_POINT_SIZE_GRANULARITY"; - case GL_POINT_SIZE_RANGE: + case GL_POINT_SIZE_RANGE: return out << "GL_POINT_SIZE_RANGE"; /* Lines */ - case GL_LINE_SMOOTH: + case GL_LINE_SMOOTH: return out << "GL_LINE_SMOOTH"; - case GL_LINE_STIPPLE: + case GL_LINE_STIPPLE: return out << "GL_LINE_STIPPLE"; - case GL_LINE_STIPPLE_PATTERN: + case GL_LINE_STIPPLE_PATTERN: return out << "GL_LINE_STIPPLE_PATTERN"; - case GL_LINE_STIPPLE_REPEAT: + case GL_LINE_STIPPLE_REPEAT: return out << "GL_LINE_STIPPLE_REPEAT"; - case GL_LINE_WIDTH: + case GL_LINE_WIDTH: return out << "GL_LINE_WIDTH"; - case GL_LINE_WIDTH_GRANULARITY: + case GL_LINE_WIDTH_GRANULARITY: return out << "GL_LINE_WIDTH_GRANULARITY"; - case GL_LINE_WIDTH_RANGE: + case GL_LINE_WIDTH_RANGE: return out << "GL_LINE_WIDTH_RANGE"; /* Polygons */ - case GL_POINT: + case GL_POINT: return out << "GL_POINT"; - case GL_LINE: + case GL_LINE: return out << "GL_LINE"; - case GL_FILL: + case GL_FILL: return out << "GL_FILL"; - case GL_CCW: + case GL_CCW: return out << "GL_CCW"; - case GL_CW: + case GL_CW: return out << "GL_CW"; - case GL_FRONT: + case GL_FRONT: return out << "GL_FRONT"; - case GL_BACK: + case GL_BACK: return out << "GL_BACK"; - case GL_CULL_FACE: + case GL_CULL_FACE: return out << "GL_CULL_FACE"; - case GL_CULL_FACE_MODE: + case GL_CULL_FACE_MODE: return out << "GL_CULL_FACE_MODE"; - case GL_POLYGON_SMOOTH: + case GL_POLYGON_SMOOTH: return out << "GL_POLYGON_SMOOTH"; - case GL_POLYGON_STIPPLE: + case GL_POLYGON_STIPPLE: return out << "GL_POLYGON_STIPPLE"; - case GL_FRONT_FACE: + case GL_FRONT_FACE: return out << "GL_FRONT_FACE"; - case GL_POLYGON_MODE: + case GL_POLYGON_MODE: return out << "GL_POLYGON_MODE"; - case GL_POLYGON_OFFSET_FACTOR: + case GL_POLYGON_OFFSET_FACTOR: return out << "GL_POLYGON_OFFSET_FACTOR"; - case GL_POLYGON_OFFSET_UNITS: + case GL_POLYGON_OFFSET_UNITS: return out << "GL_POLYGON_OFFSET_UNITS"; - case GL_POLYGON_OFFSET_POINT: + case GL_POLYGON_OFFSET_POINT: return out << "GL_POLYGON_OFFSET_POINT"; - case GL_POLYGON_OFFSET_LINE: + case GL_POLYGON_OFFSET_LINE: return out << "GL_POLYGON_OFFSET_LINE"; - case GL_POLYGON_OFFSET_FILL: + case GL_POLYGON_OFFSET_FILL: return out << "GL_POLYGON_OFFSET_FILL"; /* Display Lists */ - case GL_COMPILE: + case GL_COMPILE: return out << "GL_COMPILE"; - case GL_COMPILE_AND_EXECUTE: + case GL_COMPILE_AND_EXECUTE: return out << "GL_COMPILE_AND_EXECUTE"; - case GL_LIST_BASE: + case GL_LIST_BASE: return out << "GL_LIST_BASE"; - case GL_LIST_INDEX: + case GL_LIST_INDEX: return out << "GL_LIST_INDEX"; - case GL_LIST_MODE: + case GL_LIST_MODE: return out << "GL_LIST_MODE"; /* Depth buffer */ - case GL_NEVER: + case GL_NEVER: return out << "GL_NEVER"; - case GL_LESS: + case GL_LESS: return out << "GL_LESS"; - case GL_GEQUAL: + case GL_GEQUAL: return out << "GL_GEQUAL"; - case GL_LEQUAL: + case GL_LEQUAL: return out << "GL_LEQUAL"; - case GL_GREATER: + case GL_GREATER: return out << "GL_GREATER"; - case GL_NOTEQUAL: + case GL_NOTEQUAL: return out << "GL_NOTEQUAL"; - case GL_EQUAL: + case GL_EQUAL: return out << "GL_EQUAL"; - case GL_ALWAYS: + case GL_ALWAYS: return out << "GL_ALWAYS"; - case GL_DEPTH_TEST: + case GL_DEPTH_TEST: return out << "GL_DEPTH_TEST"; - case GL_DEPTH_BITS: + case GL_DEPTH_BITS: return out << "GL_DEPTH_BITS"; - case GL_DEPTH_CLEAR_VALUE: + case GL_DEPTH_CLEAR_VALUE: return out << "GL_DEPTH_CLEAR_VALUE"; - case GL_DEPTH_FUNC: + case GL_DEPTH_FUNC: return out << "GL_DEPTH_FUNC"; - case GL_DEPTH_RANGE: + case GL_DEPTH_RANGE: return out << "GL_DEPTH_RANGE"; - case GL_DEPTH_WRITEMASK: + case GL_DEPTH_WRITEMASK: return out << "GL_DEPTH_WRITEMASK"; - case GL_DEPTH_COMPONENT: + case GL_DEPTH_COMPONENT: return out << "GL_DEPTH_COMPONENT"; /* Lighting */ - case GL_LIGHTING: + case GL_LIGHTING: return out << "GL_LIGHTING"; - case GL_LIGHT0: + case GL_LIGHT0: return out << "GL_LIGHT0"; - case GL_LIGHT1: + case GL_LIGHT1: return out << "GL_LIGHT1"; - case GL_LIGHT2: + case GL_LIGHT2: return out << "GL_LIGHT2"; - case GL_LIGHT3: + case GL_LIGHT3: return out << "GL_LIGHT3"; - case GL_LIGHT4: + case GL_LIGHT4: return out << "GL_LIGHT4"; - case GL_LIGHT5: + case GL_LIGHT5: return out << "GL_LIGHT5"; - case GL_LIGHT6: + case GL_LIGHT6: return out << "GL_LIGHT6"; - case GL_LIGHT7: + case GL_LIGHT7: return out << "GL_LIGHT7"; - case GL_SPOT_EXPONENT: + case GL_SPOT_EXPONENT: return out << "GL_SPOT_EXPONENT"; - case GL_SPOT_CUTOFF: + case GL_SPOT_CUTOFF: return out << "GL_SPOT_CUTOFF"; - case GL_CONSTANT_ATTENUATION: + case GL_CONSTANT_ATTENUATION: return out << "GL_CONSTANT_ATTENUATION"; - case GL_LINEAR_ATTENUATION: + case GL_LINEAR_ATTENUATION: return out << "GL_LINEAR_ATTENUATION"; - case GL_QUADRATIC_ATTENUATION: + case GL_QUADRATIC_ATTENUATION: return out << "GL_QUADRATIC_ATTENUATION"; - case GL_AMBIENT: + case GL_AMBIENT: return out << "GL_AMBIENT"; - case GL_DIFFUSE: + case GL_DIFFUSE: return out << "GL_DIFFUSE"; - case GL_SPECULAR: + case GL_SPECULAR: return out << "GL_SPECULAR"; - case GL_SHININESS: + case GL_SHININESS: return out << "GL_SHININESS"; - case GL_EMISSION: + case GL_EMISSION: return out << "GL_EMISSION"; - case GL_POSITION: + case GL_POSITION: return out << "GL_POSITION"; - case GL_SPOT_DIRECTION: + case GL_SPOT_DIRECTION: return out << "GL_SPOT_DIRECTION"; - case GL_AMBIENT_AND_DIFFUSE: + case GL_AMBIENT_AND_DIFFUSE: return out << "GL_AMBIENT_AND_DIFFUSE"; - case GL_COLOR_INDEXES: + case GL_COLOR_INDEXES: return out << "GL_COLOR_INDEXES"; - case GL_LIGHT_MODEL_TWO_SIDE: + case GL_LIGHT_MODEL_TWO_SIDE: return out << "GL_LIGHT_MODEL_TWO_SIDE"; - case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_LOCAL_VIEWER: return out << "GL_LIGHT_MODEL_LOCAL_VIEWER"; - case GL_LIGHT_MODEL_AMBIENT: + case GL_LIGHT_MODEL_AMBIENT: return out << "GL_LIGHT_MODEL_AMBIENT"; - case GL_FRONT_AND_BACK: + case GL_FRONT_AND_BACK: return out << "GL_FRONT_AND_BACK"; - case GL_SHADE_MODEL: + case GL_SHADE_MODEL: return out << "GL_SHADE_MODEL"; - case GL_FLAT: + case GL_FLAT: return out << "GL_FLAT"; - case GL_SMOOTH: + case GL_SMOOTH: return out << "GL_SMOOTH"; - case GL_COLOR_MATERIAL: + case GL_COLOR_MATERIAL: return out << "GL_COLOR_MATERIAL"; - case GL_COLOR_MATERIAL_FACE: + case GL_COLOR_MATERIAL_FACE: return out << "GL_COLOR_MATERIAL_FACE"; - case GL_COLOR_MATERIAL_PARAMETER: + case GL_COLOR_MATERIAL_PARAMETER: return out << "GL_COLOR_MATERIAL_PARAMETER"; - case GL_NORMALIZE: + case GL_NORMALIZE: return out << "GL_NORMALIZE"; /* User clipping planes */ - case GL_CLIP_PLANE0: + case GL_CLIP_PLANE0: return out << "GL_CLIP_PLANE0"; - case GL_CLIP_PLANE1: + case GL_CLIP_PLANE1: return out << "GL_CLIP_PLANE1"; - case GL_CLIP_PLANE2: + case GL_CLIP_PLANE2: return out << "GL_CLIP_PLANE2"; - case GL_CLIP_PLANE3: + case GL_CLIP_PLANE3: return out << "GL_CLIP_PLANE3"; - case GL_CLIP_PLANE4: + case GL_CLIP_PLANE4: return out << "GL_CLIP_PLANE4"; - case GL_CLIP_PLANE5: + case GL_CLIP_PLANE5: return out << "GL_CLIP_PLANE5"; /* Accumulation buffer */ - case GL_ACCUM_RED_BITS: + case GL_ACCUM_RED_BITS: return out << "GL_ACCUM_RED_BITS"; - case GL_ACCUM_GREEN_BITS: + case GL_ACCUM_GREEN_BITS: return out << "GL_ACCUM_GREEN_BITS"; - case GL_ACCUM_BLUE_BITS: + case GL_ACCUM_BLUE_BITS: return out << "GL_ACCUM_BLUE_BITS"; - case GL_ACCUM_ALPHA_BITS: + case GL_ACCUM_ALPHA_BITS: return out << "GL_ACCUM_ALPHA_BITS"; - case GL_ACCUM_CLEAR_VALUE: + case GL_ACCUM_CLEAR_VALUE: return out << "GL_ACCUM_CLEAR_VALUE"; - case GL_ACCUM: + case GL_ACCUM: return out << "GL_ACCUM"; - case GL_ADD: + case GL_ADD: return out << "GL_ADD"; - case GL_LOAD: + case GL_LOAD: return out << "GL_LOAD"; - case GL_MULT: + case GL_MULT: return out << "GL_MULT"; /* Alpha testing */ - case GL_ALPHA_TEST: + case GL_ALPHA_TEST: return out << "GL_ALPHA_TEST"; - case GL_ALPHA_TEST_REF: + case GL_ALPHA_TEST_REF: return out << "GL_ALPHA_TEST_REF"; - case GL_ALPHA_TEST_FUNC: + case GL_ALPHA_TEST_FUNC: return out << "GL_ALPHA_TEST_FUNC"; /* Blending */ - case GL_BLEND: + case GL_BLEND: return out << "GL_BLEND"; - case GL_BLEND_SRC: + case GL_BLEND_SRC: return out << "GL_BLEND_SRC"; - case GL_BLEND_DST: + case GL_BLEND_DST: return out << "GL_BLEND_DST"; /* - case GL_ZERO: + case GL_ZERO: return out << "GL_ZERO"; - case GL_ONE: + case GL_ONE: return out << "GL_ONE"; */ - case GL_SRC_COLOR: + case GL_SRC_COLOR: return out << "GL_SRC_COLOR"; - case GL_ONE_MINUS_SRC_COLOR: + case GL_ONE_MINUS_SRC_COLOR: return out << "GL_ONE_MINUS_SRC_COLOR"; - case GL_DST_COLOR: + case GL_DST_COLOR: return out << "GL_DST_COLOR"; - case GL_ONE_MINUS_DST_COLOR: + case GL_ONE_MINUS_DST_COLOR: return out << "GL_ONE_MINUS_DST_COLOR"; - case GL_SRC_ALPHA: + case GL_SRC_ALPHA: return out << "GL_SRC_ALPHA"; - case GL_ONE_MINUS_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: return out << "GL_ONE_MINUS_SRC_ALPHA"; - case GL_DST_ALPHA: + case GL_DST_ALPHA: return out << "GL_DST_ALPHA"; - case GL_ONE_MINUS_DST_ALPHA: + case GL_ONE_MINUS_DST_ALPHA: return out << "GL_ONE_MINUS_DST_ALPHA"; - case GL_SRC_ALPHA_SATURATE: + case GL_SRC_ALPHA_SATURATE: return out << "GL_SRC_ALPHA_SATURATE"; - case GL_CONSTANT_COLOR: + case GL_CONSTANT_COLOR: return out << "GL_CONSTANT_COLOR"; - case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: return out << "GL_ONE_MINUS_CONSTANT_COLOR"; - case GL_CONSTANT_ALPHA: + case GL_CONSTANT_ALPHA: return out << "GL_CONSTANT_ALPHA"; - case GL_ONE_MINUS_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: return out << "GL_ONE_MINUS_CONSTANT_ALPHA"; /* Render Mode */ - case GL_FEEDBACK: + case GL_FEEDBACK: return out << "GL_FEEDBACK"; - case GL_RENDER: + case GL_RENDER: return out << "GL_RENDER"; - case GL_SELECT: + case GL_SELECT: return out << "GL_SELECT"; /* Feedback */ - case GL_2D: + case GL_2D: return out << "GL_2D"; - case GL_3D: + case GL_3D: return out << "GL_3D"; - case GL_3D_COLOR: + case GL_3D_COLOR: return out << "GL_3D_COLOR"; - case GL_3D_COLOR_TEXTURE: + case GL_3D_COLOR_TEXTURE: return out << "GL_3D_COLOR_TEXTURE"; - case GL_4D_COLOR_TEXTURE: + case GL_4D_COLOR_TEXTURE: return out << "GL_4D_COLOR_TEXTURE"; - case GL_POINT_TOKEN: + case GL_POINT_TOKEN: return out << "GL_POINT_TOKEN"; - case GL_LINE_TOKEN: + case GL_LINE_TOKEN: return out << "GL_LINE_TOKEN"; - case GL_LINE_RESET_TOKEN: + case GL_LINE_RESET_TOKEN: return out << "GL_LINE_RESET_TOKEN"; - case GL_POLYGON_TOKEN: + case GL_POLYGON_TOKEN: return out << "GL_POLYGON_TOKEN"; - case GL_BITMAP_TOKEN: + case GL_BITMAP_TOKEN: return out << "GL_BITMAP_TOKEN"; - case GL_DRAW_PIXEL_TOKEN: + case GL_DRAW_PIXEL_TOKEN: return out << "GL_DRAW_PIXEL_TOKEN"; - case GL_COPY_PIXEL_TOKEN: + case GL_COPY_PIXEL_TOKEN: return out << "GL_COPY_PIXEL_TOKEN"; - case GL_PASS_THROUGH_TOKEN: + case GL_PASS_THROUGH_TOKEN: return out << "GL_PASS_THROUGH_TOKEN"; - case GL_FEEDBACK_BUFFER_POINTER: + case GL_FEEDBACK_BUFFER_POINTER: return out << "GL_FEEDBACK_BUFFER_POINTER"; - case GL_FEEDBACK_BUFFER_SIZE: + case GL_FEEDBACK_BUFFER_SIZE: return out << "GL_FEEDBACK_BUFFER_SIZE"; - case GL_FEEDBACK_BUFFER_TYPE: + case GL_FEEDBACK_BUFFER_TYPE: return out << "GL_FEEDBACK_BUFFER_TYPE"; /* Selection */ - case GL_SELECTION_BUFFER_POINTER: + case GL_SELECTION_BUFFER_POINTER: return out << "GL_SELECTION_BUFFER_POINTER"; - case GL_SELECTION_BUFFER_SIZE: + case GL_SELECTION_BUFFER_SIZE: return out << "GL_SELECTION_BUFFER_SIZE"; /* Fog */ - case GL_FOG: + case GL_FOG: return out << "GL_FOG"; - case GL_FOG_MODE: + case GL_FOG_MODE: return out << "GL_FOG_MODE"; - case GL_FOG_DENSITY: + case GL_FOG_DENSITY: return out << "GL_FOG_DENSITY"; - case GL_FOG_COLOR: + case GL_FOG_COLOR: return out << "GL_FOG_COLOR"; - case GL_FOG_INDEX: + case GL_FOG_INDEX: return out << "GL_FOG_INDEX"; - case GL_FOG_START: + case GL_FOG_START: return out << "GL_FOG_START"; - case GL_FOG_END: + case GL_FOG_END: return out << "GL_FOG_END"; - case GL_LINEAR: + case GL_LINEAR: return out << "GL_LINEAR"; - case GL_EXP: + case GL_EXP: return out << "GL_EXP"; - case GL_EXP2: + case GL_EXP2: return out << "GL_EXP2"; /* Logic Ops */ - case GL_LOGIC_OP: + case GL_LOGIC_OP: return out << "GL_LOGIC_OP"; /* - case GL_INDEX_LOGIC_OP: + case GL_INDEX_LOGIC_OP: return out << "GL_INDEX_LOGIC_OP"; */ - case GL_COLOR_LOGIC_OP: + case GL_COLOR_LOGIC_OP: return out << "GL_COLOR_LOGIC_OP"; - case GL_LOGIC_OP_MODE: + case GL_LOGIC_OP_MODE: return out << "GL_LOGIC_OP_MODE"; - case GL_CLEAR: + case GL_CLEAR: return out << "GL_CLEAR"; - case GL_SET: + case GL_SET: return out << "GL_SET"; - case GL_COPY: + case GL_COPY: return out << "GL_COPY"; - case GL_COPY_INVERTED: + case GL_COPY_INVERTED: return out << "GL_COPY_INVERTED"; - case GL_NOOP: + case GL_NOOP: return out << "GL_NOOP"; - case GL_INVERT: + case GL_INVERT: return out << "GL_INVERT"; - case GL_AND: + case GL_AND: return out << "GL_AND"; - case GL_NAND: + case GL_NAND: return out << "GL_NAND"; - case GL_OR: + case GL_OR: return out << "GL_OR"; - case GL_NOR: + case GL_NOR: return out << "GL_NOR"; - case GL_XOR: + case GL_XOR: return out << "GL_XOR"; - case GL_EQUIV: + case GL_EQUIV: return out << "GL_EQUIV"; - case GL_AND_REVERSE: + case GL_AND_REVERSE: return out << "GL_AND_REVERSE"; - case GL_AND_INVERTED: + case GL_AND_INVERTED: return out << "GL_AND_INVERTED"; - case GL_OR_REVERSE: + case GL_OR_REVERSE: return out << "GL_OR_REVERSE"; - case GL_OR_INVERTED: + case GL_OR_INVERTED: return out << "GL_OR_INVERTED"; /* Stencil */ - case GL_STENCIL_TEST: + case GL_STENCIL_TEST: return out << "GL_STENCIL_TEST"; - case GL_STENCIL_WRITEMASK: + case GL_STENCIL_WRITEMASK: return out << "GL_STENCIL_WRITEMASK"; - case GL_STENCIL_BITS: + case GL_STENCIL_BITS: return out << "GL_STENCIL_BITS"; - case GL_STENCIL_FUNC: + case GL_STENCIL_FUNC: return out << "GL_STENCIL_FUNC"; - case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_VALUE_MASK: return out << "GL_STENCIL_VALUE_MASK"; - case GL_STENCIL_REF: + case GL_STENCIL_REF: return out << "GL_STENCIL_REF"; - case GL_STENCIL_FAIL: + case GL_STENCIL_FAIL: return out << "GL_STENCIL_FAIL"; - case GL_STENCIL_PASS_DEPTH_PASS: + case GL_STENCIL_PASS_DEPTH_PASS: return out << "GL_STENCIL_PASS_DEPTH_PASS"; - case GL_STENCIL_PASS_DEPTH_FAIL: + case GL_STENCIL_PASS_DEPTH_FAIL: return out << "GL_STENCIL_PASS_DEPTH_FAIL"; - case GL_STENCIL_CLEAR_VALUE: + case GL_STENCIL_CLEAR_VALUE: return out << "GL_STENCIL_CLEAR_VALUE"; - case GL_STENCIL_INDEX: + case GL_STENCIL_INDEX: return out << "GL_STENCIL_INDEX"; - case GL_KEEP: + case GL_KEEP: return out << "GL_KEEP"; - case GL_REPLACE: + case GL_REPLACE: return out << "GL_REPLACE"; - case GL_INCR: + case GL_INCR: return out << "GL_INCR"; - case GL_DECR: + case GL_DECR: return out << "GL_DECR"; /* Buffers, Pixel Drawing/Reading */ /* - case GL_NONE: + case GL_NONE: return out << "GL_NONE"; */ - case GL_LEFT: + case GL_LEFT: return out << "GL_LEFT"; - case GL_RIGHT: + case GL_RIGHT: return out << "GL_RIGHT"; - case GL_FRONT_LEFT: + case GL_FRONT_LEFT: return out << "GL_FRONT_LEFT"; - case GL_FRONT_RIGHT: + case GL_FRONT_RIGHT: return out << "GL_FRONT_RIGHT"; - case GL_BACK_LEFT: + case GL_BACK_LEFT: return out << "GL_BACK_LEFT"; - case GL_BACK_RIGHT: + case GL_BACK_RIGHT: return out << "GL_BACK_RIGHT"; - case GL_AUX0: + case GL_AUX0: return out << "GL_AUX0"; - case GL_AUX1: + case GL_AUX1: return out << "GL_AUX1"; - case GL_AUX2: + case GL_AUX2: return out << "GL_AUX2"; - case GL_AUX3: + case GL_AUX3: return out << "GL_AUX3"; - case GL_COLOR_INDEX: + case GL_COLOR_INDEX: return out << "GL_COLOR_INDEX"; - case GL_RED: + case GL_RED: return out << "GL_RED"; - case GL_GREEN: + case GL_GREEN: return out << "GL_GREEN"; - case GL_BLUE: + case GL_BLUE: return out << "GL_BLUE"; - case GL_ALPHA: + case GL_ALPHA: return out << "GL_ALPHA"; - case GL_LUMINANCE: + case GL_LUMINANCE: return out << "GL_LUMINANCE"; - case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE_ALPHA: return out << "GL_LUMINANCE_ALPHA"; - case GL_ALPHA_BITS: + case GL_ALPHA_BITS: return out << "GL_ALPHA_BITS"; - case GL_RED_BITS: + case GL_RED_BITS: return out << "GL_RED_BITS"; - case GL_GREEN_BITS: + case GL_GREEN_BITS: return out << "GL_GREEN_BITS"; - case GL_BLUE_BITS: + case GL_BLUE_BITS: return out << "GL_BLUE_BITS"; - case GL_INDEX_BITS: + case GL_INDEX_BITS: return out << "GL_INDEX_BITS"; - case GL_SUBPIXEL_BITS: + case GL_SUBPIXEL_BITS: return out << "GL_SUBPIXEL_BITS"; - case GL_AUX_BUFFERS: + case GL_AUX_BUFFERS: return out << "GL_AUX_BUFFERS"; - case GL_READ_BUFFER: + case GL_READ_BUFFER: return out << "GL_READ_BUFFER"; - case GL_DRAW_BUFFER: + case GL_DRAW_BUFFER: return out << "GL_DRAW_BUFFER"; - case GL_DOUBLEBUFFER: + case GL_DOUBLEBUFFER: return out << "GL_DOUBLEBUFFER"; - case GL_STEREO: + case GL_STEREO: return out << "GL_STEREO"; - case GL_BITMAP: + case GL_BITMAP: return out << "GL_BITMAP"; - case GL_COLOR: + case GL_COLOR: return out << "GL_COLOR"; - case GL_DEPTH: + case GL_DEPTH: return out << "GL_DEPTH"; - case GL_STENCIL: + case GL_STENCIL: return out << "GL_STENCIL"; - case GL_DITHER: + case GL_DITHER: return out << "GL_DITHER"; - case GL_RGB: + case GL_RGB: return out << "GL_RGB"; - case GL_RGBA: + case GL_RGBA: return out << "GL_RGBA"; /* Implementation limits */ - case GL_MAX_LIST_NESTING: + case GL_MAX_LIST_NESTING: return out << "GL_MAX_LIST_NESTING"; - case GL_MAX_ATTRIB_STACK_DEPTH: + case GL_MAX_ATTRIB_STACK_DEPTH: return out << "GL_MAX_ATTRIB_STACK_DEPTH"; - case GL_MAX_MODELVIEW_STACK_DEPTH: + case GL_MAX_MODELVIEW_STACK_DEPTH: return out << "GL_MAX_MODELVIEW_STACK_DEPTH"; - case GL_MAX_NAME_STACK_DEPTH: + case GL_MAX_NAME_STACK_DEPTH: return out << "GL_MAX_NAME_STACK_DEPTH"; - case GL_MAX_PROJECTION_STACK_DEPTH: + case GL_MAX_PROJECTION_STACK_DEPTH: return out << "GL_MAX_PROJECTION_STACK_DEPTH"; - case GL_MAX_TEXTURE_STACK_DEPTH: + case GL_MAX_TEXTURE_STACK_DEPTH: return out << "GL_MAX_TEXTURE_STACK_DEPTH"; - case GL_MAX_EVAL_ORDER: + case GL_MAX_EVAL_ORDER: return out << "GL_MAX_EVAL_ORDER"; - case GL_MAX_LIGHTS: + case GL_MAX_LIGHTS: return out << "GL_MAX_LIGHTS"; - case GL_MAX_CLIP_PLANES: + case GL_MAX_CLIP_PLANES: return out << "GL_MAX_CLIP_PLANES"; - case GL_MAX_TEXTURE_SIZE: + case GL_MAX_TEXTURE_SIZE: return out << "GL_MAX_TEXTURE_SIZE"; - case GL_MAX_PIXEL_MAP_TABLE: + case GL_MAX_PIXEL_MAP_TABLE: return out << "GL_MAX_PIXEL_MAP_TABLE"; - case GL_MAX_VIEWPORT_DIMS: + case GL_MAX_VIEWPORT_DIMS: return out << "GL_MAX_VIEWPORT_DIMS"; - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: + case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: return out << "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH"; /* Gets */ - case GL_ATTRIB_STACK_DEPTH: + case GL_ATTRIB_STACK_DEPTH: return out << "GL_ATTRIB_STACK_DEPTH"; - case GL_CLIENT_ATTRIB_STACK_DEPTH: + case GL_CLIENT_ATTRIB_STACK_DEPTH: return out << "GL_CLIENT_ATTRIB_STACK_DEPTH"; - case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_CLEAR_VALUE: return out << "GL_COLOR_CLEAR_VALUE"; - case GL_COLOR_WRITEMASK: + case GL_COLOR_WRITEMASK: return out << "GL_COLOR_WRITEMASK"; - case GL_CURRENT_INDEX: + case GL_CURRENT_INDEX: return out << "GL_CURRENT_INDEX"; - case GL_CURRENT_COLOR: + case GL_CURRENT_COLOR: return out << "GL_CURRENT_COLOR"; - case GL_CURRENT_NORMAL: + case GL_CURRENT_NORMAL: return out << "GL_CURRENT_NORMAL"; - case GL_CURRENT_RASTER_COLOR: + case GL_CURRENT_RASTER_COLOR: return out << "GL_CURRENT_RASTER_COLOR"; - case GL_CURRENT_RASTER_DISTANCE: + case GL_CURRENT_RASTER_DISTANCE: return out << "GL_CURRENT_RASTER_DISTANCE"; - case GL_CURRENT_RASTER_INDEX: + case GL_CURRENT_RASTER_INDEX: return out << "GL_CURRENT_RASTER_INDEX"; - case GL_CURRENT_RASTER_POSITION: + case GL_CURRENT_RASTER_POSITION: return out << "GL_CURRENT_RASTER_POSITION"; - case GL_CURRENT_RASTER_TEXTURE_COORDS: + case GL_CURRENT_RASTER_TEXTURE_COORDS: return out << "GL_CURRENT_RASTER_TEXTURE_COORDS"; - case GL_CURRENT_RASTER_POSITION_VALID: + case GL_CURRENT_RASTER_POSITION_VALID: return out << "GL_CURRENT_RASTER_POSITION_VALID"; - case GL_CURRENT_TEXTURE_COORDS: + case GL_CURRENT_TEXTURE_COORDS: return out << "GL_CURRENT_TEXTURE_COORDS"; - case GL_INDEX_CLEAR_VALUE: + case GL_INDEX_CLEAR_VALUE: return out << "GL_INDEX_CLEAR_VALUE"; - case GL_INDEX_MODE: + case GL_INDEX_MODE: return out << "GL_INDEX_MODE"; - case GL_INDEX_WRITEMASK: + case GL_INDEX_WRITEMASK: return out << "GL_INDEX_WRITEMASK"; - case GL_MODELVIEW_MATRIX: + case GL_MODELVIEW_MATRIX: return out << "GL_MODELVIEW_MATRIX"; - case GL_MODELVIEW_STACK_DEPTH: + case GL_MODELVIEW_STACK_DEPTH: return out << "GL_MODELVIEW_STACK_DEPTH"; - case GL_NAME_STACK_DEPTH: + case GL_NAME_STACK_DEPTH: return out << "GL_NAME_STACK_DEPTH"; - case GL_PROJECTION_MATRIX: + case GL_PROJECTION_MATRIX: return out << "GL_PROJECTION_MATRIX"; - case GL_PROJECTION_STACK_DEPTH: + case GL_PROJECTION_STACK_DEPTH: return out << "GL_PROJECTION_STACK_DEPTH"; - case GL_RENDER_MODE: + case GL_RENDER_MODE: return out << "GL_RENDER_MODE"; - case GL_RGBA_MODE: + case GL_RGBA_MODE: return out << "GL_RGBA_MODE"; - case GL_TEXTURE_MATRIX: + case GL_TEXTURE_MATRIX: return out << "GL_TEXTURE_MATRIX"; - case GL_TEXTURE_STACK_DEPTH: + case GL_TEXTURE_STACK_DEPTH: return out << "GL_TEXTURE_STACK_DEPTH"; - case GL_VIEWPORT: + case GL_VIEWPORT: return out << "GL_VIEWPORT"; /* Evaluators */ - case GL_AUTO_NORMAL: + case GL_AUTO_NORMAL: return out << "GL_AUTO_NORMAL"; - case GL_MAP1_COLOR_4: + case GL_MAP1_COLOR_4: return out << "GL_MAP1_COLOR_4"; - case GL_MAP1_GRID_DOMAIN: + case GL_MAP1_GRID_DOMAIN: return out << "GL_MAP1_GRID_DOMAIN"; - case GL_MAP1_GRID_SEGMENTS: + case GL_MAP1_GRID_SEGMENTS: return out << "GL_MAP1_GRID_SEGMENTS"; - case GL_MAP1_INDEX: + case GL_MAP1_INDEX: return out << "GL_MAP1_INDEX"; - case GL_MAP1_NORMAL: + case GL_MAP1_NORMAL: return out << "GL_MAP1_NORMAL"; - case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_1: return out << "GL_MAP1_TEXTURE_COORD_1"; - case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_2: return out << "GL_MAP1_TEXTURE_COORD_2"; - case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_3: return out << "GL_MAP1_TEXTURE_COORD_3"; - case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_TEXTURE_COORD_4: return out << "GL_MAP1_TEXTURE_COORD_4"; - case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_3: return out << "GL_MAP1_VERTEX_3"; - case GL_MAP1_VERTEX_4: + case GL_MAP1_VERTEX_4: return out << "GL_MAP1_VERTEX_4"; - case GL_MAP2_COLOR_4: + case GL_MAP2_COLOR_4: return out << "GL_MAP2_COLOR_4"; - case GL_MAP2_GRID_DOMAIN: + case GL_MAP2_GRID_DOMAIN: return out << "GL_MAP2_GRID_DOMAIN"; - case GL_MAP2_GRID_SEGMENTS: + case GL_MAP2_GRID_SEGMENTS: return out << "GL_MAP2_GRID_SEGMENTS"; - case GL_MAP2_INDEX: + case GL_MAP2_INDEX: return out << "GL_MAP2_INDEX"; - case GL_MAP2_NORMAL: + case GL_MAP2_NORMAL: return out << "GL_MAP2_NORMAL"; - case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_1: return out << "GL_MAP2_TEXTURE_COORD_1"; - case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_2: return out << "GL_MAP2_TEXTURE_COORD_2"; - case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_3: return out << "GL_MAP2_TEXTURE_COORD_3"; - case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_TEXTURE_COORD_4: return out << "GL_MAP2_TEXTURE_COORD_4"; - case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_3: return out << "GL_MAP2_VERTEX_3"; - case GL_MAP2_VERTEX_4: + case GL_MAP2_VERTEX_4: return out << "GL_MAP2_VERTEX_4"; - case GL_COEFF: + case GL_COEFF: return out << "GL_COEFF"; - case GL_DOMAIN: + case GL_DOMAIN: return out << "GL_DOMAIN"; - case GL_ORDER: + case GL_ORDER: return out << "GL_ORDER"; /* Hints */ - case GL_FOG_HINT: + case GL_FOG_HINT: return out << "GL_FOG_HINT"; - case GL_LINE_SMOOTH_HINT: + case GL_LINE_SMOOTH_HINT: return out << "GL_LINE_SMOOTH_HINT"; - case GL_PERSPECTIVE_CORRECTION_HINT: + case GL_PERSPECTIVE_CORRECTION_HINT: return out << "GL_PERSPECTIVE_CORRECTION_HINT"; - case GL_POINT_SMOOTH_HINT: + case GL_POINT_SMOOTH_HINT: return out << "GL_POINT_SMOOTH_HINT"; - case GL_POLYGON_SMOOTH_HINT: + case GL_POLYGON_SMOOTH_HINT: return out << "GL_POLYGON_SMOOTH_HINT"; - case GL_DONT_CARE: + case GL_DONT_CARE: return out << "GL_DONT_CARE"; - case GL_FASTEST: + case GL_FASTEST: return out << "GL_FASTEST"; - case GL_NICEST: + case GL_NICEST: return out << "GL_NICEST"; /* Scissor box */ - case GL_SCISSOR_TEST: + case GL_SCISSOR_TEST: return out << "GL_SCISSOR_TEST"; - case GL_SCISSOR_BOX: + case GL_SCISSOR_BOX: return out << "GL_SCISSOR_BOX"; /* Pixel Mode / Transfer */ - case GL_MAP_COLOR: + case GL_MAP_COLOR: return out << "GL_MAP_COLOR"; - case GL_MAP_STENCIL: + case GL_MAP_STENCIL: return out << "GL_MAP_STENCIL"; - case GL_INDEX_SHIFT: + case GL_INDEX_SHIFT: return out << "GL_INDEX_SHIFT"; - case GL_INDEX_OFFSET: + case GL_INDEX_OFFSET: return out << "GL_INDEX_OFFSET"; - case GL_RED_SCALE: + case GL_RED_SCALE: return out << "GL_RED_SCALE"; - case GL_RED_BIAS: + case GL_RED_BIAS: return out << "GL_RED_BIAS"; - case GL_GREEN_SCALE: + case GL_GREEN_SCALE: return out << "GL_GREEN_SCALE"; - case GL_GREEN_BIAS: + case GL_GREEN_BIAS: return out << "GL_GREEN_BIAS"; - case GL_BLUE_SCALE: + case GL_BLUE_SCALE: return out << "GL_BLUE_SCALE"; - case GL_BLUE_BIAS: + case GL_BLUE_BIAS: return out << "GL_BLUE_BIAS"; - case GL_ALPHA_SCALE: + case GL_ALPHA_SCALE: return out << "GL_ALPHA_SCALE"; - case GL_ALPHA_BIAS: + case GL_ALPHA_BIAS: return out << "GL_ALPHA_BIAS"; - case GL_DEPTH_SCALE: + case GL_DEPTH_SCALE: return out << "GL_DEPTH_SCALE"; - case GL_DEPTH_BIAS: + case GL_DEPTH_BIAS: return out << "GL_DEPTH_BIAS"; - case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_S_TO_S_SIZE: return out << "GL_PIXEL_MAP_S_TO_S_SIZE"; - case GL_PIXEL_MAP_I_TO_I_SIZE: + case GL_PIXEL_MAP_I_TO_I_SIZE: return out << "GL_PIXEL_MAP_I_TO_I_SIZE"; - case GL_PIXEL_MAP_I_TO_R_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: return out << "GL_PIXEL_MAP_I_TO_R_SIZE"; - case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_G_SIZE: return out << "GL_PIXEL_MAP_I_TO_G_SIZE"; - case GL_PIXEL_MAP_I_TO_B_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: return out << "GL_PIXEL_MAP_I_TO_B_SIZE"; - case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_I_TO_A_SIZE: return out << "GL_PIXEL_MAP_I_TO_A_SIZE"; - case GL_PIXEL_MAP_R_TO_R_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: return out << "GL_PIXEL_MAP_R_TO_R_SIZE"; - case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_G_TO_G_SIZE: return out << "GL_PIXEL_MAP_G_TO_G_SIZE"; - case GL_PIXEL_MAP_B_TO_B_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: return out << "GL_PIXEL_MAP_B_TO_B_SIZE"; - case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_PIXEL_MAP_A_TO_A_SIZE: return out << "GL_PIXEL_MAP_A_TO_A_SIZE"; - case GL_PIXEL_MAP_S_TO_S: + case GL_PIXEL_MAP_S_TO_S: return out << "GL_PIXEL_MAP_S_TO_S"; - case GL_PIXEL_MAP_I_TO_I: + case GL_PIXEL_MAP_I_TO_I: return out << "GL_PIXEL_MAP_I_TO_I"; - case GL_PIXEL_MAP_I_TO_R: + case GL_PIXEL_MAP_I_TO_R: return out << "GL_PIXEL_MAP_I_TO_R"; - case GL_PIXEL_MAP_I_TO_G: + case GL_PIXEL_MAP_I_TO_G: return out << "GL_PIXEL_MAP_I_TO_G"; - case GL_PIXEL_MAP_I_TO_B: + case GL_PIXEL_MAP_I_TO_B: return out << "GL_PIXEL_MAP_I_TO_B"; - case GL_PIXEL_MAP_I_TO_A: + case GL_PIXEL_MAP_I_TO_A: return out << "GL_PIXEL_MAP_I_TO_A"; - case GL_PIXEL_MAP_R_TO_R: + case GL_PIXEL_MAP_R_TO_R: return out << "GL_PIXEL_MAP_R_TO_R"; - case GL_PIXEL_MAP_G_TO_G: + case GL_PIXEL_MAP_G_TO_G: return out << "GL_PIXEL_MAP_G_TO_G"; - case GL_PIXEL_MAP_B_TO_B: + case GL_PIXEL_MAP_B_TO_B: return out << "GL_PIXEL_MAP_B_TO_B"; - case GL_PIXEL_MAP_A_TO_A: + case GL_PIXEL_MAP_A_TO_A: return out << "GL_PIXEL_MAP_A_TO_A"; - case GL_PACK_ALIGNMENT: + case GL_PACK_ALIGNMENT: return out << "GL_PACK_ALIGNMENT"; - case GL_PACK_LSB_FIRST: + case GL_PACK_LSB_FIRST: return out << "GL_PACK_LSB_FIRST"; - case GL_PACK_ROW_LENGTH: + case GL_PACK_ROW_LENGTH: return out << "GL_PACK_ROW_LENGTH"; - case GL_PACK_SKIP_PIXELS: + case GL_PACK_SKIP_PIXELS: return out << "GL_PACK_SKIP_PIXELS"; - case GL_PACK_SKIP_ROWS: + case GL_PACK_SKIP_ROWS: return out << "GL_PACK_SKIP_ROWS"; - case GL_PACK_SWAP_BYTES: + case GL_PACK_SWAP_BYTES: return out << "GL_PACK_SWAP_BYTES"; - case GL_UNPACK_ALIGNMENT: + case GL_UNPACK_ALIGNMENT: return out << "GL_UNPACK_ALIGNMENT"; - case GL_UNPACK_LSB_FIRST: + case GL_UNPACK_LSB_FIRST: return out << "GL_UNPACK_LSB_FIRST"; - case GL_UNPACK_ROW_LENGTH: + case GL_UNPACK_ROW_LENGTH: return out << "GL_UNPACK_ROW_LENGTH"; - case GL_UNPACK_SKIP_PIXELS: + case GL_UNPACK_SKIP_PIXELS: return out << "GL_UNPACK_SKIP_PIXELS"; - case GL_UNPACK_SKIP_ROWS: + case GL_UNPACK_SKIP_ROWS: return out << "GL_UNPACK_SKIP_ROWS"; - case GL_UNPACK_SWAP_BYTES: + case GL_UNPACK_SWAP_BYTES: return out << "GL_UNPACK_SWAP_BYTES"; - case GL_ZOOM_X: + case GL_ZOOM_X: return out << "GL_ZOOM_X"; - case GL_ZOOM_Y: + case GL_ZOOM_Y: return out << "GL_ZOOM_Y"; /* Texture mapping */ - case GL_TEXTURE_ENV: + case GL_TEXTURE_ENV: return out << "GL_TEXTURE_ENV"; - case GL_TEXTURE_ENV_MODE: + case GL_TEXTURE_ENV_MODE: return out << "GL_TEXTURE_ENV_MODE"; - case GL_TEXTURE_1D: + case GL_TEXTURE_1D: return out << "GL_TEXTURE_1D"; - case GL_TEXTURE_2D: + case GL_TEXTURE_2D: return out << "GL_TEXTURE_2D"; - case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_S: return out << "GL_TEXTURE_WRAP_S"; - case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_WRAP_T: return out << "GL_TEXTURE_WRAP_T"; - case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MAG_FILTER: return out << "GL_TEXTURE_MAG_FILTER"; - case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MIN_FILTER: return out << "GL_TEXTURE_MIN_FILTER"; - case GL_TEXTURE_ENV_COLOR: + case GL_TEXTURE_ENV_COLOR: return out << "GL_TEXTURE_ENV_COLOR"; - case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_S: return out << "GL_TEXTURE_GEN_S"; - case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_T: return out << "GL_TEXTURE_GEN_T"; - case GL_TEXTURE_GEN_MODE: + case GL_TEXTURE_GEN_MODE: return out << "GL_TEXTURE_GEN_MODE"; - case GL_TEXTURE_BORDER_COLOR: + case GL_TEXTURE_BORDER_COLOR: return out << "GL_TEXTURE_BORDER_COLOR"; - case GL_TEXTURE_WIDTH: + case GL_TEXTURE_WIDTH: return out << "GL_TEXTURE_WIDTH"; - case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_HEIGHT: return out << "GL_TEXTURE_HEIGHT"; - case GL_TEXTURE_BORDER: + case GL_TEXTURE_BORDER: return out << "GL_TEXTURE_BORDER"; - case GL_TEXTURE_COMPONENTS: + case GL_TEXTURE_COMPONENTS: return out << "GL_TEXTURE_COMPONENTS"; - case GL_TEXTURE_RED_SIZE: + case GL_TEXTURE_RED_SIZE: return out << "GL_TEXTURE_RED_SIZE"; - case GL_TEXTURE_GREEN_SIZE: + case GL_TEXTURE_GREEN_SIZE: return out << "GL_TEXTURE_GREEN_SIZE"; - case GL_TEXTURE_BLUE_SIZE: + case GL_TEXTURE_BLUE_SIZE: return out << "GL_TEXTURE_BLUE_SIZE"; - case GL_TEXTURE_ALPHA_SIZE: + case GL_TEXTURE_ALPHA_SIZE: return out << "GL_TEXTURE_ALPHA_SIZE"; - case GL_TEXTURE_LUMINANCE_SIZE: + case GL_TEXTURE_LUMINANCE_SIZE: return out << "GL_TEXTURE_LUMINANCE_SIZE"; - case GL_TEXTURE_INTENSITY_SIZE: + case GL_TEXTURE_INTENSITY_SIZE: return out << "GL_TEXTURE_INTENSITY_SIZE"; - case GL_NEAREST_MIPMAP_NEAREST: + case GL_NEAREST_MIPMAP_NEAREST: return out << "GL_NEAREST_MIPMAP_NEAREST"; - case GL_NEAREST_MIPMAP_LINEAR: + case GL_NEAREST_MIPMAP_LINEAR: return out << "GL_NEAREST_MIPMAP_LINEAR"; - case GL_LINEAR_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_NEAREST: return out << "GL_LINEAR_MIPMAP_NEAREST"; - case GL_LINEAR_MIPMAP_LINEAR: + case GL_LINEAR_MIPMAP_LINEAR: return out << "GL_LINEAR_MIPMAP_LINEAR"; - case GL_OBJECT_LINEAR: + case GL_OBJECT_LINEAR: return out << "GL_OBJECT_LINEAR"; - case GL_OBJECT_PLANE: + case GL_OBJECT_PLANE: return out << "GL_OBJECT_PLANE"; - case GL_EYE_LINEAR: + case GL_EYE_LINEAR: return out << "GL_EYE_LINEAR"; - case GL_EYE_PLANE: + case GL_EYE_PLANE: return out << "GL_EYE_PLANE"; - case GL_SPHERE_MAP: + case GL_SPHERE_MAP: return out << "GL_SPHERE_MAP"; - case GL_DECAL: + case GL_DECAL: return out << "GL_DECAL"; - case GL_MODULATE: + case GL_MODULATE: return out << "GL_MODULATE"; - case GL_NEAREST: + case GL_NEAREST: return out << "GL_NEAREST"; - case GL_REPEAT: + case GL_REPEAT: return out << "GL_REPEAT"; - case GL_CLAMP: + case GL_CLAMP: return out << "GL_CLAMP"; - case GL_S: + case GL_S: return out << "GL_S"; - case GL_T: + case GL_T: return out << "GL_T"; - case GL_R: + case GL_R: return out << "GL_R"; - case GL_Q: + case GL_Q: return out << "GL_Q"; - case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_R: return out << "GL_TEXTURE_GEN_R"; - case GL_TEXTURE_GEN_Q: + case GL_TEXTURE_GEN_Q: return out << "GL_TEXTURE_GEN_Q"; /* GL 1.1 texturing */ - case GL_PROXY_TEXTURE_1D: + case GL_PROXY_TEXTURE_1D: return out << "GL_PROXY_TEXTURE_1D"; - case GL_PROXY_TEXTURE_2D: + case GL_PROXY_TEXTURE_2D: return out << "GL_PROXY_TEXTURE_2D"; - case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_PRIORITY: return out << "GL_TEXTURE_PRIORITY"; - case GL_TEXTURE_RESIDENT: + case GL_TEXTURE_RESIDENT: return out << "GL_TEXTURE_RESIDENT"; - case GL_TEXTURE_BINDING_1D: + case GL_TEXTURE_BINDING_1D: return out << "GL_TEXTURE_BINDING_1D"; - case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_2D: return out << "GL_TEXTURE_BINDING_2D"; /* - case GL_TEXTURE_INTERNAL_FORMAT: + case GL_TEXTURE_INTERNAL_FORMAT: return out << "GL_TEXTURE_INTERNAL_FORMAT"; */ /* GL 1.2 texturing */ - case GL_PACK_SKIP_IMAGES: + case GL_PACK_SKIP_IMAGES: return out << "GL_PACK_SKIP_IMAGES"; - case GL_PACK_IMAGE_HEIGHT: + case GL_PACK_IMAGE_HEIGHT: return out << "GL_PACK_IMAGE_HEIGHT"; - case GL_UNPACK_SKIP_IMAGES: + case GL_UNPACK_SKIP_IMAGES: return out << "GL_UNPACK_SKIP_IMAGES"; - case GL_UNPACK_IMAGE_HEIGHT: + case GL_UNPACK_IMAGE_HEIGHT: return out << "GL_UNPACK_IMAGE_HEIGHT"; - case GL_TEXTURE_3D: + case GL_TEXTURE_3D: return out << "GL_TEXTURE_3D"; - case GL_PROXY_TEXTURE_3D: + case GL_PROXY_TEXTURE_3D: return out << "GL_PROXY_TEXTURE_3D"; - case GL_TEXTURE_DEPTH: + case GL_TEXTURE_DEPTH: return out << "GL_TEXTURE_DEPTH"; - case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_WRAP_R: return out << "GL_TEXTURE_WRAP_R"; - case GL_MAX_3D_TEXTURE_SIZE: + case GL_MAX_3D_TEXTURE_SIZE: return out << "GL_MAX_3D_TEXTURE_SIZE"; #ifdef GL_TEXTURE_BINDING_3D - case GL_TEXTURE_BINDING_3D: + case GL_TEXTURE_BINDING_3D: return out << "GL_TEXTURE_BINDING_3D"; #endif /* Internal texture formats (GL 1.1) */ - case GL_ALPHA4: + case GL_ALPHA4: return out << "GL_ALPHA4"; - case GL_ALPHA8: + case GL_ALPHA8: return out << "GL_ALPHA8"; - case GL_ALPHA12: + case GL_ALPHA12: return out << "GL_ALPHA12"; - case GL_ALPHA16: + case GL_ALPHA16: return out << "GL_ALPHA16"; - case GL_LUMINANCE4: + case GL_LUMINANCE4: return out << "GL_LUMINANCE4"; - case GL_LUMINANCE8: + case GL_LUMINANCE8: return out << "GL_LUMINANCE8"; - case GL_LUMINANCE12: + case GL_LUMINANCE12: return out << "GL_LUMINANCE12"; - case GL_LUMINANCE16: + case GL_LUMINANCE16: return out << "GL_LUMINANCE16"; - case GL_LUMINANCE4_ALPHA4: + case GL_LUMINANCE4_ALPHA4: return out << "GL_LUMINANCE4_ALPHA4"; - case GL_LUMINANCE6_ALPHA2: + case GL_LUMINANCE6_ALPHA2: return out << "GL_LUMINANCE6_ALPHA2"; - case GL_LUMINANCE8_ALPHA8: + case GL_LUMINANCE8_ALPHA8: return out << "GL_LUMINANCE8_ALPHA8"; - case GL_LUMINANCE12_ALPHA4: + case GL_LUMINANCE12_ALPHA4: return out << "GL_LUMINANCE12_ALPHA4"; - case GL_LUMINANCE12_ALPHA12: + case GL_LUMINANCE12_ALPHA12: return out << "GL_LUMINANCE12_ALPHA12"; - case GL_LUMINANCE16_ALPHA16: + case GL_LUMINANCE16_ALPHA16: return out << "GL_LUMINANCE16_ALPHA16"; - case GL_INTENSITY: + case GL_INTENSITY: return out << "GL_INTENSITY"; - case GL_INTENSITY4: + case GL_INTENSITY4: return out << "GL_INTENSITY4"; - case GL_INTENSITY8: + case GL_INTENSITY8: return out << "GL_INTENSITY8"; - case GL_INTENSITY12: + case GL_INTENSITY12: return out << "GL_INTENSITY12"; - case GL_INTENSITY16: + case GL_INTENSITY16: return out << "GL_INTENSITY16"; - case GL_R3_G3_B2: + case GL_R3_G3_B2: return out << "GL_R3_G3_B2"; - case GL_RGB4: + case GL_RGB4: return out << "GL_RGB4"; - case GL_RGB5: + case GL_RGB5: return out << "GL_RGB5"; - case GL_RGB8: + case GL_RGB8: return out << "GL_RGB8"; - case GL_RGB10: + case GL_RGB10: return out << "GL_RGB10"; - case GL_RGB12: + case GL_RGB12: return out << "GL_RGB12"; - case GL_RGB16: + case GL_RGB16: return out << "GL_RGB16"; - case GL_RGBA2: + case GL_RGBA2: return out << "GL_RGBA2"; - case GL_RGBA4: + case GL_RGBA4: return out << "GL_RGBA4"; - case GL_RGB5_A1: + case GL_RGB5_A1: return out << "GL_RGB5_A1"; - case GL_RGBA8: + case GL_RGBA8: return out << "GL_RGBA8"; - case GL_RGB10_A2: + case GL_RGB10_A2: return out << "GL_RGB10_A2"; - case GL_RGBA12: + case GL_RGBA12: return out << "GL_RGBA12"; - case GL_RGBA16: + case GL_RGBA16: return out << "GL_RGBA16"; /* Utility */ - case GL_VENDOR: + case GL_VENDOR: return out << "GL_VENDOR"; - case GL_RENDERER: + case GL_RENDERER: return out << "GL_RENDERER"; - case GL_VERSION: + case GL_VERSION: return out << "GL_VERSION"; - case GL_EXTENSIONS: + case GL_EXTENSIONS: return out << "GL_EXTENSIONS"; - + /* Errors */ - case GL_INVALID_VALUE: + case GL_INVALID_VALUE: return out << "GL_INVALID_VALUE"; - case GL_INVALID_ENUM: + case GL_INVALID_ENUM: return out << "GL_INVALID_ENUM"; - case GL_INVALID_OPERATION: + case GL_INVALID_OPERATION: return out << "GL_INVALID_OPERATION"; - case GL_STACK_OVERFLOW: + case GL_STACK_OVERFLOW: return out << "GL_STACK_OVERFLOW"; - case GL_STACK_UNDERFLOW: + case GL_STACK_UNDERFLOW: return out << "GL_STACK_UNDERFLOW"; - case GL_OUT_OF_MEMORY: + case GL_OUT_OF_MEMORY: return out << "GL_OUT_OF_MEMORY"; /* OpenGL 1.2 */ - case GL_RESCALE_NORMAL: + case GL_RESCALE_NORMAL: return out << "GL_RESCALE_NORMAL"; - case GL_CLAMP_TO_EDGE: + case GL_CLAMP_TO_EDGE: return out << "GL_CLAMP_TO_EDGE"; - case GL_MAX_ELEMENTS_VERTICES: + case GL_MAX_ELEMENTS_VERTICES: return out << "GL_MAX_ELEMENTS_VERTICES"; - case GL_MAX_ELEMENTS_INDICES: + case GL_MAX_ELEMENTS_INDICES: return out << "GL_MAX_ELEMENTS_INDICES"; - case GL_BGR: + case GL_BGR: return out << "GL_BGR"; - case GL_BGRA: + case GL_BGRA: return out << "GL_BGRA"; - case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_3_3_2: return out << "GL_UNSIGNED_BYTE_3_3_2"; - case GL_UNSIGNED_BYTE_2_3_3_REV: + case GL_UNSIGNED_BYTE_2_3_3_REV: return out << "GL_UNSIGNED_BYTE_2_3_3_REV"; - case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5: return out << "GL_UNSIGNED_SHORT_5_6_5"; - case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_5_6_5_REV: return out << "GL_UNSIGNED_SHORT_5_6_5_REV"; - case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4: return out << "GL_UNSIGNED_SHORT_4_4_4_4"; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: return out << "GL_UNSIGNED_SHORT_4_4_4_4_REV"; - case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_5_5_5_1: return out << "GL_UNSIGNED_SHORT_5_5_5_1"; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: return out << "GL_UNSIGNED_SHORT_1_5_5_5_REV"; - case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8: return out << "GL_UNSIGNED_INT_8_8_8_8"; - case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_8_8_8_8_REV: return out << "GL_UNSIGNED_INT_8_8_8_8_REV"; - case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_10_10_10_2: return out << "GL_UNSIGNED_INT_10_10_10_2"; - case GL_UNSIGNED_INT_2_10_10_10_REV: + case GL_UNSIGNED_INT_2_10_10_10_REV: return out << "GL_UNSIGNED_INT_2_10_10_10_REV"; - case GL_LIGHT_MODEL_COLOR_CONTROL: + case GL_LIGHT_MODEL_COLOR_CONTROL: return out << "GL_LIGHT_MODEL_COLOR_CONTROL"; - case GL_SINGLE_COLOR: + case GL_SINGLE_COLOR: return out << "GL_SINGLE_COLOR"; - case GL_SEPARATE_SPECULAR_COLOR: + case GL_SEPARATE_SPECULAR_COLOR: return out << "GL_SEPARATE_SPECULAR_COLOR"; - case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MIN_LOD: return out << "GL_TEXTURE_MIN_LOD"; - case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_MAX_LOD: return out << "GL_TEXTURE_MAX_LOD"; - case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_BASE_LEVEL: return out << "GL_TEXTURE_BASE_LEVEL"; - case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_MAX_LEVEL: return out << "GL_TEXTURE_MAX_LEVEL"; } - + return out << (int)v; } #endif diff --git a/panda/src/glgsg/glGraphicsStateGuardian.h b/panda/src/glgsg/glGraphicsStateGuardian.h index c1ae157843..d1a5952d53 100644 --- a/panda/src/glgsg/glGraphicsStateGuardian.h +++ b/panda/src/glgsg/glGraphicsStateGuardian.h @@ -2,6 +2,19 @@ // Created by: drose (02Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLGRAPHICSSTATEGUARDIAN_H #define GLGRAPHICSSTATEGUARDIAN_H @@ -65,7 +78,7 @@ public: virtual void render_frame(const AllAttributesWrapper &initial_state); virtual void render_scene(Node *root, ProjectionNode *projnode, const AllAttributesWrapper &initial_state); - virtual void render_subgraph(RenderTraverser *traverser, + virtual void render_subgraph(RenderTraverser *traverser, Node *subgraph, ProjectionNode *projnode, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans); @@ -248,7 +261,7 @@ protected: void build_phony_mipmaps(Texture *tex); void build_phony_mipmap_level(int level, int xsize, int ysize); #endif - + GLclampf _clear_color_red, _clear_color_green, _clear_color_blue, _clear_color_alpha; GLclampd _clear_depth; diff --git a/panda/src/glgsg/glSavedFrameBuffer.I b/panda/src/glgsg/glSavedFrameBuffer.I index 60f8a62dd2..923416b4f0 100644 --- a/panda/src/glgsg/glSavedFrameBuffer.I +++ b/panda/src/glgsg/glSavedFrameBuffer.I @@ -1,13 +1,26 @@ // Filename: glSavedFrameBuffer.I // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GLSavedFrameBuffer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GLSavedFrameBuffer:: GLSavedFrameBuffer(const RenderBuffer &buffer, CPT(DisplayRegion) dr) : @@ -18,7 +31,7 @@ GLSavedFrameBuffer(const RenderBuffer &buffer, CPT(DisplayRegion) dr) : //////////////////////////////////////////////////////////////////// // Function: GLSavedFrameBuffer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GLSavedFrameBuffer:: ~GLSavedFrameBuffer() { diff --git a/panda/src/glgsg/glSavedFrameBuffer.cxx b/panda/src/glgsg/glSavedFrameBuffer.cxx index 6b1a26f2b8..bf182d3566 100644 --- a/panda/src/glgsg/glSavedFrameBuffer.cxx +++ b/panda/src/glgsg/glSavedFrameBuffer.cxx @@ -1,6 +1,19 @@ // Filename: glSavedFrameBuffer.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glSavedFrameBuffer.h" diff --git a/panda/src/glgsg/glSavedFrameBuffer.h b/panda/src/glgsg/glSavedFrameBuffer.h index 3682a84fc3..8e75ff235b 100644 --- a/panda/src/glgsg/glSavedFrameBuffer.h +++ b/panda/src/glgsg/glSavedFrameBuffer.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLSAVEDFRAMEBUFFER_H #define GLSAVEDFRAMEBUFFER_H @@ -40,7 +53,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/glgsg/glTextureContext.I b/panda/src/glgsg/glTextureContext.I index a4a98ca299..d368419c45 100644 --- a/panda/src/glgsg/glTextureContext.I +++ b/panda/src/glgsg/glTextureContext.I @@ -1,18 +1,31 @@ // Filename: glTextureContext.I // Created by: drose (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GLTextureContext::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GLTextureContext:: GLTextureContext(Texture *tex) : TextureContext(tex) { _index = 0; - _priority = 0.5; // For keeping resident in texture memory + _priority = 0.5; // For keeping resident in texture memory } diff --git a/panda/src/glgsg/glTextureContext.cxx b/panda/src/glgsg/glTextureContext.cxx index acbe05e617..7e988418d7 100644 --- a/panda/src/glgsg/glTextureContext.cxx +++ b/panda/src/glgsg/glTextureContext.cxx @@ -1,6 +1,19 @@ // Filename: glTextureContext.cxx // Created by: drose (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glTextureContext.h" diff --git a/panda/src/glgsg/glTextureContext.h b/panda/src/glgsg/glTextureContext.h index b2f02d4e09..e86d427a06 100644 --- a/panda/src/glgsg/glTextureContext.h +++ b/panda/src/glgsg/glTextureContext.h @@ -2,6 +2,19 @@ // Created by: drose (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLTEXTURECONTEXT_H #define GLTEXTURECONTEXT_H @@ -45,7 +58,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/glutdisplay/config_glutdisplay.cxx b/panda/src/glutdisplay/config_glutdisplay.cxx index 15b0d96c94..1d3e36c62c 100644 --- a/panda/src/glutdisplay/config_glutdisplay.cxx +++ b/panda/src/glutdisplay/config_glutdisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_glutdisplay.cxx // Created by: cary (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_glutdisplay.h" diff --git a/panda/src/glutdisplay/config_glutdisplay.h b/panda/src/glutdisplay/config_glutdisplay.h index 0cecfc1338..35815feefc 100644 --- a/panda/src/glutdisplay/config_glutdisplay.h +++ b/panda/src/glutdisplay/config_glutdisplay.h @@ -2,6 +2,19 @@ // Created by: cary (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_GLUTDISPLAY_H #define CONFIG_GLUTDISPLAY_H diff --git a/panda/src/glutdisplay/glutGraphicsPipe.cxx b/panda/src/glutdisplay/glutGraphicsPipe.cxx index fc936e822f..d207977671 100644 --- a/panda/src/glutdisplay/glutGraphicsPipe.cxx +++ b/panda/src/glutdisplay/glutGraphicsPipe.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glutGraphicsPipe.h" #include "config_glutdisplay.h" diff --git a/panda/src/glutdisplay/glutGraphicsPipe.h b/panda/src/glutdisplay/glutGraphicsPipe.h index a23140a71d..82d7e76757 100644 --- a/panda/src/glutdisplay/glutGraphicsPipe.h +++ b/panda/src/glutdisplay/glutGraphicsPipe.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLUTGRAPHICSPIPE_H #define GLUTGRAPHICSPIPE_H // diff --git a/panda/src/glutdisplay/glutGraphicsWindow.cxx b/panda/src/glutdisplay/glutGraphicsWindow.cxx index c62690c68f..44bb67e685 100644 --- a/panda/src/glutdisplay/glutGraphicsWindow.cxx +++ b/panda/src/glutdisplay/glutGraphicsWindow.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glutGraphicsWindow.h" #include "glutGraphicsPipe.h" @@ -34,7 +43,7 @@ glutGraphicsWindow* glutGraphicsWindow::_global_window; // Access: // Description: //////////////////////////////////////////////////////////////////// -glutGraphicsWindow::glutGraphicsWindow( GraphicsPipe* pipe ) : +glutGraphicsWindow::glutGraphicsWindow( GraphicsPipe* pipe ) : GraphicsWindow( pipe ) { _global_window = this; @@ -46,7 +55,7 @@ glutGraphicsWindow::glutGraphicsWindow( GraphicsPipe* pipe ) : // Access: // Description: //////////////////////////////////////////////////////////////////// -glutGraphicsWindow::glutGraphicsWindow( GraphicsPipe* pipe, const +glutGraphicsWindow::glutGraphicsWindow( GraphicsPipe* pipe, const GraphicsWindow::Properties& props ) : GraphicsWindow( pipe, props ) { _global_window = this; @@ -62,7 +71,7 @@ glutGraphicsWindow::~glutGraphicsWindow(void) { } //////////////////////////////////////////////////////////////////// -// Function: config +// Function: config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -73,12 +82,12 @@ void glutGraphicsWindow::config( void ) glutInitWindowSize( _props._xsize, _props._ysize ); _handle = glutCreateWindow( _props._title.c_str() ); glutReshapeFunc( glut_handle_reshape ); - + // Mouse callbacks glutMouseFunc( glut_handle_mouse_input ); glutMotionFunc( glut_handle_mouse_motion ); glutPassiveMotionFunc( glut_handle_mouse_motion ); - + // Keyboard callbacks glutKeyboardFunc( glut_handle_ascii_keyboard_input ); glutSpecialFunc( glut_handle_special_keyboard_input ); @@ -93,7 +102,7 @@ void glutGraphicsWindow::config( void ) } //////////////////////////////////////////////////////////////////// -// Function: end_frame +// Function: end_frame // Access: // Description: Swaps the front and back buffers. //////////////////////////////////////////////////////////////////// @@ -108,7 +117,7 @@ void glutGraphicsWindow::end_frame( void ) } //////////////////////////////////////////////////////////////////// -// Function: handle_reshape +// Function: handle_reshape // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -123,7 +132,7 @@ void glutGraphicsWindow::handle_reshape( int w, int h ) // Access: // Description: //////////////////////////////////////////////////////////////////// -void glutGraphicsWindow::handle_mouse_input( int button, int state, +void glutGraphicsWindow::handle_mouse_input( int button, int state, int x, int y ) { _input_devices[0].set_pointer_in_window(x, y); @@ -284,7 +293,7 @@ make_GlutGraphicsWindow(const FactoryParams ¶ms) { } GraphicsPipe *pipe = pipe_param->get_pipe(); - + GraphicsWindow::WindowProps *props_param; if (!get_param_into(props_param, params)) { return new glutGraphicsWindow(pipe); diff --git a/panda/src/glutdisplay/glutGraphicsWindow.h b/panda/src/glutdisplay/glutGraphicsWindow.h index 55831ad0cd..ae575ff7c0 100644 --- a/panda/src/glutdisplay/glutGraphicsWindow.h +++ b/panda/src/glutdisplay/glutGraphicsWindow.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLUTGRAPHICSWINDOW_H #define GLUTGRAPHICSWINDOW_H // diff --git a/panda/src/glutdisplay/test_glut.cxx b/panda/src/glutdisplay/test_glut.cxx index 26aca5f4e1..44daeead8c 100644 --- a/panda/src/glutdisplay/test_glut.cxx +++ b/panda/src/glutdisplay/test_glut.cxx @@ -1,6 +1,19 @@ // Filename: test_glut.cxx // Created by: mike (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //#include "glutGraphicsPipe.h" @@ -41,7 +54,7 @@ int main() { cout << " " << (*pti) << endl; } cout << "after Known pipe types" << endl; - + GraphicsPipe::PipeFactory& factory = GraphicsPipe::_factory; GraphicsPipe::PipePrioritiesIter pribegin = GraphicsPipe::get_priorities_begin(); diff --git a/panda/src/glutdisplay/test_glut_win.cxx b/panda/src/glutdisplay/test_glut_win.cxx index 57e5cc7416..d1e3eaebce 100644 --- a/panda/src/glutdisplay/test_glut_win.cxx +++ b/panda/src/glutdisplay/test_glut_win.cxx @@ -1,6 +1,19 @@ // Filename: test_glut_win.cxx // Created by: mike (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/glxdisplay/config_glxdisplay.cxx b/panda/src/glxdisplay/config_glxdisplay.cxx index e59bed5cfb..c12dfad93f 100644 --- a/panda/src/glxdisplay/config_glxdisplay.cxx +++ b/panda/src/glxdisplay/config_glxdisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_glxdisplay.cxx // Created by: cary (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_glxdisplay.h" diff --git a/panda/src/glxdisplay/config_glxdisplay.h b/panda/src/glxdisplay/config_glxdisplay.h index 6c0a9c3fdc..bf55a16cc5 100644 --- a/panda/src/glxdisplay/config_glxdisplay.h +++ b/panda/src/glxdisplay/config_glxdisplay.h @@ -2,6 +2,19 @@ // Created by: cary (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CONFIG_GLXDISPLAY_H__ #define __CONFIG_GLXDISPLAY_H__ diff --git a/panda/src/glxdisplay/glxDisplay.I b/panda/src/glxdisplay/glxDisplay.I index a2db3c5db7..f934f85ba5 100644 --- a/panda/src/glxdisplay/glxDisplay.I +++ b/panda/src/glxdisplay/glxDisplay.I @@ -1,6 +1,19 @@ // Filename: glxDisplay.I // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/glxdisplay/glxDisplay.cxx b/panda/src/glxdisplay/glxDisplay.cxx index 9bf8c5391e..c50bb63c34 100644 --- a/panda/src/glxdisplay/glxDisplay.cxx +++ b/panda/src/glxdisplay/glxDisplay.cxx @@ -1,6 +1,19 @@ // Filename: glxDisplay.cxx // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glxDisplay.h" @@ -16,7 +29,7 @@ TypeHandle glxDisplay::_type_handle; //////////////////////////////////////////////////////////////////// // Function: glxDisplay::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// glxDisplay:: glxDisplay(GraphicsPipe *pipe, const string &x_specifier) { diff --git a/panda/src/glxdisplay/glxDisplay.h b/panda/src/glxdisplay/glxDisplay.h index 9a9ea97695..0ac93591ae 100644 --- a/panda/src/glxdisplay/glxDisplay.h +++ b/panda/src/glxdisplay/glxDisplay.h @@ -1,6 +1,19 @@ // Filename: glxDisplay.h // Created by: drose (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GLXDISPLAY_H @@ -33,7 +46,7 @@ public: INLINE int get_display_height() const; glxGraphicsWindow *find_window(Window win) const; - + private: GraphicsPipe *_pipe; Display *_display; @@ -55,7 +68,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/glxdisplay/glxGraphicsPipe.cxx b/panda/src/glxdisplay/glxGraphicsPipe.cxx index ef81931d0b..60264b7854 100644 --- a/panda/src/glxdisplay/glxGraphicsPipe.cxx +++ b/panda/src/glxdisplay/glxGraphicsPipe.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glxGraphicsPipe.h" #include "config_glxdisplay.h" diff --git a/panda/src/glxdisplay/glxGraphicsPipe.h b/panda/src/glxdisplay/glxGraphicsPipe.h index c27d433db7..64ff8fe2e1 100644 --- a/panda/src/glxdisplay/glxGraphicsPipe.h +++ b/panda/src/glxdisplay/glxGraphicsPipe.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLXGRAPHICSPIPE_H #define GLXGRAPHICSPIPE_H // diff --git a/panda/src/glxdisplay/glxGraphicsWindow.I b/panda/src/glxdisplay/glxGraphicsWindow.I index fe55883c83..045455917f 100644 --- a/panda/src/glxdisplay/glxGraphicsWindow.I +++ b/panda/src/glxdisplay/glxGraphicsWindow.I @@ -1,23 +1,36 @@ // Filename: glxGraphicsWindow.I // Created by: mike (07Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: add_event_mask +// Function: add_event_mask // Access: Protected // Description: Ensures we only update window events once //////////////////////////////////////////////////////////////////// INLINE void glxGraphicsWindow::add_event_mask(long event_mask) { if ((_event_mask & event_mask) != event_mask) { - _event_mask |= event_mask; + _event_mask |= event_mask; _change_mask |= GLXWIN_EVENT; } } //////////////////////////////////////////////////////////////////// -// Function: remove_event_mask +// Function: remove_event_mask // Access: Protected // Description: Ensures we only update window events once //////////////////////////////////////////////////////////////////// diff --git a/panda/src/glxdisplay/glxGraphicsWindow.cxx b/panda/src/glxdisplay/glxGraphicsWindow.cxx index 07dd5290d6..7db204d989 100644 --- a/panda/src/glxdisplay/glxGraphicsWindow.cxx +++ b/panda/src/glxdisplay/glxGraphicsWindow.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "glxGraphicsWindow.h" #include "glxDisplay.h" @@ -39,7 +48,7 @@ const char* glxGraphicsWindow::_glx_extensions = NULL; // Access: // Description: //////////////////////////////////////////////////////////////////// -glxGraphicsWindow::glxGraphicsWindow( GraphicsPipe* pipe ) : +glxGraphicsWindow::glxGraphicsWindow( GraphicsPipe* pipe ) : GraphicsWindow( pipe ) { config(); @@ -50,7 +59,7 @@ glxGraphicsWindow::glxGraphicsWindow( GraphicsPipe* pipe ) : // Access: // Description: //////////////////////////////////////////////////////////////////// -glxGraphicsWindow::glxGraphicsWindow( GraphicsPipe* pipe, const +glxGraphicsWindow::glxGraphicsWindow( GraphicsPipe* pipe, const GraphicsWindow::Properties& props ) : GraphicsWindow( pipe, props ) { config(); @@ -61,7 +70,7 @@ glxGraphicsWindow::glxGraphicsWindow( GraphicsPipe* pipe, const // Access: // Description: //////////////////////////////////////////////////////////////////// -glxGraphicsWindow::~glxGraphicsWindow(void) +glxGraphicsWindow::~glxGraphicsWindow(void) { // The GL context is already gone. Don't try to destroy it again; // that will cause a seg fault on exit. @@ -78,7 +87,7 @@ glxGraphicsWindow::~glxGraphicsWindow(void) } //////////////////////////////////////////////////////////////////// -// Function: glx_supports +// Function: glx_supports // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -95,7 +104,7 @@ bool glxGraphicsWindow::glx_supports(const char* extension) glXQueryVersion(_display, &major, &minor); if ((major == 1 && minor >= 1) || (major > 1)) { if (!_glx_extensions) { - _glx_extensions = + _glx_extensions = glXQueryExtensionsString(_display, glx->get_screen()); } start = _glx_extensions; @@ -141,7 +150,7 @@ try_for_visual(glxDisplay *glx, int mask, } else { want_color_component_bits = max(want_color_bits / 3, 1); } - + attrib_list[n++] = GLX_RGBA; attrib_list[n++] = GLX_RED_SIZE; @@ -259,7 +268,7 @@ void glxGraphicsWindow::choose_visual(void) bool special_size_request = (want_depth_bits != 1 || want_color_bits != 1); - + // We try to be smart about choosing a close match for the visual. // First, we'll eliminate some of the more esoteric options one at // a time, then two at a time, and finally we'll try just the bare @@ -275,11 +284,11 @@ void glxGraphicsWindow::choose_visual(void) if (_visual == NULL) { // Ok, not good enough. Now try to eliminate options, but keep // as many bits as we asked for. - + // This array keeps the bitmasks of options that we pull out of // the requested mask, in order. - - static const int strip_properties[] = { + + static const int strip_properties[] = { // One esoteric option removed. W_MULTISAMPLE, W_STENCIL, @@ -358,7 +367,7 @@ void glxGraphicsWindow::choose_visual(void) int render_mode, double_buffer, stereo, red_size, green_size, blue_size, alpha_size, ared_size, agreen_size, ablue_size, aalpha_size, depth_size, stencil_size; - + glXGetConfig(_display, _visual, GLX_RGBA, &render_mode); glXGetConfig(_display, _visual, GLX_DOUBLEBUFFER, &double_buffer); glXGetConfig(_display, _visual, GLX_STEREO, &stereo); @@ -387,7 +396,7 @@ void glxGraphicsWindow::choose_visual(void) } //////////////////////////////////////////////////////////////////// -// Function: config +// Function: config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -417,12 +426,12 @@ void glxGraphicsWindow::config( void ) wa.background_pixmap = None; wa.border_pixel = 0; wa.colormap = _colormap; - wa.event_mask = _event_mask; + wa.event_mask = _event_mask; wa.do_not_propagate_mask = 0; _xwindow = XCreateWindow(_display, glx->get_root(), _props._xorg, _props._yorg, _props._xsize, _props._ysize, 0, - _visual->depth, InputOutput, _visual->visual, attrib_mask, &wa); + _visual->depth, InputOutput, _visual->visual, attrib_mask, &wa); if (!_xwindow) { glxdisplay_cat.fatal() << "glxGraphicsWindow::config() - failed to create Xwindow" << endl; @@ -497,7 +506,7 @@ void glxGraphicsWindow::config( void ) } //////////////////////////////////////////////////////////////////// -// Function: setup_colormap +// Function: setup_colormap // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -508,10 +517,10 @@ void glxGraphicsWindow::setup_colormap(void) visual_class = _visual->c_class; #else visual_class = _visual->class; -#endif +#endif glxDisplay *glx = _pipe->get_glx_display(); nassertv(glx != (glxDisplay *)NULL); - + switch (visual_class) { case PseudoColor: rc = glXGetConfig(_display, _visual, GLX_RGBA, &is_rgb); @@ -529,13 +538,13 @@ void glxGraphicsWindow::setup_colormap(void) case TrueColor: case DirectColor: _colormap = XCreateColormap(_display, glx->get_root(), - _visual->visual, AllocNone); + _visual->visual, AllocNone); break; case StaticColor: case StaticGray: case GrayScale: _colormap = XCreateColormap(_display, glx->get_root(), - _visual->visual, AllocNone); + _visual->visual, AllocNone); break; default: glxdisplay_cat.error() @@ -609,7 +618,7 @@ void glxGraphicsWindow::setup_properties(void) } //////////////////////////////////////////////////////////////////// -// Function: end_frame +// Function: end_frame // Access: // Description: Swaps the front and back buffers. //////////////////////////////////////////////////////////////////// @@ -645,9 +654,9 @@ void glxGraphicsWindow::end_frame( void ) // these seem to be good for default font glRasterPos2f(_props._xsize-75,_props._ysize-20); - // set up for a string-drawing display list call + // set up for a string-drawing display list call glListBase(FONT_BITMAP_OGLDISPLAYLISTNUM); - + // draw a string using font display lists. chars index their // corresponding displist name glCallLists(strlen(fps_msg), GL_UNSIGNED_BYTE, fps_msg); @@ -671,7 +680,7 @@ void glxGraphicsWindow::end_frame( void ) } //////////////////////////////////////////////////////////////////// -// Function: handle_reshape +// Function: handle_reshape // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -728,7 +737,7 @@ handle_keyrelease(ButtonHandle key, int, int) { } ButtonHandle glxGraphicsWindow:: -lookup_key(XEvent event) { +lookup_key(XEvent event) { // First, get the string key name. If it fits in one character, it // must be the ASCII equivalent for the key. char tmp[1]; @@ -743,203 +752,203 @@ lookup_key(XEvent event) { KeySym ks = XLookupKeysym((XKeyEvent *)&event, 0); switch (ks) { - case XK_BackSpace: + case XK_BackSpace: return KeyboardButton::backspace(); - case XK_Tab: + case XK_Tab: return KeyboardButton::tab(); - case XK_Return: + case XK_Return: return KeyboardButton::enter(); - case XK_Escape: + case XK_Escape: return KeyboardButton::escape(); - case XK_space: + case XK_space: return KeyboardButton::space(); - case XK_exclam: + case XK_exclam: return KeyboardButton::ascii_key('!'); - case XK_quotedbl: + case XK_quotedbl: return KeyboardButton::ascii_key('"'); - case XK_numbersign: + case XK_numbersign: return KeyboardButton::ascii_key('#'); - case XK_dollar: + case XK_dollar: return KeyboardButton::ascii_key('$'); - case XK_percent: + case XK_percent: return KeyboardButton::ascii_key('%'); - case XK_ampersand: + case XK_ampersand: return KeyboardButton::ascii_key('&'); case XK_apostrophe: // == XK_quoteright return KeyboardButton::ascii_key('\''); - case XK_parenleft: + case XK_parenleft: return KeyboardButton::ascii_key('('); - case XK_parenright: + case XK_parenright: return KeyboardButton::ascii_key(')'); - case XK_asterisk: + case XK_asterisk: return KeyboardButton::ascii_key('*'); - case XK_plus: + case XK_plus: return KeyboardButton::ascii_key('+'); - case XK_comma: + case XK_comma: return KeyboardButton::ascii_key(','); - case XK_minus: + case XK_minus: return KeyboardButton::ascii_key('-'); - case XK_period: + case XK_period: return KeyboardButton::ascii_key('.'); - case XK_slash: + case XK_slash: return KeyboardButton::ascii_key('/'); - case XK_0: + case XK_0: return KeyboardButton::ascii_key('0'); - case XK_1: + case XK_1: return KeyboardButton::ascii_key('1'); - case XK_2: + case XK_2: return KeyboardButton::ascii_key('2'); - case XK_3: + case XK_3: return KeyboardButton::ascii_key('3'); - case XK_4: + case XK_4: return KeyboardButton::ascii_key('4'); - case XK_5: + case XK_5: return KeyboardButton::ascii_key('5'); - case XK_6: + case XK_6: return KeyboardButton::ascii_key('6'); - case XK_7: + case XK_7: return KeyboardButton::ascii_key('7'); - case XK_8: + case XK_8: return KeyboardButton::ascii_key('8'); - case XK_9: + case XK_9: return KeyboardButton::ascii_key('9'); - case XK_colon: + case XK_colon: return KeyboardButton::ascii_key(':'); - case XK_semicolon: + case XK_semicolon: return KeyboardButton::ascii_key(';'); - case XK_less: + case XK_less: return KeyboardButton::ascii_key('<'); - case XK_equal: + case XK_equal: return KeyboardButton::ascii_key('='); - case XK_greater: + case XK_greater: return KeyboardButton::ascii_key('>'); - case XK_question: + case XK_question: return KeyboardButton::ascii_key('?'); - case XK_at: + case XK_at: return KeyboardButton::ascii_key('@'); - case XK_A: + case XK_A: return KeyboardButton::ascii_key('A'); - case XK_B: + case XK_B: return KeyboardButton::ascii_key('B'); - case XK_C: + case XK_C: return KeyboardButton::ascii_key('C'); - case XK_D: + case XK_D: return KeyboardButton::ascii_key('D'); - case XK_E: + case XK_E: return KeyboardButton::ascii_key('E'); - case XK_F: + case XK_F: return KeyboardButton::ascii_key('F'); - case XK_G: + case XK_G: return KeyboardButton::ascii_key('G'); - case XK_H: + case XK_H: return KeyboardButton::ascii_key('H'); - case XK_I: + case XK_I: return KeyboardButton::ascii_key('I'); - case XK_J: + case XK_J: return KeyboardButton::ascii_key('J'); - case XK_K: + case XK_K: return KeyboardButton::ascii_key('K'); - case XK_L: + case XK_L: return KeyboardButton::ascii_key('L'); - case XK_M: + case XK_M: return KeyboardButton::ascii_key('M'); - case XK_N: + case XK_N: return KeyboardButton::ascii_key('N'); - case XK_O: + case XK_O: return KeyboardButton::ascii_key('O'); - case XK_P: + case XK_P: return KeyboardButton::ascii_key('P'); - case XK_Q: + case XK_Q: return KeyboardButton::ascii_key('Q'); - case XK_R: + case XK_R: return KeyboardButton::ascii_key('R'); - case XK_S: + case XK_S: return KeyboardButton::ascii_key('S'); - case XK_T: + case XK_T: return KeyboardButton::ascii_key('T'); - case XK_U: + case XK_U: return KeyboardButton::ascii_key('U'); - case XK_V: + case XK_V: return KeyboardButton::ascii_key('V'); - case XK_W: + case XK_W: return KeyboardButton::ascii_key('W'); - case XK_X: + case XK_X: return KeyboardButton::ascii_key('X'); - case XK_Y: + case XK_Y: return KeyboardButton::ascii_key('Y'); - case XK_Z: + case XK_Z: return KeyboardButton::ascii_key('Z'); - case XK_bracketleft: + case XK_bracketleft: return KeyboardButton::ascii_key('['); - case XK_backslash: + case XK_backslash: return KeyboardButton::ascii_key('\\'); - case XK_bracketright: + case XK_bracketright: return KeyboardButton::ascii_key(']'); - case XK_asciicircum: + case XK_asciicircum: return KeyboardButton::ascii_key('^'); - case XK_underscore: + case XK_underscore: return KeyboardButton::ascii_key('_'); case XK_grave: // == XK_quoteleft return KeyboardButton::ascii_key('`'); - case XK_a: + case XK_a: return KeyboardButton::ascii_key('a'); - case XK_b: + case XK_b: return KeyboardButton::ascii_key('b'); - case XK_c: + case XK_c: return KeyboardButton::ascii_key('c'); - case XK_d: + case XK_d: return KeyboardButton::ascii_key('d'); - case XK_e: + case XK_e: return KeyboardButton::ascii_key('e'); - case XK_f: + case XK_f: return KeyboardButton::ascii_key('f'); - case XK_g: + case XK_g: return KeyboardButton::ascii_key('g'); - case XK_h: + case XK_h: return KeyboardButton::ascii_key('h'); - case XK_i: + case XK_i: return KeyboardButton::ascii_key('i'); - case XK_j: + case XK_j: return KeyboardButton::ascii_key('j'); - case XK_k: + case XK_k: return KeyboardButton::ascii_key('k'); - case XK_l: + case XK_l: return KeyboardButton::ascii_key('l'); - case XK_m: + case XK_m: return KeyboardButton::ascii_key('m'); - case XK_n: + case XK_n: return KeyboardButton::ascii_key('n'); - case XK_o: + case XK_o: return KeyboardButton::ascii_key('o'); - case XK_p: + case XK_p: return KeyboardButton::ascii_key('p'); - case XK_q: + case XK_q: return KeyboardButton::ascii_key('q'); - case XK_r: + case XK_r: return KeyboardButton::ascii_key('r'); - case XK_s: + case XK_s: return KeyboardButton::ascii_key('s'); - case XK_t: + case XK_t: return KeyboardButton::ascii_key('t'); - case XK_u: + case XK_u: return KeyboardButton::ascii_key('u'); - case XK_v: + case XK_v: return KeyboardButton::ascii_key('v'); - case XK_w: + case XK_w: return KeyboardButton::ascii_key('w'); - case XK_x: + case XK_x: return KeyboardButton::ascii_key('x'); - case XK_y: + case XK_y: return KeyboardButton::ascii_key('y'); - case XK_z: + case XK_z: return KeyboardButton::ascii_key('z'); - case XK_braceleft: + case XK_braceleft: return KeyboardButton::ascii_key('{'); - case XK_bar: + case XK_bar: return KeyboardButton::ascii_key('|'); - case XK_braceright: + case XK_braceright: return KeyboardButton::ascii_key('}'); - case XK_asciitilde: + case XK_asciitilde: return KeyboardButton::ascii_key('~'); case XK_F1: return KeyboardButton::f1(); @@ -1017,7 +1026,7 @@ lookup_key(XEvent event) { } //////////////////////////////////////////////////////////////////// -// Function: interruptible_xnextevent +// Function: interruptible_xnextevent // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1027,7 +1036,7 @@ int glxGraphicsWindow::interruptible_xnextevent(Display* display, XEvent* event) if (XPending(display)) { XNextEvent(display, event); return 1; - } else + } else return 0; } @@ -1161,7 +1170,7 @@ void glxGraphicsWindow::process_event(XEvent event) } //////////////////////////////////////////////////////////////////// -// Function: process_events +// Function: process_events // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1189,7 +1198,7 @@ void glxGraphicsWindow::process_events(void) XEvent ahead; while (XEventsQueued(_display, QueuedAfterReading) > 0) { XPeekEvent(_display, &ahead); - if (ahead.type != Expose || + if (ahead.type != Expose || ahead.xexpose.window != event.xexpose.window) { break; } @@ -1241,7 +1250,7 @@ void glxGraphicsWindow::process_events(void) } //////////////////////////////////////////////////////////////////// -// Function: idle_wait +// Function: idle_wait // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1288,7 +1297,7 @@ void glxGraphicsWindow::update(void) // Always ask for a redisplay for now call_draw_callback(true); - if (_idle_callback) + if (_idle_callback) idle_wait(); else process_events(); @@ -1297,7 +1306,7 @@ void glxGraphicsWindow::update(void) } //////////////////////////////////////////////////////////////////// -// Function: enable_mouse_input +// Function: enable_mouse_input // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1314,7 +1323,7 @@ void glxGraphicsWindow::enable_mouse_input(bool val) } //////////////////////////////////////////////////////////////////// -// Function: enable_mouse_motion +// Function: enable_mouse_motion // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1328,7 +1337,7 @@ void glxGraphicsWindow::enable_mouse_motion(bool val) add_event_mask(input_mask); add_event_mask(motion_mask); } - else if (_mouse_motion_enabled == true && val == false) { + else if (_mouse_motion_enabled == true && val == false) { remove_event_mask(motion_mask); if (_mouse_input_enabled == false) remove_event_mask(input_mask); @@ -1415,7 +1424,7 @@ make_GlxGraphicsWindow(const FactoryParams ¶ms) { } GraphicsPipe *pipe = pipe_param->get_pipe(); - + GraphicsWindow::WindowProps *props_param; if (!get_param_into(props_param, params)) { return new glxGraphicsWindow(pipe); diff --git a/panda/src/glxdisplay/glxGraphicsWindow.h b/panda/src/glxdisplay/glxGraphicsWindow.h index e884f33538..037ca57c40 100644 --- a/panda/src/glxdisplay/glxGraphicsWindow.h +++ b/panda/src/glxdisplay/glxGraphicsWindow.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLXGRAPHICSWINDOW_H #define GLXGRAPHICSWINDOW_H // diff --git a/panda/src/gobj/LOD.I b/panda/src/gobj/LOD.I index ba2df20653..d042815fb1 100644 --- a/panda/src/gobj/LOD.I +++ b/panda/src/gobj/LOD.I @@ -2,13 +2,26 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include //////////////////////////////////////////////////////////////////// // Function: LODSwitch::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LODSwitch:: LODSwitch() { @@ -17,7 +30,7 @@ LODSwitch() { //////////////////////////////////////////////////////////////////// // Function: LODSwitch::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LODSwitch:: LODSwitch(float in, float out) { @@ -27,7 +40,7 @@ LODSwitch(float in, float out) { //////////////////////////////////////////////////////////////////// // Function: LODSwitch::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LODSwitch:: LODSwitch(const LODSwitch ©) : @@ -39,7 +52,7 @@ LODSwitch(const LODSwitch ©) : //////////////////////////////////////////////////////////////////// // Function: LODSwitch::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void LODSwitch:: operator = (const LODSwitch ©) { @@ -88,7 +101,7 @@ set_range(float in, float out) { // We actually store the square of the switching distances. This // makes the LOD computation a little simpler. _in = in * in; - _out = out * out; + _out = out * out; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/LOD.cxx b/panda/src/gobj/LOD.cxx index 454981b561..072ecbace1 100644 --- a/panda/src/gobj/LOD.cxx +++ b/panda/src/gobj/LOD.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "LOD.h" @@ -69,7 +78,7 @@ xform(const LMatrix4f &mat) { LVector3f y; mat.get_row3(y,1); float factor_squared = y.length_squared(); - + LODSwitchVector::iterator si; for (si = _switch_vector.begin(); si != _switch_vector.end(); ++si) { (*si).rescale(factor_squared); @@ -81,7 +90,7 @@ xform(const LMatrix4f &mat) { // Access: Public // Description: Computes the distance between two points and returns // the index for the child of the LOD by testing against -// the corresponding list of switching distances. +// the corresponding list of switching distances. //////////////////////////////////////////////////////////////////// int LOD:: compute_child(const LPoint3f &cam_pos, const LPoint3f ¢er) const { @@ -89,7 +98,7 @@ compute_child(const LPoint3f &cam_pos, const LPoint3f ¢er) const { float dist = dot(v, v); LODSwitchVector::const_iterator i; int child = 0; - for (i = _switch_vector.begin(), child = 0; + for (i = _switch_vector.begin(), child = 0; i != _switch_vector.end(); ++i, ++child) { if ((*i).in_range(dist)) break; @@ -126,9 +135,9 @@ write_datagram(Datagram &destination) const { void LOD:: read_datagram(DatagramIterator &source) { _center.read_datagram(source); - + _switch_vector.clear(); - + int num_switches = source.get_uint16(); _switch_vector.reserve(num_switches); for (int i = 0; i < num_switches; i++) { @@ -140,7 +149,7 @@ read_datagram(DatagramIterator &source) { //////////////////////////////////////////////////////////////////// // Function: LOD::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LOD:: output(ostream &out) const { @@ -161,7 +170,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: LOD::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LOD:: write(ostream &out, int indent_level) const { @@ -173,7 +182,7 @@ write(ostream &out, int indent_level) const { si != _switch_vector.end(); ++si) { indent(out, indent_level + 2) - << i << ". in at " << (*si).get_in() + << i << ". in at " << (*si).get_in() << ", out at " << (*si).get_out() << "\n"; i++; } diff --git a/panda/src/gobj/LOD.h b/panda/src/gobj/LOD.h index 4cb5c50fd7..d4752606a4 100644 --- a/panda/src/gobj/LOD.h +++ b/panda/src/gobj/LOD.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LOD_H #define LOD_H // diff --git a/panda/src/gobj/config_gobj.cxx b/panda/src/gobj/config_gobj.cxx index ee4b38358f..0806abf6e4 100644 --- a/panda/src/gobj/config_gobj.cxx +++ b/panda/src/gobj/config_gobj.cxx @@ -1,6 +1,20 @@ // Filename: config_gobj.cxx // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include "config_gobj.h" @@ -115,7 +129,7 @@ ConfigureFn(config_gobj) { textures_up_square = false; textures_down_square = config_gobj.GetBool("textures-square", false); } - + Fog::init_type(); Geom::init_type(); GeomLine::init_type(); diff --git a/panda/src/gobj/config_gobj.h b/panda/src/gobj/config_gobj.h index bedf395c9d..689f57e9da 100644 --- a/panda/src/gobj/config_gobj.h +++ b/panda/src/gobj/config_gobj.h @@ -2,6 +2,19 @@ // Created by: drose (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_GOBJ_H #define CONFIG_GOBJ_H diff --git a/panda/src/gobj/drawable.cxx b/panda/src/gobj/drawable.cxx index 27d1cfa36a..d0cf5dc100 100644 --- a/panda/src/gobj/drawable.cxx +++ b/panda/src/gobj/drawable.cxx @@ -1,6 +1,19 @@ // Filename: drawable.cxx // Created by: drose (15Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "drawable.h" diff --git a/panda/src/gobj/drawable.h b/panda/src/gobj/drawable.h index d561a9e805..8b82e7233c 100644 --- a/panda/src/gobj/drawable.h +++ b/panda/src/gobj/drawable.h @@ -1,7 +1,20 @@ // Filename: drawable.h // Created by: mike (09Jan97) // +//////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DDRAWABLE_H #define DDRAWABLE_H // @@ -36,7 +49,7 @@ class EXPCL_PANDA dDrawable : public ReferenceCount, public WritableConfigurable public BoundedObject { public: - dDrawable() : WritableConfigurable() { + dDrawable() : WritableConfigurable() { MemoryUsage::update_type(this, this); } virtual ~dDrawable() { } @@ -47,7 +60,7 @@ protected: virtual void propagate_stale_bound(); public: - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); protected: void fillin(DatagramIterator& scan, BamReader* manager); diff --git a/panda/src/gobj/fog.I b/panda/src/gobj/fog.I index 94ff41fa5b..4058928eac 100644 --- a/panda/src/gobj/fog.I +++ b/panda/src/gobj/fog.I @@ -1,11 +1,24 @@ // Filename: fog.I -// Created by: krisg (05Feb01) -// +// Created by: krisg (05Feb01) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: Fog::get_mode +// Function: Fog::get_mode // Access: Public // Description: //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/fog.cxx b/panda/src/gobj/fog.cxx index 65e298411c..846de68f72 100644 --- a/panda/src/gobj/fog.cxx +++ b/panda/src/gobj/fog.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -44,7 +53,7 @@ Fog::Fog(Mode mode, int bits_per_color_channel) { set_mode(mode); set_color(Colorf(1.0f, 1.0f, 1.0f, 1.0f)); set_range(0.0f, 100.0f); - + _density = 0.5f; // compute_density(); } @@ -65,7 +74,7 @@ void Fog::compute_density(void) { _density = 1.0f; float opaque_multiplier; switch (_mode) { - case M_linear: + case M_linear: break; case M_exponential: // Multiplier = ln(2^bits) @@ -93,7 +102,7 @@ void Fog:: output(ostream &out) const { out << "fog:" << _mode; switch (_mode) { - case M_linear: + case M_linear: break; case M_exponential: case M_exponential_squared: diff --git a/panda/src/gobj/fog.h b/panda/src/gobj/fog.h index 908df473b9..363f9a38a3 100644 --- a/panda/src/gobj/fog.h +++ b/panda/src/gobj/fog.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FOG_H #define FOG_H // diff --git a/panda/src/gobj/geom.I b/panda/src/gobj/geom.I index 0db5f41297..e54bd5dacb 100644 --- a/panda/src/gobj/geom.I +++ b/panda/src/gobj/geom.I @@ -1,6 +1,19 @@ // Filename: geom.I // Created by: drose (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -123,9 +136,9 @@ get_texcoords_index() const { // one tristrip in a GeomTristrip. //////////////////////////////////////////////////////////////////// INLINE void Geom:: -set_num_prims(int num) { - _numprims = num; - make_dirty(); +set_num_prims(int num) { + _numprims = num; + make_dirty(); } //////////////////////////////////////////////////////////////////// @@ -134,8 +147,8 @@ set_num_prims(int num) { // Description: Returns the number of primitives in the Geom. //////////////////////////////////////////////////////////////////// INLINE int Geom:: -get_num_prims(void) const { - return _numprims; +get_num_prims(void) const { + return _numprims; } //////////////////////////////////////////////////////////////////// @@ -197,7 +210,7 @@ get_lengths() const { //////////////////////////////////////////////////////////////////// // Function: Geom::make_vertex_iterator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Geom::VertexIterator Geom:: make_vertex_iterator() const { @@ -211,7 +224,7 @@ make_vertex_iterator() const { //////////////////////////////////////////////////////////////////// // Function: Geom::get_next_vertex // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const Vertexf &Geom:: get_next_vertex(VertexIterator &viterator) const { @@ -221,7 +234,7 @@ get_next_vertex(VertexIterator &viterator) const { //////////////////////////////////////////////////////////////////// // Function: Geom::make_normal_iterator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Geom::NormalIterator Geom:: make_normal_iterator() const { @@ -235,7 +248,7 @@ make_normal_iterator() const { //////////////////////////////////////////////////////////////////// // Function: Geom::get_next_normal // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const Normalf &Geom:: get_next_normal(NormalIterator &niterator) const { @@ -245,7 +258,7 @@ get_next_normal(NormalIterator &niterator) const { //////////////////////////////////////////////////////////////////// // Function: Geom::make_texcoord_iterator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Geom::TexCoordIterator Geom:: make_texcoord_iterator() const { @@ -259,7 +272,7 @@ make_texcoord_iterator() const { //////////////////////////////////////////////////////////////////// // Function: Geom::get_next_texcoord // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const TexCoordf &Geom:: get_next_texcoord(TexCoordIterator &tciterator) const { @@ -269,7 +282,7 @@ get_next_texcoord(TexCoordIterator &tciterator) const { //////////////////////////////////////////////////////////////////// // Function: Geom::make_color_iterator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Geom::ColorIterator Geom:: make_color_iterator() const { @@ -283,7 +296,7 @@ make_color_iterator() const { //////////////////////////////////////////////////////////////////// // Function: Geom::get_next_color // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const Colorf &Geom:: get_next_color(ColorIterator &citerator) const { diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index deb90e89e5..e93438de44 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Includes @@ -162,12 +175,12 @@ operator = (const Geom ©) { _norms = copy._norms; _colors = copy._colors; _texcoords = copy._texcoords; - + _vindex = copy._vindex; _nindex = copy._nindex; _cindex = copy._cindex; _tindex = copy._tindex; - + _numprims = copy._numprims; _primlengths = copy._primlengths; for (int i = 0; i < num_GeomAttrTypes; i++) { @@ -178,18 +191,18 @@ operator = (const Geom ©) { _get_normal = copy._get_normal; _get_color = copy._get_color; _get_texcoord = copy._get_texcoord; - + if (copy.is_dirty()) make_dirty(); } //////////////////////////////////////////////////////////////////// -// Function: Geom::set_coords +// Function: Geom::set_coords // Access: Public // Description: //////////////////////////////////////////////////////////////////// void Geom:: -set_coords(const PTA_Vertexf &coords, GeomBindType bind, +set_coords(const PTA_Vertexf &coords, GeomBindType bind, const PTA_ushort &vindex) { _coords = coords; assert(bind == G_PER_VERTEX); @@ -197,7 +210,7 @@ set_coords(const PTA_Vertexf &coords, GeomBindType bind, if ( vindex ) _vindex = vindex; - + mark_bound_stale(); make_dirty(); } @@ -208,14 +221,14 @@ set_coords(const PTA_Vertexf &coords, GeomBindType bind, // Description: //////////////////////////////////////////////////////////////////// void Geom:: -set_normals(const PTA_Normalf &norms, GeomBindType bind, +set_normals(const PTA_Normalf &norms, GeomBindType bind, const PTA_ushort &nindex) { _norms = norms; _bind[G_NORMAL] = bind; - + if (nindex) _nindex = nindex; - + make_dirty(); } @@ -225,14 +238,14 @@ set_normals(const PTA_Normalf &norms, GeomBindType bind, // Description: //////////////////////////////////////////////////////////////////// void Geom:: -set_colors(const PTA_Colorf &colors, GeomBindType bind, +set_colors(const PTA_Colorf &colors, GeomBindType bind, const PTA_ushort &cindex) { _colors = colors; _bind[G_COLOR] = bind; - + if ( cindex ) _cindex = cindex; - + make_dirty(); } @@ -242,25 +255,25 @@ set_colors(const PTA_Colorf &colors, GeomBindType bind, // Description: //////////////////////////////////////////////////////////////////// void Geom:: -set_texcoords(const PTA_TexCoordf &texcoords, GeomBindType bind, +set_texcoords(const PTA_TexCoordf &texcoords, GeomBindType bind, const PTA_ushort &tindex) { _texcoords = texcoords; assert(bind == G_PER_VERTEX || bind == G_OFF); _bind[G_TEXCOORD] = bind; - + if ( tindex ) _tindex = tindex; - + make_dirty(); } //////////////////////////////////////////////////////////////////// -// Function: Geom::get_coords +// Function: Geom::get_coords // Access: Public // Description: //////////////////////////////////////////////////////////////////// void Geom:: -get_coords(PTA_Vertexf &coords, GeomBindType &bind, +get_coords(PTA_Vertexf &coords, GeomBindType &bind, PTA_ushort &vindex) const { coords = _coords; bind = _bind[G_COORD]; @@ -273,7 +286,7 @@ get_coords(PTA_Vertexf &coords, GeomBindType &bind, // Description: //////////////////////////////////////////////////////////////////// void Geom:: -get_normals(PTA_Normalf &norms, GeomBindType &bind, +get_normals(PTA_Normalf &norms, GeomBindType &bind, PTA_ushort &nindex) const { norms = _norms; bind = _bind[G_NORMAL]; @@ -286,7 +299,7 @@ get_normals(PTA_Normalf &norms, GeomBindType &bind, // Description: //////////////////////////////////////////////////////////////////// void Geom:: -get_colors(PTA_Colorf &colors, GeomBindType &bind, +get_colors(PTA_Colorf &colors, GeomBindType &bind, PTA_ushort &cindex) const { colors = _colors; bind = _bind[G_COLOR]; @@ -299,7 +312,7 @@ get_colors(PTA_Colorf &colors, GeomBindType &bind, // Description: //////////////////////////////////////////////////////////////////// void Geom:: -get_texcoords(PTA_TexCoordf &texcoords, GeomBindType &bind, +get_texcoords(PTA_TexCoordf &texcoords, GeomBindType &bind, PTA_ushort &tindex) const { texcoords = _texcoords; bind = _bind[G_TEXCOORD]; @@ -364,7 +377,7 @@ get_tris() const { } //////////////////////////////////////////////////////////////////// -// Function: Geom::config +// Function: Geom::config // Access: Public // Description: Configure rendering based on current settings //////////////////////////////////////////////////////////////////// @@ -374,13 +387,13 @@ config(void) { // Only per vertex binding makes any sense if (_coords != (Vertexf*)0L && _bind[G_COORD] != G_OFF) { - _get_vertex = + _get_vertex = (_vindex == (ushort*)0L) ? get_vertex_nonindexed : get_vertex_indexed; } else { gobj_cat.error() << "Geom::Config() - no vertex array!" << endl; } - + // Set up normal rendering configuration if (_norms != (Normalf*)0L && _bind[G_NORMAL] != G_OFF) { _get_normal = @@ -388,7 +401,7 @@ config(void) { } else { _get_normal = get_normal_noop; } - + // Set up texture coordinate rendering configuration if (_texcoords != (TexCoordf*)0L && _bind[G_TEXCOORD] != G_OFF) { _get_texcoord = @@ -396,7 +409,7 @@ config(void) { } else { _get_texcoord = get_texcoord_noop; } - + // Set up color rendering configuration if (_colors != (Colorf*)0L && _bind[G_COLOR] != G_OFF) { _get_color = @@ -409,7 +422,7 @@ config(void) { //////////////////////////////////////////////////////////////////// // Function: Geom::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Geom:: write(ostream &out, int indent_level) const { @@ -419,7 +432,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: Geom::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Geom:: output(ostream &out) const { @@ -435,14 +448,14 @@ output(ostream &out) const { } //////////////////////////////////////////////////////////////////// -// Function: Geom::init +// Function: Geom::init // Access: Public // Description: //////////////////////////////////////////////////////////////////// void Geom:: init(void) { int i; - + _coords.clear(); _norms.clear(); _colors.clear(); @@ -452,15 +465,15 @@ init(void) { _cindex.clear(); _tindex.clear(); _primlengths.clear(); - + for ( i = 0; i < num_GeomAttrTypes; i++ ) _bind[i] = G_OFF; - + _get_vertex = get_vertex_noop; _get_normal = get_normal_noop; _get_texcoord = get_texcoord_noop; _get_color = get_color_noop; - + WritableConfigurable::config(); } @@ -685,17 +698,17 @@ write_verbose(ostream &out, int indent_level) const { GeomBindType bind_normals; GeomBindType bind_tcoords; GeomBindType bind_colors; - + PTA_Vertexf g_coords; PTA_Normalf g_normals; PTA_TexCoordf g_tcoords; PTA_Colorf g_colors; - + PTA_ushort i_coords; PTA_ushort i_normals; PTA_ushort i_tcoords; PTA_ushort i_colors; - + get_coords(g_coords, bind_coords, i_coords); get_normals(g_normals, bind_normals, i_normals); get_texcoords(g_tcoords, bind_tcoords, i_tcoords); @@ -703,7 +716,7 @@ write_verbose(ostream &out, int indent_level) const { out << "\n"; indent(out, indent_level) - << get_type() << " contains " + << get_type() << " contains " << get_num_prims() << " primitives:\n"; if (bind_coords == G_OFF) { @@ -711,7 +724,7 @@ write_verbose(ostream &out, int indent_level) const { << "No coords\n"; } else if (i_coords!=(ushort*)0L) { indent(out, indent_level) - << "Indexed coords = " << (void *)g_coords << ", length = " + << "Indexed coords = " << (void *)g_coords << ", length = " << g_coords.size() << ":\n"; describe_attr(out, this, bind_coords, i_coords, false, indent_level + 2); } else { @@ -719,27 +732,27 @@ write_verbose(ostream &out, int indent_level) const { << "Nonindexed coords:\n"; describe_attr(out, this, bind_coords, g_coords, true, indent_level + 2); } - + if (bind_colors == G_OFF) { indent(out, indent_level) << "No colors\n"; } else if (i_colors!=(ushort*)0L) { indent(out, indent_level) - << "Indexed colors = " << (void *)g_colors << ", length = " + << "Indexed colors = " << (void *)g_colors << ", length = " << g_colors.size() << "\n"; describe_attr(out, this, bind_colors, i_colors, false, indent_level + 2); } else { indent(out, indent_level) - << "Nonindexed colors:\n"; + << "Nonindexed colors:\n"; describe_attr(out, this, bind_colors, g_colors, true, indent_level + 2); } - + if (bind_tcoords == G_OFF) { indent(out, indent_level) << "No tcoords\n"; } else if (i_tcoords!=(ushort*)0L) { indent(out, indent_level) - << "Indexed tcoords = " << (void *)g_tcoords << ", length = " + << "Indexed tcoords = " << (void *)g_tcoords << ", length = " << g_tcoords.size() << "\n"; describe_attr(out, this, bind_tcoords, i_tcoords, false, indent_level + 2); } else { @@ -747,13 +760,13 @@ write_verbose(ostream &out, int indent_level) const { << "Nonindexed tcoords:\n"; describe_attr(out, this, bind_tcoords, g_tcoords, true, indent_level + 2); } - + if (bind_normals == G_OFF) { indent(out, indent_level) << "No normals\n"; } else if (i_normals!=(ushort*)0L) { indent(out, indent_level) - << "Indexed normals = " << (void *)g_normals << ", length = " + << "Indexed normals = " << (void *)g_normals << ", length = " << g_normals.size() << "\n"; describe_attr(out, this, bind_normals, i_normals, false, indent_level + 2); } else { @@ -764,7 +777,7 @@ write_verbose(ostream &out, int indent_level) const { } //////////////////////////////////////////////////////////////////// -// Function: Geom::get_min_max +// Function: Geom::get_min_max // Access: Public // Description: //////////////////////////////////////////////////////////////////// @@ -773,17 +786,17 @@ get_min_max(Vertexf& min, Vertexf& max) const { int numv = _coords.size(); for (int i = 0; i < numv; i++) { - if (_coords[i][0] < min[0]) + if (_coords[i][0] < min[0]) min[0] = _coords[i][0]; - else if (_coords[i][0] > max[0]) + else if (_coords[i][0] > max[0]) max[0] = _coords[i][0]; - if (_coords[i][1] < min[1]) + if (_coords[i][1] < min[1]) min[1] = _coords[i][1]; - else if (_coords[i][1] > max[1]) + else if (_coords[i][1] > max[1]) max[1] = _coords[i][1]; - if (_coords[i][2] < min[2]) + if (_coords[i][2] < min[2]) min[2] = _coords[i][2]; else if (_coords[i][2] > max[2]) max[2] = _coords[i][2]; diff --git a/panda/src/gobj/geom.h b/panda/src/gobj/geom.h index afb1ffe395..f8a16e4807 100644 --- a/panda/src/gobj/geom.h +++ b/panda/src/gobj/geom.h @@ -1,7 +1,20 @@ // Filename: geom.h // Created by: mike (09Jan97) // +//////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GEOM_H #define GEOM_H // @@ -103,33 +116,33 @@ public: Geom( void ); Geom( const Geom& copy ); ~Geom( void ); - + void operator = ( const Geom © ); virtual Geom *make_copy() const=0; -PUBLISHED: +PUBLISHED: void write(ostream &out, int indent_level = 0) const; virtual void output(ostream &out) const; void write_verbose(ostream &out, int indent_level) const; -public: +public: // From parent dDrawable virtual void draw(GraphicsStateGuardianBase *gsg) { dDrawable::draw(gsg); draw_immediate(gsg); } - + // From parent Configurable virtual void config( void ); - + // Immediate mode drawing functions - issue graphics commands virtual void draw_immediate(GraphicsStateGuardianBase *) const = 0; virtual void print_draw_immediate( void ) const = 0; - + public: - + void get_min_max( Vertexf& min, Vertexf& max ) const; - - + + void set_coords( const PTA_Vertexf &coords, GeomBindType bind, const PTA_ushort &vindex = @@ -146,7 +159,7 @@ public: GeomBindType bind, const PTA_ushort &tindex = PTA_ushort() ); - + void get_coords( PTA_Vertexf &coords, GeomBindType &bind, PTA_ushort &vindex) const; @@ -160,7 +173,7 @@ public: GeomBindType &bind, PTA_ushort &tindex) const; -PUBLISHED: +PUBLISHED: INLINE GeomBindType get_binding(int attr) const; INLINE const PTA_Vertexf &get_coords_array() const; INLINE const PTA_Normalf &get_normals_array() const; @@ -171,13 +184,13 @@ PUBLISHED: INLINE const PTA_ushort &get_colors_index() const; INLINE const PTA_ushort &get_texcoords_index() const; -public: +public: INLINE void set_num_prims(int num); INLINE int get_num_prims(void) const; - + INLINE void set_lengths(const PTA_int &lengths); INLINE PTA_int get_lengths() const; - + virtual int get_num_vertices_per_prim() const=0; virtual int get_num_more_vertices_than_components() const=0; virtual bool uses_components() const=0; @@ -210,23 +223,23 @@ protected: void init( void ); virtual void recompute_bound(); - + protected: - + PTA_Vertexf _coords; PTA_Normalf _norms; PTA_Colorf _colors; PTA_TexCoordf _texcoords; - + PTA_ushort _vindex; PTA_ushort _nindex; PTA_ushort _cindex; PTA_ushort _tindex; - + int _numprims; PTA_int _primlengths; enum GeomBindType _bind[num_GeomAttrTypes]; - + // Functions to extract component values, one at a time. GetNextVertex *_get_vertex; GetNextNormal *_get_normal; @@ -236,7 +249,7 @@ protected: public: //static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); //static TypedWritable *make_Generic(const FactoryParams ¶ms); diff --git a/panda/src/gobj/geomLine.cxx b/panda/src/gobj/geomLine.cxx index ea6683880f..4119b27b3f 100644 --- a/panda/src/gobj/geomLine.cxx +++ b/panda/src/gobj/geomLine.cxx @@ -1,6 +1,19 @@ // Filename: geomLine.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/gobj/geomLine.h b/panda/src/gobj/geomLine.h index a760927554..b314d0b4f4 100644 --- a/panda/src/gobj/geomLine.h +++ b/panda/src/gobj/geomLine.h @@ -1,6 +1,19 @@ // Filename: geomLine.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMLINE_H @@ -46,7 +59,7 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_GeomLine(const FactoryParams ¶ms); diff --git a/panda/src/gobj/geomLinestrip.cxx b/panda/src/gobj/geomLinestrip.cxx index 78b8afc9de..2941cb2acf 100644 --- a/panda/src/gobj/geomLinestrip.cxx +++ b/panda/src/gobj/geomLinestrip.cxx @@ -1,6 +1,19 @@ // Filename: geomLinestrip.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/gobj/geomLinestrip.h b/panda/src/gobj/geomLinestrip.h index 82f4b713fd..0415fd9296 100644 --- a/panda/src/gobj/geomLinestrip.h +++ b/panda/src/gobj/geomLinestrip.h @@ -1,6 +1,19 @@ // Filename: geomLinestrip.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMLINESTRIP_H @@ -45,7 +58,7 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_GeomLinestrip(const FactoryParams ¶ms); diff --git a/panda/src/gobj/geomPoint.cxx b/panda/src/gobj/geomPoint.cxx index d5bbbe30bb..ed59338630 100644 --- a/panda/src/gobj/geomPoint.cxx +++ b/panda/src/gobj/geomPoint.cxx @@ -1,6 +1,19 @@ // Filename: geomPoint.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/gobj/geomPoint.h b/panda/src/gobj/geomPoint.h index d7dd6e510e..4db33e3306 100644 --- a/panda/src/gobj/geomPoint.h +++ b/panda/src/gobj/geomPoint.h @@ -1,6 +1,19 @@ // Filename: geomPoint.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMPOINT_H @@ -46,7 +59,7 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_GeomPoint(const FactoryParams ¶ms); diff --git a/panda/src/gobj/geomPolygon.cxx b/panda/src/gobj/geomPolygon.cxx index 0f2abacbd9..d576729f91 100644 --- a/panda/src/gobj/geomPolygon.cxx +++ b/panda/src/gobj/geomPolygon.cxx @@ -1,6 +1,19 @@ // Filename: geomPolygon.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/gobj/geomPolygon.h b/panda/src/gobj/geomPolygon.h index 4920d2b766..01ef6d2dcb 100644 --- a/panda/src/gobj/geomPolygon.h +++ b/panda/src/gobj/geomPolygon.h @@ -1,6 +1,19 @@ // Filename: geomPolygon.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMPOLYGON_H diff --git a/panda/src/gobj/geomQuad.cxx b/panda/src/gobj/geomQuad.cxx index b5175362b3..0283be107a 100644 --- a/panda/src/gobj/geomQuad.cxx +++ b/panda/src/gobj/geomQuad.cxx @@ -1,6 +1,19 @@ // Filename: geomQuad.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/gobj/geomQuad.h b/panda/src/gobj/geomQuad.h index 58f46fa7b8..dd40e50edc 100644 --- a/panda/src/gobj/geomQuad.h +++ b/panda/src/gobj/geomQuad.h @@ -1,6 +1,19 @@ // Filename: geomQuad.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMQUAD_H diff --git a/panda/src/gobj/geomSphere.cxx b/panda/src/gobj/geomSphere.cxx index ec8dd65e73..4f827c5a94 100644 --- a/panda/src/gobj/geomSphere.cxx +++ b/panda/src/gobj/geomSphere.cxx @@ -1,6 +1,19 @@ // Filename: geomSphere.cxx // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomSphere.h" diff --git a/panda/src/gobj/geomSphere.h b/panda/src/gobj/geomSphere.h index 787167028e..816b3d2fe1 100644 --- a/panda/src/gobj/geomSphere.h +++ b/panda/src/gobj/geomSphere.h @@ -2,6 +2,19 @@ // Created by: drose (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GEOMSPHERE_H #define GEOMSPHERE_H diff --git a/panda/src/gobj/geomSprite.I b/panda/src/gobj/geomSprite.I index b84100b451..3c61fa4d0f 100644 --- a/panda/src/gobj/geomSprite.I +++ b/panda/src/gobj/geomSprite.I @@ -1,6 +1,19 @@ // Filename: geomSprite.I // Created by: charles (18Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -9,8 +22,8 @@ // Description : //////////////////////////////////////////////////////////////////// INLINE void GeomSprite:: -set_texture(Texture *tex) { - _texture = tex; +set_texture(Texture *tex) { + _texture = tex; } //////////////////////////////////////////////////////////////////// @@ -19,8 +32,8 @@ set_texture(Texture *tex) { // Description : //////////////////////////////////////////////////////////////////// INLINE Texture *GeomSprite:: -get_texture(void) const { - return _texture; +get_texture(void) const { + return _texture; } //////////////////////////////////////////////////////////////////// @@ -29,8 +42,8 @@ get_texture(void) const { // Description : //////////////////////////////////////////////////////////////////// INLINE void GeomSprite:: -set_alpha_disable(bool a) { - _alpha_disable = a; +set_alpha_disable(bool a) { + _alpha_disable = a; } //////////////////////////////////////////////////////////////////// @@ -39,8 +52,8 @@ set_alpha_disable(bool a) { // Description : //////////////////////////////////////////////////////////////////// INLINE bool GeomSprite:: -get_alpha_disable(void) const { - return _alpha_disable; +get_alpha_disable(void) const { + return _alpha_disable; } //////////////////////////////////////////////////////////////////// @@ -50,7 +63,7 @@ get_alpha_disable(void) const { //////////////////////////////////////////////////////////////////// INLINE void GeomSprite:: set_x_texel_ratio(PTA_float x_texel_ratio, GeomBindType x_bind_type) { - _x_texel_ratio = x_texel_ratio; + _x_texel_ratio = x_texel_ratio; _x_bind_type = x_bind_type; } diff --git a/panda/src/gobj/geomSprite.cxx b/panda/src/gobj/geomSprite.cxx index e23eebc87b..c1bc746a3a 100644 --- a/panda/src/gobj/geomSprite.cxx +++ b/panda/src/gobj/geomSprite.cxx @@ -1,6 +1,19 @@ // Filename: geomSprite.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -29,7 +42,7 @@ GeomSprite(Texture *tex, bool alpha_disable) : _y_texel_ratio.clear(); _theta_bind_type = G_OFF; - // note that the other bind types are intentionally left + // note that the other bind types are intentionally left // uninitialized; the arrays themselves can not be set without a // bind type. } @@ -133,7 +146,7 @@ register_with_read_factory(void) { //////////////////////////////////////////////////////////////////// // Function: GeomSprite::complete_pointers // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// int GeomSprite:: complete_pointers(vector_typedWritable &plist, BamReader *manager) { diff --git a/panda/src/gobj/geomSprite.h b/panda/src/gobj/geomSprite.h index 42572577c4..2acec7eca4 100644 --- a/panda/src/gobj/geomSprite.h +++ b/panda/src/gobj/geomSprite.h @@ -1,6 +1,19 @@ // Filename: geomSprite.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMSPRITE_H diff --git a/panda/src/gobj/geomTri.cxx b/panda/src/gobj/geomTri.cxx index 6b2538fea1..4aa576f7fa 100644 --- a/panda/src/gobj/geomTri.cxx +++ b/panda/src/gobj/geomTri.cxx @@ -1,6 +1,19 @@ // Filename: geomTri.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -53,8 +66,8 @@ print_draw_immediate(void) const // Draw overall if ( _color_command[G_OVERALL] != _issue_color_noop ) { - nout << "Color (Overall): "; - if ( tcindex ) + nout << "Color (Overall): "; + if ( tcindex ) { nout << "idx: " << *tcindex << " "; nout << tcolors[*(tcindex++)]; @@ -64,9 +77,9 @@ print_draw_immediate(void) const nout << endl; } if ( _normal_command[G_OVERALL] != _issue_normal_noop ) - { - nout << "Normal (Overall): "; - if ( tnindex ) + { + nout << "Normal (Overall): "; + if ( tnindex ) { nout << "idx: " << *tnindex << " "; nout << tnorms[*(tnindex++)]; diff --git a/panda/src/gobj/geomTri.h b/panda/src/gobj/geomTri.h index f8348e18f6..db6f17dd41 100644 --- a/panda/src/gobj/geomTri.h +++ b/panda/src/gobj/geomTri.h @@ -1,6 +1,19 @@ // Filename: geomTri.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMTRI_H diff --git a/panda/src/gobj/geomTrifan.cxx b/panda/src/gobj/geomTrifan.cxx index bb5c1ae083..5d1c325e1c 100644 --- a/panda/src/gobj/geomTrifan.cxx +++ b/panda/src/gobj/geomTrifan.cxx @@ -1,6 +1,19 @@ // Filename: geomTrifan.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -121,7 +134,7 @@ print_draw_immediate( void ) const } nout << "BeginGfx()" << endl; - + for ( j = *(plen++); j > 0; j-- ) { // Draw per vertex @@ -218,7 +231,7 @@ explode() const { int num_tris = 0; int num_prims = get_num_prims(); - + for (int i = 0; i < num_prims; i++) { // Get per-primitive values Colorf per_trifan_color; @@ -258,7 +271,7 @@ explode() const { f3color[v] = get_next_color(ci); } } - + // Now fill each triangle. Each vertex from this point on defines // a new triangle. for (v = 2; v < num_verts; v++) { @@ -280,7 +293,7 @@ explode() const { } else if (get_binding(G_NORMAL) == G_PER_COMPONENT) { normals.push_back(get_next_normal(ni)); } - + // Per-vertex attributes. if (get_binding(G_COORD) == G_PER_VERTEX) { f3vertex[2] = get_next_vertex(vi); @@ -311,11 +324,11 @@ explode() const { Geom *tris = new GeomTri; tris->set_coords(coords, get_binding(G_COORD)); - tris->set_normals(normals, + tris->set_normals(normals, get_binding(G_NORMAL) == G_PER_COMPONENT ? G_PER_PRIM : get_binding(G_NORMAL)); tris->set_texcoords(texcoords, get_binding(G_TEXCOORD)); - tris->set_colors(colors, + tris->set_colors(colors, get_binding(G_COLOR) == G_PER_COMPONENT ? G_PER_PRIM : get_binding(G_COLOR)); tris->set_num_prims(num_tris); @@ -345,7 +358,7 @@ get_tris() const { tris.reserve(num_tris * 3); int k = 0; - + for (int i = 0; i < _numprims; i++) { ushort v0, v1, v2; if (_vindex.empty()) { diff --git a/panda/src/gobj/geomTrifan.h b/panda/src/gobj/geomTrifan.h index 681e1765c1..a6baacbe8d 100644 --- a/panda/src/gobj/geomTrifan.h +++ b/panda/src/gobj/geomTrifan.h @@ -1,6 +1,19 @@ // Filename: geomTrifan.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMTRIFAN_H diff --git a/panda/src/gobj/geomTristrip.cxx b/panda/src/gobj/geomTristrip.cxx index 271d251bce..859afde300 100644 --- a/panda/src/gobj/geomTristrip.cxx +++ b/panda/src/gobj/geomTristrip.cxx @@ -1,6 +1,19 @@ // Filename: geomTristrip.cxx // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -264,7 +277,7 @@ void GeomTristrip::draw_immediate(GraphicsStateGuardianBase *gsg) const { } //////////////////////////////////////////////////////////////////// -// Function: GeomTristrip::get_num_tris +// Function: GeomTristrip::get_num_tris // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -305,7 +318,7 @@ explode() const { int num_tris = 0; int num_prims = get_num_prims(); - + for (int i = 0; i < num_prims; i++) { // Get per-primitive values Colorf per_tristrip_color; @@ -346,7 +359,7 @@ explode() const { f3color[v] = get_next_color(ci); } } - + // Now fill each triangle. Each vertex from this point on defines // a new triangle. for (v = 2; v < num_verts; v++) { @@ -377,7 +390,7 @@ explode() const { f3texcoord[0] = f3texcoord[2]; f3color[0] = f3color[2]; } - + // Per-vertex attributes. if (get_binding(G_COORD) == G_PER_VERTEX) { f3vertex[2] = get_next_vertex(vi); @@ -408,11 +421,11 @@ explode() const { Geom *tris = new GeomTri; tris->set_coords(coords, get_binding(G_COORD)); - tris->set_normals(normals, + tris->set_normals(normals, get_binding(G_NORMAL) == G_PER_COMPONENT ? G_PER_PRIM : get_binding(G_NORMAL)); tris->set_texcoords(texcoords, get_binding(G_TEXCOORD)); - tris->set_colors(colors, + tris->set_colors(colors, get_binding(G_COLOR) == G_PER_COMPONENT ? G_PER_PRIM : get_binding(G_COLOR)); tris->set_num_prims(num_tris); @@ -442,7 +455,7 @@ get_tris() const { tris.reserve(num_tris * 3); int k = 0; - + for (int i = 0; i < _numprims; i++) { ushort v0, v1, v2; if (_vindex.empty()) { @@ -474,7 +487,7 @@ get_tris() const { tris.push_back(v0); tris.push_back(v1); tris.push_back(v2); - + if (even) { v0 = v2; } else { diff --git a/panda/src/gobj/geomTristrip.h b/panda/src/gobj/geomTristrip.h index 81820e3eec..66ca574369 100644 --- a/panda/src/gobj/geomTristrip.h +++ b/panda/src/gobj/geomTristrip.h @@ -1,6 +1,19 @@ // Filename: geomTristrip.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMTRISTRIP_H diff --git a/panda/src/gobj/geomprimitives.h b/panda/src/gobj/geomprimitives.h index a9e61ae279..e0282da7c2 100644 --- a/panda/src/gobj/geomprimitives.h +++ b/panda/src/gobj/geomprimitives.h @@ -1,6 +1,19 @@ // Filename: geomprimitives.h // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMPRIMITIVES_H diff --git a/panda/src/gobj/imageBuffer.I b/panda/src/gobj/imageBuffer.I index 1c183b6c04..4ce479704e 100644 --- a/panda/src/gobj/imageBuffer.I +++ b/panda/src/gobj/imageBuffer.I @@ -1,6 +1,19 @@ // Filename: imageBuffer.I // Created by: drose (21Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/imageBuffer.cxx b/panda/src/gobj/imageBuffer.cxx index 3584fd5175..882d39a806 100644 --- a/panda/src/gobj/imageBuffer.cxx +++ b/panda/src/gobj/imageBuffer.cxx @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Includes @@ -41,13 +54,13 @@ write_datagram(BamWriter *, Datagram &me) filename.find_on_searchpath(get_texture_path()); filename.find_on_searchpath(get_model_path()); if (gobj_cat.is_debug()) { - gobj_cat.debug() + gobj_cat.debug() << "Texture file " << get_name() << " found as " << filename << "\n"; } alpha_filename.find_on_searchpath(get_texture_path()); alpha_filename.find_on_searchpath(get_model_path()); if (gobj_cat.is_debug()) { - gobj_cat.debug() + gobj_cat.debug() << "Alpha image " << get_alpha_name() << " found as " << alpha_filename << "\n"; } break; diff --git a/panda/src/gobj/imageBuffer.h b/panda/src/gobj/imageBuffer.h index e91dace97e..09cd93a6d4 100644 --- a/panda/src/gobj/imageBuffer.h +++ b/panda/src/gobj/imageBuffer.h @@ -1,5 +1,19 @@ // Filename: imageBuffer.h // Created by: mike (09Jan97) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef IMAGEBUFFER_H @@ -29,16 +43,16 @@ class DisplayRegion; //////////////////////////////////////////////////////////////////// class EXPCL_PANDA ImageBuffer : public dDrawable, public Namable { -PUBLISHED: +PUBLISHED: ImageBuffer( void ) : dDrawable() { } virtual ~ImageBuffer( void ) { } - + virtual bool read( const string& name ) = 0; virtual bool write( const string& name = "" ) const = 0; - + public: virtual void config( void ) { WritableConfigurable::config(); } - + virtual void copy(GraphicsStateGuardianBase *, const DisplayRegion *)=0; virtual void copy(GraphicsStateGuardianBase *, const DisplayRegion *, const RenderBuffer &rb)=0; @@ -57,13 +71,13 @@ private: public: //Abstract class, so no factory methods for Reading and Writing - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); protected: void fillin(DatagramIterator& scan, BamReader* manager); - + public: - + static TypeHandle get_class_type() { return _type_handle; } @@ -78,9 +92,9 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/gobj/material.I b/panda/src/gobj/material.I index a5967b8cd3..c3cb9549fb 100644 --- a/panda/src/gobj/material.I +++ b/panda/src/gobj/material.I @@ -1,6 +1,19 @@ // Filename: material.I // Created by: mike (05Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -26,7 +39,7 @@ Material(const Material ©) { } //////////////////////////////////////////////////////////////////// -// Function: Material::Destructor +// Function: Material::Destructor // Access: Public // Description: //////////////////////////////////////////////////////////////////// @@ -35,7 +48,7 @@ INLINE Material:: } //////////////////////////////////////////////////////////////////// -// Function: Material::has_ambient +// Function: Material::has_ambient // Access: Public // Description: Returns true if the ambient color has been explicitly // set for this material, false otherwise. @@ -46,7 +59,7 @@ has_ambient() const { } //////////////////////////////////////////////////////////////////// -// Function: Material::get_ambient +// Function: Material::get_ambient // Access: Public // Description: Returns the ambient color setting, if it has been // set. Returns (0,0,0,0) if the ambient color has not @@ -68,7 +81,7 @@ clear_ambient() { } //////////////////////////////////////////////////////////////////// -// Function: Material::has_diffuse +// Function: Material::has_diffuse // Access: Public // Description: Returns true if the diffuse color has been explicitly // set for this material, false otherwise. @@ -101,7 +114,7 @@ clear_diffuse() { } //////////////////////////////////////////////////////////////////// -// Function: Material::has_specular +// Function: Material::has_specular // Access: Public // Description: Returns true if the specular color has been explicitly // set for this material, false otherwise. @@ -134,7 +147,7 @@ clear_specular() { } //////////////////////////////////////////////////////////////////// -// Function: Material::has_emission +// Function: Material::has_emission // Access: Public // Description: Returns true if the emission color has been explicitly // set for this material, false otherwise. diff --git a/panda/src/gobj/material.cxx b/panda/src/gobj/material.cxx index 81f4f1aabb..877adcfb62 100644 --- a/panda/src/gobj/material.cxx +++ b/panda/src/gobj/material.cxx @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include "material.h" @@ -22,7 +35,7 @@ TypeHandle Material::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Material::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Material:: operator = (const Material ©) { @@ -145,7 +158,7 @@ compare_to(const Material &other) const { } //////////////////////////////////////////////////////////////////// -// Function: Material::output +// Function: Material::output // Access: Public // Description: //////////////////////////////////////////////////////////////////// @@ -164,13 +177,13 @@ output(ostream &out) const { if (has_emission()) { out << " e(" << get_emission() << ")"; } - out << " s" << get_shininess() - << " l" << get_local() + out << " s" << get_shininess() + << " l" << get_local() << " t" << get_twoside(); } //////////////////////////////////////////////////////////////////// -// Function: Material::write +// Function: Material::write // Access: Public // Description: //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/material.h b/panda/src/gobj/material.h index 76e0ba6eef..b0821dd6fa 100644 --- a/panda/src/gobj/material.h +++ b/panda/src/gobj/material.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MATERIAL_H #define MATERIAL_H // @@ -49,7 +61,7 @@ PUBLISHED: INLINE float get_shininess() const; INLINE void set_shininess(float shininess); - + INLINE bool get_local() const; INLINE void set_local(bool local); INLINE bool get_twoside() const; @@ -60,7 +72,7 @@ PUBLISHED: INLINE bool operator < (const Material &other) const; int compare_to(const Material &other) const; - + void output(ostream &out) const; void write(ostream &out, int indent) const; @@ -83,7 +95,7 @@ private: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); protected: static TypedWritable *make_Material(const FactoryParams ¶ms); diff --git a/panda/src/gobj/materialPool.I b/panda/src/gobj/materialPool.I index 18299ba63e..b3cd09a9af 100644 --- a/panda/src/gobj/materialPool.I +++ b/panda/src/gobj/materialPool.I @@ -1,6 +1,19 @@ // Filename: materialPool.I // Created by: drose (30Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/materialPool.cxx b/panda/src/gobj/materialPool.cxx index 13c4c3a09d..d064889f89 100644 --- a/panda/src/gobj/materialPool.cxx +++ b/panda/src/gobj/materialPool.cxx @@ -1,6 +1,19 @@ // Filename: materialPool.cxx // Created by: drose (30Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "materialPool.h" diff --git a/panda/src/gobj/materialPool.h b/panda/src/gobj/materialPool.h index ec9da0097d..58c7813dd4 100644 --- a/panda/src/gobj/materialPool.h +++ b/panda/src/gobj/materialPool.h @@ -1,6 +1,19 @@ // Filename: materialPool.h // Created by: drose (30Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MATERIALPOOL_H @@ -58,4 +71,4 @@ private: #endif - + diff --git a/panda/src/gobj/orthoProjection.I b/panda/src/gobj/orthoProjection.I index fd3795bfd7..3a59bebce5 100644 --- a/panda/src/gobj/orthoProjection.I +++ b/panda/src/gobj/orthoProjection.I @@ -1,12 +1,25 @@ // Filename: orthoProjection.I // Created by: mike (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: OrthoProjection::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE OrthoProjection:: OrthoProjection(const Frustumf &frustum) : _frustum(frustum) { diff --git a/panda/src/gobj/orthoProjection.cxx b/panda/src/gobj/orthoProjection.cxx index 5c808480a4..f8e9ef88a1 100644 --- a/panda/src/gobj/orthoProjection.cxx +++ b/panda/src/gobj/orthoProjection.cxx @@ -1,6 +1,19 @@ // Filename: orthoProjection.cxx // Created by: mike (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomLine.h" @@ -37,17 +50,17 @@ get_projection_mat(CoordinateSystem cs) const { // Function: OrthoProjection::make_geometry // Access: Public, Virtual // Description: Creates a GeomLine that describes the shape of the -// frustum for this projection +// frustum for this projection //////////////////////////////////////////////////////////////////// Geom *OrthoProjection:: make_geometry(const Colorf &color, CoordinateSystem cs) const { Vertexf rtn, ltn, lbn, rbn; Vertexf rtf, ltf, lbf, rbf; - + // x, y, and z here refer to the right, forward, and up vectors, // which are not necessarily the x, y, and z axes. - + LVector3f x = LVector3f::right(cs); LVector3f y = LVector3f::forward(cs); LVector3f z = LVector3f::up(cs); @@ -70,7 +83,7 @@ make_geometry(const Colorf &color, rtf = yf + ((zt + xr) * fs); ltf = yf + ((zt + xl) * fs); lbf = yf + ((zb + xl) * fs); - rbf = yf + ((zb + xr) * fs); + rbf = yf + ((zb + xr) * fs); PTA_Vertexf coords(0); PTA_ushort vindex(0); diff --git a/panda/src/gobj/orthoProjection.h b/panda/src/gobj/orthoProjection.h index 16707eeed7..5095c01d2c 100644 --- a/panda/src/gobj/orthoProjection.h +++ b/panda/src/gobj/orthoProjection.h @@ -2,6 +2,19 @@ // Created by: mike (18Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ORTHOPROJECTION_H #define ORTHOPROJECTION_H @@ -34,7 +47,7 @@ public: protected: Frustumf _frustum; - + public: virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/gobj/perspectiveProjection.I b/panda/src/gobj/perspectiveProjection.I index c2fab31136..c145934fc9 100644 --- a/panda/src/gobj/perspectiveProjection.I +++ b/panda/src/gobj/perspectiveProjection.I @@ -1,12 +1,25 @@ // Filename: perspectiveProjection.I // Created by: drose (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PerspectiveProjection::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PerspectiveProjection:: PerspectiveProjection(const Frustumf &frustum) : _frustum(frustum) { diff --git a/panda/src/gobj/perspectiveProjection.cxx b/panda/src/gobj/perspectiveProjection.cxx index 99f58c7c7c..1fbf5ca06f 100644 --- a/panda/src/gobj/perspectiveProjection.cxx +++ b/panda/src/gobj/perspectiveProjection.cxx @@ -1,6 +1,19 @@ // Filename: perspectiveProjection.cxx // Created by: drose (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomLine.h" @@ -38,17 +51,17 @@ get_projection_mat(CoordinateSystem cs) const { // Function: PerspectiveProjection::make_geometry // Access: Public, Virtual // Description: Creates a GeomLine that describes the shape of the -// frustum for this projection +// frustum for this projection //////////////////////////////////////////////////////////////////// Geom *PerspectiveProjection:: make_geometry(const Colorf &color, CoordinateSystem cs) const { Vertexf rtn, ltn, lbn, rbn; Vertexf rtf, ltf, lbf, rbf; - + // x, y, and z here refer to the right, forward, and up vectors, // which are not necessarily the x, y, and z axes. - + LVector3f x = LVector3f::right(cs); LVector3f y = LVector3f::forward(cs); LVector3f z = LVector3f::up(cs); @@ -71,7 +84,7 @@ make_geometry(const Colorf &color, rtf = yf + ((zt + xr) * fs); ltf = yf + ((zt + xl) * fs); lbf = yf + ((zb + xl) * fs); - rbf = yf + ((zb + xr) * fs); + rbf = yf + ((zb + xr) * fs); PTA_Vertexf coords(0); PTA_ushort vindex(0); @@ -152,9 +165,9 @@ extrude(const LPoint2f &point2d, LPoint3f &origin, LVector3f &direction, // Scale the point from (-1,1) to the range of the frustum. - LPoint2f scaled(_frustum._l + 0.5 * (point2d[0] + 1.0) * + LPoint2f scaled(_frustum._l + 0.5 * (point2d[0] + 1.0) * (_frustum._r - _frustum._l), - _frustum._b + 0.5 * (point2d[1] + 1.0) * + _frustum._b + 0.5 * (point2d[1] + 1.0) * (_frustum._t - _frustum._b)); LVector3f near_vector = @@ -198,9 +211,9 @@ project(const LPoint3f &point3d, LPoint2f &point2d, return false; } - point2d.set((scaled[0] - _frustum._l) * 2.0 / + point2d.set((scaled[0] - _frustum._l) * 2.0 / (_frustum._r - _frustum._l) - 1.0, - (scaled[1] - _frustum._b) * 2.0 / + (scaled[1] - _frustum._b) * 2.0 / (_frustum._t - _frustum._b) - 1.0); return true; } diff --git a/panda/src/gobj/perspectiveProjection.h b/panda/src/gobj/perspectiveProjection.h index 685eaea6a3..3f6b1964f5 100644 --- a/panda/src/gobj/perspectiveProjection.h +++ b/panda/src/gobj/perspectiveProjection.h @@ -2,6 +2,19 @@ // Created by: drose (18Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PERSPECTIVEPROJECTION_H #define PERSPECTIVEPROJECTION_H @@ -40,7 +53,7 @@ public: protected: Frustumf _frustum; - + public: virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/gobj/pixelBuffer.I b/panda/src/gobj/pixelBuffer.I index d95507b368..5050cd7581 100644 --- a/panda/src/gobj/pixelBuffer.I +++ b/panda/src/gobj/pixelBuffer.I @@ -1,6 +1,19 @@ // Filename: pixelBuffer.I // Created by: drose (05Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -31,8 +44,8 @@ PixelBuffer(void) : ImageBuffer() //////////////////////////////////////////////////////////////////// INLINE PixelBuffer:: PixelBuffer(int xsize, int ysize, int components, int component_width, - Type type, Format format) : - ImageBuffer() + Type type, Format format) : + ImageBuffer() { _xsize = xsize; _ysize = ysize; @@ -47,12 +60,12 @@ PixelBuffer(int xsize, int ysize, int components, int component_width, } //////////////////////////////////////////////////////////////////// -// Function: PixelBuffer::Copy Constructor +// Function: PixelBuffer::Copy Constructor // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE PixelBuffer:: -PixelBuffer(const PixelBuffer ©) : +PixelBuffer(const PixelBuffer ©) : _xsize(copy._xsize), _ysize(copy._ysize), _xorg(copy._xorg), @@ -67,7 +80,7 @@ PixelBuffer(const PixelBuffer ©) : } //////////////////////////////////////////////////////////////////// -// Function: PixelBuffer::Copy Assignment Operator +// Function: PixelBuffer::Copy Assignment Operator // Access: Public // Description: //////////////////////////////////////////////////////////////////// @@ -92,7 +105,7 @@ operator = (const PixelBuffer ©) { //////////////////////////////////////////////////////////////////// INLINE PixelBuffer PixelBuffer:: rgb_buffer(int xsize, int ysize) { - return PixelBuffer(xsize, ysize, 3, sizeof(uchar), T_unsigned_byte, + return PixelBuffer(xsize, ysize, 3, sizeof(uchar), T_unsigned_byte, F_rgb); } @@ -103,7 +116,7 @@ rgb_buffer(int xsize, int ysize) { //////////////////////////////////////////////////////////////////// INLINE PixelBuffer PixelBuffer:: rgba_buffer(int xsize, int ysize) { - return PixelBuffer(xsize, ysize, 4, sizeof(uchar), T_unsigned_byte, + return PixelBuffer(xsize, ysize, 4, sizeof(uchar), T_unsigned_byte, F_rgba); } @@ -114,7 +127,7 @@ rgba_buffer(int xsize, int ysize) { //////////////////////////////////////////////////////////////////// INLINE PixelBuffer PixelBuffer:: depth_buffer(int xsize, int ysize) { - return PixelBuffer(xsize, ysize, 1, sizeof(float), T_float, + return PixelBuffer(xsize, ysize, 1, sizeof(float), T_float, F_depth_component); } @@ -125,12 +138,12 @@ depth_buffer(int xsize, int ysize) { //////////////////////////////////////////////////////////////////// INLINE PixelBuffer PixelBuffer:: stencil_buffer(int xsize, int ysize) { - return PixelBuffer(xsize, ysize, 1, sizeof(uchar), T_unsigned_byte, + return PixelBuffer(xsize, ysize, 1, sizeof(uchar), T_unsigned_byte, F_stencil_index); } //////////////////////////////////////////////////////////////////// -// Function: PixelBuffer::Destructor +// Function: PixelBuffer::Destructor // Access: Public // Description: //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/pixelBuffer.cxx b/panda/src/gobj/pixelBuffer.cxx index 6196fa8a8c..52fbecc352 100644 --- a/panda/src/gobj/pixelBuffer.cxx +++ b/panda/src/gobj/pixelBuffer.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pixelBuffer.h" #include "config_gobj.h" @@ -15,7 +24,7 @@ TypeHandle PixelBuffer::_type_handle; //////////////////////////////////////////////////////////////////// -// Function: config +// Function: config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -105,7 +114,7 @@ bool PixelBuffer::load(const PNMImage& pnmimage) default: // Eh? nassertr(false, false); - _format = F_rgb; + _format = F_rgb; }; bool has_alpha = pnmimage.has_alpha(); @@ -117,7 +126,7 @@ bool PixelBuffer::load(const PNMImage& pnmimage) _type = T_unsigned_byte; _image = PTA_uchar(_xsize * _ysize * _components); int idx = 0; - + for (int j = _ysize-1; j >= 0; j--) { for (int i = 0; i < _xsize; i++) { if (is_grayscale) { @@ -139,7 +148,7 @@ bool PixelBuffer::load(const PNMImage& pnmimage) _type = T_unsigned_short; _image = PTA_uchar(_xsize * _ysize * _components * 2); int idx = 0; - + for (int j = _ysize-1; j >= 0; j--) { for (int i = 0; i < _xsize; i++) { if (is_grayscale) { @@ -163,7 +172,7 @@ bool PixelBuffer::load(const PNMImage& pnmimage) _image = PTA_uchar(_xsize * _ysize * _components); int idx = 0; double scale = 255.0 / (double)maxval; - + for (int j = _ysize-1; j >= 0; j--) { for (int i = 0; i < _xsize; i++) { if (is_grayscale) { @@ -187,7 +196,7 @@ bool PixelBuffer::load(const PNMImage& pnmimage) _image = PTA_uchar(_xsize * _ysize * _components * 2); int idx = 0; double scale = 65535.0 / (double)maxval; - + for (int j = _ysize-1; j >= 0; j--) { for (int i = 0; i < _xsize; i++) { if (is_grayscale) { @@ -257,7 +266,7 @@ store(PNMImage &pnmimage) const { } } return true; - } + } gobj_cat.error() << "Couldn't write image for " << get_name() @@ -266,7 +275,7 @@ store(PNMImage &pnmimage) const { } //////////////////////////////////////////////////////////////////// -// Function: copy +// Function: copy // Access: // Description: Deep copy of pixel buffer //////////////////////////////////////////////////////////////////// @@ -282,7 +291,7 @@ copy(const PixelBuffer *pb) { _format = pb->_format; _image = PTA_uchar(0); if (!pb->_image.empty()) - _image.v() = pb->_image.v(); + _image.v() = pb->_image.v(); } void PixelBuffer::copy(GraphicsStateGuardianBase *gsg, const DisplayRegion *dr) { diff --git a/panda/src/gobj/pixelBuffer.h b/panda/src/gobj/pixelBuffer.h index d17e78da35..4c480c8a3d 100644 --- a/panda/src/gobj/pixelBuffer.h +++ b/panda/src/gobj/pixelBuffer.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PIXELBUFFER_H #define PIXELBUFFER_H // @@ -35,7 +47,7 @@ public: T_unsigned_byte_332, T_float, }; - + enum Format { F_color_index, F_stencil_index, @@ -61,7 +73,7 @@ public: }; INLINE PixelBuffer(void); - INLINE PixelBuffer(int xsize, int ysize, int components, + INLINE PixelBuffer(int xsize, int ysize, int components, int component_width, Type type, Format format); INLINE PixelBuffer(const PixelBuffer ©); INLINE void operator = (const PixelBuffer ©); @@ -108,7 +120,7 @@ public: INLINE Format get_format() const; INLINE Type get_image_type() const; - INLINE void set_uchar_rgb_texel(const uchar color[3], + INLINE void set_uchar_rgb_texel(const uchar color[3], int x, int y, int width); private: @@ -146,8 +158,8 @@ protected: // pixelbuffer "origin" represents upper left screen point at which // pixelbuffer should be drawn using draw_pixel_buffer - int _xorg; - int _yorg; + int _xorg; + int _yorg; int _border; int _components; int _component_width; diff --git a/panda/src/gobj/projection.cxx b/panda/src/gobj/projection.cxx index 972c3b6f58..91009eaa3a 100644 --- a/panda/src/gobj/projection.cxx +++ b/panda/src/gobj/projection.cxx @@ -1,6 +1,19 @@ // Filename: projection.cxx // Created by: drose (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "projection.h" diff --git a/panda/src/gobj/projection.h b/panda/src/gobj/projection.h index 26d9773b4a..bd08012ece 100644 --- a/panda/src/gobj/projection.h +++ b/panda/src/gobj/projection.h @@ -2,6 +2,19 @@ // Created by: drose (18Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PROJECTION_H #define PROJECTION_H @@ -36,7 +49,7 @@ public: CoordinateSystem cs = CS_default) const; virtual BoundingVolume *make_bounds(CoordinateSystem cs = CS_default) const; - + public: virtual TypeHandle get_type() const { return get_class_type(); diff --git a/panda/src/gobj/test_gobj.cxx b/panda/src/gobj/test_gobj.cxx index 43679311c0..60ab894b0e 100644 --- a/panda/src/gobj/test_gobj.cxx +++ b/panda/src/gobj/test_gobj.cxx @@ -1,6 +1,19 @@ // Filename: test_gobj.cxx // Created by: shochet (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geom.h" diff --git a/panda/src/gobj/texture.I b/panda/src/gobj/texture.I index f31314a2a6..981521a26b 100644 --- a/panda/src/gobj/texture.I +++ b/panda/src/gobj/texture.I @@ -1,13 +1,26 @@ // Filename: texture.I // Created by: drose (05Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Texture::apply // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void Texture:: apply(GraphicsStateGuardianBase *gsg) { diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 5a2e561aed..79191f1690 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Includes @@ -85,7 +98,7 @@ consider_rescale(PNMImage &pnmimage, const string &name) { if (pnmimage.get_x_size() != new_x_size || pnmimage.get_y_size() != new_y_size) { gobj_cat.info() - << "Automatically rescaling " << name << " from " + << "Automatically rescaling " << name << " from " << pnmimage.get_x_size() << " by " << pnmimage.get_y_size() << " to " << new_x_size << " by " << new_y_size << "\n"; @@ -114,7 +127,7 @@ Texture() : ImageBuffer() { } //////////////////////////////////////////////////////////////////// -// Function: Destructor +// Function: Destructor // Access: Published // Description: //////////////////////////////////////////////////////////////////// @@ -175,21 +188,21 @@ read(const string &name, const string &gray) { if (pnmimage.get_x_size() != grayimage.get_x_size() || pnmimage.get_y_size() != grayimage.get_y_size()) { gobj_cat.info() - << "Automatically rescaling " << gray << " from " + << "Automatically rescaling " << gray << " from " << grayimage.get_x_size() << " by " << grayimage.get_y_size() << " to " << pnmimage.get_x_size() << " by " << pnmimage.get_y_size() << "\n"; - PNMImage scaled(pnmimage.get_x_size(), pnmimage.get_y_size(), + PNMImage scaled(pnmimage.get_x_size(), pnmimage.get_y_size(), grayimage.get_num_channels(), grayimage.get_maxval(), grayimage.get_type()); scaled.quick_filter_from(grayimage); grayimage = scaled; } - + // Make the original image a 4-component image pnmimage.add_alpha(); for (int x = 0; x < pnmimage.get_x_size(); x++) { - for (int y = 0; y < pnmimage.get_y_size(); y++) { + for (int y = 0; y < pnmimage.get_y_size(); y++) { pnmimage.set_alpha(x, y, grayimage.get_gray(x, y)); } } @@ -200,7 +213,7 @@ read(const string &name, const string &gray) { } //////////////////////////////////////////////////////////////////// -// Function: write +// Function: write // Access: Published // Description: //////////////////////////////////////////////////////////////////// @@ -235,7 +248,7 @@ bool Texture::store(PNMImage& pnmimage) const } //////////////////////////////////////////////////////////////////// -// Function: prepare +// Function: prepare // Access: Public // Description: Creates a context for the texture on the particular // GSG, if it does not already exist. Returns the new @@ -342,7 +355,7 @@ void Texture::draw(GraphicsStateGuardianBase *gsg, const DisplayRegion *dr, } //////////////////////////////////////////////////////////////////// -// Function: set_wrapu +// Function: set_wrapu // Access: Published // Description: //////////////////////////////////////////////////////////////////// @@ -449,10 +462,10 @@ write_datagram(BamWriter *manager, Datagram &me) //////////////////////////////////////////////////////////////////// void Texture:: fillin(DatagramIterator &scan, BamReader *manager) { - //We don't want to call ImageBuffer::fillin, like we + //We don't want to call ImageBuffer::fillin, like we //would normally, since due to needing to know the name //of the Texture before creating it, we have already read - //that name in. This is something of a problem as it forces + //that name in. This is something of a problem as it forces //Texture to know how the parent write_datagram works. And //makes the assumption that the only data being written is //the name diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index aa9d2bd842..7c398d3dbf 100644 --- a/panda/src/gobj/texture.h +++ b/panda/src/gobj/texture.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TEXTURE_H #define TEXTURE_H // @@ -36,7 +48,7 @@ PUBLISHED: // Bilinear filtering of four neighboring pixels FT_linear, - + // Min Filter Only // Point sample the pixel from the nearest mipmap level @@ -48,11 +60,11 @@ PUBLISHED: // Point sample the pixel from two mipmap levels, and linearly blend FT_nearest_mipmap_linear, - // A.k.a. trilinear filtering: Bilinear filter the pixel from + // A.k.a. trilinear filtering: Bilinear filter the pixel from // two mipmap levels, and linearly blend the results. FT_linear_mipmap_linear, }; - + enum WrapMode { WM_clamp, WM_repeat, @@ -91,7 +103,7 @@ public: INLINE int get_level() const; -PUBLISHED: +PUBLISHED: void set_wrapu(WrapMode wrap); void set_wrapv(WrapMode wrap); void set_minfilter(FilterType filter); @@ -106,7 +118,7 @@ PUBLISHED: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_Texture(const FactoryParams ¶ms); diff --git a/panda/src/gobj/texturePool.I b/panda/src/gobj/texturePool.I index 526463eba4..7408e26c3d 100644 --- a/panda/src/gobj/texturePool.I +++ b/panda/src/gobj/texturePool.I @@ -1,6 +1,19 @@ // Filename: texturePool.I // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/texturePool.cxx b/panda/src/gobj/texturePool.cxx index 867049a076..d2b9cf46bd 100644 --- a/panda/src/gobj/texturePool.cxx +++ b/panda/src/gobj/texturePool.cxx @@ -1,6 +1,19 @@ // Filename: texturePool.cxx // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "texturePool.h" diff --git a/panda/src/gobj/texturePool.h b/panda/src/gobj/texturePool.h index f065c49282..71cf1e067c 100644 --- a/panda/src/gobj/texturePool.h +++ b/panda/src/gobj/texturePool.h @@ -1,6 +1,19 @@ // Filename: texturePool.h // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXTUREPOOL_H @@ -63,4 +76,4 @@ private: #endif - + diff --git a/panda/src/graph/allAttributesWrapper.I b/panda/src/graph/allAttributesWrapper.I index 406fc3227b..9e85ef790b 100644 --- a/panda/src/graph/allAttributesWrapper.I +++ b/panda/src/graph/allAttributesWrapper.I @@ -1,12 +1,25 @@ // Filename: allAttributesWrapper.I // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllAttributesWrapper:: AllAttributesWrapper() { @@ -15,7 +28,7 @@ AllAttributesWrapper() { //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllAttributesWrapper:: AllAttributesWrapper(const NodeAttributes &attrib) : @@ -26,7 +39,7 @@ AllAttributesWrapper(const NodeAttributes &attrib) : //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllAttributesWrapper:: AllAttributesWrapper(const AllAttributesWrapper ©) : @@ -37,7 +50,7 @@ AllAttributesWrapper(const AllAttributesWrapper ©) : //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void AllAttributesWrapper:: operator = (const AllAttributesWrapper ©) { @@ -59,7 +72,7 @@ init_from(const AllTransitionsWrapper &) { //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllAttributesWrapper:: ~AllAttributesWrapper() { @@ -189,7 +202,7 @@ is_initial() const { //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH int AllAttributesWrapper:: compare_to(const AllAttributesWrapper &other) const { diff --git a/panda/src/graph/allAttributesWrapper.T b/panda/src/graph/allAttributesWrapper.T index bd18bf3878..d58973bf57 100644 --- a/panda/src/graph/allAttributesWrapper.T +++ b/panda/src/graph/allAttributesWrapper.T @@ -1,6 +1,19 @@ // Filename: allAttributesWrapper.T // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ // false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_attribute_into(Attribute *&ptr, const AllAttributesWrapper &attrib, TypeHandle transition_type) { NodeAttribute *nt = attrib.get_attribute(transition_type); diff --git a/panda/src/graph/allAttributesWrapper.cxx b/panda/src/graph/allAttributesWrapper.cxx index fad2d975bc..7eeadfdf18 100644 --- a/panda/src/graph/allAttributesWrapper.cxx +++ b/panda/src/graph/allAttributesWrapper.cxx @@ -1,6 +1,19 @@ // Filename: allAttributesWrapper.cxx // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "allAttributesWrapper.h" @@ -27,7 +40,7 @@ apply_in_place(const AllTransitionsWrapper &trans) { // the indicated transition to the other attribute. //////////////////////////////////////////////////////////////////// void AllAttributesWrapper:: -apply_from(const AllAttributesWrapper &other, +apply_from(const AllAttributesWrapper &other, const AllTransitionsWrapper &trans) { if (trans._cache != (NodeTransitionCache *)NULL) { _attrib.apply_from(other._attrib, *trans._cache); @@ -55,7 +68,7 @@ apply(const AllTransitionsWrapper &trans) const { //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AllAttributesWrapper:: output(ostream &out) const { @@ -65,7 +78,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: AllAttributesWrapper::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AllAttributesWrapper:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/allAttributesWrapper.h b/panda/src/graph/allAttributesWrapper.h index c774469d80..9b2dfe879f 100644 --- a/panda/src/graph/allAttributesWrapper.h +++ b/panda/src/graph/allAttributesWrapper.h @@ -1,6 +1,19 @@ // Filename: allAttributesWrapper.h // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ALLATTRIBUTESWRAPPER_H @@ -17,7 +30,7 @@ class AllTransitionsWrapper; //////////////////////////////////////////////////////////////////// // Class : AllAttributesWrapper -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA AllAttributesWrapper { public: @@ -28,7 +41,7 @@ public: INLINE_GRAPH AllAttributesWrapper(const NodeAttributes &attrib); INLINE_GRAPH AllAttributesWrapper(const AllAttributesWrapper ©); INLINE_GRAPH void operator = (const AllAttributesWrapper ©); - INLINE_GRAPH static AllAttributesWrapper + INLINE_GRAPH static AllAttributesWrapper init_from(const AllTransitionsWrapper &trans); INLINE_GRAPH ~AllAttributesWrapper(); @@ -48,7 +61,7 @@ public: INLINE_GRAPH void make_initial(); void apply_in_place(const AllTransitionsWrapper &trans); - void apply_from(const AllAttributesWrapper &other, + void apply_from(const AllAttributesWrapper &other, const AllTransitionsWrapper &trans); NodeAttributes *apply(const AllTransitionsWrapper &trans) const; diff --git a/panda/src/graph/allTransitionsWrapper.I b/panda/src/graph/allTransitionsWrapper.I index b695e0a60d..6a9a9c707e 100644 --- a/panda/src/graph/allTransitionsWrapper.I +++ b/panda/src/graph/allTransitionsWrapper.I @@ -1,6 +1,19 @@ // Filename: allTransitionsWrapper.I // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeRelation.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllTransitionsWrapper:: AllTransitionsWrapper() { @@ -17,7 +30,7 @@ AllTransitionsWrapper() { //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllTransitionsWrapper:: AllTransitionsWrapper(const AllTransitionsWrapper ©) : @@ -29,7 +42,7 @@ AllTransitionsWrapper(const AllTransitionsWrapper ©) : //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void AllTransitionsWrapper:: operator = (const AllTransitionsWrapper ©) { @@ -40,7 +53,7 @@ operator = (const AllTransitionsWrapper ©) { //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllTransitionsWrapper:: ~AllTransitionsWrapper() { @@ -79,7 +92,7 @@ init_from(const AllAttributesWrapper &) { //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool AllTransitionsWrapper:: is_empty() const { - return + return (_cache == (NodeTransitionCache *)NULL) || _cache->is_empty(); } @@ -208,7 +221,7 @@ is_identity() const { //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH int AllTransitionsWrapper:: compare_to(const AllTransitionsWrapper &other) const { @@ -290,7 +303,7 @@ compose_in_place(const AllTransitionsWrapper &other) { //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::invert_in_place // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void AllTransitionsWrapper:: invert_in_place() { @@ -363,7 +376,7 @@ store_to_cache(NodeRelation *arc, Node *top_subtree) { INLINE_GRAPH void AllTransitionsWrapper:: store_to_cache_partial(NodeRelation *arc, Node *top_subtree) { arc->_top_subtree = top_subtree; - arc->_net_transitions = + arc->_net_transitions = NodeTransitionCache::c_union(arc->_net_transitions, _cache); if (wrt_cat.is_spam()) { @@ -382,7 +395,7 @@ INLINE_GRAPH bool AllTransitionsWrapper:: is_cache_verified(UpdateSeq as_of) const { if (wrt_cat.is_spam()) { wrt_cat.spam() - << "AllTransitionsWrapper::is_cache_verified(" << as_of + << "AllTransitionsWrapper::is_cache_verified(" << as_of << "), _all_verified = " << _all_verified << ", result = " << (as_of <= _all_verified) << "\n"; } @@ -413,7 +426,7 @@ set_computed_verified(UpdateSeq now) { // and stores the result in this wrapper. //////////////////////////////////////////////////////////////////// INLINE_GRAPH void AllTransitionsWrapper:: -cached_compose(const AllTransitionsWrapper &cache, +cached_compose(const AllTransitionsWrapper &cache, const AllTransitionsWrapper &value, UpdateSeq now) { _cache = NodeTransitionCache::cached_compose(_cache, cache._cache, @@ -424,7 +437,7 @@ cached_compose(const AllTransitionsWrapper &cache, //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllTransitionsWrapper::size_type AllTransitionsWrapper:: size() const { @@ -437,7 +450,7 @@ size() const { //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllTransitionsWrapper::const_iterator AllTransitionsWrapper:: begin() const { @@ -450,7 +463,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH AllTransitionsWrapper::const_iterator AllTransitionsWrapper:: end() const { diff --git a/panda/src/graph/allTransitionsWrapper.T b/panda/src/graph/allTransitionsWrapper.T index bc893ebf02..6fd9a76e26 100644 --- a/panda/src/graph/allTransitionsWrapper.T +++ b/panda/src/graph/allTransitionsWrapper.T @@ -1,6 +1,19 @@ // Filename: allTransitionsWrapper.T // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ // false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const AllTransitionsWrapper &trans, TypeHandle transition_type) { NodeTransition *nt = trans.get_transition(transition_type); @@ -28,7 +41,7 @@ get_transition_into(Transition *&ptr, const AllTransitionsWrapper &trans, } template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const AllTransitionsWrapper &trans) { return get_transition_into(ptr, trans, Transition::get_class_type()); } diff --git a/panda/src/graph/allTransitionsWrapper.cxx b/panda/src/graph/allTransitionsWrapper.cxx index 8df1852b8d..d639e09dac 100644 --- a/panda/src/graph/allTransitionsWrapper.cxx +++ b/panda/src/graph/allTransitionsWrapper.cxx @@ -1,6 +1,19 @@ // Filename: allTransitionsWrapper.cxx // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "allTransitionsWrapper.h" @@ -13,7 +26,7 @@ NodeTransitionCache AllTransitionsWrapper::_empty_cache; //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AllTransitionsWrapper:: output(ostream &out) const { @@ -25,7 +38,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: AllTransitionsWrapper::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AllTransitionsWrapper:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/allTransitionsWrapper.h b/panda/src/graph/allTransitionsWrapper.h index 8c024b00fe..07bb4367b3 100644 --- a/panda/src/graph/allTransitionsWrapper.h +++ b/panda/src/graph/allTransitionsWrapper.h @@ -1,6 +1,19 @@ // Filename: allTransitionsWrapper.h // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ALLTRANSITIONSWRAPPER_H @@ -51,9 +64,9 @@ public: INLINE_GRAPH void operator = (const AllTransitionsWrapper ©); INLINE_GRAPH ~AllTransitionsWrapper(); - INLINE_GRAPH static AllTransitionsWrapper + INLINE_GRAPH static AllTransitionsWrapper init_from(const AllTransitionsWrapper &other); - INLINE_GRAPH static AllTransitionsWrapper + INLINE_GRAPH static AllTransitionsWrapper init_from(const AllAttributesWrapper &attrib); INLINE_GRAPH bool is_empty() const; @@ -84,7 +97,7 @@ public: INLINE_GRAPH bool is_cache_verified(UpdateSeq as_of) const; INLINE_GRAPH void set_computed_verified(UpdateSeq now); - INLINE_GRAPH void cached_compose(const AllTransitionsWrapper &cache, + INLINE_GRAPH void cached_compose(const AllTransitionsWrapper &cache, const AllTransitionsWrapper &value, UpdateSeq now); diff --git a/panda/src/graph/arcChain.I b/panda/src/graph/arcChain.I index 3c4f3760c4..4915f268bb 100644 --- a/panda/src/graph/arcChain.I +++ b/panda/src/graph/arcChain.I @@ -1,6 +1,19 @@ // Filename: arcChain.I // Created by: drose (05Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -43,7 +56,7 @@ ArcComponent(NodeRelation *arc, ArcComponent *next) : //////////////////////////////////////////////////////////////////// // Function: ArcChain::ArcComponent::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH ArcChain::ArcComponent:: ArcComponent(const ArcComponent ©) : @@ -66,7 +79,7 @@ ArcComponent(const ArcComponent ©) : //////////////////////////////////////////////////////////////////// // Function: ArcChain::ArcComponent::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH ArcChain::ArcComponent:: ~ArcComponent() { @@ -190,7 +203,7 @@ ForwardIterator(ArcChain::ArcComponent *comp) : _comp(comp) { //////////////////////////////////////////////////////////////////// // Function: ArcChain::ForwardIterator::Dereference Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeRelation *ArcChain::ForwardIterator:: operator * () const { @@ -201,7 +214,7 @@ operator * () const { //////////////////////////////////////////////////////////////////// // Function: ArcChain::ForwardIterator::Increment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void ArcChain::ForwardIterator:: operator ++() { @@ -218,7 +231,7 @@ operator ++() { //////////////////////////////////////////////////////////////////// // Function: ArcChain::ForwardIterator::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool ArcChain::ForwardIterator:: operator == (const ArcChain::ForwardIterator &other) const { @@ -228,7 +241,7 @@ operator == (const ArcChain::ForwardIterator &other) const { //////////////////////////////////////////////////////////////////// // Function: ArcChain::ForwardIterator::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool ArcChain::ForwardIterator:: operator != (const ArcChain::ForwardIterator &other) const { @@ -269,7 +282,7 @@ ArcChain(Node *top_node) { //////////////////////////////////////////////////////////////////// // Function: ArcChain::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH ArcChain:: ArcChain(const ArcChain ©) : @@ -280,7 +293,7 @@ ArcChain(const ArcChain ©) : //////////////////////////////////////////////////////////////////// // Function: ArcChain::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void ArcChain:: operator = (const ArcChain ©) { diff --git a/panda/src/graph/arcChain.cxx b/panda/src/graph/arcChain.cxx index ea5e2e9180..9e05ac2563 100644 --- a/panda/src/graph/arcChain.cxx +++ b/panda/src/graph/arcChain.cxx @@ -1,6 +1,19 @@ // Filename: arcChain.cxx // Created by: drose (05Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "arcChain.h" @@ -13,7 +26,7 @@ TypeHandle ArcChain::ArcComponent::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ArcChain::ArcComponent::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ArcChain::ArcComponent:: operator = (const ArcComponent ©) { diff --git a/panda/src/graph/arcChain.h b/panda/src/graph/arcChain.h index 44f908652f..e0207cdd81 100644 --- a/panda/src/graph/arcChain.h +++ b/panda/src/graph/arcChain.h @@ -1,6 +1,19 @@ // Filename: arcChain.h // Created by: drose (05Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ARCCHAIN_H @@ -98,7 +111,7 @@ protected: register_type(_type_handle, "ArcChain::ArcComponent", ReferenceCount::get_class_type()); } - + private: static TypeHandle _type_handle; }; @@ -158,7 +171,7 @@ public: ArcComponent::init_type(); register_type(_type_handle, "ArcChain"); } - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/graph/bitMask32Transition.cxx b/panda/src/graph/bitMask32Transition.cxx index 57ed08a766..fc0cc7c02e 100644 --- a/panda/src/graph/bitMask32Transition.cxx +++ b/panda/src/graph/bitMask32Transition.cxx @@ -1,6 +1,19 @@ // Filename: bitMask32Transition.cxx // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "bitMask32Transition.h" diff --git a/panda/src/graph/bitMask32Transition.h b/panda/src/graph/bitMask32Transition.h index 412a8fbd0a..95cdf5f961 100644 --- a/panda/src/graph/bitMask32Transition.h +++ b/panda/src/graph/bitMask32Transition.h @@ -1,6 +1,19 @@ // Filename: bitMask32Transition.h // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BITMASK32TRANSITION_H diff --git a/panda/src/graph/bitMaskAttribute.T b/panda/src/graph/bitMaskAttribute.T index bfc232ae0b..d893c2ac47 100644 --- a/panda/src/graph/bitMaskAttribute.T +++ b/panda/src/graph/bitMaskAttribute.T @@ -1,6 +1,19 @@ -// Filename: bitMaskAttribute.I +// Filename: bitMaskAttribute.T // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -11,7 +24,7 @@ TypeHandle BitMaskAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH BitMaskAttribute:: @@ -21,7 +34,7 @@ BitMaskAttribute() { //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH BitMaskAttribute:: @@ -33,7 +46,7 @@ BitMaskAttribute(const MaskType &mask) : //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH BitMaskAttribute:: @@ -46,7 +59,7 @@ BitMaskAttribute(const BitMaskAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void BitMaskAttribute:: @@ -58,7 +71,7 @@ operator = (const BitMaskAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::set_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void BitMaskAttribute:: @@ -69,7 +82,7 @@ set_mask(const MaskType &mask) { //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::get_maskType // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH const MaskType &BitMaskAttribute:: @@ -80,7 +93,7 @@ get_mask() const { //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void BitMaskAttribute:: @@ -91,7 +104,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: BitMaskAttribute::internal_compare_to // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int BitMaskAttribute:: diff --git a/panda/src/graph/bitMaskAttribute.h b/panda/src/graph/bitMaskAttribute.h index 045a9a3de3..48f0136a23 100644 --- a/panda/src/graph/bitMaskAttribute.h +++ b/panda/src/graph/bitMaskAttribute.h @@ -1,6 +1,19 @@ // Filename: bitMaskAttribute.h // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BITMASKATTRIBUTE_H @@ -15,7 +28,7 @@ class BitMaskTransition; //////////////////////////////////////////////////////////////////// // Class : BitMaskAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// template class BitMaskAttribute : public NodeAttribute { @@ -48,7 +61,7 @@ public: static void init_type() { NodeAttribute::init_type(); MaskType::init_type(); - register_type(_type_handle, + register_type(_type_handle, string("BitMaskAttribute<") + MaskType::get_class_type().get_name() + ">", NodeAttribute::get_class_type()); diff --git a/panda/src/graph/bitMaskTransition.T b/panda/src/graph/bitMaskTransition.T index 7664a472dc..7926ab3f6a 100644 --- a/panda/src/graph/bitMaskTransition.T +++ b/panda/src/graph/bitMaskTransition.T @@ -1,6 +1,19 @@ -// Filename: bitMaskTransition.I +// Filename: bitMaskTransition.T // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "bitMaskAttribute.h" @@ -11,7 +24,7 @@ TypeHandle BitMaskTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH BitMaskTransition:: @@ -23,7 +36,7 @@ BitMaskTransition() { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH BitMaskTransition:: @@ -35,7 +48,7 @@ BitMaskTransition(const MaskType &and, const MaskType &or) { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH BitMaskTransition:: @@ -49,7 +62,7 @@ BitMaskTransition(const BitMaskTransition ©) : //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void BitMaskTransition:: @@ -62,7 +75,7 @@ operator = (const BitMaskTransition ©) { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::set_and // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void BitMaskTransition:: @@ -74,7 +87,7 @@ set_and(const MaskType &and) { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::get_and // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH const MaskType &BitMaskTransition:: @@ -85,7 +98,7 @@ get_and() const { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::set_or // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void BitMaskTransition:: @@ -97,7 +110,7 @@ set_or(const MaskType &or) { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::get_or // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH const MaskType &BitMaskTransition:: @@ -135,7 +148,7 @@ compose(const NodeTransition *other) const { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::invert // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NodeTransition *BitMaskTransition:: @@ -180,7 +193,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void BitMaskTransition:: @@ -194,7 +207,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: BitMaskTransition::internal_compare_to // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int BitMaskTransition:: diff --git a/panda/src/graph/bitMaskTransition.h b/panda/src/graph/bitMaskTransition.h index 1a7e888223..86f8484b14 100644 --- a/panda/src/graph/bitMaskTransition.h +++ b/panda/src/graph/bitMaskTransition.h @@ -1,6 +1,19 @@ // Filename: bitMaskTransition.h // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BITMASKTRANSITION_H @@ -65,7 +78,7 @@ public: static void init_type() { NodeTransition::init_type(); MaskType::init_type(); - register_type(_type_handle, + register_type(_type_handle, string("BitMaskTransition<") + MaskType::get_class_type().get_name() + ">", NodeTransition::get_class_type()); diff --git a/panda/src/graph/boundedObject.I b/panda/src/graph/boundedObject.I index 07672752e4..35bfc47eb0 100644 --- a/panda/src/graph/boundedObject.I +++ b/panda/src/graph/boundedObject.I @@ -1,6 +1,19 @@ // Filename: boundedObject.I // Created by: drose (02Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: BoundedObject::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH BoundedObject:: BoundedObject() { diff --git a/panda/src/graph/boundedObject.cxx b/panda/src/graph/boundedObject.cxx index d515026dfd..93bd969b1b 100644 --- a/panda/src/graph/boundedObject.cxx +++ b/panda/src/graph/boundedObject.cxx @@ -1,6 +1,19 @@ // Filename: boundedObject.cxx // Created by: drose (02Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "boundedObject.h" @@ -13,7 +26,7 @@ TypeHandle BoundedObject::_type_handle; //////////////////////////////////////////////////////////////////// // Function: BoundedObject::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// BoundedObject:: ~BoundedObject() { @@ -47,7 +60,7 @@ recompute_bound() { default: graph_cat.error() - << "Unexpected _bound_type: " << (int)_bound_type + << "Unexpected _bound_type: " << (int)_bound_type << " in BoundedObject::recompute_bound()\n"; _bound = NULL; } diff --git a/panda/src/graph/boundedObject.h b/panda/src/graph/boundedObject.h index 48021fb8ba..3e86099b50 100644 --- a/panda/src/graph/boundedObject.h +++ b/panda/src/graph/boundedObject.h @@ -2,6 +2,19 @@ // Created by: drose (02Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BOUNDEDOBJECT_H #define BOUNDEDOBJECT_H diff --git a/panda/src/graph/config_graph.cxx b/panda/src/graph/config_graph.cxx index e5fc5b9b0c..813d63d878 100644 --- a/panda/src/graph/config_graph.cxx +++ b/panda/src/graph/config_graph.cxx @@ -1,6 +1,19 @@ // Filename: config_graph.cxx // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_graph.h" @@ -96,5 +109,5 @@ init_libgraph() { //functions with BamReader's factory Node::register_with_read_factory(); NamedNode::register_with_read_factory(); - NodeRelation::register_with_read_factory(); + NodeRelation::register_with_read_factory(); } diff --git a/panda/src/graph/config_graph.h b/panda/src/graph/config_graph.h index ab82fca1d2..d3cf1b591f 100644 --- a/panda/src/graph/config_graph.h +++ b/panda/src/graph/config_graph.h @@ -2,6 +2,19 @@ // Created by: drose (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_GRAPH_H #define CONFIG_GRAPH_H diff --git a/panda/src/graph/dftraverser.T b/panda/src/graph/dftraverser.T index 169b246cd1..ff4515033b 100644 --- a/panda/src/graph/dftraverser.T +++ b/panda/src/graph/dftraverser.T @@ -1,6 +1,19 @@ // Filename: dftraverser.T // Created by: drose (26Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dftraverser.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: DFTraverser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH DFTraverser:: @@ -55,9 +68,9 @@ template void DFTraverser:: traverse(NodeRelation *arc, AttributeWrapper state, LevelState level_state) { nassertv(arc->get_child() != (Node *)NULL); - + // Give the visitor a chance to veto this arc. - TransitionWrapper trans = + TransitionWrapper trans = TransitionWrapper::init_from(_initial_render_state); trans.extract_from(arc); @@ -84,7 +97,7 @@ traverse(Node *node, AttributeWrapper &state, LevelState &level_state) { if (_visitor.reached_node(node, state, level_state)) { // Look for further children of the given NodeRelation. - const DownRelationPointers &drp = + const DownRelationPointers &drp = node->find_connection(_graph_type).get_down(); // Now visit each of the children in turn. @@ -98,11 +111,11 @@ traverse(Node *node, AttributeWrapper &state, LevelState &level_state) { // Convenience functions. template INLINE void -df_traverse(NodeRelation *arc, Visitor &visitor, +df_traverse(NodeRelation *arc, Visitor &visitor, const AttributeWrapper &initial_render_state, const LevelState &initial_level_state, TypeHandle graph_type) { - DFTraverser + DFTraverser dft(visitor, initial_render_state, graph_type); dft.start(arc, initial_level_state); } @@ -113,7 +126,7 @@ df_traverse(Node *root, Visitor &visitor, const AttributeWrapper &initial_render_state, const LevelState &initial_level_state, TypeHandle graph_type) { - DFTraverser + DFTraverser dft(visitor, initial_render_state, graph_type); dft.start(root, initial_level_state); } diff --git a/panda/src/graph/dftraverser.h b/panda/src/graph/dftraverser.h index 5d549fb4e3..8840aab08c 100644 --- a/panda/src/graph/dftraverser.h +++ b/panda/src/graph/dftraverser.h @@ -2,6 +2,19 @@ // Created by: drose (26Oct98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DFTRAVERSER_H #define DFTRAVERSER_H @@ -35,7 +48,7 @@ public: INLINE_GRAPH void start(Node *root, const LevelState &initial_level_state); protected: - void traverse(NodeRelation *arc, + void traverse(NodeRelation *arc, AttributeWrapper render_state, LevelState level_state); void traverse(Node *node, diff --git a/panda/src/graph/graphHashGenerator.h b/panda/src/graph/graphHashGenerator.h index 6d2fdc9619..ae00c69b52 100644 --- a/panda/src/graph/graphHashGenerator.h +++ b/panda/src/graph/graphHashGenerator.h @@ -1,6 +1,19 @@ // Filename: graphHashGenerator.h // Created by: drose (14May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GRAPHHASHGENERATOR_H diff --git a/panda/src/graph/graphReducer.cxx b/panda/src/graph/graphReducer.cxx index 70e554912d..dcf3c1450a 100644 --- a/panda/src/graph/graphReducer.cxx +++ b/panda/src/graph/graphReducer.cxx @@ -1,6 +1,19 @@ // Filename: graphReducer.cxx // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphReducer.h" @@ -14,7 +27,7 @@ //////////////////////////////////////////////////////////////////// // Function: GraphReducer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphReducer:: GraphReducer(TypeHandle graph_type) : @@ -25,7 +38,7 @@ GraphReducer(TypeHandle graph_type) : //////////////////////////////////////////////////////////////////// // Function: GraphReducer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GraphReducer:: ~GraphReducer() { @@ -61,13 +74,13 @@ flatten(Node *root, bool combine_siblings) { do { num_pass_nodes = 0; - const DownRelationPointers &drp = + const DownRelationPointers &drp = root->find_connection(_graph_type).get_down(); - + // Get a copy of the children list, so we don't have to worry // about self-modifications. DownRelationPointers drp_copy = drp; - + // Now visit each of the children in turn. DownRelationPointers::const_iterator drpi; for (drpi = drp_copy.begin(); drpi != drp_copy.end(); ++drpi) { @@ -97,7 +110,7 @@ int GraphReducer:: r_flatten(Node *root, bool combine_siblings) { int num_nodes = 0; - const DownRelationPointers &drp = + const DownRelationPointers &drp = root->find_connection(_graph_type).get_down(); // Get a copy of the children list, so we don't have to worry @@ -110,11 +123,11 @@ r_flatten(Node *root, bool combine_siblings) { NodeRelation *arc = (*drpi); num_nodes += r_flatten(arc->get_child(), combine_siblings); } - + if (combine_siblings && drp.size() >= 2) { num_nodes += flatten_siblings(root); } - + if (drp.size() == 1) { // If we have exactly one child, consider flattening it. NodeRelation *arc = *drp.begin(); @@ -130,7 +143,7 @@ r_flatten(Node *root, bool combine_siblings) { class SortByTransitions { public: - INLINE bool + INLINE bool operator () (const NodeRelation *arc1, const NodeRelation *arc2) const; }; @@ -155,7 +168,7 @@ flatten_siblings(Node *root) { typedef map, SortByTransitions> Children; Children children; - const DownRelationPointers &drp = + const DownRelationPointers &drp = root->find_connection(_graph_type).get_down(); DownRelationPointers::const_iterator drpi; for (drpi = drp.begin(); drpi != drp.end(); ++drpi) { @@ -283,7 +296,7 @@ flatten_arc(NodeRelation *arc) { } } - remove_arc(arc); + remove_arc(arc); return true; } @@ -292,7 +305,7 @@ flatten_arc(NodeRelation *arc) { // Access: Protected, Virtual // Description: Performs the work of collapsing two sibling arcs // together into a single arc (and their associated -// nodes into a single node). +// nodes into a single node). // // Returns a pointer to a NodeRelation the reflects the // combined arc (which may be either of the source arcs, @@ -341,7 +354,7 @@ collapse_nodes(Node *node1, Node *node2, bool) { node2->is_exact_type(NamedNode::get_class_type())) { // Node2 isn't anything special, so preserve node1. return node1; - + } else if (node1->is_exact_type(Node::get_class_type()) || node1->is_exact_type(NamedNode::get_class_type())) { // Node1 isn't anything special, so preserve node2. @@ -403,7 +416,7 @@ move_children(Node *to, Node *from) { if (to != from) { int num_children = from->get_num_children(_graph_type); while (num_children > 0) { - NodeRelation *arc = + NodeRelation *arc = from->get_child(_graph_type, 0); arc->change_parent(to); num_children--; diff --git a/panda/src/graph/graphReducer.h b/panda/src/graph/graphReducer.h index ae2e86c632..e7b2af33a7 100644 --- a/panda/src/graph/graphReducer.h +++ b/panda/src/graph/graphReducer.h @@ -1,6 +1,19 @@ // Filename: graphReducer.h // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GRAPHREDUCER_H @@ -53,5 +66,5 @@ protected: #endif - - + + diff --git a/panda/src/graph/immediateAttribute.cxx b/panda/src/graph/immediateAttribute.cxx index d7d4387178..d8271d6cd9 100644 --- a/panda/src/graph/immediateAttribute.cxx +++ b/panda/src/graph/immediateAttribute.cxx @@ -1,6 +1,19 @@ // Filename: immediateAttribute.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "immediateAttribute.h" @@ -13,7 +26,7 @@ TypeHandle ImmediateAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ImmediateAttribute::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *ImmediateAttribute:: make_copy() const { @@ -23,7 +36,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: ImmediateAttribute::make_initial // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *ImmediateAttribute:: make_initial() const { @@ -33,7 +46,7 @@ make_initial() const { //////////////////////////////////////////////////////////////////// // Function: ImmediateAttribute::get_handle // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// TypeHandle ImmediateAttribute:: get_handle() const { @@ -43,7 +56,7 @@ get_handle() const { //////////////////////////////////////////////////////////////////// // Function: ImmediateAttribute::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ImmediateAttribute:: internal_compare_to(const NodeAttribute *) const { diff --git a/panda/src/graph/immediateAttribute.h b/panda/src/graph/immediateAttribute.h index 4d7ebf3a9e..e28979b049 100644 --- a/panda/src/graph/immediateAttribute.h +++ b/panda/src/graph/immediateAttribute.h @@ -1,6 +1,19 @@ // Filename: immediateAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef IMMEDIATEATTRIBUTE_H @@ -14,7 +27,7 @@ class ImmediateTransition; //////////////////////////////////////////////////////////////////// // Class : ImmediateAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA ImmediateAttribute : public NodeAttribute { public: diff --git a/panda/src/graph/immediateTransition.I b/panda/src/graph/immediateTransition.I index 144daf2267..1788b2b339 100644 --- a/panda/src/graph/immediateTransition.I +++ b/panda/src/graph/immediateTransition.I @@ -1,12 +1,25 @@ // Filename: immediateTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ImmediateTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH ImmediateTransition:: ImmediateTransition() { @@ -15,7 +28,7 @@ ImmediateTransition() { //////////////////////////////////////////////////////////////////// // Function: ImmediateTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH ImmediateTransition:: ImmediateTransition(const ImmediateTransition ©) : @@ -26,7 +39,7 @@ ImmediateTransition(const ImmediateTransition ©) : //////////////////////////////////////////////////////////////////// // Function: ImmediateTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void ImmediateTransition:: operator = (const ImmediateTransition ©) { diff --git a/panda/src/graph/immediateTransition.cxx b/panda/src/graph/immediateTransition.cxx index de13d5dd18..aa6eb052d4 100644 --- a/panda/src/graph/immediateTransition.cxx +++ b/panda/src/graph/immediateTransition.cxx @@ -1,6 +1,19 @@ // Filename: immediateTransition.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "immediateTransition.h" @@ -13,7 +26,7 @@ TypeHandle ImmediateTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: ImmediateTransition::make_attrib // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttribute *ImmediateTransition:: make_attrib() const { @@ -67,7 +80,7 @@ apply(const NodeAttribute *) const { //////////////////////////////////////////////////////////////////// // Function: ImmediateTransition::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ImmediateTransition:: internal_compare_to(const NodeTransition *) const { diff --git a/panda/src/graph/immediateTransition.h b/panda/src/graph/immediateTransition.h index 330a7988f6..c1fe5f856c 100644 --- a/panda/src/graph/immediateTransition.h +++ b/panda/src/graph/immediateTransition.h @@ -1,6 +1,19 @@ // Filename: immediateTransition.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef IMMEDIATETRANSITION_H diff --git a/panda/src/graph/lmatrix4fTransition.cxx b/panda/src/graph/lmatrix4fTransition.cxx index 439e78fd0c..5e8786228c 100644 --- a/panda/src/graph/lmatrix4fTransition.cxx +++ b/panda/src/graph/lmatrix4fTransition.cxx @@ -1,6 +1,19 @@ // Filename: lmatrix4fTransition.cxx // Created by: drose (05May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lmatrix4fTransition.h" diff --git a/panda/src/graph/lmatrix4fTransition.h b/panda/src/graph/lmatrix4fTransition.h index 1d637e7303..17aba5181b 100644 --- a/panda/src/graph/lmatrix4fTransition.h +++ b/panda/src/graph/lmatrix4fTransition.h @@ -1,6 +1,19 @@ // Filename: lmatrix4fTransition.h // Created by: drose (05May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LMATRIX4FTRANSITION_H diff --git a/panda/src/graph/matrixAttribute.T b/panda/src/graph/matrixAttribute.T index 820f2804de..5e1510ccda 100644 --- a/panda/src/graph/matrixAttribute.T +++ b/panda/src/graph/matrixAttribute.T @@ -1,6 +1,19 @@ -// Filename: matrixAttribute.I +// Filename: matrixAttribute.T // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -11,7 +24,7 @@ TypeHandle MatrixAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH MatrixAttribute:: @@ -22,7 +35,7 @@ MatrixAttribute() { //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH MatrixAttribute:: @@ -35,7 +48,7 @@ MatrixAttribute(const MatrixAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void MatrixAttribute:: @@ -47,7 +60,7 @@ operator = (const MatrixAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::set_matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void MatrixAttribute:: @@ -58,7 +71,7 @@ set_matrix(const Matrix &mat) { //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::get_matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH const Matrix &MatrixAttribute:: @@ -69,7 +82,7 @@ get_matrix() const { //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MatrixAttribute:: @@ -80,7 +93,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MatrixAttribute:: @@ -91,7 +104,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: MatrixAttribute::internal_compare_to // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int MatrixAttribute:: diff --git a/panda/src/graph/matrixAttribute.h b/panda/src/graph/matrixAttribute.h index 504c52638c..a519024eda 100644 --- a/panda/src/graph/matrixAttribute.h +++ b/panda/src/graph/matrixAttribute.h @@ -1,6 +1,19 @@ // Filename: matrixAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MATRIXATTRIBUTE_H @@ -15,7 +28,7 @@ class MatrixTransition; //////////////////////////////////////////////////////////////////// // Class : MatrixAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// template class MatrixAttribute : public NodeAttribute { @@ -48,7 +61,7 @@ public: static void init_type() { NodeAttribute::init_type(); Matrix::init_type(); - register_type(_type_handle, + register_type(_type_handle, string("MatrixAttribute<") + Matrix::get_class_type().get_name() + ">", NodeAttribute::get_class_type()); diff --git a/panda/src/graph/matrixTransition.T b/panda/src/graph/matrixTransition.T index 88cefbda1e..4292c9b357 100644 --- a/panda/src/graph/matrixTransition.T +++ b/panda/src/graph/matrixTransition.T @@ -1,6 +1,19 @@ -// Filename: matrixTransition.I +// Filename: matrixTransition.T // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "matrixAttribute.h" @@ -13,7 +26,7 @@ TypeHandle MatrixTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH MatrixTransition:: @@ -24,7 +37,7 @@ MatrixTransition() { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH MatrixTransition:: @@ -35,7 +48,7 @@ MatrixTransition(const Matrix &matrix) { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH MatrixTransition:: @@ -48,7 +61,7 @@ MatrixTransition(const MatrixTransition ©) : //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void MatrixTransition:: @@ -60,7 +73,7 @@ operator = (const MatrixTransition ©) { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::set_matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void MatrixTransition:: @@ -72,7 +85,7 @@ set_matrix(const Matrix &mat) { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::get_matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH const Matrix &MatrixTransition:: @@ -104,7 +117,7 @@ compose(const NodeTransition *other) const { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::invert // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NodeTransition *MatrixTransition:: @@ -129,7 +142,7 @@ invert() const { template NodeAttribute *MatrixTransition:: apply(const NodeAttribute *attrib) const { - + MatrixAttribute *result; DCAST_INTO_R(result, make_attrib(), NULL); @@ -148,7 +161,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MatrixTransition:: @@ -159,7 +172,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MatrixTransition:: @@ -170,7 +183,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: MatrixTransition::internal_compare_to // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int MatrixTransition:: diff --git a/panda/src/graph/matrixTransition.h b/panda/src/graph/matrixTransition.h index 6689b39828..5d1ac6aac1 100644 --- a/panda/src/graph/matrixTransition.h +++ b/panda/src/graph/matrixTransition.h @@ -1,6 +1,19 @@ // Filename: matrixTransition.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MATRIXTRANSITION_H @@ -55,7 +68,7 @@ private: Matrix _matrix; public: - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); //Matrix has no factory method as it is a virtual template //class @@ -73,7 +86,7 @@ public: static void init_type() { NodeTransition::init_type(); Matrix::init_type(); - register_type(_type_handle, + register_type(_type_handle, string("MatrixTransition<") + Matrix::get_class_type().get_name() + ">", NodeTransition::get_class_type()); diff --git a/panda/src/graph/multiAttribute.T b/panda/src/graph/multiAttribute.T index 95f912ca63..df6ebff446 100644 --- a/panda/src/graph/multiAttribute.T +++ b/panda/src/graph/multiAttribute.T @@ -1,6 +1,19 @@ // Filename: multiAttribute.T // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// template @@ -9,7 +22,7 @@ TypeHandle MultiAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template MultiAttribute:: @@ -20,7 +33,7 @@ MultiAttribute() { //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template MultiAttribute:: @@ -34,7 +47,7 @@ MultiAttribute(const MultiAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiAttribute:: @@ -47,7 +60,7 @@ operator = (const MultiAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::set_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiAttribute:: @@ -62,7 +75,7 @@ set_on(const Property &property) { //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::set_off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiAttribute:: @@ -124,7 +137,7 @@ get_properties_is_on() const { //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiAttribute:: @@ -144,7 +157,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiAttribute:: @@ -158,7 +171,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int MultiAttribute:: @@ -291,7 +304,7 @@ binary_search_property(Properties::iterator begin, Properties::iterator end, //////////////////////////////////////////////////////////////////// // Function: MultiAttribute::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH MultiAttribute::size_type MultiAttribute:: diff --git a/panda/src/graph/multiAttribute.h b/panda/src/graph/multiAttribute.h index 23e622f870..08d45aacf2 100644 --- a/panda/src/graph/multiAttribute.h +++ b/panda/src/graph/multiAttribute.h @@ -1,6 +1,19 @@ // Filename: multiAttribute.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MULTIATTRIBUTE_H @@ -19,7 +32,7 @@ class MultiTransition; //////////////////////////////////////////////////////////////////// // Class : MultiAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// template class MultiAttribute : public NodeAttribute { @@ -95,7 +108,7 @@ public: } static void init_type() { NodeAttribute::init_type(); - register_type(_type_handle, + register_type(_type_handle, string("MultiAttribute<")+NameClass::get_class_name()+">", NodeAttribute::get_class_type()); } diff --git a/panda/src/graph/multiNodeAttribute.cxx b/panda/src/graph/multiNodeAttribute.cxx index aa8fbef6ac..7e94ec1482 100644 --- a/panda/src/graph/multiNodeAttribute.cxx +++ b/panda/src/graph/multiNodeAttribute.cxx @@ -1,6 +1,19 @@ // Filename: multiNodeAttribute.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "multiNodeAttribute.h" diff --git a/panda/src/graph/multiNodeAttribute.h b/panda/src/graph/multiNodeAttribute.h index aa63ae6277..cd823224d0 100644 --- a/panda/src/graph/multiNodeAttribute.h +++ b/panda/src/graph/multiNodeAttribute.h @@ -1,6 +1,19 @@ // Filename: multiNodeAttribute.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MULTINODEATTRIBUTE_H @@ -25,16 +38,16 @@ EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, MULTIATTRIBUTE_NODE); //////////////////////////////////////////////////////////////////// // Class : MultiNodeAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA MultiNodeAttribute : +class EXPCL_PANDA MultiNodeAttribute : public MultiAttribute { protected: INLINE_GRAPH MultiNodeAttribute() {}; INLINE_GRAPH MultiNodeAttribute(const MultiNodeAttribute ©) : MultiAttribute(copy) {}; - INLINE_GRAPH void operator = (const MultiNodeAttribute ©) + INLINE_GRAPH void operator = (const MultiNodeAttribute ©) {MultiAttribute::operator = (copy);} public: diff --git a/panda/src/graph/multiNodeTransition.cxx b/panda/src/graph/multiNodeTransition.cxx index ed9de3be90..700372c754 100644 --- a/panda/src/graph/multiNodeTransition.cxx +++ b/panda/src/graph/multiNodeTransition.cxx @@ -1,6 +1,19 @@ // Filename: multiNodeTransition.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "multiNodeTransition.h" diff --git a/panda/src/graph/multiNodeTransition.h b/panda/src/graph/multiNodeTransition.h index 93c46b6f63..3fc7b32aa8 100644 --- a/panda/src/graph/multiNodeTransition.h +++ b/panda/src/graph/multiNodeTransition.h @@ -1,6 +1,19 @@ // Filename: multiNodeTransition.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MULTINODETRANSITION_H @@ -33,14 +46,14 @@ EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, MULTITRANSITION_NODE); // (rather than instantiating a whole new kind of // MultiTransition). //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA MultiNodeTransition : +class EXPCL_PANDA MultiNodeTransition : public MultiTransition { protected: INLINE_GRAPH MultiNodeTransition() {}; INLINE_GRAPH MultiNodeTransition(const MultiNodeTransition ©) : MultiTransition(copy) {}; - INLINE_GRAPH void operator = (const MultiNodeTransition ©) + INLINE_GRAPH void operator = (const MultiNodeTransition ©) {MultiTransition::operator = (copy);}; public: diff --git a/panda/src/graph/multiTransition.T b/panda/src/graph/multiTransition.T index 8f39807db7..c3ad403124 100644 --- a/panda/src/graph/multiTransition.T +++ b/panda/src/graph/multiTransition.T @@ -1,6 +1,19 @@ -// Filename: multiTransition.I +// Filename: multiTransition.T // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// /* okcircular */ @@ -12,7 +25,7 @@ TypeHandle MultiTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MultiTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template MultiTransition:: @@ -23,7 +36,7 @@ MultiTransition() { //////////////////////////////////////////////////////////////////// // Function: MultiTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template MultiTransition:: @@ -37,7 +50,7 @@ MultiTransition(const MultiTransition ©) : //////////////////////////////////////////////////////////////////// // Function: MultiTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiTransition:: @@ -108,7 +121,7 @@ set_default_dir(TransitionDirection dir) { //////////////////////////////////////////////////////////////////// // Function: MultiTransition::get_default_dir // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH TransitionDirection MultiTransition:: @@ -127,7 +140,7 @@ template void MultiTransition:: set_identity(const Property &property) { _properties[property] = TD_identity; - state_changed(); + state_changed(); } //////////////////////////////////////////////////////////////////// @@ -141,7 +154,7 @@ template void MultiTransition:: set_on(const Property &property) { _properties[property] = TD_on; - state_changed(); + state_changed(); } //////////////////////////////////////////////////////////////////// @@ -155,7 +168,7 @@ template void MultiTransition:: set_off(const Property &property) { _properties[property] = TD_off; - state_changed(); + state_changed(); } //////////////////////////////////////////////////////////////////// @@ -287,7 +300,7 @@ compose(const NodeTransition *other) const { //////////////////////////////////////////////////////////////////// // Function: MultiTransition::invert // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template NodeTransition *MultiTransition:: @@ -319,13 +332,13 @@ invert() const { template NodeAttribute *MultiTransition:: apply(const NodeAttribute *attrib) const { - + MultiAttribute *result; if (attrib == (const NodeAttribute *)NULL) { DCAST_INTO_R(result, make_attrib(), NULL); } else { DCAST_INTO_R(result, (NodeAttribute *)attrib, NULL); - } + } if (_priority < result->_priority || is_identity()) { // The priority is too low to affect the attribute, or we're @@ -379,7 +392,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: MultiTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiTransition:: @@ -438,7 +451,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: MultiTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void MultiTransition:: @@ -482,7 +495,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: MultiTransition::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// template int MultiTransition:: @@ -525,7 +538,7 @@ write_property(ostream &, const Property &, int) const { //////////////////////////////////////////////////////////////////// // Function: MultiTransition::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE_GRAPH MultiTransition::size_type MultiTransition:: diff --git a/panda/src/graph/multiTransition.h b/panda/src/graph/multiTransition.h index cc303779e1..9516a4f434 100644 --- a/panda/src/graph/multiTransition.h +++ b/panda/src/graph/multiTransition.h @@ -1,6 +1,19 @@ // Filename: multiTransition.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MULTITRANSITION_H @@ -118,7 +131,7 @@ public: } static void init_type() { NodeTransition::init_type(); - register_type(_type_handle, + register_type(_type_handle, string("MultiTransition<")+NameClass::get_class_name()+">", NodeTransition::get_class_type()); } diff --git a/panda/src/graph/multiTransitionHelpers.I b/panda/src/graph/multiTransitionHelpers.I index 6bd0d2401f..b6fe15b9fa 100644 --- a/panda/src/graph/multiTransitionHelpers.I +++ b/panda/src/graph/multiTransitionHelpers.I @@ -1,6 +1,19 @@ // Filename: multiTransitionHelpers.I // Created by: drose (15Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -44,7 +57,7 @@ dmap_compose(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = *first2; ++first2; ++result; @@ -102,7 +115,7 @@ dmap_invert_compose(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = *first2; ++first2; ++result; @@ -189,7 +202,7 @@ dmap_equiv(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { if ((*first2).second != TD_identity) { return false; } @@ -254,7 +267,7 @@ dmap_compare(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { if ((*first2).second != TD_identity) { // list2 is longer. return 1; @@ -381,7 +394,7 @@ bmap_apply(InputIterator1 first1, InputIterator1 last1, ++result; break; } - + ++first2; } else { // ((*first2).first == (*first1)) @@ -419,17 +432,17 @@ bmap_apply(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { // The transition mentions this property that wasn't previously // in the attribute. It becomes a member of the attribute only // if the transition explicitly turned it on. - + if ((*first2).second == want_dirs) { *result = (*first2).first; ++result; break; } - + ++first2; } return result; diff --git a/panda/src/graph/multiTransitionHelpers.h b/panda/src/graph/multiTransitionHelpers.h index 8c23be785e..2d85ab405f 100644 --- a/panda/src/graph/multiTransitionHelpers.h +++ b/panda/src/graph/multiTransitionHelpers.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MULTITRANSITIONHELPERS_H #define MULTITRANSITIONHELPERS_H diff --git a/panda/src/graph/namedNode.I b/panda/src/graph/namedNode.I index d825b031d7..a5e07c49a5 100644 --- a/panda/src/graph/namedNode.I +++ b/panda/src/graph/namedNode.I @@ -1,35 +1,48 @@ // Filename: namedNode.I // Created by: drose (23May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NamedNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NamedNode:: NamedNode(const string &initial_name) : - Namable(initial_name) -{ + Namable(initial_name) +{ } //////////////////////////////////////////////////////////////////// // Function: NamedNode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NamedNode:: NamedNode(const NamedNode ©) : Node(copy), Namable(copy) { } - + //////////////////////////////////////////////////////////////////// // Function: NamedNode::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NamedNode:: operator = (const NamedNode ©) { diff --git a/panda/src/graph/namedNode.cxx b/panda/src/graph/namedNode.cxx index 42c3ccd9e3..1b7d4d408d 100644 --- a/panda/src/graph/namedNode.cxx +++ b/panda/src/graph/namedNode.cxx @@ -1,6 +1,20 @@ // Filename: namedNode.cxx // Created by: drose (15Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include diff --git a/panda/src/graph/namedNode.h b/panda/src/graph/namedNode.h index 418147947e..afa802de30 100644 --- a/panda/src/graph/namedNode.h +++ b/panda/src/graph/namedNode.h @@ -1,6 +1,20 @@ // Filename: namedNode.h // Created by: drose (15Jan99) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NAMEDNODE_H #define NAMEDNODE_H @@ -27,7 +41,7 @@ public: virtual void output(ostream &out) const; static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_NamedNode(const FactoryParams ¶ms); diff --git a/panda/src/graph/node.I b/panda/src/graph/node.I index 59e376a726..2eba289fac 100644 --- a/panda/src/graph/node.I +++ b/panda/src/graph/node.I @@ -1,6 +1,19 @@ // Filename: node.I // Created by: drose (26Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/graph/node.cxx b/panda/src/graph/node.cxx index a74316668b..84010ad86f 100644 --- a/panda/src/graph/node.cxx +++ b/panda/src/graph/node.cxx @@ -1,6 +1,20 @@ // Filename: node.cxx // Created by: drose (27Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "node.h" #include "nodeRelation.h" @@ -19,7 +33,7 @@ Node* const Node::Null = (Node*)0L; //////////////////////////////////////////////////////////////////// // Function: Node::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Node:: Node() { @@ -47,7 +61,7 @@ Node(const Node ©) : //////////////////////////////////////////////////////////////////// // Function: Node::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Node:: operator = (const Node ©) { @@ -228,10 +242,10 @@ get_child(TypeHandle type, int index) const { //////////////////////////////////////////////////////////////////// // Function: Node::sub_render // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool Node:: -sub_render(const AllAttributesWrapper &, AllTransitionsWrapper &, +sub_render(const AllAttributesWrapper &, AllTransitionsWrapper &, RenderTraverser *) { return true; } @@ -264,7 +278,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: Node::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Node:: write(ostream &out, int indent_level) const { @@ -376,16 +390,16 @@ r_copy_subgraph(TypeHandle graph_type, Node::InstanceMap &inst_map) const { // function. //////////////////////////////////////////////////////////////////// void Node:: -r_copy_children(const Node *from, TypeHandle graph_type, +r_copy_children(const Node *from, TypeHandle graph_type, Node::InstanceMap &inst_map) { - const DownRelationPointers &drp = + const DownRelationPointers &drp = from->find_connection(graph_type).get_down(); DownRelationPointers::const_iterator drpi; for (drpi = drp.begin(); drpi != drp.end(); ++drpi) { NodeRelation *source_arc = (*drpi); Node *source_child = source_arc->get_child(); nassertv(source_child != (Node *)NULL); - + Node *dest_child; // Check to see if we have already copied this child. If we @@ -400,12 +414,12 @@ r_copy_children(const Node *from, TypeHandle graph_type, dest_child = source_child->r_copy_subgraph(graph_type, inst_map); inst_map[source_child] = dest_child; } - - NodeRelation *dest_arc = + + NodeRelation *dest_arc = NodeRelation::create_typed_arc(graph_type, this, dest_child); nassertv(dest_arc != (NodeRelation *)NULL); nassertv(dest_arc->is_exact_type(graph_type)); - + dest_arc->copy_transitions_from(source_arc); } } @@ -456,7 +470,7 @@ write_datagram(BamWriter *manager, Datagram &me) { // Function: Node::complete_pointers // Access: Public // Description: Takes in a vector of pointers to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int Node:: @@ -472,7 +486,7 @@ complete_pointers(vector_typedWritable &plist, BamReader *manager) { // loaded. graph_cat.warning() - << "Unable to reliably load bam version " + << "Unable to reliably load bam version " << manager->get_file_major_ver() << "." << manager->get_file_minor_ver() << "\n"; @@ -560,7 +574,7 @@ fillin(DatagramIterator &scan, BamReader *manager) { if (i < max_node_graphs) { _connections[i].set_graph_type(type); - + DownRelationPointers &drp = _connections[i].get_down(); int num_arcs = scan.get_uint16(); while (num_arcs > 0) { diff --git a/panda/src/graph/node.h b/panda/src/graph/node.h index 1730fe18fe..aa1cfc29a9 100644 --- a/panda/src/graph/node.h +++ b/panda/src/graph/node.h @@ -1,6 +1,20 @@ // Filename: node.h // Created by: drose (26Oct98) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NODE_H #define NODE_H @@ -102,15 +116,15 @@ protected: virtual void propagate_stale_bound(); typedef map InstanceMap; - virtual Node *r_copy_subgraph(TypeHandle graph_type, + virtual Node *r_copy_subgraph(TypeHandle graph_type, InstanceMap &inst_map) const; virtual void r_copy_children(const Node *from, TypeHandle graph_type, InstanceMap &inst_map); public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_Node(const FactoryParams ¶ms); diff --git a/panda/src/graph/nodeAttribute.I b/panda/src/graph/nodeAttribute.I index d8e1dddb1d..3927c6110b 100644 --- a/panda/src/graph/nodeAttribute.I +++ b/panda/src/graph/nodeAttribute.I @@ -1,12 +1,25 @@ // Filename: nodeAttribute.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttribute:: NodeAttribute() { @@ -16,7 +29,7 @@ NodeAttribute() { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttribute:: NodeAttribute(const NodeAttribute ©) : @@ -28,7 +41,7 @@ NodeAttribute(const NodeAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeAttribute:: operator = (const NodeAttribute ©) { @@ -39,7 +52,7 @@ operator = (const NodeAttribute ©) { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeAttribute:: operator == (const NodeAttribute &other) const { @@ -49,7 +62,7 @@ operator == (const NodeAttribute &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeAttribute:: operator != (const NodeAttribute &other) const { @@ -59,7 +72,7 @@ operator != (const NodeAttribute &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeAttribute:: operator < (const NodeAttribute &other) const { @@ -69,7 +82,7 @@ operator < (const NodeAttribute &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeAttribute:: operator <= (const NodeAttribute &other) const { @@ -79,7 +92,7 @@ operator <= (const NodeAttribute &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeAttribute:: operator > (const NodeAttribute &other) const { @@ -89,7 +102,7 @@ operator > (const NodeAttribute &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeAttribute:: operator >= (const NodeAttribute &other) const { @@ -119,7 +132,7 @@ compare_to(const NodeAttribute &other) const { return internal_compare_to(&other); } else { - return + return (my_handle < other_handle) ? -1 : 1; } } diff --git a/panda/src/graph/nodeAttribute.cxx b/panda/src/graph/nodeAttribute.cxx index b082f3eddf..419d97d301 100644 --- a/panda/src/graph/nodeAttribute.cxx +++ b/panda/src/graph/nodeAttribute.cxx @@ -1,6 +1,19 @@ // Filename: nodeAttribute.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeAttribute.h" @@ -26,7 +39,7 @@ merge(const NodeAttribute *other) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttribute:: output(ostream &out) const { @@ -36,7 +49,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttribute:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeAttribute.h b/panda/src/graph/nodeAttribute.h index 7217bb2f73..f385c4a95f 100644 --- a/panda/src/graph/nodeAttribute.h +++ b/panda/src/graph/nodeAttribute.h @@ -1,6 +1,19 @@ // Filename: nodeAttribute.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODEATTRIBUTE_H diff --git a/panda/src/graph/nodeAttributeWrapper.I b/panda/src/graph/nodeAttributeWrapper.I index 20f6ca7043..3fa394e4d3 100644 --- a/panda/src/graph/nodeAttributeWrapper.I +++ b/panda/src/graph/nodeAttributeWrapper.I @@ -1,12 +1,25 @@ // Filename: nodeAttributeWrapper.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributeWrapper:: NodeAttributeWrapper(TypeHandle handle) : _handle(handle) { @@ -16,7 +29,7 @@ NodeAttributeWrapper(TypeHandle handle) : _handle(handle) { //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributeWrapper:: NodeAttributeWrapper(const NodeAttributeWrapper ©) : @@ -28,7 +41,7 @@ NodeAttributeWrapper(const NodeAttributeWrapper ©) : //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeAttributeWrapper:: operator = (const NodeAttributeWrapper ©) { @@ -39,7 +52,7 @@ operator = (const NodeAttributeWrapper ©) { //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::get_handle // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH TypeHandle NodeAttributeWrapper:: get_handle() const { @@ -49,7 +62,7 @@ get_handle() const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::get_attrib // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttribute *NodeAttributeWrapper:: get_attrib() const { @@ -59,7 +72,7 @@ get_attrib() const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::set_attrib // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeAttributeWrapper:: set_attrib(NodeAttribute *attrib) { @@ -81,7 +94,7 @@ is_initial() const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH int NodeAttributeWrapper:: compare_to(const NodeAttributeWrapper &other) const { diff --git a/panda/src/graph/nodeAttributeWrapper.T b/panda/src/graph/nodeAttributeWrapper.T index ad9837aef1..e388a44312 100644 --- a/panda/src/graph/nodeAttributeWrapper.T +++ b/panda/src/graph/nodeAttributeWrapper.T @@ -1,6 +1,19 @@ // Filename: nodeAttributeWrapper.T // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -16,7 +29,7 @@ // return value is false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_attribute_into(Attribute *&ptr, const NodeAttributeWrapper &attrib) { NodeAttribute *nt = attrib.get_attrib(); if (nt == (NodeAttribute *)NULL) { diff --git a/panda/src/graph/nodeAttributeWrapper.cxx b/panda/src/graph/nodeAttributeWrapper.cxx index b34e24cd8b..a803eedfef 100644 --- a/panda/src/graph/nodeAttributeWrapper.cxx +++ b/panda/src/graph/nodeAttributeWrapper.cxx @@ -1,6 +1,19 @@ // Filename: nodeAttributeWrapper.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeAttributeWrapper.h" @@ -34,7 +47,7 @@ apply_in_place(const NodeTransitionWrapper &trans) { //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttributeWrapper:: output(ostream &out) const { @@ -48,7 +61,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributeWrapper::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttributeWrapper:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeAttributeWrapper.h b/panda/src/graph/nodeAttributeWrapper.h index ea2377f330..0b192eb5a0 100644 --- a/panda/src/graph/nodeAttributeWrapper.h +++ b/panda/src/graph/nodeAttributeWrapper.h @@ -1,6 +1,19 @@ // Filename: nodeAttributeWrapper.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODEATTRIBUTEWRAPPER_H @@ -17,7 +30,7 @@ class NodeTransitionWrapper; //////////////////////////////////////////////////////////////////// // Class : NodeAttributeWrapper -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA NodeAttributeWrapper { public: diff --git a/panda/src/graph/nodeAttributes.I b/panda/src/graph/nodeAttributes.I index 48b0ede98d..cf73e24dcc 100644 --- a/panda/src/graph/nodeAttributes.I +++ b/panda/src/graph/nodeAttributes.I @@ -1,12 +1,25 @@ // Filename: nodeAttributes.I // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributes::size_type NodeAttributes:: size() const { @@ -16,7 +29,7 @@ size() const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributes::iterator NodeAttributes:: begin() { @@ -26,7 +39,7 @@ begin() { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributes::iterator NodeAttributes:: end() { @@ -36,7 +49,7 @@ end() { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributes::const_iterator NodeAttributes:: begin() const { @@ -46,7 +59,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributes::const_iterator NodeAttributes:: end() const { @@ -56,10 +69,10 @@ end() const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::insert // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttributes::iterator NodeAttributes:: -insert(NodeAttributes::iterator position, +insert(NodeAttributes::iterator position, const NodeAttributes::value_type &x) { return _attributes.insert(position, x); } @@ -67,7 +80,7 @@ insert(NodeAttributes::iterator position, //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::erase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeAttributes:: erase(NodeAttributes::iterator position) { diff --git a/panda/src/graph/nodeAttributes.T b/panda/src/graph/nodeAttributes.T index 25821ae8ca..c81b2f55cb 100644 --- a/panda/src/graph/nodeAttributes.T +++ b/panda/src/graph/nodeAttributes.T @@ -1,6 +1,19 @@ // Filename: nodeAttributes.T // Created by: drose (21Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ // false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_attribute_into(Attribute *&ptr, const NodeAttributes &attrib, TypeHandle transition_type) { NodeAttribute *nt = attrib.get_attribute(transition_type); diff --git a/panda/src/graph/nodeAttributes.cxx b/panda/src/graph/nodeAttributes.cxx index 467ac49c3c..113a81efc8 100644 --- a/panda/src/graph/nodeAttributes.cxx +++ b/panda/src/graph/nodeAttributes.cxx @@ -1,6 +1,19 @@ // Filename: nodeAttributes.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeAttributes.h" @@ -11,7 +24,7 @@ //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttributes:: NodeAttributes() { @@ -20,7 +33,7 @@ NodeAttributes() { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttributes:: NodeAttributes(const NodeAttributes ©) : @@ -31,7 +44,7 @@ NodeAttributes(const NodeAttributes ©) : //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttributes:: operator = (const NodeAttributes ©) { @@ -41,7 +54,7 @@ operator = (const NodeAttributes ©) { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeAttributes:: ~NodeAttributes() { @@ -158,7 +171,7 @@ get_attribute(TypeHandle handle) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::clear // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttributes:: clear() { @@ -168,7 +181,7 @@ clear() { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::is_initial // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool NodeAttributes:: is_initial() const { @@ -186,7 +199,7 @@ is_initial() const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int NodeAttributes:: compare_to(const NodeAttributes &other) const { @@ -216,7 +229,7 @@ apply_from(const NodeAttributes &other, const NodeTransitionCache &trans) { tmap_apply(other._attributes.begin(), other._attributes.end(), trans._cache.begin(), trans._cache.end(), inserter(temp, temp.begin())); - + _attributes.swap(temp); } } @@ -245,7 +258,7 @@ merge_from(const NodeAttributes &a, const NodeAttributes &b) { tmap_merge_union(a._attributes.begin(), a._attributes.end(), b._attributes.begin(), b._attributes.end(), inserter(temp, temp.begin())); - + _attributes.swap(temp); } } @@ -254,7 +267,7 @@ merge_from(const NodeAttributes &a, const NodeAttributes &b) { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttributes:: output(ostream &out) const { @@ -275,7 +288,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeAttributes::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeAttributes:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeAttributes.h b/panda/src/graph/nodeAttributes.h index a231d93140..93d0cecd73 100644 --- a/panda/src/graph/nodeAttributes.h +++ b/panda/src/graph/nodeAttributes.h @@ -1,6 +1,19 @@ // Filename: nodeAttributes.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODEATTRIBUTES_H @@ -65,7 +78,7 @@ public: public: INLINE_GRAPH void apply_in_place(const NodeTransitionCache &trans); INLINE_GRAPH NodeAttributes *apply(const NodeTransitionCache &trans) const; - void apply_from(const NodeAttributes &other, + void apply_from(const NodeAttributes &other, const NodeTransitionCache &trans); void merge_from(const NodeAttributes &a, const NodeAttributes &b); diff --git a/panda/src/graph/nodeConnection.I b/panda/src/graph/nodeConnection.I index 6f7d111e3f..18268c3597 100644 --- a/panda/src/graph/nodeConnection.I +++ b/panda/src/graph/nodeConnection.I @@ -1,6 +1,19 @@ // Filename: nodeConnection.I // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: NodeConnection::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeConnection:: NodeConnection(TypeHandle graph_type) : _graph_type(graph_type) { @@ -17,7 +30,7 @@ NodeConnection(TypeHandle graph_type) : _graph_type(graph_type) { //////////////////////////////////////////////////////////////////// // Function: NodeConnection::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeConnection:: ~NodeConnection() { diff --git a/panda/src/graph/nodeConnection.cxx b/panda/src/graph/nodeConnection.cxx index ecda399dad..eaee05383d 100644 --- a/panda/src/graph/nodeConnection.cxx +++ b/panda/src/graph/nodeConnection.cxx @@ -1,6 +1,19 @@ // Filename: nodeConnection.cxx // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "node.h" diff --git a/panda/src/graph/nodeConnection.h b/panda/src/graph/nodeConnection.h index 36c759918b..3e4203c179 100644 --- a/panda/src/graph/nodeConnection.h +++ b/panda/src/graph/nodeConnection.h @@ -1,6 +1,19 @@ // Filename: nodeConnection.h // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODECONNECTION_H diff --git a/panda/src/graph/nodeRelation.I b/panda/src/graph/nodeRelation.I index db95d83c85..fc26edbf73 100644 --- a/panda/src/graph/nodeRelation.I +++ b/panda/src/graph/nodeRelation.I @@ -1,6 +1,19 @@ // Filename: nodeRelation.I // Created by: drose (30Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -19,7 +32,7 @@ remove_arc(NodeRelation *arc) { //////////////////////////////////////////////////////////////////// // Function: NodeRelation::output_transitions // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeRelation:: output_transitions(ostream &out) const { @@ -29,7 +42,7 @@ output_transitions(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeRelation::write_transitions // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeRelation:: write_transitions(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeRelation.T b/panda/src/graph/nodeRelation.T index 641839d1fb..b82ef06d4b 100644 --- a/panda/src/graph/nodeRelation.T +++ b/panda/src/graph/nodeRelation.T @@ -1,6 +1,19 @@ // Filename: nodeRelation.T // Created by: drose (30Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ // false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const NodeRelation *arc, TypeHandle transition_type) { NodeTransition *nt = arc->get_transition(transition_type); @@ -28,7 +41,7 @@ get_transition_into(Transition *&ptr, const NodeRelation *arc, } template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const NodeRelation *arc) { return get_transition_into(ptr, arc, Transition::get_class_type()); } diff --git a/panda/src/graph/nodeRelation.cxx b/panda/src/graph/nodeRelation.cxx index f4883541b8..48857f8b80 100644 --- a/panda/src/graph/nodeRelation.cxx +++ b/panda/src/graph/nodeRelation.cxx @@ -1,6 +1,20 @@ // Filename: nodeRelation.cxx // Created by: drose (26Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "nodeRelation.h" #include "node.h" @@ -202,7 +216,7 @@ static bool internal_insert_arc(ArcList &alist, NodeRelation *arc) { nassertr(arc != (NodeRelation *)NULL, false); - TYPENAME ArcList::iterator position = + TYPENAME ArcList::iterator position = find_insert_position(alist.begin(), alist.end(), arc); nassertr(position >= alist.begin() && position <= alist.end(), false); @@ -235,7 +249,7 @@ static bool internal_remove_arc(ArcList &alist, NodeRelation *arc) { nassertr(arc != (NodeRelation *)NULL, false); - TYPENAME ArcList::iterator position = + TYPENAME ArcList::iterator position = find_arc(alist.begin(), alist.end(), arc); nassertr(position >= alist.begin() && position <= alist.end(), false); nassertr(position != alist.end(), false); @@ -270,7 +284,7 @@ internal_remove_arc(ArcList &alist, NodeRelation *arc) { //////////////////////////////////////////////////////////////////// NodeRelation:: NodeRelation(Node *parent, Node *to, int sort, TypeHandle graph_type) : - _parent(parent), _child(to), _sort(sort), + _parent(parent), _child(to), _sort(sort), _graph_type(graph_type), _num_transitions(0) { _top_subtree = NULL; @@ -326,7 +340,7 @@ operator = (const NodeRelation &) { //////////////////////////////////////////////////////////////////// // Function: NodeRelation::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeRelation:: ~NodeRelation() { @@ -470,7 +484,7 @@ void NodeRelation:: copy_transitions_from(const NodeTransitions &trans) { if (!trans.is_empty()) { _transitions.copy_transitions_from(trans, this); - + // Now mark that *all* transitions have changed, even though many // of them might not have, because we're not really sure. _net_transitions.clear(); @@ -495,7 +509,7 @@ void NodeRelation:: compose_transitions_from(const NodeTransitions &trans) { if (!trans.is_empty()) { _transitions.compose_transitions_from(trans, this); - + // Now mark that *all* transitions have changed, even though many // of them might not have, because we're not really sure. _net_transitions.clear(); @@ -614,21 +628,21 @@ attach() { if (parent_connection == (NodeConnection *)NULL) { graph_cat.error() - << "Attempt to attach " << _parent << " simultaneously to more than " + << "Attempt to attach " << _parent << " simultaneously to more than " << max_node_graphs << " different graph types.\n"; nassertv(false); } if (child_connection == (NodeConnection *)NULL) { graph_cat.error() - << "Attempt to attach " << _child << " simultaneously to more than " + << "Attempt to attach " << _child << " simultaneously to more than " << max_node_graphs << " different graph types.\n"; nassertv(false); } DownRelationPointers &parent_list = parent_connection->get_down(); UpRelationPointers &child_list = child_connection->get_up(); - + bool inserted_one = internal_insert_arc(parent_list, this); bool inserted_two = internal_insert_arc(child_list, this); nassertv(inserted_one && inserted_two); @@ -818,7 +832,7 @@ recompute_bound() { child_volumes.push_back(&node->get_bound()); - const DownRelationPointers &drp = + const DownRelationPointers &drp = node->find_connection(_graph_type).get_down(); DownRelationPointers::const_iterator drpi; for (drpi = drp.begin(); drpi != drp.end(); ++drpi) { @@ -827,7 +841,7 @@ recompute_bound() { const BoundingVolume **child_begin = &child_volumes[0]; const BoundingVolume **child_end = child_begin + child_volumes.size(); - bool success = + bool success = _bound->around(child_begin, child_end); @@ -882,7 +896,7 @@ write_datagram(BamWriter *manager, Datagram &me) // Function: NodeRelation::complete_pointers // Access: Public // Description: Takes in a vector of pointers to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int NodeRelation:: @@ -923,8 +937,8 @@ complete_pointers(vector_typedWritable &plist, BamReader *manager) { //at old code if (plist[i] == TypedWritable::Null) { - graph_cat->warning() - << get_type().get_name() + graph_cat->warning() + << get_type().get_name() << ": Ignoring null Transition" << endl; } else @@ -1033,7 +1047,7 @@ get_type() const { TypeHandle NodeRelation:: force_init_type() { init_type(); - return get_class_type(); + return get_class_type(); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/graph/nodeRelation.h b/panda/src/graph/nodeRelation.h index cdb40f4589..7f6084b237 100644 --- a/panda/src/graph/nodeRelation.h +++ b/panda/src/graph/nodeRelation.h @@ -2,6 +2,19 @@ // Created by: drose (26Oct98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NODERELATION_H #define NODERELATION_H @@ -128,8 +141,8 @@ public: INLINE_GRAPH static void register_with_factory(); protected: - INLINE_GRAPH static Factory &get_factory(); - + INLINE_GRAPH static Factory &get_factory(); + private: static NodeRelation *make_arc(const FactoryParams ¶ms); static Factory *_factory; @@ -177,8 +190,8 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_NodeRelation(const FactoryParams ¶ms); @@ -188,7 +201,7 @@ protected: private: //This value is only used for the process of re-construction - //from a binary source. DO NOT ACCESS. The value is only + //from a binary source. DO NOT ACCESS. The value is only //guaranteed to be accurate during that process int _num_transitions; diff --git a/panda/src/graph/nodeTransition.I b/panda/src/graph/nodeTransition.I index 43291b773a..10911a3d17 100644 --- a/panda/src/graph/nodeTransition.I +++ b/panda/src/graph/nodeTransition.I @@ -1,12 +1,25 @@ // Filename: nodeTransition.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransition:: NodeTransition() { @@ -16,7 +29,7 @@ NodeTransition() { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransition:: NodeTransition(const NodeTransition ©) : @@ -29,7 +42,7 @@ NodeTransition(const NodeTransition ©) : //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeTransition:: operator = (const NodeTransition ©) { @@ -41,7 +54,7 @@ operator = (const NodeTransition ©) { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransition:: operator == (const NodeTransition &other) const { @@ -51,7 +64,7 @@ operator == (const NodeTransition &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransition:: operator != (const NodeTransition &other) const { @@ -61,7 +74,7 @@ operator != (const NodeTransition &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransition:: operator < (const NodeTransition &other) const { @@ -71,7 +84,7 @@ operator < (const NodeTransition &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransition:: operator <= (const NodeTransition &other) const { @@ -81,7 +94,7 @@ operator <= (const NodeTransition &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransition:: operator > (const NodeTransition &other) const { @@ -91,7 +104,7 @@ operator > (const NodeTransition &other) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransition:: operator >= (const NodeTransition &other) const { @@ -118,7 +131,7 @@ compare_to(const NodeTransition &other) const { TypeHandle other_handle = other.get_handle(); if (my_handle != other_handle) { - return + return (my_handle < other_handle) ? -1 : 1; } else if (_priority != other._priority) { diff --git a/panda/src/graph/nodeTransition.cxx b/panda/src/graph/nodeTransition.cxx index 201b20cefe..6de2ea14b4 100644 --- a/panda/src/graph/nodeTransition.cxx +++ b/panda/src/graph/nodeTransition.cxx @@ -1,6 +1,19 @@ // Filename: nodeTransition.cxx // Created by: drose (26Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeTransition.h" @@ -35,7 +48,7 @@ get_handle() const { // process. //////////////////////////////////////////////////////////////////// bool NodeTransition:: -sub_render(NodeRelation *, const AllAttributesWrapper &, +sub_render(NodeRelation *, const AllAttributesWrapper &, AllTransitionsWrapper &, RenderTraverser *) { return true; } @@ -55,7 +68,7 @@ has_sub_render() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransition:: output(ostream &out) const { @@ -65,7 +78,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransition:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeTransition.h b/panda/src/graph/nodeTransition.h index 21bc1ec629..fb3774ca4e 100644 --- a/panda/src/graph/nodeTransition.h +++ b/panda/src/graph/nodeTransition.h @@ -1,6 +1,19 @@ // Filename: nodeTransition.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODETRANSITION_H @@ -102,7 +115,7 @@ protected: Arcs _arcs; public: - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); //NodeTransition has no factory methods as it is not directly made diff --git a/panda/src/graph/nodeTransitionCache.I b/panda/src/graph/nodeTransitionCache.I index d0fcc55c9b..63ac36f046 100644 --- a/panda/src/graph/nodeTransitionCache.I +++ b/panda/src/graph/nodeTransitionCache.I @@ -1,6 +1,19 @@ // Filename: nodeTransitionCache.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -24,7 +37,7 @@ set_transition(NodeTransition *trans) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCache::size_type NodeTransitionCache:: size() const { @@ -34,7 +47,7 @@ size() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCache::const_iterator NodeTransitionCache:: begin() const { @@ -44,7 +57,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCache::const_iterator NodeTransitionCache:: end() const { diff --git a/panda/src/graph/nodeTransitionCache.cxx b/panda/src/graph/nodeTransitionCache.cxx index abac626707..03da7375e7 100644 --- a/panda/src/graph/nodeTransitionCache.cxx +++ b/panda/src/graph/nodeTransitionCache.cxx @@ -1,6 +1,19 @@ // Filename: nodeTransitionCache.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeTransitionCache.h" @@ -15,7 +28,7 @@ TypeHandle NodeTransitionCache::_type_handle; //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransitionCache:: NodeTransitionCache() { @@ -48,7 +61,7 @@ NodeTransitionCache(const NodeTransitions &nt) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransitionCache:: ~NodeTransitionCache() { @@ -207,7 +220,7 @@ get_transition(TypeHandle handle) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::clear // Access: Public -// Description: Blows away all entries in the cache. +// Description: Blows away all entries in the cache. //////////////////////////////////////////////////////////////////// void NodeTransitionCache:: clear() { @@ -255,7 +268,7 @@ store_entry(TypeHandle handle, const NodeTransitionCacheEntry &entry) { // has been added to the indicated arc. //////////////////////////////////////////////////////////////////// void NodeTransitionCache:: -store_to(const NodeTransitionCache *a, NodeRelation *arc, +store_to(const NodeTransitionCache *a, NodeRelation *arc, NodeTransitions &nt) { if (a == (NodeTransitionCache *)NULL || a->_cache.empty()) { // a is empty: no change. @@ -366,7 +379,7 @@ invert(const NodeTransitionCache *a) { tmap_invert(a->_cache.begin(), a->_cache.end(), inserter(result->_cache, result->_cache.begin())); - + return result; } @@ -417,7 +430,7 @@ invert_compose(const NodeTransitionCache *a, const NodeTransitionCache *b) { // the result as computed at time 'now'. //////////////////////////////////////////////////////////////////// NodeTransitionCache *NodeTransitionCache:: -cached_compose(const NodeTransitionCache *a, +cached_compose(const NodeTransitionCache *a, const NodeTransitionCache *cache, const NodeTransitionCache *b, UpdateSeq now) { @@ -489,7 +502,7 @@ set_computed_verified(const NodeTransitionCache *a, UpdateSeq now) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitionCache:: output(ostream &out) const { @@ -509,7 +522,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCache::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitionCache:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeTransitionCache.h b/panda/src/graph/nodeTransitionCache.h index 3f7e433bb3..fee5d08297 100644 --- a/panda/src/graph/nodeTransitionCache.h +++ b/panda/src/graph/nodeTransitionCache.h @@ -1,6 +1,19 @@ // Filename: nodeTransitionCache.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODETRANSITIONCACHE_H @@ -70,7 +83,7 @@ public: // AllTransitionsWrapper; they have limited utility elsewhere. static void - store_to(const NodeTransitionCache *a, NodeRelation *arc, + store_to(const NodeTransitionCache *a, NodeRelation *arc, NodeTransitions &nt); static NodeTransitionCache * @@ -86,7 +99,7 @@ public: invert_compose(const NodeTransitionCache *a, const NodeTransitionCache *b); static NodeTransitionCache * - cached_compose(const NodeTransitionCache *a, + cached_compose(const NodeTransitionCache *a, const NodeTransitionCache *cache, const NodeTransitionCache *b, UpdateSeq now); diff --git a/panda/src/graph/nodeTransitionCacheEntry.I b/panda/src/graph/nodeTransitionCacheEntry.I index 2a6156048d..14cb648e4f 100644 --- a/panda/src/graph/nodeTransitionCacheEntry.I +++ b/panda/src/graph/nodeTransitionCacheEntry.I @@ -1,6 +1,19 @@ // Filename: nodeTransitionCacheEntry.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_graph.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCacheEntry:: NodeTransitionCacheEntry(NodeTransition *trans) : _trans(trans) { @@ -17,7 +30,7 @@ NodeTransitionCacheEntry(NodeTransition *trans) : _trans(trans) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCacheEntry:: NodeTransitionCacheEntry(const NodeTransitionCacheEntry ©) : @@ -30,7 +43,7 @@ NodeTransitionCacheEntry(const NodeTransitionCacheEntry ©) : //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeTransitionCacheEntry:: operator = (const NodeTransitionCacheEntry ©) { @@ -42,7 +55,7 @@ operator = (const NodeTransitionCacheEntry ©) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::is_identity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransitionCacheEntry:: is_identity() const { @@ -53,7 +66,7 @@ is_identity() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH int NodeTransitionCacheEntry:: compare_to(const NodeTransitionCacheEntry &other) const { @@ -157,7 +170,7 @@ INLINE_GRAPH bool NodeTransitionCacheEntry:: is_cache_verified(UpdateSeq as_of) const { if (wrt_cat.is_spam()) { wrt_cat.spam() - << "NodeTransitionCacheEntry::is_cache_verified(" << as_of + << "NodeTransitionCacheEntry::is_cache_verified(" << as_of << "), _verified = " << _verified << ", result = " << (as_of <= _verified) << "\n"; } @@ -243,12 +256,12 @@ invert(const NodeTransitionCacheEntry &a) { // composition of a and b. //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCacheEntry NodeTransitionCacheEntry:: -compose(const NodeTransitionCacheEntry &a, +compose(const NodeTransitionCacheEntry &a, const NodeTransitionCacheEntry &b) { if (a.is_identity()) { return b; } - if (b.is_identity()) { + if (b.is_identity()) { return a; } return NodeTransitionCacheEntry(a._trans->compose(b._trans)); @@ -261,7 +274,7 @@ compose(const NodeTransitionCacheEntry &a, // composition of invert(a) and b. //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCacheEntry NodeTransitionCacheEntry:: -invert_compose(const NodeTransitionCacheEntry &a, +invert_compose(const NodeTransitionCacheEntry &a, const NodeTransitionCacheEntry &b) { if (a.is_identity()) { return b; @@ -297,8 +310,8 @@ invert_compose(const NodeTransitionCacheEntry &a, // the result as computed at time 'now'. //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionCacheEntry NodeTransitionCacheEntry:: -cached_compose(const NodeTransitionCacheEntry &a, - const NodeTransitionCacheEntry &cache, +cached_compose(const NodeTransitionCacheEntry &a, + const NodeTransitionCacheEntry &cache, const NodeTransitionCacheEntry &b, UpdateSeq now) { if (wrt_cat.is_spam()) { @@ -310,7 +323,7 @@ cached_compose(const NodeTransitionCacheEntry &a, } if (cache._computed == UpdateSeq::initial() || - (a._computed == UpdateSeq::initial() && + (a._computed == UpdateSeq::initial() && b._computed == UpdateSeq::initial()) || cache._computed < a._computed) { @@ -360,7 +373,7 @@ apply(const NodeAttribute *a, const NodeTransitionCacheEntry &b) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::make_attrib // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeAttribute *NodeTransitionCacheEntry:: make_attrib() const { diff --git a/panda/src/graph/nodeTransitionCacheEntry.cxx b/panda/src/graph/nodeTransitionCacheEntry.cxx index 75bbf0a4e2..2a5e861f4e 100644 --- a/panda/src/graph/nodeTransitionCacheEntry.cxx +++ b/panda/src/graph/nodeTransitionCacheEntry.cxx @@ -1,6 +1,19 @@ // Filename: nodeTransitionCacheEntry.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeTransitionCacheEntry.h" @@ -11,7 +24,7 @@ //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitionCacheEntry:: output(ostream &out) const { @@ -23,7 +36,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionCacheEntry::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitionCacheEntry:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeTransitionCacheEntry.h b/panda/src/graph/nodeTransitionCacheEntry.h index c5594f70c7..be1c5d5b90 100644 --- a/panda/src/graph/nodeTransitionCacheEntry.h +++ b/panda/src/graph/nodeTransitionCacheEntry.h @@ -1,6 +1,19 @@ // Filename: nodeTransitionCacheEntry.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODETRANSITIONCACHEENTRY_H @@ -55,20 +68,20 @@ public: // keep the _computed and _verified members consistent across these // operations. - INLINE_GRAPH static NodeTransitionCacheEntry + INLINE_GRAPH static NodeTransitionCacheEntry invert(const NodeTransitionCacheEntry &a); INLINE_GRAPH static NodeTransitionCacheEntry - compose(const NodeTransitionCacheEntry &a, + compose(const NodeTransitionCacheEntry &a, const NodeTransitionCacheEntry &b); INLINE_GRAPH static NodeTransitionCacheEntry - invert_compose(const NodeTransitionCacheEntry &a, + invert_compose(const NodeTransitionCacheEntry &a, const NodeTransitionCacheEntry &b); INLINE_GRAPH static NodeTransitionCacheEntry - cached_compose(const NodeTransitionCacheEntry &a, - const NodeTransitionCacheEntry &cache, + cached_compose(const NodeTransitionCacheEntry &a, + const NodeTransitionCacheEntry &cache, const NodeTransitionCacheEntry &b, UpdateSeq now); diff --git a/panda/src/graph/nodeTransitionWrapper.I b/panda/src/graph/nodeTransitionWrapper.I index dc2ccf35f8..a8af3f1915 100644 --- a/panda/src/graph/nodeTransitionWrapper.I +++ b/panda/src/graph/nodeTransitionWrapper.I @@ -1,6 +1,19 @@ // Filename: nodeTransitionWrapper.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeRelation.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionWrapper:: NodeTransitionWrapper(TypeHandle handle) : _handle(handle) { @@ -19,7 +32,7 @@ NodeTransitionWrapper(TypeHandle handle) : _handle(handle) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitionWrapper:: NodeTransitionWrapper(const NodeTransitionWrapper ©) : @@ -31,7 +44,7 @@ NodeTransitionWrapper(const NodeTransitionWrapper ©) : //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeTransitionWrapper:: operator = (const NodeTransitionWrapper ©) { @@ -54,7 +67,7 @@ init_from(const NodeTransitionWrapper &other) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::get_handle // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH TypeHandle NodeTransitionWrapper:: get_handle() const { @@ -64,7 +77,7 @@ get_handle() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::has_trans // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NodeTransitionWrapper:: has_trans() const { @@ -74,7 +87,7 @@ has_trans() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::get_trans // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransition *NodeTransitionWrapper:: get_trans() const { @@ -95,7 +108,7 @@ is_identity() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH int NodeTransitionWrapper:: compare_to(const NodeTransitionWrapper &other) const { @@ -151,7 +164,7 @@ compose_in_place(const NodeTransitionWrapper &other) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::invert_in_place // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeTransitionWrapper:: invert_in_place() { @@ -236,10 +249,10 @@ set_computed_verified(UpdateSeq now) { // and stores the result in this wrapper. //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NodeTransitionWrapper:: -cached_compose(const NodeTransitionWrapper &cache, +cached_compose(const NodeTransitionWrapper &cache, const NodeTransitionWrapper &value, UpdateSeq now) { - _entry = + _entry = NodeTransitionCacheEntry::cached_compose(_entry, cache._entry, value._entry, now); } diff --git a/panda/src/graph/nodeTransitionWrapper.T b/panda/src/graph/nodeTransitionWrapper.T index 28074673b3..31b0816bc0 100644 --- a/panda/src/graph/nodeTransitionWrapper.T +++ b/panda/src/graph/nodeTransitionWrapper.T @@ -1,6 +1,19 @@ // Filename: nodeTransitionWrapper.T // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ // return value is false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const NodeTransitionWrapper &trans) { NodeTransition *nt = trans.get_trans(); if (nt == (NodeTransition *)NULL) { diff --git a/panda/src/graph/nodeTransitionWrapper.cxx b/panda/src/graph/nodeTransitionWrapper.cxx index 1e11d667db..28ef76c466 100644 --- a/panda/src/graph/nodeTransitionWrapper.cxx +++ b/panda/src/graph/nodeTransitionWrapper.cxx @@ -1,6 +1,19 @@ // Filename: nodeTransitionWrapper.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeTransitionWrapper.h" @@ -24,7 +37,7 @@ init_from(const NodeAttributeWrapper &attrib) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitionWrapper:: output(ostream &out) const { @@ -38,7 +51,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitionWrapper::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitionWrapper:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeTransitionWrapper.h b/panda/src/graph/nodeTransitionWrapper.h index 624c3f0047..b321a995b2 100644 --- a/panda/src/graph/nodeTransitionWrapper.h +++ b/panda/src/graph/nodeTransitionWrapper.h @@ -1,6 +1,19 @@ // Filename: nodeTransitionWrapper.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODETRANSITIONWRAPPER_H @@ -45,7 +58,7 @@ public: INLINE_GRAPH NodeTransitionWrapper(const NodeTransitionWrapper ©); INLINE_GRAPH void operator = (const NodeTransitionWrapper ©); - INLINE_GRAPH static NodeTransitionWrapper + INLINE_GRAPH static NodeTransitionWrapper init_from(const NodeTransitionWrapper &other); static NodeTransitionWrapper init_from(const NodeAttributeWrapper &attrib); @@ -69,7 +82,7 @@ public: INLINE_GRAPH bool is_cache_verified(UpdateSeq as_of) const; INLINE_GRAPH void set_computed_verified(UpdateSeq now); - INLINE_GRAPH void cached_compose(const NodeTransitionWrapper &cache, + INLINE_GRAPH void cached_compose(const NodeTransitionWrapper &cache, const NodeTransitionWrapper &value, UpdateSeq now); diff --git a/panda/src/graph/nodeTransitions.I b/panda/src/graph/nodeTransitions.I index 9529bbc258..2598b9463a 100644 --- a/panda/src/graph/nodeTransitions.I +++ b/panda/src/graph/nodeTransitions.I @@ -1,6 +1,19 @@ // Filename: nodeTransitions.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -23,7 +36,7 @@ set_transition(NodeTransition *trans) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitions::size_type NodeTransitions:: size() const { @@ -33,7 +46,7 @@ size() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitions::const_iterator NodeTransitions:: begin() const { @@ -43,7 +56,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NodeTransitions::const_iterator NodeTransitions:: end() const { @@ -62,7 +75,7 @@ end() const { // false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const NodeTransitions &trans, TypeHandle transition_type) { NodeTransition *nt = trans.get_transition(transition_type); @@ -75,7 +88,7 @@ get_transition_into(Transition *&ptr, const NodeTransitions &trans, } template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const NodeTransitions &trans) { return get_transition_into(ptr, trans, Transition::get_class_type()); } diff --git a/panda/src/graph/nodeTransitions.T b/panda/src/graph/nodeTransitions.T index 3225c3fb57..26060a014a 100644 --- a/panda/src/graph/nodeTransitions.T +++ b/panda/src/graph/nodeTransitions.T @@ -1,6 +1,19 @@ -// Filename: nodeTransitions.I +// Filename: nodeTransitions.T // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ // false. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const NodeTransitions &trans, TypeHandle transition_type) { NodeTransition *nt = trans.get_transition(transition_type); @@ -28,7 +41,7 @@ get_transition_into(Transition *&ptr, const NodeTransitions &trans, } template -INLINE_GRAPH bool +INLINE_GRAPH bool get_transition_into(Transition *&ptr, const NodeTransitions &trans) { return get_transition_into(ptr, trans, Transition::get_class_type()); } diff --git a/panda/src/graph/nodeTransitions.cxx b/panda/src/graph/nodeTransitions.cxx index 02d9d983e7..1dd52f8727 100644 --- a/panda/src/graph/nodeTransitions.cxx +++ b/panda/src/graph/nodeTransitions.cxx @@ -1,6 +1,19 @@ // Filename: nodeTransitions.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeTransitions.h" @@ -11,7 +24,7 @@ //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransitions:: NodeTransitions() { @@ -20,7 +33,7 @@ NodeTransitions() { //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransitions:: NodeTransitions(const NodeTransitions ©) : @@ -31,7 +44,7 @@ NodeTransitions(const NodeTransitions ©) : //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitions:: operator = (const NodeTransitions ©) { @@ -41,7 +54,7 @@ operator = (const NodeTransitions ©) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodeTransitions:: ~NodeTransitions() { @@ -218,7 +231,7 @@ compose_transitions_from(const NodeTransitions &other, //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int NodeTransitions:: compare_to(const NodeTransitions &other) const { @@ -274,7 +287,7 @@ remove_all_from_arc(NodeRelation *arc) { //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitions:: output(ostream &out) const { @@ -294,7 +307,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: NodeTransitions::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodeTransitions:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/nodeTransitions.h b/panda/src/graph/nodeTransitions.h index a66f16747e..f93fb9c1b0 100644 --- a/panda/src/graph/nodeTransitions.h +++ b/panda/src/graph/nodeTransitions.h @@ -1,6 +1,19 @@ // Filename: nodeTransitions.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODETRANSITIONS_H @@ -36,9 +49,9 @@ public: bool has_transition(TypeHandle handle) const; NodeTransition *get_transition(TypeHandle handle) const; void copy_transitions_from(const NodeTransitions &other); - void copy_transitions_from(const NodeTransitions &other, + void copy_transitions_from(const NodeTransitions &other, NodeRelation *to_arc); - void compose_transitions_from(const NodeTransitions &other, + void compose_transitions_from(const NodeTransitions &other, NodeRelation *to_arc); void adjust_all_priorities(int adjustment, NodeRelation *arc); diff --git a/panda/src/graph/nullAttributeWrapper.I b/panda/src/graph/nullAttributeWrapper.I index 972fe8109c..cfdf4fdaf8 100644 --- a/panda/src/graph/nullAttributeWrapper.I +++ b/panda/src/graph/nullAttributeWrapper.I @@ -1,12 +1,25 @@ // Filename: nullAttributeWrapper.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NullAttributeWrapper:: NullAttributeWrapper() { @@ -15,7 +28,7 @@ NullAttributeWrapper() { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NullAttributeWrapper:: NullAttributeWrapper(const NullAttributeWrapper &) { @@ -24,7 +37,7 @@ NullAttributeWrapper(const NullAttributeWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullAttributeWrapper:: operator = (const NullAttributeWrapper &) { @@ -33,7 +46,7 @@ operator = (const NullAttributeWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::init_from // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NullAttributeWrapper NullAttributeWrapper:: init_from(const NullTransitionWrapper &) { @@ -43,7 +56,7 @@ init_from(const NullTransitionWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::is_initial // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NullAttributeWrapper:: is_initial() const { @@ -53,7 +66,7 @@ is_initial() const { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH int NullAttributeWrapper:: compare_to(const NullAttributeWrapper &) const { @@ -63,7 +76,7 @@ compare_to(const NullAttributeWrapper &) const { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::make_initial // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullAttributeWrapper:: make_initial() { @@ -72,7 +85,7 @@ make_initial() { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::apply_in_place // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullAttributeWrapper:: apply_in_place(const NullTransitionWrapper &) { @@ -81,7 +94,7 @@ apply_in_place(const NullTransitionWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullAttributeWrapper:: output(ostream &) const { @@ -90,7 +103,7 @@ output(ostream &) const { //////////////////////////////////////////////////////////////////// // Function: NullAttributeWrapper::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullAttributeWrapper:: write(ostream &, int) const { diff --git a/panda/src/graph/nullAttributeWrapper.cxx b/panda/src/graph/nullAttributeWrapper.cxx index 8f6a810bdf..7eac7e5773 100644 --- a/panda/src/graph/nullAttributeWrapper.cxx +++ b/panda/src/graph/nullAttributeWrapper.cxx @@ -1,6 +1,19 @@ // Filename: nullAttributeWrapper.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nullAttributeWrapper.h" diff --git a/panda/src/graph/nullAttributeWrapper.h b/panda/src/graph/nullAttributeWrapper.h index c83c5a7a21..219f06dcd5 100644 --- a/panda/src/graph/nullAttributeWrapper.h +++ b/panda/src/graph/nullAttributeWrapper.h @@ -1,6 +1,19 @@ // Filename: nullAttributeWrapper.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NULLATTRIBUTEWRAPPER_H @@ -17,7 +30,7 @@ class NullTransitionWrapper; //////////////////////////////////////////////////////////////////// // Class : NullAttributeWrapper -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA NullAttributeWrapper { public: diff --git a/panda/src/graph/nullLevelState.cxx b/panda/src/graph/nullLevelState.cxx index e4030667f6..2bfa7c20ad 100644 --- a/panda/src/graph/nullLevelState.cxx +++ b/panda/src/graph/nullLevelState.cxx @@ -1,6 +1,19 @@ // Filename: nullLevelState.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nullLevelState.h" diff --git a/panda/src/graph/nullLevelState.h b/panda/src/graph/nullLevelState.h index 1c3f136d29..fc164cc4bb 100644 --- a/panda/src/graph/nullLevelState.h +++ b/panda/src/graph/nullLevelState.h @@ -1,6 +1,19 @@ // Filename: nullLevelState.h // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NULLLEVELSTATE_H diff --git a/panda/src/graph/nullTransitionWrapper.I b/panda/src/graph/nullTransitionWrapper.I index 17d7f593fe..a1ce5c95a8 100644 --- a/panda/src/graph/nullTransitionWrapper.I +++ b/panda/src/graph/nullTransitionWrapper.I @@ -1,6 +1,19 @@ // Filename: nullTransitionWrapper.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeRelation.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NullTransitionWrapper:: NullTransitionWrapper() { @@ -18,7 +31,7 @@ NullTransitionWrapper() { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NullTransitionWrapper:: NullTransitionWrapper(const NullTransitionWrapper &) { @@ -27,7 +40,7 @@ NullTransitionWrapper(const NullTransitionWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: operator = (const NullTransitionWrapper &) { @@ -36,7 +49,7 @@ operator = (const NullTransitionWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::init_from // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NullTransitionWrapper NullTransitionWrapper:: init_from(const NullTransitionWrapper &) { @@ -46,7 +59,7 @@ init_from(const NullTransitionWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::init_from // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH NullTransitionWrapper NullTransitionWrapper:: init_from(const NullAttributeWrapper &) { @@ -56,7 +69,7 @@ init_from(const NullAttributeWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::is_identity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH bool NullTransitionWrapper:: is_identity() const { @@ -66,7 +79,7 @@ is_identity() const { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH int NullTransitionWrapper:: compare_to(const NullTransitionWrapper &) const { @@ -76,7 +89,7 @@ compare_to(const NullTransitionWrapper &) const { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::make_identity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: make_identity() { @@ -85,7 +98,7 @@ make_identity() { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::extract_from // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: extract_from(const NodeRelation *) { @@ -94,7 +107,7 @@ extract_from(const NodeRelation *) { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::store_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: store_to(NodeRelation *) const { @@ -103,7 +116,7 @@ store_to(NodeRelation *) const { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::compose_in_place // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: compose_in_place(const NullTransitionWrapper &) { @@ -112,7 +125,7 @@ compose_in_place(const NullTransitionWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::invert_in_place // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: invert_in_place() { @@ -121,7 +134,7 @@ invert_in_place() { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::invert_compose_in_place // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: invert_compose_in_place(const NullTransitionWrapper &) { @@ -130,7 +143,7 @@ invert_compose_in_place(const NullTransitionWrapper &) { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::extract_from_cache // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH Node *NullTransitionWrapper:: extract_from_cache(const NodeRelation *) { @@ -174,7 +187,7 @@ set_computed_verified(UpdateSeq) { // and stores the result in this wrapper. //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: -cached_compose(const NullTransitionWrapper &, +cached_compose(const NullTransitionWrapper &, const NullTransitionWrapper &, UpdateSeq) { } @@ -182,7 +195,7 @@ cached_compose(const NullTransitionWrapper &, //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: output(ostream &) const { @@ -191,7 +204,7 @@ output(ostream &) const { //////////////////////////////////////////////////////////////////// // Function: NullTransitionWrapper::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void NullTransitionWrapper:: write(ostream &, int) const { diff --git a/panda/src/graph/nullTransitionWrapper.cxx b/panda/src/graph/nullTransitionWrapper.cxx index 4fd81881ec..433c64ca52 100644 --- a/panda/src/graph/nullTransitionWrapper.cxx +++ b/panda/src/graph/nullTransitionWrapper.cxx @@ -1,6 +1,19 @@ // Filename: nullTransitionWrapper.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nullTransitionWrapper.h" diff --git a/panda/src/graph/nullTransitionWrapper.h b/panda/src/graph/nullTransitionWrapper.h index 37de13dd48..848bf6d91f 100644 --- a/panda/src/graph/nullTransitionWrapper.h +++ b/panda/src/graph/nullTransitionWrapper.h @@ -1,6 +1,19 @@ // Filename: nullTransitionWrapper.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NULLTRANSITIONWRAPPER_H @@ -46,7 +59,7 @@ public: INLINE_GRAPH NullTransitionWrapper(const NullTransitionWrapper ©); INLINE_GRAPH void operator = (const NullTransitionWrapper ©); - INLINE_GRAPH static NullTransitionWrapper + INLINE_GRAPH static NullTransitionWrapper init_from(const NullTransitionWrapper &other); INLINE_GRAPH static NullTransitionWrapper init_from(const NullAttributeWrapper &attrib); @@ -67,7 +80,7 @@ public: INLINE_GRAPH bool is_cache_verified(UpdateSeq now) const; INLINE_GRAPH void set_computed_verified(UpdateSeq now); - INLINE_GRAPH void cached_compose(const NullTransitionWrapper &cache, + INLINE_GRAPH void cached_compose(const NullTransitionWrapper &cache, const NullTransitionWrapper &value, UpdateSeq now); diff --git a/panda/src/graph/onAttribute.cxx b/panda/src/graph/onAttribute.cxx index f0f972c1bb..b057ca5dd2 100644 --- a/panda/src/graph/onAttribute.cxx +++ b/panda/src/graph/onAttribute.cxx @@ -1,6 +1,19 @@ // Filename: onAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "onAttribute.h" @@ -14,7 +27,7 @@ TypeHandle OnAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: OnAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnAttribute:: output(ostream &out) const { @@ -24,7 +37,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: OnAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnAttribute:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/onAttribute.h b/panda/src/graph/onAttribute.h index e83188050e..9ff8d91378 100644 --- a/panda/src/graph/onAttribute.h +++ b/panda/src/graph/onAttribute.h @@ -1,6 +1,19 @@ // Filename: onAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ONATTRIBUTE_H @@ -14,7 +27,7 @@ class OnTransition; //////////////////////////////////////////////////////////////////// // Class : OnAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA OnAttribute : public NodeAttribute { protected: diff --git a/panda/src/graph/onOffAttribute.I b/panda/src/graph/onOffAttribute.I index cee1678a40..bf11f10f79 100644 --- a/panda/src/graph/onOffAttribute.I +++ b/panda/src/graph/onOffAttribute.I @@ -1,12 +1,25 @@ // Filename: onOffAttribute.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: OnOffAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH OnOffAttribute:: OnOffAttribute(bool is_on) { @@ -16,7 +29,7 @@ OnOffAttribute(bool is_on) { //////////////////////////////////////////////////////////////////// // Function: OnOffAttribute::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH OnOffAttribute:: OnOffAttribute(const OnOffAttribute ©) : @@ -28,7 +41,7 @@ OnOffAttribute(const OnOffAttribute ©) : //////////////////////////////////////////////////////////////////// // Function: OnOffAttribute::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void OnOffAttribute:: operator = (const OnOffAttribute ©) { diff --git a/panda/src/graph/onOffAttribute.cxx b/panda/src/graph/onOffAttribute.cxx index a2525dbb1c..7e5dccb100 100644 --- a/panda/src/graph/onOffAttribute.cxx +++ b/panda/src/graph/onOffAttribute.cxx @@ -1,6 +1,19 @@ // Filename: onOffAttribute.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "onOffAttribute.h" @@ -14,7 +27,7 @@ TypeHandle OnOffAttribute::_type_handle; //////////////////////////////////////////////////////////////////// // Function: OnOffAttribute::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnOffAttribute:: output(ostream &out) const { @@ -29,7 +42,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: OnOffAttribute::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnOffAttribute:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/onOffAttribute.h b/panda/src/graph/onOffAttribute.h index 312ee7d459..08371ea3d7 100644 --- a/panda/src/graph/onOffAttribute.h +++ b/panda/src/graph/onOffAttribute.h @@ -1,6 +1,19 @@ // Filename: onOffAttribute.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ONOFFATTRIBUTE_H @@ -14,7 +27,7 @@ class OnOffTransition; //////////////////////////////////////////////////////////////////// // Class : OnOffAttribute -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA OnOffAttribute : public NodeAttribute { protected: diff --git a/panda/src/graph/onOffTransition.I b/panda/src/graph/onOffTransition.I index 83542b0423..710e9306ea 100644 --- a/panda/src/graph/onOffTransition.I +++ b/panda/src/graph/onOffTransition.I @@ -1,22 +1,35 @@ // Filename: onOffTransition.I // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: OnOffTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH OnOffTransition:: OnOffTransition(TransitionDirection direction) { - _direction = direction; + _direction = direction; } //////////////////////////////////////////////////////////////////// // Function: OnOffTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH OnOffTransition:: OnOffTransition(const OnOffTransition ©) : @@ -28,7 +41,7 @@ OnOffTransition(const OnOffTransition ©) : //////////////////////////////////////////////////////////////////// // Function: OnOffTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void OnOffTransition:: operator = (const OnOffTransition ©) { diff --git a/panda/src/graph/onOffTransition.cxx b/panda/src/graph/onOffTransition.cxx index 6be753657d..5612b7fcd1 100644 --- a/panda/src/graph/onOffTransition.cxx +++ b/panda/src/graph/onOffTransition.cxx @@ -1,6 +1,19 @@ // Filename: onOffTransition.cxx // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "onOffTransition.h" @@ -92,7 +105,7 @@ apply(const NodeAttribute *attrib) const { DCAST_INTO_R(result, make_attrib(), NULL); } else { DCAST_INTO_R(result, (NodeAttribute *)attrib, NULL); - } + } if (_priority < result->_priority || _direction == TD_identity) { // The priority is too low to affect the attribute, or the @@ -106,7 +119,7 @@ apply(const NodeAttribute *attrib) const { } result->_priority = _priority; - + if (_direction == TD_on) { result->_is_on = true; result->set_value_from(this); @@ -119,7 +132,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: OnOffTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnOffTransition:: output(ostream &out) const { @@ -145,7 +158,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: OnOffTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnOffTransition:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/onOffTransition.h b/panda/src/graph/onOffTransition.h index eff4f83061..e7dce32952 100644 --- a/panda/src/graph/onOffTransition.h +++ b/panda/src/graph/onOffTransition.h @@ -1,6 +1,19 @@ // Filename: onOffTransition.h // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ONOFFTRANSITION_H @@ -71,7 +84,7 @@ private: public: //No Read/Write factory methods are defined since this is //only an abstract clas - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); protected: void fillin(DatagramIterator& scan, BamReader* manager); diff --git a/panda/src/graph/onTransition.I b/panda/src/graph/onTransition.I index 0e0a923bcf..82c1fff7fc 100644 --- a/panda/src/graph/onTransition.I +++ b/panda/src/graph/onTransition.I @@ -1,12 +1,25 @@ // Filename: onTransition.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: OnTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH OnTransition:: OnTransition() { @@ -15,7 +28,7 @@ OnTransition() { //////////////////////////////////////////////////////////////////// // Function: OnTransition::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH OnTransition:: OnTransition(const OnTransition ©) : @@ -26,7 +39,7 @@ OnTransition(const OnTransition ©) : //////////////////////////////////////////////////////////////////// // Function: OnTransition::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_GRAPH void OnTransition:: operator = (const OnTransition ©) { diff --git a/panda/src/graph/onTransition.cxx b/panda/src/graph/onTransition.cxx index 4178c4066b..28604142cd 100644 --- a/panda/src/graph/onTransition.cxx +++ b/panda/src/graph/onTransition.cxx @@ -1,6 +1,19 @@ // Filename: onTransition.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "onTransition.h" @@ -67,7 +80,7 @@ apply(const NodeAttribute *attrib) const { DCAST_INTO_R(result, make_attrib(), NULL); } else { DCAST_INTO_R(result, (NodeAttribute *)attrib, NULL); - } + } if (_priority < result->_priority) { // The priority is too low to affect the attribute. @@ -87,7 +100,7 @@ apply(const NodeAttribute *attrib) const { //////////////////////////////////////////////////////////////////// // Function: OnTransition::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnTransition:: output(ostream &out) const { @@ -97,7 +110,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: OnTransition::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OnTransition:: write(ostream &out, int indent_level) const { diff --git a/panda/src/graph/onTransition.h b/panda/src/graph/onTransition.h index 0ae35ad3f5..1f623fe214 100644 --- a/panda/src/graph/onTransition.h +++ b/panda/src/graph/onTransition.h @@ -1,6 +1,19 @@ // Filename: onTransition.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ONTRANSITION_H diff --git a/panda/src/graph/pointerNameClass.h b/panda/src/graph/pointerNameClass.h index 5f684ac9eb..2848a8daba 100644 --- a/panda/src/graph/pointerNameClass.h +++ b/panda/src/graph/pointerNameClass.h @@ -1,6 +1,19 @@ // Filename: pointerNameClass.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTERNAMECLASS_H diff --git a/panda/src/graph/pt_NamedNode.cxx b/panda/src/graph/pt_NamedNode.cxx index 34b8fb1d4c..e188bc94ef 100644 --- a/panda/src/graph/pt_NamedNode.cxx +++ b/panda/src/graph/pt_NamedNode.cxx @@ -1,6 +1,19 @@ // Filename: pt_NamedNode.cxx // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pt_NamedNode.h" diff --git a/panda/src/graph/pt_NamedNode.h b/panda/src/graph/pt_NamedNode.h index bc8b594dbd..85ea19fca2 100644 --- a/panda/src/graph/pt_NamedNode.h +++ b/panda/src/graph/pt_NamedNode.h @@ -1,6 +1,19 @@ // Filename: pt_NamedNode.h // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_NAMEDNODE_H diff --git a/panda/src/graph/pt_Node.cxx b/panda/src/graph/pt_Node.cxx index 4f9c2fb05d..45c0bbd168 100644 --- a/panda/src/graph/pt_Node.cxx +++ b/panda/src/graph/pt_Node.cxx @@ -1,6 +1,19 @@ // Filename: pt_Node.cxx // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "node.h" diff --git a/panda/src/graph/pt_Node.h b/panda/src/graph/pt_Node.h index 36fe8d5663..2dd63f119c 100644 --- a/panda/src/graph/pt_Node.h +++ b/panda/src/graph/pt_Node.h @@ -1,6 +1,19 @@ // Filename: pt_Node.h // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_NODE_H diff --git a/panda/src/graph/pt_NodeRelation.cxx b/panda/src/graph/pt_NodeRelation.cxx index 36294e99a8..b07221436e 100644 --- a/panda/src/graph/pt_NodeRelation.cxx +++ b/panda/src/graph/pt_NodeRelation.cxx @@ -1,6 +1,19 @@ // Filename: pt_NodeRelation.cxx // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeRelation.h" diff --git a/panda/src/graph/pt_NodeRelation.h b/panda/src/graph/pt_NodeRelation.h index 6321d61318..0c8ab78d2f 100644 --- a/panda/src/graph/pt_NodeRelation.h +++ b/panda/src/graph/pt_NodeRelation.h @@ -1,6 +1,19 @@ // Filename: pt_NodeRelation.h // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_NODERELATION_H diff --git a/panda/src/graph/setTransitionHelpers.T b/panda/src/graph/setTransitionHelpers.T index 356670a7c0..ec3e9c59ca 100644 --- a/panda/src/graph/setTransitionHelpers.T +++ b/panda/src/graph/setTransitionHelpers.T @@ -1,6 +1,19 @@ -// Filename: setTransitionHelpers.I +// Filename: setTransitionHelpers.T // Created by: drose (25Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeTransitionCacheEntry.h" @@ -71,7 +84,7 @@ tmap_override_union(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = *first2; ++first2; ++result; @@ -115,7 +128,7 @@ tmap_merge_union(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = *first2; ++first2; ++result; @@ -160,7 +173,7 @@ tmap_arc_union(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { (*first2).second->added_to_arc(to_arc); *result = *first2; ++first2; @@ -171,7 +184,7 @@ tmap_arc_union(InputIterator1 first1, InputIterator1 last1, //////////////////////////////////////////////////////////////////// // Function: tmap_arc_compose -// Description: +// Description: //////////////////////////////////////////////////////////////////// template OutputIterator @@ -208,7 +221,7 @@ tmap_arc_compose(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { (*first2).second->added_to_arc(to_arc); *result = *first2; ++first2; @@ -219,7 +232,7 @@ tmap_arc_compose(InputIterator1 first1, InputIterator1 last1, //////////////////////////////////////////////////////////////////// // Function: tmap_arc_compose -// Description: +// Description: //////////////////////////////////////////////////////////////////// template OutputIterator @@ -253,7 +266,7 @@ tmap_arc_compose(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = *first2; ++first2; ++result; @@ -284,7 +297,7 @@ tmap_compose(InputIterator1 first1, InputIterator1 last1, ++result; } else { *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::compose((*first1).second, (*first2).second)); ++first1; ++first2; @@ -298,7 +311,7 @@ tmap_compose(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = *first2; ++first2; ++result; @@ -349,7 +362,7 @@ tmap_invert_compose(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = *first2; ++first2; ++result; @@ -389,39 +402,39 @@ tmap_cached_compose_not_1(InputIterator2 &first2, InputIterator3 &first3, OUTPUT_CC_ELEM("2", (*first2).first); *result = pair - ((*first2).first, + ((*first2).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), - (*first2).second, + (*first2).second, NodeTransitionCacheEntry(), now)); ++first2; ++result; - + } else if ((*first3).first < (*first2).first) { // Here's an element in list 3 that is not lists 2 or 1. OUTPUT_CC_ELEM("3", (*first3).first); *result = pair - ((*first3).first, + ((*first3).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), NodeTransitionCacheEntry(), - (*first3).second, + (*first3).second, now)); ++first3; ++result; - + } else { // (*first2).first == (*first3).first // Here's an element in lists 2 and 3 that is not in list 1. OUTPUT_CC_ELEM("2, 3", (*first2).first); *result = pair - ((*first2).first, + ((*first2).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), - (*first2).second, - (*first3).second, + (*first2).second, + (*first3).second, now)); ++first2; ++first3; @@ -447,39 +460,39 @@ tmap_cached_compose_not_2(InputIterator1 &first1, InputIterator3 &first3, OUTPUT_CC_ELEM("1", (*first1).first); *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::cached_compose - ((*first1).second, + ((*first1).second, NodeTransitionCacheEntry(), NodeTransitionCacheEntry(), now)); ++first1; ++result; - + } else if ((*first3).first < (*first1).first) { // Here's an element in list 3 that is not lists 1 or 2. OUTPUT_CC_ELEM("3", (*first3).first); *result = pair - ((*first3).first, + ((*first3).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), NodeTransitionCacheEntry(), - (*first3).second, + (*first3).second, now)); ++first3; ++result; - + } else { // (*first1).first == (*first3).first // Here's an element in lists 1 and 3 that is not in list 2. OUTPUT_CC_ELEM("1, 3", (*first1).first); *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::cached_compose ((*first1).second, NodeTransitionCacheEntry(), - (*first3).second, + (*first3).second, now)); ++first1; ++first3; @@ -504,35 +517,35 @@ tmap_cached_compose_not_3(InputIterator1 &first1, InputIterator2 &first2, OUTPUT_CC_ELEM("1", (*first1).first); *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::cached_compose - ((*first1).second, + ((*first1).second, NodeTransitionCacheEntry(), NodeTransitionCacheEntry(), now)); ++first1; ++result; - + } else if ((*first2).first < (*first1).first) { // Here's an element in list 2 that is not lists 1 or 3. OUTPUT_CC_ELEM("2", (*first2).first); *result = pair - ((*first2).first, + ((*first2).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), - (*first2).second, + (*first2).second, NodeTransitionCacheEntry(), now)); ++first2; ++result; - + } else { // (*first1).first == (*first2).first // Here's an element in lists 1 and 2 that is not in list 3. OUTPUT_CC_ELEM("1, 2", (*first1).first); *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::cached_compose ((*first1).second, (*first2).second, @@ -552,7 +565,7 @@ tmap_cached_compose_not_3(InputIterator1 &first1, InputIterator2 &first2, // is already known to be in both lists 1 and 2, and may // or may not also be in list 3. //////////////////////////////////////////////////////////////////// -template void tmap_cached_compose_12(InputIterator1 &first1, InputIterator2 &first2, @@ -563,7 +576,7 @@ tmap_cached_compose_12(InputIterator1 &first1, InputIterator2 &first2, OUTPUT_CC_ELEM("1, 2", (*first1).first); *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::cached_compose ((*first1).second, (*first2).second, @@ -572,13 +585,13 @@ tmap_cached_compose_12(InputIterator1 &first1, InputIterator2 &first2, ++first1; ++first2; ++result; - + } else if ((*first3).first < (*first1).first) { // Here's an element in list 3 that is not lists 1 or 2. OUTPUT_CC_ELEM("3", (*first3).first); *result = pair - ((*first3).first, + ((*first3).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), NodeTransitionCacheEntry(), @@ -586,13 +599,13 @@ tmap_cached_compose_12(InputIterator1 &first1, InputIterator2 &first2, now)); ++first3; ++result; - + } else { // (*first1).first == (*first3).first // Here's an element in lists 1, 2, and 3. OUTPUT_CC_ELEM("1, 2, 3", (*first1).first); - + *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::cached_compose ((*first1).second, (*first2).second, @@ -659,9 +672,9 @@ tmap_cached_compose(InputIterator1 first1, InputIterator1 last1, OUTPUT_CC_ELEM("1", (*first1).first); *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::cached_compose - ((*first1).second, + ((*first1).second, NodeTransitionCacheEntry(), NodeTransitionCacheEntry(), now)); @@ -674,10 +687,10 @@ tmap_cached_compose(InputIterator1 first1, InputIterator1 last1, OUTPUT_CC_ELEM("2", (*first2).first); *result = pair - ((*first2).first, + ((*first2).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), - (*first2).second, + (*first2).second, NodeTransitionCacheEntry(), now)); ++first2; @@ -689,11 +702,11 @@ tmap_cached_compose(InputIterator1 first1, InputIterator1 last1, OUTPUT_CC_ELEM("3", (*first3).first); *result = pair - ((*first3).first, + ((*first3).first, NodeTransitionCacheEntry::cached_compose (NodeTransitionCacheEntry(), NodeTransitionCacheEntry(), - (*first3).second, + (*first3).second, now)); ++first3; ++result; @@ -722,13 +735,13 @@ tmap_apply(InputIterator1 first1, InputIterator1 last1, ++result; } else if ((*first2).first < (*first1).first) { *result = pair - ((*first2).first, + ((*first2).first, NodeTransitionCacheEntry::apply(NULL, (*first2).second)); ++first2; ++result; } else { *result = pair - ((*first1).first, + ((*first1).first, NodeTransitionCacheEntry::apply((*first1).second, (*first2).second)); ++first1; ++first2; @@ -742,9 +755,9 @@ tmap_apply(InputIterator1 first1, InputIterator1 last1, ++result; } - while (first2 != last2) { + while (first2 != last2) { *result = pair - ((*first2).first, + ((*first2).first, NodeTransitionCacheEntry::apply(NULL, (*first2).second)); ++first2; ++result; @@ -813,7 +826,7 @@ tmap_equiv_trans(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { if (!(*first2).second.is_identity()) { return false; } @@ -866,7 +879,7 @@ tmap_equiv_attr(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { if ((*first2).second != (NodeAttribute *)NULL) { return false; } @@ -915,7 +928,7 @@ tmap_compare_cache(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { if (!(*first2).second.is_identity()) { // list2 is longer. return 1; @@ -974,7 +987,7 @@ tmap_compare_trans(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { if ((*first2).second != (NodeTransition *)NULL) { // list2 is longer. return 1; @@ -1033,7 +1046,7 @@ tmap_compare_attr(InputIterator1 first1, InputIterator1 last1, ++first1; } - while (first2 != last2) { + while (first2 != last2) { if ((*first2).second != (NodeAttribute *)NULL) { // list2 is longer. return 1; diff --git a/panda/src/graph/setTransitionHelpers.h b/panda/src/graph/setTransitionHelpers.h index 591f516ef8..69e43d53fd 100644 --- a/panda/src/graph/setTransitionHelpers.h +++ b/panda/src/graph/setTransitionHelpers.h @@ -2,6 +2,19 @@ // Created by: drose (25Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SETTRANSITIONHELPERS_H #define SETTRANSITIONHELPERS_H diff --git a/panda/src/graph/test_graph.cxx b/panda/src/graph/test_graph.cxx index 9f6a2bfc44..048423775c 100644 --- a/panda/src/graph/test_graph.cxx +++ b/panda/src/graph/test_graph.cxx @@ -1,6 +1,19 @@ // Filename: test_graph.cxx // Created by: drose (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodeRelation.h" @@ -453,7 +466,7 @@ int main() { new NodeRelation(a, ab, 0, NodeRelation::get_class_type()); NodeRelation *b_ba = new NodeRelation(b, ba, 0, NodeRelation::get_class_type()); - + r_a->set_transition(new TestTransition(1)); // a_aa->set_transition(new TestTransition(2)); a_aa->set_transition(new Test2Transition(3)); @@ -495,7 +508,7 @@ int main() { { nout << "\n"; PrintNodes pn; - df_traverse(r, pn, + df_traverse(r, pn, NullAttributeWrapper(), NullLevelState(), NodeRelation::get_class_type()); @@ -543,7 +556,7 @@ int main() { { nout << "\n"; PrintNodes pn; - df_traverse(r, pn, + df_traverse(r, pn, NodeAttributeWrapper(TestTransition::get_class_type()), NullLevelState(), NodeRelation::get_class_type()); @@ -591,7 +604,7 @@ int main() { { nout << "\n"; PrintNodes pn; - df_traverse(r, pn, + df_traverse(r, pn, NodeAttributeWrapper(Test2Transition::get_class_type()), NullLevelState(), NodeRelation::get_class_type()); @@ -639,7 +652,7 @@ int main() { { nout << "\n"; PrintNodes pn; - df_traverse(r, pn, + df_traverse(r, pn, NodeAttributeWrapper(TestMTransition::get_class_type()), NullLevelState(), NodeRelation::get_class_type()); @@ -687,7 +700,7 @@ int main() { { nout << "\n"; PrintNodes pn; - df_traverse(r, pn, + df_traverse(r, pn, AllAttributesWrapper(), NullLevelState(), NodeRelation::get_class_type()); @@ -738,7 +751,7 @@ int main() { wrt(aa, r, result, NodeRelation::get_class_type()); nout << "wrt of aa to r is " << result << "\n"; a_aa->set_transition(new Test2Transition(4)); - + wrt(aa, r, result, NodeRelation::get_class_type()); nout << "wrt of aa to r is now " << result << "\n"; diff --git a/panda/src/graph/transitionDirection.h b/panda/src/graph/transitionDirection.h index 0c44c55330..073aa859a3 100644 --- a/panda/src/graph/transitionDirection.h +++ b/panda/src/graph/transitionDirection.h @@ -1,6 +1,19 @@ // Filename: transitionDirection.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRANSITIONDIRECTION_H diff --git a/panda/src/graph/traverserVisitor.T b/panda/src/graph/traverserVisitor.T index c88443f7b2..b154e9820f 100644 --- a/panda/src/graph/traverserVisitor.T +++ b/panda/src/graph/traverserVisitor.T @@ -1,6 +1,19 @@ -// Filename: traverserVisitor.I +// Filename: traverserVisitor.T // Created by: drose (20Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// template INLINE_GRAPH bool TraverserVisitor:: -reached_node(Node *, +reached_node(Node *, TraverserVisitor::AttributeWrapper &, LevelState &) { return true; @@ -28,10 +41,10 @@ reached_node(Node *, // pruned and not reach the destination node. //////////////////////////////////////////////////////////////////// template -INLINE_GRAPH bool TraverserVisitor:: -forward_arc(NodeRelation *, +INLINE_GRAPH bool TraverserVisitor:: +forward_arc(NodeRelation *, TraverserVisitor::TransitionWrapper &, - TraverserVisitor::AttributeWrapper &, + TraverserVisitor::AttributeWrapper &, TraverserVisitor::AttributeWrapper &, LevelState &) { return true; @@ -49,9 +62,9 @@ forward_arc(NodeRelation *, //////////////////////////////////////////////////////////////////// template INLINE_GRAPH void TraverserVisitor:: -backward_arc(NodeRelation *, +backward_arc(NodeRelation *, TraverserVisitor::TransitionWrapper &, - TraverserVisitor::AttributeWrapper &, + TraverserVisitor::AttributeWrapper &, TraverserVisitor::AttributeWrapper &, const LevelState &) { } diff --git a/panda/src/graph/traverserVisitor.h b/panda/src/graph/traverserVisitor.h index a67eb97236..11abdb7fb1 100644 --- a/panda/src/graph/traverserVisitor.h +++ b/panda/src/graph/traverserVisitor.h @@ -2,6 +2,19 @@ // Created by: drose (26Oct98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TRAVERSERVISITOR_H #define TRAVERSERVISITOR_H @@ -17,7 +30,7 @@ public: typedef TW TransitionWrapper; typedef TYPENAME TransitionWrapper::AttributeWrapper AttributeWrapper; - INLINE_GRAPH bool reached_node(Node *node, + INLINE_GRAPH bool reached_node(Node *node, AttributeWrapper &render_state, LevelState &level_state); @@ -37,5 +50,5 @@ public: #endif - - + + diff --git a/panda/src/graph/vector_NodeRelation_star.cxx b/panda/src/graph/vector_NodeRelation_star.cxx index 456826c855..73b47212b9 100644 --- a/panda/src/graph/vector_NodeRelation_star.cxx +++ b/panda/src/graph/vector_NodeRelation_star.cxx @@ -1,6 +1,19 @@ // Filename: vector_NodeRelation_star.cxx // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_NodeRelation_star.h" diff --git a/panda/src/graph/vector_NodeRelation_star.h b/panda/src/graph/vector_NodeRelation_star.h index 39d3431b85..7146f1db8f 100644 --- a/panda/src/graph/vector_NodeRelation_star.h +++ b/panda/src/graph/vector_NodeRelation_star.h @@ -1,6 +1,19 @@ // Filename: vector_NodeRelation_star.h // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_NODERELATION_STAR_H diff --git a/panda/src/graph/vector_PT_Node.cxx b/panda/src/graph/vector_PT_Node.cxx index 5c34157ae9..ae9ee637f4 100644 --- a/panda/src/graph/vector_PT_Node.cxx +++ b/panda/src/graph/vector_PT_Node.cxx @@ -1,6 +1,19 @@ // Filename: vector_PT_Node.cxx // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_PT_Node.h" diff --git a/panda/src/graph/vector_PT_Node.h b/panda/src/graph/vector_PT_Node.h index eea4bf8af6..df5b42a694 100644 --- a/panda/src/graph/vector_PT_Node.h +++ b/panda/src/graph/vector_PT_Node.h @@ -1,6 +1,19 @@ // Filename: vector_PT_Node.h // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_PT_NODE_H diff --git a/panda/src/graph/vector_PT_NodeRelation.cxx b/panda/src/graph/vector_PT_NodeRelation.cxx index d3c8110c84..686d3c56cc 100644 --- a/panda/src/graph/vector_PT_NodeRelation.cxx +++ b/panda/src/graph/vector_PT_NodeRelation.cxx @@ -1,6 +1,19 @@ // Filename: vector_PT_NodeRelation.cxx // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "node.h" diff --git a/panda/src/graph/vector_PT_NodeRelation.h b/panda/src/graph/vector_PT_NodeRelation.h index 7d0f012191..4c62114381 100644 --- a/panda/src/graph/vector_PT_NodeRelation.h +++ b/panda/src/graph/vector_PT_NodeRelation.h @@ -1,6 +1,19 @@ // Filename: vector_PT_NodeRelation.h // Created by: drose (07May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_PT_NODERELATION_H diff --git a/panda/src/graph/wrt.I b/panda/src/graph/wrt.I index 89dde308e7..c1bdf4410e 100644 --- a/panda/src/graph/wrt.I +++ b/panda/src/graph/wrt.I @@ -1,6 +1,19 @@ // Filename: wrt.I // Created by: drose (26Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifdef NOTIFY_DEBUG @@ -13,7 +26,7 @@ template void describe_ambiguous_wrt(const Node *node, - InputIterator arc_list_begin, + InputIterator arc_list_begin, InputIterator arc_list_end, TypeHandle graph_type) { if (wrt_cat.is_warning()) { @@ -28,11 +41,11 @@ describe_ambiguous_wrt(const Node *node, wrt_cat.warning(false) << *parent_arc->get_parent(); for (int i = 1; i < num_parents; i++) { parent_arc = urp[i]; - wrt_cat.warning(false) + wrt_cat.warning(false) << ", " << *parent_arc->get_parent(); } wrt_cat.warning(false) << "\n"; - + // Show the chain of arcs specified. if (arc_list_begin == arc_list_end) { wrt_cat.warning(false) @@ -44,7 +57,7 @@ describe_ambiguous_wrt(const Node *node, wrt_cat.warning(false) << " " << *(*ri)->get_parent() << "/" << *(*ri)->get_child(); - + InputIterator ri_last = ri; ++ri; while (ri != arc_list_end) { @@ -58,7 +71,7 @@ describe_ambiguous_wrt(const Node *node, } ri_last = ri; ++ri; - } + } wrt_cat.warning(false) << "\n"; } } @@ -94,7 +107,7 @@ describe_ambiguous_wrt(const Node *node, //////////////////////////////////////////////////////////////////// template void -get_cached_net_transition(NodeRelation *arc, Node *&root, +get_cached_net_transition(NodeRelation *arc, Node *&root, UpdateSeq as_of, UpdateSeq now, TransitionWrapper &net, TypeHandle graph_type) { TransitionWrapper cur_cache = TransitionWrapper::init_from(net); @@ -115,7 +128,7 @@ get_cached_net_transition(NodeRelation *arc, Node *&root, wrt_cat.debug(false) << *root; } wrt_cat.debug(false) - << ") is current as of " << as_of << " (now is " + << ") is current as of " << as_of << " (now is " << now << ")\n"; if (wrt_cat.is_spam()) { wrt_cat.spam() << "result of " << *arc << " is " << net << "\n"; @@ -175,14 +188,14 @@ get_cached_net_transition(NodeRelation *arc, Node *&root, wrt_cat.debug(false) << *root; } wrt_cat.debug(false) - << ") is recomputed as of " << as_of << " (now is " + << ") is recomputed as of " << as_of << " (now is " << now << ")\n"; if (wrt_cat.is_spam()) { wrt_cat.spam() << "result of " << *arc << " is " << net << "\n"; } } } -} +} //////////////////////////////////////////////////////////////////// @@ -202,8 +215,8 @@ get_cached_net_transition(NodeRelation *arc, Node *&root, //////////////////////////////////////////////////////////////////// template void -get_cached_net_transition(const Node *node, - InputIterator arc_list_begin, +get_cached_net_transition(const Node *node, + InputIterator arc_list_begin, InputIterator arc_list_end, UpdateSeq as_of, UpdateSeq now, TransitionWrapper &result, @@ -232,7 +245,7 @@ get_cached_net_transition(const Node *node, } else if (num_parents == 0) { // This node has no parents. Stop here. result.make_identity(); - + if (wrt_cat.is_debug()) { wrt_cat.debug() << "get_cached_net_transition(" << *node << ") has no parents.\n"; @@ -243,8 +256,8 @@ get_cached_net_transition(const Node *node, // The node has multiple parents, and we have a list of arcs in // arc_list_begin .. arc_list_end. If any of the parents is // mentioned in the list, we must choose that parent. - for (InputIterator ri = arc_list_begin; - parent_arc == (NodeRelation *)NULL && ri != arc_list_end; + for (InputIterator ri = arc_list_begin; + parent_arc == (NodeRelation *)NULL && ri != arc_list_end; ++ri) { if ((*ri)->get_child() == node) { parent_arc = (*ri); @@ -263,14 +276,14 @@ get_cached_net_transition(const Node *node, // Get the net transition leading into this node. Node *root; - get_cached_net_transition((NodeRelation *)parent_arc, root, + get_cached_net_transition((NodeRelation *)parent_arc, root, as_of, now, result, graph_type); if (root != NULL) { // There's more to get. The above function call was forced to // stop at a node with multiple parents. TransitionWrapper more = TransitionWrapper::init_from(result); - get_cached_net_transition(root, arc_list_begin, arc_list_end, + get_cached_net_transition(root, arc_list_begin, arc_list_end, as_of, now, more, graph_type); more.compose_in_place(result); result = more; @@ -297,8 +310,8 @@ get_cached_net_transition(const Node *node, //////////////////////////////////////////////////////////////////// template void -get_uncached_net_transition(const Node *node, - InputIterator arc_list_begin, +get_uncached_net_transition(const Node *node, + InputIterator arc_list_begin, InputIterator arc_list_end, TransitionWrapper &result, TypeHandle graph_type) { @@ -335,8 +348,8 @@ get_uncached_net_transition(const Node *node, // The node has multiple parents, and we have a list of arcs in // arc_list_begin .. arc_list_end. If any of the parents is // mentioned in the list, we must choose that parent. - for (InputIterator ri = arc_list_begin; - parent_arc == (NodeRelation *)NULL && ri != arc_list_end; + for (InputIterator ri = arc_list_begin; + parent_arc == (NodeRelation *)NULL && ri != arc_list_end; ++ri) { if ((*ri)->get_child() == node) { parent_arc = (*ri); @@ -346,7 +359,7 @@ get_uncached_net_transition(const Node *node, if (parent_arc == (NodeRelation *)NULL) { #ifdef NOTIFY_DEBUG // No, it wasn't mentioned. Issue a warning and use the first - // one. + // one. describe_ambiguous_wrt(node, arc_list_begin, arc_list_end, graph_type); #endif parent_arc = urp[0]; @@ -370,7 +383,7 @@ get_uncached_net_transition(const Node *node, for (ri = arc_list_begin; ri != arc_list_end; ++ri) { wrt_cat.spam(false) << ", " << *(*ri); } - + wrt_cat.spam(false) << "), " << num_parents << " parents, is:\n"; result.write(wrt_cat.spam(false), 2); @@ -388,7 +401,7 @@ template void cached_wrt_base(const Node *from, InputIterator1 from_arcs_begin, InputIterator1 from_arcs_end, - const Node *to, + const Node *to, InputIterator2 to_arcs_begin, InputIterator2 to_arcs_end, TransitionWrapper &result, TypeHandle graph_type) { @@ -410,22 +423,22 @@ cached_wrt_base(const Node *from, wrt_cat.debug(false) << *to; } wrt_cat.debug(false) - << "), as of " << now << " (now is " + << "), as of " << now << " (now is " << now << ")\n"; } - get_cached_net_transition(from, from_arcs_begin, from_arcs_end, + get_cached_net_transition(from, from_arcs_begin, from_arcs_end, now, now, net_from_trans, graph_type); - get_cached_net_transition(to, to_arcs_begin, to_arcs_end, + get_cached_net_transition(to, to_arcs_begin, to_arcs_end, now, now, result, graph_type); - + #ifndef NDEBUG if (paranoid_wrt) { // We don't entirely trust the caching to work flawlessly. Go // ahead and compute the uncached transition just to doublecheck. TransitionWrapper check_from_trans = TransitionWrapper::init_from(result); - TransitionWrapper check_to_trans = + TransitionWrapper check_to_trans = TransitionWrapper::init_from(result); get_uncached_net_transition(from, from_arcs_begin, from_arcs_end, check_from_trans, graph_type); @@ -439,7 +452,7 @@ cached_wrt_base(const Node *from, check_from_trans.write(wrt_cat.warning(false), 4); net_from_trans = check_from_trans; } - + get_uncached_net_transition(to, to_arcs_begin, to_arcs_end, check_to_trans, graph_type); if (check_to_trans.compare_to(result) != 0) { @@ -468,7 +481,7 @@ template void uncached_wrt_base(const Node *from, InputIterator1 from_arcs_begin, InputIterator1 from_arcs_end, - const Node *to, + const Node *to, InputIterator2 to_arcs_begin, InputIterator2 to_arcs_end, TransitionWrapper &result, TypeHandle graph_type) { @@ -501,7 +514,7 @@ template INLINE_GRAPH void wrt_base(const Node *from, InputIterator1 from_arcs_begin, InputIterator1 from_arcs_end, - const Node *to, + const Node *to, InputIterator2 to_arcs_begin, InputIterator2 to_arcs_end, TransitionWrapper &result, TypeHandle graph_type) { @@ -534,7 +547,7 @@ template INLINE_GRAPH void wrt(const Node *from, InputIterator from_arcs_begin, InputIterator from_arcs_end, - const Node *to, + const Node *to, TransitionWrapper &result, TypeHandle graph_type) { const NodeRelation *arc = NULL; wrt_base(from, from_arcs_begin, from_arcs_end, to, &arc, &arc, @@ -544,7 +557,7 @@ wrt(const Node *from, template INLINE_GRAPH void wrt(const Node *from, - const Node *to, + const Node *to, InputIterator to_arcs_begin, InputIterator to_arcs_end, TransitionWrapper &result, TypeHandle graph_type) { const NodeRelation *arc = NULL; @@ -556,7 +569,7 @@ template INLINE_GRAPH void wrt(const Node *from, InputIterator1 from_arcs_begin, InputIterator1 from_arcs_end, - const Node *to, + const Node *to, InputIterator2 to_arcs_begin, InputIterator2 to_arcs_end, TransitionWrapper &result, TypeHandle graph_type) { wrt_base(from, from_arcs_begin, from_arcs_end, @@ -577,7 +590,7 @@ template INLINE_GRAPH void uncached_wrt(const Node *from, InputIterator from_arcs_begin, InputIterator from_arcs_end, - const Node *to, + const Node *to, TransitionWrapper &result, TypeHandle graph_type) { const NodeRelation *arc = NULL; uncached_wrt_base(from, from_arcs_begin, from_arcs_end, to, &arc, &arc, @@ -587,7 +600,7 @@ uncached_wrt(const Node *from, template INLINE_GRAPH void uncached_wrt(const Node *from, - const Node *to, + const Node *to, InputIterator to_arcs_begin, InputIterator to_arcs_end, TransitionWrapper &result, TypeHandle graph_type) { const NodeRelation *arc = NULL; @@ -599,7 +612,7 @@ template INLINE_GRAPH void uncached_wrt(const Node *from, InputIterator1 from_arcs_begin, InputIterator1 from_arcs_end, - const Node *to, + const Node *to, InputIterator2 to_arcs_begin, InputIterator2 to_arcs_end, TransitionWrapper &result, TypeHandle graph_type) { uncached_wrt_base(from, from_arcs_begin, from_arcs_end, @@ -611,7 +624,7 @@ uncached_wrt(const Node *from, #ifndef NDEBUG template Node * -get_uncached_wrt_subtree(Node *node, Node *to, TransitionWrapper &result, +get_uncached_wrt_subtree(Node *node, Node *to, TransitionWrapper &result, TypeHandle graph_type) { nassertr(node != (Node *)NULL, to); @@ -665,7 +678,7 @@ get_uncached_wrt_subtree(Node *node, Node *to, TransitionWrapper &result, const NodeRelation *parent_arc = urp[0]; - Node *stop = + Node *stop = get_uncached_wrt_subtree(parent_arc->get_parent(), to, result, graph_type); @@ -694,7 +707,7 @@ template INLINE_GRAPH Node * uncached_wrt_subtree(NodeRelation *arc, Node *to, TransitionWrapper &result, TypeHandle graph_type) { - Node *stop = + Node *stop = get_uncached_wrt_subtree(arc->get_parent(), to, result, graph_type); @@ -781,20 +794,20 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now, return cached_wrt_subtree(arc, to, UpdateSeq::fresh(), now, result, graph_type); } - + nassertr(to->get_num_parents(graph_type) == 1, NULL); NodeRelation *to_arc = to->get_parent(graph_type, 0); - + // Save the result from the first pass. TransitionWrapper net_from_trans = result; - + // Now determine the net transition to the top of the subtree from // this arc. It had better be the same subtree! Node *top_subtree_2; get_cached_net_transition(to_arc, top_subtree_2, as_of, now, result, graph_type); nassertr(top_subtree == top_subtree_2, NULL); - + // And now compute the actual wrt. result.invert_compose_in_place(net_from_trans); @@ -818,7 +831,7 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now, // Now check the results. TransitionWrapper check_trans = TransitionWrapper::init_from(result); - Node *top_subtree_3 = + Node *top_subtree_3 = uncached_wrt_subtree(arc, to, check_trans, graph_type); if (top_subtree_3 != top_subtree) { diff --git a/panda/src/graph/wrt.cxx b/panda/src/graph/wrt.cxx index bc1e0d2497..792f9aee86 100644 --- a/panda/src/graph/wrt.cxx +++ b/panda/src/graph/wrt.cxx @@ -1,6 +1,19 @@ // Filename: wrt.cxx // Created by: drose (16Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "wrt.h" diff --git a/panda/src/graph/wrt.h b/panda/src/graph/wrt.h index c21c32c596..2a3e7148df 100644 --- a/panda/src/graph/wrt.h +++ b/panda/src/graph/wrt.h @@ -2,6 +2,19 @@ // Created by: drose (26Oct98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef WRT_H #define WRT_H diff --git a/panda/src/grutil/config_grutil.cxx b/panda/src/grutil/config_grutil.cxx index 668e531065..9e417deb1b 100644 --- a/panda/src/grutil/config_grutil.cxx +++ b/panda/src/grutil/config_grutil.cxx @@ -1,6 +1,19 @@ // Filename: config_grutil.cxx // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_grutil.h" diff --git a/panda/src/grutil/config_grutil.h b/panda/src/grutil/config_grutil.h index 0b40925acf..869d0498b1 100644 --- a/panda/src/grutil/config_grutil.h +++ b/panda/src/grutil/config_grutil.h @@ -1,6 +1,19 @@ // Filename: config_grutil.h // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_GRUTIL_H diff --git a/panda/src/grutil/lineSegs.I b/panda/src/grutil/lineSegs.I index 79d1ce3f17..1f2834c7f8 100644 --- a/panda/src/grutil/lineSegs.I +++ b/panda/src/grutil/lineSegs.I @@ -1,12 +1,25 @@ // Filename: lineSegs.I // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LineSegs::Point::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LineSegs::Point:: Point() { @@ -15,19 +28,19 @@ Point() { //////////////////////////////////////////////////////////////////// // Function: LineSegs::Point::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LineSegs::Point:: Point(const LVecBase3f &point, const Colorf &color) : - _point(point[0], point[1], point[2]), - _color(color) + _point(point[0], point[1], point[2]), + _color(color) { } //////////////////////////////////////////////////////////////////// // Function: LineSegs::Point::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LineSegs::Point:: Point(const LineSegs::Point ©) : @@ -39,7 +52,7 @@ Point(const LineSegs::Point ©) : //////////////////////////////////////////////////////////////////// // Function: LineSegs::Point::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void LineSegs::Point:: operator = (const LineSegs::Point ©) { @@ -155,7 +168,7 @@ get_num_vertices() const { //////////////////////////////////////////////////////////////////// INLINE Vertexf LineSegs:: get_vertex(int vertex) const { - nassertr(vertex >= 0 && vertex < (int)_created_verts.size(), + nassertr(vertex >= 0 && vertex < (int)_created_verts.size(), Vertexf(0.0, 0.0, 0.0)); return _created_verts[vertex]; } @@ -196,7 +209,7 @@ set_vertex(int vertex, float x, float y, float z) { //////////////////////////////////////////////////////////////////// INLINE Colorf LineSegs:: get_vertex_color(int vertex) const { - nassertr(vertex >= 0 && vertex < (int)_created_colors.size(), + nassertr(vertex >= 0 && vertex < (int)_created_colors.size(), Colorf(0.0, 0.0, 0.0, 0.0)); return _created_colors[vertex]; } diff --git a/panda/src/grutil/lineSegs.cxx b/panda/src/grutil/lineSegs.cxx index 1464aa4600..41700f27b6 100644 --- a/panda/src/grutil/lineSegs.cxx +++ b/panda/src/grutil/lineSegs.cxx @@ -1,6 +1,19 @@ // Filename: lineSegs.cxx -// Created by: (24May00) -// +// Created by: (24May00) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lineSegs.h" @@ -81,7 +94,7 @@ draw_to(const LVecBase3f &v) { // Get the current SegmentList, which was the last one we added to // the LineList. SegmentList &segs = _list.back(); - + // Add the new point. segs.push_back(Point(v, _color)); } @@ -97,7 +110,7 @@ draw_to(const LVecBase3f &v) { bool LineSegs:: is_empty() { return _list.empty(); -} +} //////////////////////////////////////////////////////////////////// // Function: LineSegs::get_current_position @@ -155,7 +168,7 @@ create(GeomNode *previous, bool) { } else { lengths.push_back(segs.size()); } - + for (sl = segs.begin(); sl != segs.end(); sl++) { if (segs.size() >= 2) { line_index.push_back(v); @@ -166,7 +179,7 @@ create(GeomNode *previous, bool) { nassertr(v == (int)_created_verts.size(), previous); } } - + // Now create the lines. if (line_index.size() > 0) { // Create a new Geom and add the line segments. @@ -193,7 +206,7 @@ create(GeomNode *previous, bool) { previous->add_geom(geom); } - + // And now create the points. if (point_index.size() > 0) { // Create a new Geom and add the points. diff --git a/panda/src/grutil/lineSegs.h b/panda/src/grutil/lineSegs.h index a1b715a0e2..13b6b50efb 100644 --- a/panda/src/grutil/lineSegs.h +++ b/panda/src/grutil/lineSegs.h @@ -1,6 +1,19 @@ // Filename: lineSegs.h // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINESEGS_H diff --git a/panda/src/gsgbase/config_gsgbase.cxx b/panda/src/gsgbase/config_gsgbase.cxx index b317db1543..dddaae232d 100644 --- a/panda/src/gsgbase/config_gsgbase.cxx +++ b/panda/src/gsgbase/config_gsgbase.cxx @@ -1,6 +1,19 @@ // Filename: config_gsgbase.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_gsgbase.h" diff --git a/panda/src/gsgbase/config_gsgbase.h b/panda/src/gsgbase/config_gsgbase.h index 0e5ca7c7d1..7456a5142c 100644 --- a/panda/src/gsgbase/config_gsgbase.h +++ b/panda/src/gsgbase/config_gsgbase.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_GSGBASE_H #define CONFIG_GSGBASE_H diff --git a/panda/src/gsgbase/graphicsStateGuardianBase.cxx b/panda/src/gsgbase/graphicsStateGuardianBase.cxx index 6d7009487e..110413733f 100644 --- a/panda/src/gsgbase/graphicsStateGuardianBase.cxx +++ b/panda/src/gsgbase/graphicsStateGuardianBase.cxx @@ -1,6 +1,19 @@ // Filename: graphicsStateGuardianBase.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsStateGuardianBase.h" diff --git a/panda/src/gsgbase/graphicsStateGuardianBase.h b/panda/src/gsgbase/graphicsStateGuardianBase.h index a43dc8f86d..846bfd78fe 100644 --- a/panda/src/gsgbase/graphicsStateGuardianBase.h +++ b/panda/src/gsgbase/graphicsStateGuardianBase.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GRAPHICSSTATEGUARDIANBASE_H #define GRAPHICSSTATEGUARDIANBASE_H @@ -183,7 +196,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/gsgbase/test_gsgbase.cxx b/panda/src/gsgbase/test_gsgbase.cxx index 3c2f649347..cd85aa2a8b 100644 --- a/panda/src/gsgbase/test_gsgbase.cxx +++ b/panda/src/gsgbase/test_gsgbase.cxx @@ -1,6 +1,19 @@ // Filename: test_gsgbase.cxx // Created by: shochet (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "graphicsStateGuardianBase.h" diff --git a/panda/src/gsgmisc/geomIssuer.I b/panda/src/gsgmisc/geomIssuer.I index 54fcd13972..dfdb00b73a 100644 --- a/panda/src/gsgmisc/geomIssuer.I +++ b/panda/src/gsgmisc/geomIssuer.I @@ -1,6 +1,19 @@ // Filename: geomIssuer.I // Created by: drose (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gsgmisc/geomIssuer.cxx b/panda/src/gsgmisc/geomIssuer.cxx index 93fc332858..7114717f96 100644 --- a/panda/src/gsgmisc/geomIssuer.cxx +++ b/panda/src/gsgmisc/geomIssuer.cxx @@ -1,6 +1,19 @@ // Filename: geomIssuer.cxx // Created by: drose (03Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomIssuer.h" diff --git a/panda/src/gsgmisc/geomIssuer.h b/panda/src/gsgmisc/geomIssuer.h index 071769c581..29946c8001 100644 --- a/panda/src/gsgmisc/geomIssuer.h +++ b/panda/src/gsgmisc/geomIssuer.h @@ -2,6 +2,19 @@ // Created by: drose (03Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GEOMISSUER_H #define GEOMISSUER_H @@ -70,5 +83,5 @@ protected: }; #include "geomIssuer.I" - + #endif diff --git a/panda/src/gui/config_gui.cxx b/panda/src/gui/config_gui.cxx index 95485823f2..d31babc262 100644 --- a/panda/src/gui/config_gui.cxx +++ b/panda/src/gui/config_gui.cxx @@ -1,6 +1,19 @@ // Filename: config_gui.cxx // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_gui.h" diff --git a/panda/src/gui/config_gui.h b/panda/src/gui/config_gui.h index 84a82d75ad..01954dc0ea 100644 --- a/panda/src/gui/config_gui.h +++ b/panda/src/gui/config_gui.h @@ -1,6 +1,19 @@ // Filename: config_gui.h // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __CONFIG_GUI_H__ diff --git a/panda/src/gui/guiBackground.I b/panda/src/gui/guiBackground.I index 8d253ac453..558ed8f27d 100644 --- a/panda/src/gui/guiBackground.I +++ b/panda/src/gui/guiBackground.I @@ -1,6 +1,19 @@ // Filename: guiBackground.I // Created by: cary (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiBackground::GuiBackground(void) { diff --git a/panda/src/gui/guiBackground.cxx b/panda/src/gui/guiBackground.cxx index b6f32bd319..e37a9a6e89 100644 --- a/panda/src/gui/guiBackground.cxx +++ b/panda/src/gui/guiBackground.cxx @@ -1,6 +1,19 @@ // Filename: guiBackground.cxx // Created by: cary (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiBackground.h" @@ -121,7 +134,7 @@ void GuiBackground::set_priority(GuiItem* it, const GuiItem::Priority p) { _bg->set_priority(_bg, GuiLabel::P_HIGHEST); else if (p == P_Lowest) _bg->set_priority(_bg, GuiLabel::P_LOWEST); - else + else it->set_priority(_bg, ((p==P_Low)?P_High:P_Low)); GuiItem::set_priority(it, p); } diff --git a/panda/src/gui/guiBackground.h b/panda/src/gui/guiBackground.h index 446dee9ac3..4891be6512 100644 --- a/panda/src/gui/guiBackground.h +++ b/panda/src/gui/guiBackground.h @@ -1,6 +1,19 @@ // Filename: guiBackground.h // Created by: cary (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUIBACKGROUND_H__ diff --git a/panda/src/gui/guiBehavior.I b/panda/src/gui/guiBehavior.I index 93561b1dab..72b103e33e 100644 --- a/panda/src/gui/guiBehavior.I +++ b/panda/src/gui/guiBehavior.I @@ -1,6 +1,19 @@ // Filename: guiBehavior.I // Created by: cary (07Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// GuiBehavior::GuiBehavior(void) { diff --git a/panda/src/gui/guiBehavior.cxx b/panda/src/gui/guiBehavior.cxx index fd055610bb..7512af5ffe 100644 --- a/panda/src/gui/guiBehavior.cxx +++ b/panda/src/gui/guiBehavior.cxx @@ -1,6 +1,19 @@ // Filename: guiBehavior.cxx // Created by: cary (07Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiBehavior.h" diff --git a/panda/src/gui/guiBehavior.h b/panda/src/gui/guiBehavior.h index b82317ecd0..0929d5c686 100644 --- a/panda/src/gui/guiBehavior.h +++ b/panda/src/gui/guiBehavior.h @@ -1,6 +1,19 @@ // Filename: guiBehavior.h // Created by: cary (07Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUIBEHAVIOR_H__ diff --git a/panda/src/gui/guiButton.I b/panda/src/gui/guiButton.I index 9226cbd913..7d829095ec 100644 --- a/panda/src/gui/guiButton.I +++ b/panda/src/gui/guiButton.I @@ -1,6 +1,19 @@ // Filename: guiButton.I // Created by: cary (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiButton::GuiButton(void) { diff --git a/panda/src/gui/guiButton.cxx b/panda/src/gui/guiButton.cxx index fa054e195f..c54d52593d 100644 --- a/panda/src/gui/guiButton.cxx +++ b/panda/src/gui/guiButton.cxx @@ -1,6 +1,19 @@ // Filename: guiButton.cxx // Created by: cary (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiButton.h" diff --git a/panda/src/gui/guiButton.h b/panda/src/gui/guiButton.h index 2fe7a020b7..5efae25ff9 100644 --- a/panda/src/gui/guiButton.h +++ b/panda/src/gui/guiButton.h @@ -1,6 +1,19 @@ // Filename: guiButton.h // Created by: cary (30Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUIBUTTON_H__ diff --git a/panda/src/gui/guiChooser.I b/panda/src/gui/guiChooser.I index cf6843405b..94abb59a19 100644 --- a/panda/src/gui/guiChooser.I +++ b/panda/src/gui/guiChooser.I @@ -1,6 +1,19 @@ // Filename: guiChooser.I // Created by: cary (08Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiChooser::GuiChooser(void) {} diff --git a/panda/src/gui/guiChooser.cxx b/panda/src/gui/guiChooser.cxx index 545684dc1a..36811e8bec 100644 --- a/panda/src/gui/guiChooser.cxx +++ b/panda/src/gui/guiChooser.cxx @@ -1,6 +1,19 @@ // Filename: guiChooser.cxx // Created by: cary (08Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiChooser.h" diff --git a/panda/src/gui/guiChooser.h b/panda/src/gui/guiChooser.h index a385f41080..30481896f6 100644 --- a/panda/src/gui/guiChooser.h +++ b/panda/src/gui/guiChooser.h @@ -1,6 +1,19 @@ // Filename: guiChooser.h // Created by: cary (08Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUICHOOSER_H__ diff --git a/panda/src/gui/guiCollection.I b/panda/src/gui/guiCollection.I index fee95ff59e..be0bc98408 100644 --- a/panda/src/gui/guiCollection.I +++ b/panda/src/gui/guiCollection.I @@ -1,6 +1,19 @@ // Filename: guiCollection.I // Created by: cary (07Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiCollection::GuiCollection(void) {} diff --git a/panda/src/gui/guiCollection.cxx b/panda/src/gui/guiCollection.cxx index 6f29af52b6..c2b548a5d9 100644 --- a/panda/src/gui/guiCollection.cxx +++ b/panda/src/gui/guiCollection.cxx @@ -1,6 +1,19 @@ // Filename: guiCollection.cxx // Created by: cary (07Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiCollection.h" diff --git a/panda/src/gui/guiCollection.h b/panda/src/gui/guiCollection.h index 3a0b906a08..14dabe2307 100644 --- a/panda/src/gui/guiCollection.h +++ b/panda/src/gui/guiCollection.h @@ -1,6 +1,19 @@ // Filename: guiCollection.h // Created by: cary (07Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUICOLLECTION_H__ diff --git a/panda/src/gui/guiFrame.I b/panda/src/gui/guiFrame.I index 3624fd14a0..17aa5e77ed 100644 --- a/panda/src/gui/guiFrame.I +++ b/panda/src/gui/guiFrame.I @@ -1,6 +1,19 @@ // Filename: guiFrame.I // Created by: cary (01Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiFrame::GuiFrame(void) {} diff --git a/panda/src/gui/guiFrame.cxx b/panda/src/gui/guiFrame.cxx index c377319d05..d9850e211a 100644 --- a/panda/src/gui/guiFrame.cxx +++ b/panda/src/gui/guiFrame.cxx @@ -1,6 +1,19 @@ // Filename: guiFrame.cxx // Created by: cary (01Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiFrame.h" diff --git a/panda/src/gui/guiFrame.h b/panda/src/gui/guiFrame.h index 6b87691247..a7c0a96bbe 100644 --- a/panda/src/gui/guiFrame.h +++ b/panda/src/gui/guiFrame.h @@ -1,6 +1,19 @@ // Filename: guiFrame.h // Created by: cary (01Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUIFRAME_H__ diff --git a/panda/src/gui/guiItem.I b/panda/src/gui/guiItem.I index ba5699a202..03a9bf50b8 100644 --- a/panda/src/gui/guiItem.I +++ b/panda/src/gui/guiItem.I @@ -1,6 +1,19 @@ // Filename: guiItem.I // Created by: cary (01Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiItem::GuiItem(void) : Namable("fubar"), _scale(1.), _scale_x(1.), diff --git a/panda/src/gui/guiItem.cxx b/panda/src/gui/guiItem.cxx index 0be02917fe..fcadf1fbbe 100644 --- a/panda/src/gui/guiItem.cxx +++ b/panda/src/gui/guiItem.cxx @@ -1,6 +1,19 @@ // Filename: guiItem.cxx // Created by: cary (01Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiItem.h" diff --git a/panda/src/gui/guiItem.h b/panda/src/gui/guiItem.h index b737287c09..cc40456e3a 100644 --- a/panda/src/gui/guiItem.h +++ b/panda/src/gui/guiItem.h @@ -1,6 +1,19 @@ // Filename: guiItem.h // Created by: cary (01Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUIITEM_H__ diff --git a/panda/src/gui/guiLabel.I b/panda/src/gui/guiLabel.I index 6d47dcf36d..befe204a9c 100644 --- a/panda/src/gui/guiLabel.I +++ b/panda/src/gui/guiLabel.I @@ -1,6 +1,19 @@ // Filename: guiLabel.I // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiLabel::GuiLabel(void) : _type(GuiLabel::NONE), diff --git a/panda/src/gui/guiLabel.cxx b/panda/src/gui/guiLabel.cxx index 82feeba27a..15fb21ea5f 100644 --- a/panda/src/gui/guiLabel.cxx +++ b/panda/src/gui/guiLabel.cxx @@ -1,6 +1,19 @@ // Filename: guiLabel.cxx // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiLabel.h" @@ -20,11 +33,11 @@ void GuiLabel::recompute_transform(void) { LMatrix4f::scale_mat(LVector3f::rfu((_mirror_x?-1.0f:1.0f), 1.0f, (_mirror_y?-1.0f:1.0f))) * LMatrix4f::translate_mat(_pos); -*/ +*/ // optimize the above calculation float sx,sy,sz; - + sx = _scale_x*_scale; if(_mirror_x) sx = -sx; @@ -34,9 +47,9 @@ void GuiLabel::recompute_transform(void) { sz = -sz; LVector3f scalevec1 = LVector3f::rfu(sx,sy,sz); - + LMatrix4f mat(scalevec1[0], 0.0f, 0.0f, 0.0f, - 0.0f, scalevec1[1], 0.0f, 0.0f, + 0.0f, scalevec1[1], 0.0f, 0.0f, 0.0f, 0.0f, scalevec1[2], 0.0f, _pos[0], _pos[1], _pos[2], 1.0f); @@ -66,7 +79,7 @@ void GuiLabel::recompute_transform(void) { LMatrix4f::scale_mat(LVector3f::rfu((_mirror_x?-1.0f:1.0f), 1.0f, (_mirror_y?-1.0f:1.0f))) * LMatrix4f::translate_mat(_pos + _model_pos); -*/ +*/ // optimize above calculation, which was already partially done at start if(_have_width || _have_height) { @@ -308,7 +321,7 @@ GuiLabel* GuiLabel::make_model_label(Node* geom, float w, float h) { ret->_model_height = h; ret->_internal = new RenderRelation(ret->_geom, geom); #ifdef _DEBUG - gui_cat->debug() << "created model label 0x" << (void*)ret + gui_cat->debug() << "created model label 0x" << (void*)ret << " from node 0x" << (void*)geom << ", set _type(" << (int)(ret->_type) << ") to MODEL(" << (int)MODEL << ")" << endl; @@ -327,7 +340,7 @@ GuiLabel* GuiLabel::make_model_label(Node* geom, float left, float right, ret->_model_height = top - bottom; ret->_internal = new RenderRelation(ret->_geom, geom); #ifdef _DEBUG - gui_cat->debug() << "created model label 0x" << (void*)ret + gui_cat->debug() << "created model label 0x" << (void*)ret << " from node 0x" << (void*)geom << ", set _type(" << (int)(ret->_type) << ") to MODEL(" << (int)MODEL << ")" << endl; @@ -418,14 +431,14 @@ void GuiLabel::get_extents(float& l, float& r, float& b, float& t) { _scale_z)) * LMatrix4f::scale_mat(_scale) * LMatrix4f::translate_mat(_pos); - + ul = ul * mat; - lr = lr * mat; -*/ + lr = lr * mat; +*/ // optimize above LVector3f scalevec1 = LVector3f::rfu(_scale_x*_scale, _scale_y*_scale, _scale_z*_scale); - LVector3f scalevec2 = LVector3f::rfu((_mirror_x?-1.0f:1.0f), + LVector3f scalevec2 = LVector3f::rfu((_mirror_x?-1.0f:1.0f), 1.0f, (_mirror_y?-1.0f:1.0f)); diff --git a/panda/src/gui/guiLabel.h b/panda/src/gui/guiLabel.h index 12e7f5aa28..c417f80598 100644 --- a/panda/src/gui/guiLabel.h +++ b/panda/src/gui/guiLabel.h @@ -1,6 +1,19 @@ // Filename: guiLabel.h // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUILABEL_H__ diff --git a/panda/src/gui/guiListBox.I b/panda/src/gui/guiListBox.I index ffb860953b..89ee4c78f6 100644 --- a/panda/src/gui/guiListBox.I +++ b/panda/src/gui/guiListBox.I @@ -1,6 +1,19 @@ // Filename: guiListBox.I // Created by: cary (18Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiListBox::GuiListBox(void) {} diff --git a/panda/src/gui/guiListBox.cxx b/panda/src/gui/guiListBox.cxx index 31aa0307c1..3564f4ee2d 100644 --- a/panda/src/gui/guiListBox.cxx +++ b/panda/src/gui/guiListBox.cxx @@ -1,6 +1,19 @@ // Filename: guiListBox.cxx // Created by: cary (18Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiListBox.h" diff --git a/panda/src/gui/guiListBox.h b/panda/src/gui/guiListBox.h index d21acb1fcb..e8a9d1391c 100644 --- a/panda/src/gui/guiListBox.h +++ b/panda/src/gui/guiListBox.h @@ -1,6 +1,19 @@ // Filename: guiListBox.h // Created by: cary (18Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUILISTBOX_H__ diff --git a/panda/src/gui/guiManager.I b/panda/src/gui/guiManager.I index 43c7b7be09..3ad739604e 100644 --- a/panda/src/gui/guiManager.I +++ b/panda/src/gui/guiManager.I @@ -1,6 +1,19 @@ // Filename: guiManager.I // Created by: cary (25Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiManager::GuiManager(MouseWatcher* w, Node* n, EventHandler* h) diff --git a/panda/src/gui/guiManager.cxx b/panda/src/gui/guiManager.cxx index 05c14c0a2c..e8d1745067 100644 --- a/panda/src/gui/guiManager.cxx +++ b/panda/src/gui/guiManager.cxx @@ -1,6 +1,19 @@ // Filename: guiManager.cxx // Created by: cary (25Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiManager.h" @@ -264,7 +277,7 @@ void GuiManager::sanity_check(void) const { << ", " << iv[2] << ", " << iv[3] << ") and (" << jv[0] << ", " << jv[1] << ", " << jv[2] << ", " << jv[3] << ")" << endl; - + } if ((*i)->get_name() == (*j)->get_name()) gui_cat->warning() << "GuiManager::sanity_check: regions with same " diff --git a/panda/src/gui/guiManager.h b/panda/src/gui/guiManager.h index 02a8cd1684..b5707225f6 100644 --- a/panda/src/gui/guiManager.h +++ b/panda/src/gui/guiManager.h @@ -1,6 +1,19 @@ // Filename: guiManager.h // Created by: cary (25Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUIMANAGER_H__ diff --git a/panda/src/gui/guiRollover.I b/panda/src/gui/guiRollover.I index 45bf9b6dfd..f541bc6f5d 100644 --- a/panda/src/gui/guiRollover.I +++ b/panda/src/gui/guiRollover.I @@ -1,6 +1,19 @@ // Filename: guiRollover.I // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiRollover::GuiRollover(void) { diff --git a/panda/src/gui/guiRollover.cxx b/panda/src/gui/guiRollover.cxx index 32c4131520..1b22695cdd 100644 --- a/panda/src/gui/guiRollover.cxx +++ b/panda/src/gui/guiRollover.cxx @@ -1,6 +1,19 @@ // Filename: guiRollover.cxx // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiRollover.h" diff --git a/panda/src/gui/guiRollover.h b/panda/src/gui/guiRollover.h index 51374c928f..104d3cf895 100644 --- a/panda/src/gui/guiRollover.h +++ b/panda/src/gui/guiRollover.h @@ -1,6 +1,19 @@ // Filename: guiRollover.h // Created by: cary (26Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUIROLLOVER_H__ diff --git a/panda/src/gui/guiSign.I b/panda/src/gui/guiSign.I index b67b65fbe8..6cc7afe2a9 100644 --- a/panda/src/gui/guiSign.I +++ b/panda/src/gui/guiSign.I @@ -1,6 +1,19 @@ // Filename: guiSign.I // Created by: cary (06Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE GuiSign::GuiSign(void) { diff --git a/panda/src/gui/guiSign.cxx b/panda/src/gui/guiSign.cxx index c8037297de..3491fb85db 100644 --- a/panda/src/gui/guiSign.cxx +++ b/panda/src/gui/guiSign.cxx @@ -1,6 +1,19 @@ // Filename: guiSign.cxx // Created by: cary (06Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "guiSign.h" diff --git a/panda/src/gui/guiSign.h b/panda/src/gui/guiSign.h index 09ff85afde..e9e4e76a7f 100644 --- a/panda/src/gui/guiSign.h +++ b/panda/src/gui/guiSign.h @@ -1,6 +1,19 @@ // Filename: guiSign.h // Created by: cary (06Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __GUISIGN_H__ diff --git a/panda/src/ipc/ipc.cxx b/panda/src/ipc/ipc.cxx index 9615fde0d3..ec9d121d9f 100644 --- a/panda/src/ipc/ipc.cxx +++ b/panda/src/ipc/ipc.cxx @@ -1,6 +1,19 @@ // Filename: ipc.cxx // Created by: frang (06Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ipc_condition.h" @@ -31,7 +44,7 @@ base_thread::mutex* base_thread::_next_id_mutex = base_thread::mutex::Null; int base_thread::_next_id = 0; -void* base_thread::thread_wrapper(void* data) +void* base_thread::thread_wrapper(void* data) { base_thread* me = (base_thread *) data; @@ -39,24 +52,24 @@ void* base_thread::thread_wrapper(void* data) // now invoke the thread functin with the given argument - if (me->_fn_void != NULL) + if (me->_fn_void != NULL) { (*me->_fn_void)(me->_thread_arg); base_thread::exit(); } - if (me->_fn_ret != NULL) + if (me->_fn_ret != NULL) { void* return_value = (*me->_fn_ret)(me->_thread_arg); base_thread::exit(return_value); } - if (me->_detached) + if (me->_detached) { me->run(me->_thread_arg); base_thread::exit(); - } - else + } + else { void* return_value = me->run_undetached(me->_thread_arg); base_thread::exit(return_value); diff --git a/panda/src/ipc/ipc_atomics.h b/panda/src/ipc/ipc_atomics.h index 2f97f2262b..81731fc49b 100644 --- a/panda/src/ipc/ipc_atomics.h +++ b/panda/src/ipc/ipc_atomics.h @@ -2,6 +2,19 @@ // Created by: frang (10Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_ATOMICS_H__ #define __IPC_ATOMICS_H__ diff --git a/panda/src/ipc/ipc_condition.h b/panda/src/ipc/ipc_condition.h index b3b602da6f..df5fa1accc 100644 --- a/panda/src/ipc/ipc_condition.h +++ b/panda/src/ipc/ipc_condition.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_CONDITION_H__ #define __IPC_CONDITION_H__ diff --git a/panda/src/ipc/ipc_file.I b/panda/src/ipc/ipc_file.I index 7f71cd49eb..659b6ecad1 100644 --- a/panda/src/ipc/ipc_file.I +++ b/panda/src/ipc/ipc_file.I @@ -1,3 +1,17 @@ // Filename: ipc_file.I // Created by: jason (07Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// diff --git a/panda/src/ipc/ipc_file.h b/panda/src/ipc/ipc_file.h index 09e709ad38..29373e17d9 100644 --- a/panda/src/ipc/ipc_file.h +++ b/panda/src/ipc/ipc_file.h @@ -1,6 +1,20 @@ // Filename: ipc_file.h // Created by: jason (05Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_FILE_H__ #define __IPC_FILE_H__ @@ -16,7 +30,7 @@ public: typedef ipc_traits traits; typedef traits::file_class file_class; - + static base_file* const Null; INLINE base_file(const string& file = "") : _file(traits::make_file(file)) {} diff --git a/panda/src/ipc/ipc_library.h b/panda/src/ipc/ipc_library.h index abdd8be1dc..b097d25415 100644 --- a/panda/src/ipc/ipc_library.h +++ b/panda/src/ipc/ipc_library.h @@ -2,6 +2,19 @@ // Created by: frang (10Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_LIBRARY_H__ #define __IPC_LIBRARY_H__ diff --git a/panda/src/ipc/ipc_mach_traits.h b/panda/src/ipc/ipc_mach_traits.h index 63345f040f..192a8d5ffe 100644 --- a/panda/src/ipc/ipc_mach_traits.h +++ b/panda/src/ipc/ipc_mach_traits.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_MACH_TRAITS_H__ #define __IPC_MACH_TRAITS_H__ diff --git a/panda/src/ipc/ipc_mutex.h b/panda/src/ipc/ipc_mutex.h index fd36c1c994..54028ffba3 100644 --- a/panda/src/ipc/ipc_mutex.h +++ b/panda/src/ipc/ipc_mutex.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_MUTEX_H__ #define __IPC_MUTEX_H__ diff --git a/panda/src/ipc/ipc_nspr_traits.h b/panda/src/ipc/ipc_nspr_traits.h index f358f92b68..2f6b8a3f0f 100644 --- a/panda/src/ipc/ipc_nspr_traits.h +++ b/panda/src/ipc/ipc_nspr_traits.h @@ -2,6 +2,19 @@ // Created by: cary (12Jan00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_NSPR_TRAITS_H__ #define __IPC_NSPR_TRAITS_H__ @@ -213,9 +226,9 @@ public: close(); switch(mode){ case 0: _fhandle = PR_Open(_filename.c_str(), PR_RDONLY, 00666); break; - case 1: _fhandle = PR_Open(_filename.c_str(), + case 1: _fhandle = PR_Open(_filename.c_str(), PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, 00666); break; - case 2: _fhandle = PR_Open(_filename.c_str(), + case 2: _fhandle = PR_Open(_filename.c_str(), PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE, 00666); break; case 3: _fhandle = PR_Open(_filename.c_str(), PR_APPEND | PR_CREATE_FILE, 00666); break; default: _fhandle = PR_Open(_filename.c_str(), PR_RDONLY, 00666); break; diff --git a/panda/src/ipc/ipc_nt_traits.cxx b/panda/src/ipc/ipc_nt_traits.cxx index f2d5e0cdfd..b3e8298584 100644 --- a/panda/src/ipc/ipc_nt_traits.cxx +++ b/panda/src/ipc/ipc_nt_traits.cxx @@ -1,6 +1,19 @@ // Filename: ipc_nt_traits.cxx // Created by: mike (23Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifdef WIN32_VC diff --git a/panda/src/ipc/ipc_nt_traits.h b/panda/src/ipc/ipc_nt_traits.h index 8d49d24553..6a30e05077 100644 --- a/panda/src/ipc/ipc_nt_traits.h +++ b/panda/src/ipc/ipc_nt_traits.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_NT_TRAITS_H__ #define __IPC_NT_TRAITS_H__ @@ -433,7 +446,7 @@ class EXPCL_PANDAEXPRESS ipc_traits { case 2: _fhandle = fopen(_filename.data(), "rwb"); break; default: _fhandle = fopen(_filename.data(), "rb"); break; } - if (_fhandle != NULL) return true; + if (_fhandle != NULL) return true; } return false; } diff --git a/panda/src/ipc/ipc_posix_traits.h b/panda/src/ipc/ipc_posix_traits.h index 2acceb9319..15cc9fba73 100644 --- a/panda/src/ipc/ipc_posix_traits.h +++ b/panda/src/ipc/ipc_posix_traits.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_POSIX_TRAITS_H__ #define __IPC_POSIX_TRAITS_H__ diff --git a/panda/src/ipc/ipc_ps2_traits.h b/panda/src/ipc/ipc_ps2_traits.h index 3dd593e895..cbfc10ee5e 100644 --- a/panda/src/ipc/ipc_ps2_traits.h +++ b/panda/src/ipc/ipc_ps2_traits.h @@ -1,6 +1,19 @@ // Filename: ipc_ps2_traits.h -// created by: charles (07jun00) -// +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __ipc_ps2_traits_h__ @@ -24,7 +37,7 @@ // are NOT tasked out when they're banging a while loop. If a thread is waiting // for a variable, but not sleeping, deadlock. -class EXPCL_PANDAEXPRESS ipc_traits +class EXPCL_PANDAEXPRESS ipc_traits { public: @@ -153,7 +166,7 @@ class EXPCL_PANDAEXPRESS ipc_traits INLINE condition_class(mutex_class *m) : _mutex(m) {} INLINE ~condition_class(void) {} - INLINE void wait(void) + INLINE void wait(void) { WaitingThread waiting_thread; SemaParam sp; @@ -189,7 +202,7 @@ class EXPCL_PANDAEXPRESS ipc_traits return -1; } - INLINE void signal(void) + INLINE void signal(void) { WaitingThread first_in_line = waiting_thread_list.front(); waiting_thread_list.pop_front(); @@ -199,7 +212,7 @@ class EXPCL_PANDAEXPRESS ipc_traits SignalSema(first_in_line.semaphore_id); } - INLINE void broadcast(void) + INLINE void broadcast(void) { list::iterator begin = waiting_thread_list.begin(); list::iterator end = waiting_thread_list.end(); @@ -304,13 +317,13 @@ class EXPCL_PANDAEXPRESS ipc_traits DeleteThread(GetThreadId()); } - INLINE void manual_init(void) + INLINE void manual_init(void) { m_thread_id = GetThreadId(); set_priority(1); } - INLINE void start_pre(void *(*fn)(void *), const bool, const int pri) + INLINE void start_pre(void *(*fn)(void *), const bool, const int pri) { _fn = fn; m_priority = priority_map(pri); @@ -349,8 +362,8 @@ class EXPCL_PANDAEXPRESS ipc_traits INLINE void start_post(const bool det, const int) {} INLINE void *back_ptr(void) { return _b_ptr; } - static INLINE void exit(void *) - { + static INLINE void exit(void *) + { int id = GetThreadId(); vector::iterator cur; @@ -372,13 +385,13 @@ class EXPCL_PANDAEXPRESS ipc_traits INLINE void join(void **status) {} - INLINE void set_priority(const int pri) + INLINE void set_priority(const int pri) { m_priority = priority_map(pri); ChangeThreadPriority(m_thread_id, m_priority); } - static INLINE thread_class *self(void) + static INLINE thread_class *self(void) { int id, result; @@ -388,7 +401,7 @@ class EXPCL_PANDAEXPRESS ipc_traits id = GetThreadId(); for (cur = thread_addr_vector.begin(); cur != thread_addr_vector.end(); - cur++) + cur++) { if ((*cur).thread_id == id) return (*cur).thread_ptr; @@ -397,7 +410,7 @@ class EXPCL_PANDAEXPRESS ipc_traits return NULL; } - static INLINE void yield(void) + static INLINE void yield(void) { int id, result, priority; struct ThreadParam thread_param; diff --git a/panda/src/ipc/ipc_semaphore.h b/panda/src/ipc/ipc_semaphore.h index 324e6ff28c..6418a6bcd8 100644 --- a/panda/src/ipc/ipc_semaphore.h +++ b/panda/src/ipc/ipc_semaphore.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_SEMAPHORE_H__ #define __IPC_SEMAPHORE_H__ diff --git a/panda/src/ipc/ipc_solaris_traits.h b/panda/src/ipc/ipc_solaris_traits.h index 065fc3eb1e..f9432ecde9 100644 --- a/panda/src/ipc/ipc_solaris_traits.h +++ b/panda/src/ipc/ipc_solaris_traits.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_SOLARIS_TRAITS_H__ #define __IPC_SOLARIS_TRAITS_H__ diff --git a/panda/src/ipc/ipc_thread.h b/panda/src/ipc/ipc_thread.h index 5d95e59140..796f9af1fd 100644 --- a/panda/src/ipc/ipc_thread.h +++ b/panda/src/ipc/ipc_thread.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_THREAD_H__ #define __IPC_THREAD_H__ @@ -218,8 +231,8 @@ class EXPCL_PANDAEXPRESS base_thread { // destructor of a class that inherits from thread<...> shouldn't be // public either (otherwise the thread object can be destroyed while the // underlying thread is still running (this is Bad(tm))). - virtual ~base_thread(void) { - delete _thread; + virtual ~base_thread(void) { + delete _thread; } private: diff --git a/panda/src/ipc/ipc_traits.cxx b/panda/src/ipc/ipc_traits.cxx index a9a2ff1d95..b4e3c2b865 100644 --- a/panda/src/ipc/ipc_traits.cxx +++ b/panda/src/ipc/ipc_traits.cxx @@ -1,6 +1,19 @@ // Filename: ipc_traits.cxx // Created by: frang (06Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ipc_traits.h" diff --git a/panda/src/ipc/ipc_traits.h b/panda/src/ipc/ipc_traits.h index 80d34469e4..6488b2f5c1 100644 --- a/panda/src/ipc/ipc_traits.h +++ b/panda/src/ipc/ipc_traits.h @@ -2,6 +2,19 @@ // Created by: cary (16Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __IPC_TRAITS_H__ #define __IPC_TRAITS_H__ diff --git a/panda/src/ipc/loom.cxx b/panda/src/ipc/loom.cxx index 263ccd0847..1985b0c315 100644 --- a/panda/src/ipc/loom.cxx +++ b/panda/src/ipc/loom.cxx @@ -1,6 +1,19 @@ // Filename: loom.cxx // Created by: cary (23Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loom_internal.h" diff --git a/panda/src/ipc/loom.h b/panda/src/ipc/loom.h index 0577a02212..43b321bf8b 100644 --- a/panda/src/ipc/loom.h +++ b/panda/src/ipc/loom.h @@ -2,6 +2,19 @@ // Created by: cary (23Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __LOOM_H__ #define __LOOM_H__ diff --git a/panda/src/ipc/loom_internal.h b/panda/src/ipc/loom_internal.h index 69f8acc751..767dd5efa6 100644 --- a/panda/src/ipc/loom_internal.h +++ b/panda/src/ipc/loom_internal.h @@ -2,6 +2,19 @@ // Created by: cary (23Sep98) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __LOOM_INTERNAL_H__ #define __LOOM_INTERNAL_H__ diff --git a/panda/src/ipc/loom_main.cxx b/panda/src/ipc/loom_main.cxx index 64a12b3259..9a14a4566d 100644 --- a/panda/src/ipc/loom_main.cxx +++ b/panda/src/ipc/loom_main.cxx @@ -1,6 +1,19 @@ // Filename: loom_main.cxx // Created by: cary (23Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loom_internal.h" diff --git a/panda/src/ipc/loom_test1.cxx b/panda/src/ipc/loom_test1.cxx index 7db6676afb..7701eb8804 100644 --- a/panda/src/ipc/loom_test1.cxx +++ b/panda/src/ipc/loom_test1.cxx @@ -1,6 +1,19 @@ // Filename: loom_test1.cxx // Created by: cary (30Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loom.h" diff --git a/panda/src/ipc/loom_test2.cxx b/panda/src/ipc/loom_test2.cxx index b84df5b1a5..3ba7b333e7 100644 --- a/panda/src/ipc/loom_test2.cxx +++ b/panda/src/ipc/loom_test2.cxx @@ -1,6 +1,19 @@ // Filename: loom_test2.cxx // Created by: cary (30Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loom.h" diff --git a/panda/src/ipc/test_diners.cxx b/panda/src/ipc/test_diners.cxx index 7600384eb5..fb8fc34bc0 100644 --- a/panda/src/ipc/test_diners.cxx +++ b/panda/src/ipc/test_diners.cxx @@ -1,6 +1,19 @@ // Filename: test_diners.cxx // Created by: cary (16Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // A solution to the infamous dining philosophers, implemented using the diff --git a/panda/src/ipc/test_file.cxx b/panda/src/ipc/test_file.cxx index 115de5b8ea..664735201b 100644 --- a/panda/src/ipc/test_file.cxx +++ b/panda/src/ipc/test_file.cxx @@ -1,6 +1,20 @@ // Filename: test_file.cxx // Created by: jason (05Sep00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include "ipc_file.h" @@ -18,7 +32,7 @@ int main(int argc, char* argv[]) Datagram test_out; test_out.add_string(test_data); datagram_file stream(test_file); - + nout << "WRITE TEST" << endl; nout << "Opening file for writing: " << test_file << endl; if (!stream.open(file::FILE_WRITE)) nout << "Didn't open!" << endl; @@ -38,7 +52,7 @@ int main(int argc, char* argv[]) nout << "Read datagram with data: " << scan.get_string() << endl; nout << "Closing file: " << test_file << endl; stream.close(); - + #ifdef _ERROR_TEST //Test error handling Datagram test_error; diff --git a/panda/src/ipc/test_priority.cxx b/panda/src/ipc/test_priority.cxx index 0fb752e474..317bd92858 100644 --- a/panda/src/ipc/test_priority.cxx +++ b/panda/src/ipc/test_priority.cxx @@ -1,6 +1,19 @@ // Filename: test_priority.cxx // Created by: cary (16Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/ipc/test_prodcons.cxx b/panda/src/ipc/test_prodcons.cxx index 79a5b6fe86..e32fca0c25 100644 --- a/panda/src/ipc/test_prodcons.cxx +++ b/panda/src/ipc/test_prodcons.cxx @@ -1,6 +1,19 @@ // Filename: test_prodcons.cxx // Created by: cary (16Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/ipc/test_thread.cxx b/panda/src/ipc/test_thread.cxx index c5e2b2ca45..54c831981e 100644 --- a/panda/src/ipc/test_thread.cxx +++ b/panda/src/ipc/test_thread.cxx @@ -1,6 +1,19 @@ // Filename: test_thread.cxx -// created by: charles (08jun00) -// +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/ipc/test_threaddata.cxx b/panda/src/ipc/test_threaddata.cxx index 1b2a4b0871..2bde7bb905 100644 --- a/panda/src/ipc/test_threaddata.cxx +++ b/panda/src/ipc/test_threaddata.cxx @@ -1,6 +1,19 @@ // Filename: test_threaddata.cxx // Created by: cary (16Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/lerp/config_lerp.cxx b/panda/src/lerp/config_lerp.cxx index b353aa58f0..ffaa02d687 100644 --- a/panda/src/lerp/config_lerp.cxx +++ b/panda/src/lerp/config_lerp.cxx @@ -1,6 +1,19 @@ // Filename: config_lerp.cxx // Created by: frang (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_lerp.h" diff --git a/panda/src/lerp/config_lerp.h b/panda/src/lerp/config_lerp.h index b06e210f12..0ca138bbac 100644 --- a/panda/src/lerp/config_lerp.h +++ b/panda/src/lerp/config_lerp.h @@ -1,6 +1,19 @@ // Filename: config_lerp.h // Created by: frang (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __CONFIG_LERP_H__ diff --git a/panda/src/lerp/lerp.cxx b/panda/src/lerp/lerp.cxx index 151010c111..8059f5a1ba 100644 --- a/panda/src/lerp/lerp.cxx +++ b/panda/src/lerp/lerp.cxx @@ -1,6 +1,19 @@ // Filename: lerp.cxx // Created by: frang (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lerp.h" diff --git a/panda/src/lerp/lerp.h b/panda/src/lerp/lerp.h index 6b84f06f8b..67550747ae 100644 --- a/panda/src/lerp/lerp.h +++ b/panda/src/lerp/lerp.h @@ -1,6 +1,19 @@ // Filename: lerp.h // Created by: frang (18Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __LERP_H__ diff --git a/panda/src/lerp/lerpblend.cxx b/panda/src/lerp/lerpblend.cxx index 5a711fd9ae..98e568334a 100644 --- a/panda/src/lerp/lerpblend.cxx +++ b/panda/src/lerp/lerpblend.cxx @@ -1,6 +1,19 @@ // Filename: lerpblend.cxx // Created by: frang (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lerpblend.h" diff --git a/panda/src/lerp/lerpblend.h b/panda/src/lerp/lerpblend.h index 37ead8dbd0..8e80a7192e 100644 --- a/panda/src/lerp/lerpblend.h +++ b/panda/src/lerp/lerpblend.h @@ -1,6 +1,19 @@ // Filename: lerpblend.h // Created by: frang (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __LERPBLEND_H__ diff --git a/panda/src/lerp/lerpchans.h b/panda/src/lerp/lerpchans.h index 413791f853..ad7e36089c 100644 --- a/panda/src/lerp/lerpchans.h +++ b/panda/src/lerp/lerpchans.h @@ -1,6 +1,19 @@ // Filename: lerpchans.h // Created by: frang (11Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __LERPCHANS_H__ diff --git a/panda/src/lerp/lerpfunctor.cxx b/panda/src/lerp/lerpfunctor.cxx index 5d2c4b7e44..7623f12ef0 100644 --- a/panda/src/lerp/lerpfunctor.cxx +++ b/panda/src/lerp/lerpfunctor.cxx @@ -1,6 +1,19 @@ // Filename: lerpfunctor.cxx // Created by: frang (26May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lerpfunctor.h" diff --git a/panda/src/lerp/lerpfunctor.h b/panda/src/lerp/lerpfunctor.h index 0b02959eeb..4fd3aaddc2 100644 --- a/panda/src/lerp/lerpfunctor.h +++ b/panda/src/lerp/lerpfunctor.h @@ -1,6 +1,19 @@ // Filename: lerpfunctor.h // Created by: frang (26May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __LERPFUNCTOR_H__ diff --git a/panda/src/light/ambientLight.cxx b/panda/src/light/ambientLight.cxx index 40983519b2..ebecce851d 100644 --- a/panda/src/light/ambientLight.cxx +++ b/panda/src/light/ambientLight.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ambientLight.h" diff --git a/panda/src/light/ambientLight.h b/panda/src/light/ambientLight.h index 21d185795a..c01ecf3598 100644 --- a/panda/src/light/ambientLight.h +++ b/panda/src/light/ambientLight.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef AMBIENTLIGHT_H #define AMBIENTLIGHT_H // diff --git a/panda/src/light/config_light.cxx b/panda/src/light/config_light.cxx index 5766d7ddd3..cb2c90605b 100644 --- a/panda/src/light/config_light.cxx +++ b/panda/src/light/config_light.cxx @@ -1,6 +1,19 @@ // Filename: config_light.cxx // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_light.h" diff --git a/panda/src/light/config_light.h b/panda/src/light/config_light.h index 4e88e4f787..1f5c7daca3 100644 --- a/panda/src/light/config_light.h +++ b/panda/src/light/config_light.h @@ -1,6 +1,19 @@ // Filename: config_light.h // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_LIGHT_H diff --git a/panda/src/light/directionalLight.I b/panda/src/light/directionalLight.I index 18978e7efd..7c60186334 100644 --- a/panda/src/light/directionalLight.I +++ b/panda/src/light/directionalLight.I @@ -1,6 +1,19 @@ // Filename: directionalLight.I // Created by: mike (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/light/directionalLight.cxx b/panda/src/light/directionalLight.cxx index 2fe8913df5..11a09bb80e 100644 --- a/panda/src/light/directionalLight.cxx +++ b/panda/src/light/directionalLight.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include #include "directionalLight.h" diff --git a/panda/src/light/directionalLight.h b/panda/src/light/directionalLight.h index 28ecd107b6..2452bcbccd 100644 --- a/panda/src/light/directionalLight.h +++ b/panda/src/light/directionalLight.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DIRECTIONALLIGHT_H #define DIRECTIONALLIGHT_H // diff --git a/panda/src/light/light.cxx b/panda/src/light/light.cxx index bb587a0297..2d23e1d514 100644 --- a/panda/src/light/light.cxx +++ b/panda/src/light/light.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "light.h" diff --git a/panda/src/light/light.h b/panda/src/light/light.h index 0fdade7573..4a04b2f9d2 100644 --- a/panda/src/light/light.h +++ b/panda/src/light/light.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LIGHT_H #define LIGHT_H // diff --git a/panda/src/light/lightAttribute.I b/panda/src/light/lightAttribute.I index 49f30afd91..3c728b93ba 100644 --- a/panda/src/light/lightAttribute.I +++ b/panda/src/light/lightAttribute.I @@ -1,12 +1,25 @@ // Filename: lightAttribute.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LightAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LightAttribute:: LightAttribute() { diff --git a/panda/src/light/lightAttribute.cxx b/panda/src/light/lightAttribute.cxx index 43d7143919..864e978214 100644 --- a/panda/src/light/lightAttribute.cxx +++ b/panda/src/light/lightAttribute.cxx @@ -1,6 +1,19 @@ // Filename: lightAttribute.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lightAttribute.h" diff --git a/panda/src/light/lightAttribute.h b/panda/src/light/lightAttribute.h index 63dc91c372..8f21c3db39 100644 --- a/panda/src/light/lightAttribute.h +++ b/panda/src/light/lightAttribute.h @@ -1,6 +1,19 @@ // Filename: lightAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LIGHTATTRIBUTE_H diff --git a/panda/src/light/lightNameClass.h b/panda/src/light/lightNameClass.h index af42d0b342..a49b96b053 100644 --- a/panda/src/light/lightNameClass.h +++ b/panda/src/light/lightNameClass.h @@ -1,6 +1,19 @@ // Filename: lightNameClass.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LIGHTNAMECLASS_H diff --git a/panda/src/light/lightTransition.I b/panda/src/light/lightTransition.I index 41216c8b43..b6be472460 100644 --- a/panda/src/light/lightTransition.I +++ b/panda/src/light/lightTransition.I @@ -1,12 +1,25 @@ // Filename: lightTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LightTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LightTransition:: LightTransition() { diff --git a/panda/src/light/lightTransition.cxx b/panda/src/light/lightTransition.cxx index 3060f41f82..7a6149891d 100644 --- a/panda/src/light/lightTransition.cxx +++ b/panda/src/light/lightTransition.cxx @@ -1,6 +1,19 @@ // Filename: lightTransition.cxx // Created by: mike (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lightTransition.h" diff --git a/panda/src/light/lightTransition.h b/panda/src/light/lightTransition.h index 0587c4a6af..aff088f9f2 100644 --- a/panda/src/light/lightTransition.h +++ b/panda/src/light/lightTransition.h @@ -2,6 +2,19 @@ // Created by: mike (19Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LIGHTTRANSITION_H #define LIGHTTRANSITION_H @@ -34,7 +47,7 @@ PUBLISHED: INLINE LightTransition(); INLINE static LightTransition all_off(); -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; virtual NodeTransition *make_identity() const; diff --git a/panda/src/light/pointLight.I b/panda/src/light/pointLight.I index bc28b3bdad..559db21242 100644 --- a/panda/src/light/pointLight.I +++ b/panda/src/light/pointLight.I @@ -1,6 +1,19 @@ // Filename: pointLight.I // Created by: mike (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -18,7 +31,7 @@ INLINE Colorf PointLight::get_specular( void ) const // Access: Public // Description: //////////////////////////////////////////////////////////////////// -INLINE void PointLight::set_specular( const Colorf& color ) +INLINE void PointLight::set_specular( const Colorf& color ) { _specular = color; } diff --git a/panda/src/light/pointLight.cxx b/panda/src/light/pointLight.cxx index e687398541..99099394b1 100644 --- a/panda/src/light/pointLight.cxx +++ b/panda/src/light/pointLight.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pointLight.h" diff --git a/panda/src/light/pointLight.h b/panda/src/light/pointLight.h index e3fccfff9c..10100359c3 100644 --- a/panda/src/light/pointLight.h +++ b/panda/src/light/pointLight.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef POINTLIGHT_H #define POINTLIGHT_H // diff --git a/panda/src/light/pt_Light.cxx b/panda/src/light/pt_Light.cxx index b2413df895..7e6a1ed597 100644 --- a/panda/src/light/pt_Light.cxx +++ b/panda/src/light/pt_Light.cxx @@ -1,6 +1,19 @@ // Filename: pt_Light.cxx // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pt_Light.h" diff --git a/panda/src/light/pt_Light.h b/panda/src/light/pt_Light.h index da82dbb74a..e392c54705 100644 --- a/panda/src/light/pt_Light.h +++ b/panda/src/light/pt_Light.h @@ -1,6 +1,19 @@ // Filename: pt_Light.h // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PT_LIGHT_H diff --git a/panda/src/light/spotlight.I b/panda/src/light/spotlight.I index 93c507aa54..e5212cfa70 100644 --- a/panda/src/light/spotlight.I +++ b/panda/src/light/spotlight.I @@ -1,6 +1,19 @@ // Filename: spotlight.I // Created by: mike (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/light/spotlight.cxx b/panda/src/light/spotlight.cxx index f1e0376cc6..42c9426b85 100644 --- a/panda/src/light/spotlight.cxx +++ b/panda/src/light/spotlight.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "spotlight.h" #include "lightTransition.h" @@ -135,7 +144,7 @@ bool Spotlight::make_image(Texture* texture, float radius) if (D <= radius) intensity = 1.0f; else if (D < 1.0f) - intensity = pow(cos((D-radius) / + intensity = pow(cos((D-radius) / (1.0f-radius) * (MathNumbers::pi_f*0.5f)), _exponent); else intensity = 0; @@ -201,7 +210,7 @@ make_geometry(float intensity, float length, int num_facets) coords[1] = first_last_vert; vindex[0] = 0; vindex[1] = 1; - vindex[num_indices-1] = 1; + vindex[num_indices-1] = 1; int i; for (i = 2; i < num_indices-1; i++) { @@ -230,32 +239,32 @@ make_geometry(float intensity, float length, int num_facets) GeomNode* geomnode = new GeomNode("spotlight_frustum_geom"); geomnode->add_geom(tfan); - + NamedNode* root = new NamedNode("spotlight_frustum"); RenderRelation* root_arc = new RenderRelation(root, geomnode); // Disable lighting - LightTransition *light_trans = + LightTransition *light_trans = new LightTransition(LightTransition::all_off()); root_arc->set_transition(light_trans); // Disable texturing - TextureTransition *tex_trans = + TextureTransition *tex_trans = new TextureTransition(TextureTransition::off()); root_arc->set_transition(tex_trans); // Turn off writes to Z - DepthWriteTransition *depth_trans = + DepthWriteTransition *depth_trans = new DepthWriteTransition(DepthWriteTransition::off()); root_arc->set_transition(depth_trans); // Enable transparency - TransparencyTransition *col_trans = + TransparencyTransition *col_trans = new TransparencyTransition(TransparencyProperty::M_alpha); root_arc->set_transition(col_trans); // Disable culling - CullFaceTransition *cull_trans = + CullFaceTransition *cull_trans = new CullFaceTransition(CullFaceProperty::M_cull_none); root_arc->set_transition(cull_trans); diff --git a/panda/src/light/spotlight.h b/panda/src/light/spotlight.h index 64af098896..bb5481b84a 100644 --- a/panda/src/light/spotlight.h +++ b/panda/src/light/spotlight.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPOTLIGHT_H #define SPOTLIGHT_H // diff --git a/panda/src/light/vector_PT_Light.cxx b/panda/src/light/vector_PT_Light.cxx index 8bd9c0157b..6e9fd96f18 100644 --- a/panda/src/light/vector_PT_Light.cxx +++ b/panda/src/light/vector_PT_Light.cxx @@ -1,6 +1,19 @@ // Filename: vector_PT_Light.cxx // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_PT_Light.h" diff --git a/panda/src/light/vector_PT_Light.h b/panda/src/light/vector_PT_Light.h index 2ae55e447e..ab6feac640 100644 --- a/panda/src/light/vector_PT_Light.h +++ b/panda/src/light/vector_PT_Light.h @@ -1,6 +1,19 @@ // Filename: vector_PT_Light.h // Created by: drose (16May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_PT_LIGHT_H diff --git a/panda/src/linmath/cast_to_double.I b/panda/src/linmath/cast_to_double.I index 1d94bd1fa6..c329c8eb5d 100644 --- a/panda/src/linmath/cast_to_double.I +++ b/panda/src/linmath/cast_to_double.I @@ -1,6 +1,19 @@ // Filename: cast_to_double.I // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE_LINMATH LVecBase2d cast_to_double(const LVecBase2f &source) { diff --git a/panda/src/linmath/cast_to_double.h b/panda/src/linmath/cast_to_double.h index b7f5e41d3e..a9ec7bbd2c 100644 --- a/panda/src/linmath/cast_to_double.h +++ b/panda/src/linmath/cast_to_double.h @@ -1,6 +1,19 @@ // Filename: cast_to_double.h // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CAST_TO_DOUBLE_H diff --git a/panda/src/linmath/cast_to_float.I b/panda/src/linmath/cast_to_float.I index fc1ea45cbd..9402d631f8 100644 --- a/panda/src/linmath/cast_to_float.I +++ b/panda/src/linmath/cast_to_float.I @@ -1,6 +1,19 @@ // Filename: cast_to_float.I // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE_LINMATH LVecBase2f cast_to_float(const LVecBase2d &source) { diff --git a/panda/src/linmath/cast_to_float.h b/panda/src/linmath/cast_to_float.h index 178872aa65..7a3b37c838 100644 --- a/panda/src/linmath/cast_to_float.h +++ b/panda/src/linmath/cast_to_float.h @@ -1,6 +1,19 @@ // Filename: cast_to_float.h // Created by: drose (24May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CAST_TO_FLOAT_H diff --git a/panda/src/linmath/cmath.I b/panda/src/linmath/cmath.I index df2bc63602..7e3c70b209 100644 --- a/panda/src/linmath/cmath.I +++ b/panda/src/linmath/cmath.I @@ -1,6 +1,19 @@ // Filename: cmath.I // Created by: drose (19May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //Windows has isnan in a different place and with a different name diff --git a/panda/src/linmath/cmath.h b/panda/src/linmath/cmath.h index 4d05ad107a..c4fc832ce9 100644 --- a/panda/src/linmath/cmath.h +++ b/panda/src/linmath/cmath.h @@ -1,6 +1,19 @@ // Filename: cmath.h // Created by: drose (19May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CMATH_H diff --git a/panda/src/linmath/compose_matrix.cxx b/panda/src/linmath/compose_matrix.cxx index 994b22f9f6..88388f202f 100644 --- a/panda/src/linmath/compose_matrix.cxx +++ b/panda/src/linmath/compose_matrix.cxx @@ -1,6 +1,19 @@ // Filename: compose_matrix.cxx // Created by: drose (27Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "deg_2_rad.h" diff --git a/panda/src/linmath/compose_matrix.h b/panda/src/linmath/compose_matrix.h index 5811bba042..6cf258f922 100644 --- a/panda/src/linmath/compose_matrix.h +++ b/panda/src/linmath/compose_matrix.h @@ -2,6 +2,19 @@ // Created by: drose (27Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COMPOSE_MATRIX_H #define COMPOSE_MATRIX_H diff --git a/panda/src/linmath/compose_matrix_src.I b/panda/src/linmath/compose_matrix_src.I index 030db962be..5817dbb885 100644 --- a/panda/src/linmath/compose_matrix_src.I +++ b/panda/src/linmath/compose_matrix_src.I @@ -1,7 +1,19 @@ -//////////////////////////////////////////////////////////////////// -// Filename: compose_matrix_src.h +// Filename: compose_matrix_src.I // Created by: drose (21Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/compose_matrix_src.cxx b/panda/src/linmath/compose_matrix_src.cxx index 88affadbb0..d4b45140f3 100644 --- a/panda/src/linmath/compose_matrix_src.cxx +++ b/panda/src/linmath/compose_matrix_src.cxx @@ -1,6 +1,19 @@ -// Filename: compose_matrix.cxx +// Filename: compose_matrix_src.cxx // Created by: drose (27Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -13,7 +26,7 @@ compose_matrix(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVecBase3) &scale, const FLOATNAME(LVecBase3) &hpr, CoordinateSystem cs) { - + // temp_hpr_fix blocks use the correct way. need to keep other way as default until // legacy tools are fixed to work with correct way @@ -50,40 +63,40 @@ unwind_yup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { mat.get_row(x,0); mat.get_row(y,1); mat.get_row(z,2); - + // Project Z into the XZ plane. FLOATNAME(LVector2) xz(z[0], z[2]); xz = normalize(xz); - + // Compute the rotation about the +Y (up) axis. This is yaw, or // "heading". FLOATTYPE heading = rad_2_deg(((FLOATTYPE)atan2(xz[0], xz[1]))); - + // Unwind the heading, and continue. Matrix rot_y; rot_y = Matrix::rotate_mat_normaxis(-heading, FLOATNAME(LVector3)(0.0f, 1.0f, 0.0f), CS_yup_right); - + x = x * rot_y; y = y * rot_y; z = z * rot_y; - + // Project the rotated Z into the YZ plane. FLOATNAME(LVector2) yz(z[1], z[2]); yz = normalize(yz); - + // Compute the rotation about the +X (right) axis. This is pitch. FLOATTYPE pitch = rad_2_deg((FLOATTYPE)(-atan2(yz[0], yz[1]))); - + // Unwind the pitch. Matrix rot_x; - rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), + rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), CS_yup_right); - + x = x * rot_x; y = y * rot_x; z = z * rot_x; - + // Project the rotated X onto the XY plane. FLOATNAME(LVector2) xy(x[0], x[1]); xy = normalize(xy); @@ -95,82 +108,82 @@ unwind_yup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { Matrix rot_z; rot_z = Matrix::rotate_mat_normaxis(-roll, FLOATNAME(LVector3)(0.0f, 0.0f, 1.0f), CS_yup_right); - + x = x * rot_z; y = y * rot_z; z = z * rot_z; - + // Reset the matrix to reflect the unwinding. mat.set_row(0, x); mat.set_row(1, y); mat.set_row(2, z); - + // Return the three rotation components. hpr[0] = heading; hpr[1] = pitch; hpr[2] = roll; } else { - + // Extract the axes from the matrix. FLOATNAME(LVector3) x, y, z; mat.get_row(x,0); mat.get_row(y,1); mat.get_row(z,2); - + // Project X onto the XY plane. FLOATNAME(LVector2) xy(x[0], x[1]); xy = normalize(xy); - + // Compute the rotation about the +Z (back) axis. This is roll. FLOATTYPE roll = rad_2_deg(((FLOATTYPE)atan2(xy[1], xy[0]))); - + // Unwind the roll from the axes, and continue. Matrix rot_z; rot_z = Matrix::rotate_mat_normaxis(-roll, FLOATNAME(LVector3)(0.0f, 0.0f, 1.0f), CS_yup_right); - + x = x * rot_z; y = y * rot_z; z = z * rot_z; - + // Project the rotated X into the XZ plane. FLOATNAME(LVector2) xz(x[0], x[2]); xz = normalize(xz); - + // Compute the rotation about the +Y (up) axis. This is yaw, or // "heading". FLOATTYPE heading = rad_2_deg(((FLOATTYPE)-atan2(xz[1], xz[0]))); - + // Unwind the heading, and continue. Matrix rot_y; rot_y = Matrix::rotate_mat_normaxis(-heading, FLOATNAME(LVector3)(0.0f, 1.0f, 0.0f), CS_yup_right); - + x = x * rot_y; y = y * rot_y; z = z * rot_y; - + // Project the rotated Z into the YZ plane. FLOATNAME(LVector2) yz(z[1], z[2]); yz = normalize(yz); // Compute the rotation about the +X (right) axis. This is pitch. FLOATTYPE pitch = rad_2_deg(((FLOATTYPE)-atan2(yz[0], yz[1]))); - + // Unwind the pitch. Matrix rot_x; - rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), + rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), CS_yup_right); - + x = x * rot_x; y = y * rot_x; z = z * rot_x; - + // Reset the matrix to reflect the unwinding. mat.set_row(0, x); mat.set_row(1, y); mat.set_row(2, z); - + // Return the three rotation components. hpr[0] = heading; hpr[1] = pitch; @@ -236,10 +249,10 @@ unwind_yup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr, // Compute the rotation about the +X (right) axis. This is pitch. FLOATTYPE pitch = rad_2_deg(((FLOATTYPE)-atan2(yz[0], yz[1]))); - + // Unwind the pitch. Matrix rot_x; - rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), + rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), CS_yup_right); x = x * rot_x; @@ -276,7 +289,7 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { mat.get_row(x,0); mat.get_row(y,1); mat.get_row(z,2); - + // Project Y into the XY plane. FLOATNAME(LVector2) xy(y[0], y[1]); xy = normalize(xy); @@ -303,7 +316,7 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { // Unwind the pitch. Matrix rot_x; - rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), + rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), CS_zup_right); x = x * rot_x; @@ -313,15 +326,15 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { // Project X into the XZ plane. FLOATNAME(LVector2) xz(x[0], x[2]); xz = normalize(xz); - + // Compute the rotation about the -Y (back) axis. This is roll. FLOATTYPE roll = -rad_2_deg(((FLOATTYPE)atan2(xz[1], xz[0]))); - + // Unwind the roll from the axes, and continue. Matrix rot_y; rot_y = Matrix::rotate_mat_normaxis(-roll, FLOATNAME(LVector3)(0.0f, 1.0f, 0.0f), CS_zup_right); - + x = x * rot_y; y = y * rot_y; z = z * rot_y; @@ -349,10 +362,10 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { // Project X into the XZ plane. FLOATNAME(LVector2) xz(x[0], x[2]); xz = normalize(xz); - + // Compute the rotation about the -Y (back) axis. This is roll. FLOATTYPE roll = rad_2_deg(((FLOATTYPE)atan2(xz[1], xz[0]))); - + if (y[1] < 0.0f) { if (roll < 0.0f) { roll += 180.0; @@ -360,16 +373,16 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { roll -= 180.0; } } - + // Unwind the roll from the axes, and continue. Matrix rot_y; rot_y = Matrix::rotate_mat_normaxis(roll, FLOATNAME(LVector3)(0.0f, 1.0f, 0.0f), CS_zup_right); - + x = x * rot_y; y = y * rot_y; z = z * rot_y; - + // Project the rotated X into the XY plane. FLOATNAME(LVector2) xy(x[0], x[1]); xy = normalize(xy); @@ -396,7 +409,7 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr) { // Unwind the pitch. Matrix rot_x; - rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), + rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), CS_zup_right); x = x * rot_x; @@ -440,16 +453,16 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr, mat.get_row(x,0); mat.get_row(y,1); mat.get_row(z,2); - + // Unwind the roll from the axes, and continue. Matrix rot_y; rot_y = Matrix::rotate_mat_normaxis(roll, FLOATNAME(LVector3)(0.0f, 1.0f, 0.0f), CS_zup_right); - + x = x * rot_y; y = y * rot_y; z = z * rot_y; - + // Project the rotated X into the XY plane. FLOATNAME(LVector2) xy(x[0], x[1]); xy = normalize(xy); @@ -476,7 +489,7 @@ unwind_zup_rotation(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVecBase3) &hpr, // Unwind the pitch. Matrix rot_x; - rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), + rot_x = Matrix::rotate_mat_normaxis(-pitch, FLOATNAME(LVector3)(1.0f, 0.0f, 0.0f), CS_zup_right); x = x * rot_x; @@ -578,7 +591,7 @@ decompose_matrix(const FLOATNAME(LMatrix3) &mat, scale[1] = new_mat._m.m._11; } - bMatHasNoShear = + bMatHasNoShear = (fabs(new_mat(0, 1)) + fabs(new_mat(0, 2)) + fabs(new_mat(1, 0)) + fabs(new_mat(1, 2)) + fabs(new_mat(2, 0)) + fabs(new_mat(2, 1))) < 0.0001; @@ -677,7 +690,7 @@ decompose_matrix(const FLOATNAME(LMatrix3) &mat, scale[1] = new_mat._m.m._11; } - bMatHasNoShear = + bMatHasNoShear = (fabs(new_mat(0, 1)) + fabs(new_mat(0, 2)) + fabs(new_mat(1, 0)) + fabs(new_mat(1, 2)) + fabs(new_mat(2, 0)) + fabs(new_mat(2, 1))) < 0.0001; diff --git a/panda/src/linmath/compose_matrix_src.h b/panda/src/linmath/compose_matrix_src.h index abbec450f0..ee7afc43b6 100644 --- a/panda/src/linmath/compose_matrix_src.h +++ b/panda/src/linmath/compose_matrix_src.h @@ -1,7 +1,19 @@ -//////////////////////////////////////////////////////////////////// // Filename: compose_matrix_src.h // Created by: drose (21Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// BEGIN_PUBLISH @@ -19,7 +31,7 @@ compose_matrix(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVecBase3) &translate, CoordinateSystem cs = CS_default); -INLINE_LINMATH void +INLINE_LINMATH void compose_matrix(FLOATNAME(LMatrix4) &mat, const FLOATTYPE components[9], CoordinateSystem cs = CS_default); @@ -51,7 +63,7 @@ decompose_matrix(const FLOATNAME(LMatrix4) &mat, FLOATTYPE roll, CoordinateSystem cs = CS_default); -INLINE_LINMATH bool +INLINE_LINMATH bool decompose_matrix(const FLOATNAME(LMatrix4) &mat, FLOATTYPE components[9], CoordinateSystem CS = CS_default); diff --git a/panda/src/linmath/config_linmath.cxx b/panda/src/linmath/config_linmath.cxx index fe57f8026d..6380c83b7b 100644 --- a/panda/src/linmath/config_linmath.cxx +++ b/panda/src/linmath/config_linmath.cxx @@ -1,6 +1,19 @@ // Filename: config_linmath.cxx // Created by: drose (23Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_linmath.h" diff --git a/panda/src/linmath/config_linmath.h b/panda/src/linmath/config_linmath.h index c850e7bdcf..c05e57889d 100644 --- a/panda/src/linmath/config_linmath.h +++ b/panda/src/linmath/config_linmath.h @@ -1,6 +1,19 @@ // Filename: config_linmath.h // Created by: drose (23Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_LINMATH_H diff --git a/panda/src/linmath/coordinateSystem.cxx b/panda/src/linmath/coordinateSystem.cxx index 601aeb6a68..9f004715df 100644 --- a/panda/src/linmath/coordinateSystem.cxx +++ b/panda/src/linmath/coordinateSystem.cxx @@ -1,6 +1,19 @@ // Filename: coordinateSystem.cxx // Created by: drose (24Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "coordinateSystem.h" @@ -80,7 +93,7 @@ operator << (ostream &out, CoordinateSystem cs) { case CS_zup_left: return out << "zup_left"; - + case CS_yup_left: return out << "yup_left"; diff --git a/panda/src/linmath/coordinateSystem.h b/panda/src/linmath/coordinateSystem.h index eb18613fc0..17dc7515c3 100644 --- a/panda/src/linmath/coordinateSystem.h +++ b/panda/src/linmath/coordinateSystem.h @@ -2,6 +2,19 @@ // Created by: drose (24Sep99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COORDINATESYSTEM_H #define COORDINATESYSTEM_H @@ -25,7 +38,7 @@ enum CoordinateSystem { CS_yup_right, CS_zup_left, CS_yup_left, - + // CS_invalid is not a coordinate system at all. It can be used in // user-input processing code to indicate a contradictory coordinate // system request. diff --git a/panda/src/linmath/dbl2fltnames.h b/panda/src/linmath/dbl2fltnames.h index 9bd3dffa63..e27d5d69e5 100644 --- a/panda/src/linmath/dbl2fltnames.h +++ b/panda/src/linmath/dbl2fltnames.h @@ -1,6 +1,19 @@ // Filename: dbl2fltnames.h // Created by: drose (04Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/dblnames.h b/panda/src/linmath/dblnames.h index a7a98b3102..c96e63d81f 100644 --- a/panda/src/linmath/dblnames.h +++ b/panda/src/linmath/dblnames.h @@ -1,6 +1,19 @@ -// Filename: fltnames.h +// Filename: dblnames.h // Created by: cxgeorge (04Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/deg_2_rad.h b/panda/src/linmath/deg_2_rad.h index aa58d1f75f..77f2307df2 100644 --- a/panda/src/linmath/deg_2_rad.h +++ b/panda/src/linmath/deg_2_rad.h @@ -2,6 +2,19 @@ // Created by: drose (29Sep99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DEG_2_RAD_H #define DEG_2_RAD_H diff --git a/panda/src/linmath/flt2dblnames.h b/panda/src/linmath/flt2dblnames.h index 6ca31b51e9..1bf07f8e60 100644 --- a/panda/src/linmath/flt2dblnames.h +++ b/panda/src/linmath/flt2dblnames.h @@ -1,6 +1,19 @@ // Filename: flt2dblnames.h // Created by: drose (04Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/fltnames.h b/panda/src/linmath/fltnames.h index 9c84793359..2db1840770 100644 --- a/panda/src/linmath/fltnames.h +++ b/panda/src/linmath/fltnames.h @@ -1,6 +1,19 @@ // Filename: fltnames.h // Created by: cxgeorge (04Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/ioPtaDatagramLinMath.I b/panda/src/linmath/ioPtaDatagramLinMath.I index 0c73bd82ce..e1c66e4241 100644 --- a/panda/src/linmath/ioPtaDatagramLinMath.I +++ b/panda/src/linmath/ioPtaDatagramLinMath.I @@ -1,13 +1,26 @@ // Filename: ioPtaDatagramLinMath.I // Created by: jason (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagamLinMath::write_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void IoPtaDatagramLinMath:: @@ -23,7 +36,7 @@ write_datagram(Datagram &dest, CPTA(LinMathElement) array) //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagamLinMath::read_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// template PTA(LinMathElement) IoPtaDatagramLinMath:: diff --git a/panda/src/linmath/ioPtaDatagramLinMath.cxx b/panda/src/linmath/ioPtaDatagramLinMath.cxx index d14e9caf82..0671ccab67 100644 --- a/panda/src/linmath/ioPtaDatagramLinMath.cxx +++ b/panda/src/linmath/ioPtaDatagramLinMath.cxx @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramLinMath.cxx // Created by: drose (29Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ioPtaDatagramLinMath.h" diff --git a/panda/src/linmath/ioPtaDatagramLinMath.h b/panda/src/linmath/ioPtaDatagramLinMath.h index f49f819f93..a18b90820c 100644 --- a/panda/src/linmath/ioPtaDatagramLinMath.h +++ b/panda/src/linmath/ioPtaDatagramLinMath.h @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramLinMath.h // Created by: jason (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef _IO_PTA_DATAGRAM_LINMATH diff --git a/panda/src/linmath/lcast_to.h b/panda/src/linmath/lcast_to.h index 4752567836..334daca6fd 100644 --- a/panda/src/linmath/lcast_to.h +++ b/panda/src/linmath/lcast_to.h @@ -2,6 +2,19 @@ // Created by: drose (03Apr01) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LCAST_TO_H #define LCAST_TO_H diff --git a/panda/src/linmath/lcast_to_src.I b/panda/src/linmath/lcast_to_src.I index 8a8730494e..cb6e35ed8e 100644 --- a/panda/src/linmath/lcast_to_src.I +++ b/panda/src/linmath/lcast_to_src.I @@ -1,45 +1,62 @@ +// Filename: lcast_to_src.I +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME2(LVecBase2) +INLINE_LINMATH FLOATNAME2(LVecBase2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase2) &source) { return FLOATNAME2(LVecBase2)(source[0], source[1]); } -INLINE_LINMATH FLOATNAME2(LVecBase3) +INLINE_LINMATH FLOATNAME2(LVecBase3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase3) &source) { return FLOATNAME2(LVecBase3)(source[0], source[1], source[2]); } -INLINE_LINMATH FLOATNAME2(LVecBase4) +INLINE_LINMATH FLOATNAME2(LVecBase4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase4) &source) { return FLOATNAME2(LVecBase4)(source[0], source[1], source[2], source[3]); } -INLINE_LINMATH FLOATNAME2(LVector2) +INLINE_LINMATH FLOATNAME2(LVector2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector2) &source) { return FLOATNAME2(LVector2)(source[0], source[1]); } -INLINE_LINMATH FLOATNAME2(LVector3) +INLINE_LINMATH FLOATNAME2(LVector3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector3) &source) { return FLOATNAME2(LVector3)(source[0], source[1], source[2]); } -INLINE_LINMATH FLOATNAME2(LVector4) +INLINE_LINMATH FLOATNAME2(LVector4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector4) &source) { return FLOATNAME2(LVector4)(source[0], source[1], source[2], source[3]); } -INLINE_LINMATH FLOATNAME2(LPoint2) +INLINE_LINMATH FLOATNAME2(LPoint2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint2) &source) { return FLOATNAME2(LPoint2)(source[0], source[1]); } -INLINE_LINMATH FLOATNAME2(LPoint3) +INLINE_LINMATH FLOATNAME2(LPoint3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint3) &source) { return FLOATNAME2(LPoint3)(source[0], source[1], source[2]); } -INLINE_LINMATH FLOATNAME2(LPoint4) +INLINE_LINMATH FLOATNAME2(LPoint4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint4) &source) { return FLOATNAME2(LPoint4)(source[0], source[1], source[2], source[3]); } @@ -49,7 +66,7 @@ lcast_to(FLOATTYPE2 *, const FLOATNAME(LQuaternion)& c) { return FLOATNAME2(LQuaternion)(c.get_r(), c.get_i(), c.get_j(), c.get_k()); } -INLINE_LINMATH FLOATNAME2(LMatrix3) +INLINE_LINMATH FLOATNAME2(LMatrix3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix3) &source) { return FLOATNAME2(LMatrix3) (source(0, 0), source(0, 1), source(0, 2), @@ -57,7 +74,7 @@ lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix3) &source) { source(2, 0), source(2, 1), source(2, 2)); } -INLINE_LINMATH FLOATNAME2(LMatrix4) +INLINE_LINMATH FLOATNAME2(LMatrix4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix4) &source) { return FLOATNAME2(LMatrix4) (source(0, 0), source(0, 1), source(0, 2), source(0, 3), diff --git a/panda/src/linmath/lcast_to_src.h b/panda/src/linmath/lcast_to_src.h index 9f658f65f6..669c8b921d 100644 --- a/panda/src/linmath/lcast_to_src.h +++ b/panda/src/linmath/lcast_to_src.h @@ -2,41 +2,54 @@ // Created by: drose (03Apr01) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME2(LVecBase2) +INLINE_LINMATH FLOATNAME2(LVecBase2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase2) &source); -INLINE_LINMATH FLOATNAME2(LVecBase3) +INLINE_LINMATH FLOATNAME2(LVecBase3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase3) &source); -INLINE_LINMATH FLOATNAME2(LVecBase4) +INLINE_LINMATH FLOATNAME2(LVecBase4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase4) &source); -INLINE_LINMATH FLOATNAME2(LVector2) +INLINE_LINMATH FLOATNAME2(LVector2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector2) &source); -INLINE_LINMATH FLOATNAME2(LVector3) +INLINE_LINMATH FLOATNAME2(LVector3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector3) &source); -INLINE_LINMATH FLOATNAME2(LVector4) +INLINE_LINMATH FLOATNAME2(LVector4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector4) &source); -INLINE_LINMATH FLOATNAME2(LPoint2) +INLINE_LINMATH FLOATNAME2(LPoint2) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint2) &source); -INLINE_LINMATH FLOATNAME2(LPoint3) +INLINE_LINMATH FLOATNAME2(LPoint3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint3) &source); -INLINE_LINMATH FLOATNAME2(LPoint4) +INLINE_LINMATH FLOATNAME2(LPoint4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint4) &source); INLINE_LINMATH FLOATNAME2(LQuaternion) lcast_to(FLOATTYPE2 *, const FLOATNAME(LQuaternion)& c); -INLINE_LINMATH FLOATNAME2(LMatrix3) +INLINE_LINMATH FLOATNAME2(LMatrix3) lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix3) &source); -INLINE_LINMATH FLOATNAME2(LMatrix4) +INLINE_LINMATH FLOATNAME2(LMatrix4) lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix4) &source); #include "lcast_to_src.I" diff --git a/panda/src/linmath/lmat_ops.h b/panda/src/linmath/lmat_ops.h index 7db7174c45..514df059aa 100644 --- a/panda/src/linmath/lmat_ops.h +++ b/panda/src/linmath/lmat_ops.h @@ -1,6 +1,19 @@ // Filename: lmat_ops.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LMAT_OPS_H diff --git a/panda/src/linmath/lmat_ops_src.I b/panda/src/linmath/lmat_ops_src.I index 28023f1e5f..c14d748492 100644 --- a/panda/src/linmath/lmat_ops_src.I +++ b/panda/src/linmath/lmat_ops_src.I @@ -1,12 +1,25 @@ -// Filename: lmat_ops_src.h +// Filename: lmat_ops_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LVecBase3 times LMatrix3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) @@ -26,7 +39,7 @@ operator * (const FLOATNAME(LPoint3) &v, const FLOATNAME(LMatrix3) &m) { //////////////////////////////////////////////////////////////////// // Function: LVector2 times LMatrix3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) @@ -36,7 +49,7 @@ operator * (const FLOATNAME(LVector2) &v, const FLOATNAME(LMatrix3) &m) { //////////////////////////////////////////////////////////////////// // Function: LPoint2 times LMatrix3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) @@ -47,7 +60,7 @@ operator * (const FLOATNAME(LPoint2) &v, const FLOATNAME(LMatrix3) &m) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4 times LMatrix4 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) @@ -68,7 +81,7 @@ operator * (const FLOATNAME(LPoint4) &v, const FLOATNAME(LMatrix4) &m) { //////////////////////////////////////////////////////////////////// // Function: LVector3 times LMatrix4 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) @@ -78,7 +91,7 @@ operator * (const FLOATNAME(LVector3) &v, const FLOATNAME(LMatrix4) &m) { //////////////////////////////////////////////////////////////////// // Function: LPoint3 times LMatrix4 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) diff --git a/panda/src/linmath/lmat_ops_src.h b/panda/src/linmath/lmat_ops_src.h index c568df6b55..f247242fc2 100644 --- a/panda/src/linmath/lmat_ops_src.h +++ b/panda/src/linmath/lmat_ops_src.h @@ -1,6 +1,19 @@ // Filename: lmat_ops_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// BEGIN_PUBLISH diff --git a/panda/src/linmath/lmatrix.cxx b/panda/src/linmath/lmatrix.cxx index fd0042df3c..f2f7ce10c4 100644 --- a/panda/src/linmath/lmatrix.cxx +++ b/panda/src/linmath/lmatrix.cxx @@ -1,6 +1,19 @@ // Filename: lmatrix.cxx // Created by: drose (22Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/linmath/lmatrix.h b/panda/src/linmath/lmatrix.h index 9e68db8ec8..95953dc011 100644 --- a/panda/src/linmath/lmatrix.h +++ b/panda/src/linmath/lmatrix.h @@ -2,6 +2,19 @@ // Created by: drose (15Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LMATRIX_H #define LMATRIX_H diff --git a/panda/src/linmath/lmatrix3.cxx b/panda/src/linmath/lmatrix3.cxx index 81b460f617..09d4c7a35c 100644 --- a/panda/src/linmath/lmatrix3.cxx +++ b/panda/src/linmath/lmatrix3.cxx @@ -1,6 +1,19 @@ // Filename: lmatrix3.cxx // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_linmath.h" diff --git a/panda/src/linmath/lmatrix3.h b/panda/src/linmath/lmatrix3.h index dda3bf7bc6..bd01e480bc 100644 --- a/panda/src/linmath/lmatrix3.h +++ b/panda/src/linmath/lmatrix3.h @@ -2,6 +2,19 @@ // Created by: drose (29Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LMATRIX3_H #define LMATRIX3_H diff --git a/panda/src/linmath/lmatrix3_src.I b/panda/src/linmath/lmatrix3_src.I index 54a67bfe40..36fd7f00e2 100644 --- a/panda/src/linmath/lmatrix3_src.I +++ b/panda/src/linmath/lmatrix3_src.I @@ -1,6 +1,19 @@ // Filename: lmatrix3_src.I // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -19,18 +32,18 @@ ident_mat() { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LMatrix3):: +INLINE_LINMATH FLOATNAME(LMatrix3):: FLOATNAME(LMatrix3)() { } //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LMatrix3):: +INLINE_LINMATH FLOATNAME(LMatrix3):: FLOATNAME(LMatrix3)(const FLOATNAME(LMatrix3) ©) { memcpy(_m.data,copy._m.data,sizeof(_m.data)); // (*this) = copy; @@ -39,13 +52,13 @@ FLOATNAME(LMatrix3)(const FLOATNAME(LMatrix3) ©) { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LMatrix3) &FLOATNAME(LMatrix3):: +INLINE_LINMATH FLOATNAME(LMatrix3) &FLOATNAME(LMatrix3):: operator = (const FLOATNAME(LMatrix3) ©) { memcpy(_m.data,copy._m.data,sizeof(_m.data)); -// set(copy(0, 0), copy(0, 1), copy(0, 2), -// copy(1, 0), copy(1, 1), copy(1, 2), +// set(copy(0, 0), copy(0, 1), copy(0, 2), +// copy(1, 0), copy(1, 1), copy(1, 2), // copy(2, 0), copy(2, 1), copy(2, 2)); return *this; } @@ -53,7 +66,7 @@ operator = (const FLOATNAME(LMatrix3) ©) { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Fill Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix3) &FLOATNAME(LMatrix3):: operator = (FLOATTYPE fill_value) { @@ -64,9 +77,9 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LMatrix3):: +INLINE_LINMATH FLOATNAME(LMatrix3):: FLOATNAME(LMatrix3)(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e02, FLOATTYPE e10, FLOATTYPE e11, FLOATTYPE e12, FLOATTYPE e20, FLOATTYPE e21, FLOATTYPE e22) { @@ -88,7 +101,7 @@ FLOATNAME(LMatrix3)(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e02, //////////////////////////////////////////////////////////////////// // Function: LMatrix3::set // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LMatrix3):: set(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e02, @@ -220,7 +233,7 @@ get_col2(int col) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Indexing operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE &FLOATNAME(LMatrix3):: operator () (int row, int col) { @@ -232,7 +245,7 @@ operator () (int row, int col) { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Indexing operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LMatrix3):: operator () (int row, int col) const { @@ -249,7 +262,7 @@ operator () (int row, int col) const { //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LMatrix3):: is_nan() const { - return + return cnan(_m.data[0]) || cnan(_m.data[1]) || cnan(_m.data[2]) || cnan(_m.data[3]) || cnan(_m.data[4]) || cnan(_m.data[5]) || cnan(_m.data[6]) || cnan(_m.data[7]) || cnan(_m.data[8]); @@ -362,7 +375,7 @@ operator < (const FLOATNAME(LMatrix3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LMatrix3):: operator == (const FLOATNAME(LMatrix3) &other) const { @@ -372,7 +385,7 @@ operator == (const FLOATNAME(LMatrix3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LMatrix3):: operator != (const FLOATNAME(LMatrix3) &other) const { @@ -414,7 +427,7 @@ xform(const FLOATNAME(LVecBase3) &v) const { - return v_res; + return v_res; // return FLOATNAME(LVecBase3)(v.dot(get_col(0)), // v.dot(get_col(1)), @@ -494,7 +507,7 @@ res._m.m._22 = a._m.m._20*b._m.m._02 + a._m.m._21*b._m.m._12 + a._m.m._22*b._m.m //////////////////////////////////////////////////////////////////// // Function: LMatrix3::matrix * matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LMatrix3):: operator * (const FLOATNAME(LMatrix3) &other) const { @@ -555,7 +568,7 @@ scale_multiply(const FLOATNAME(LVecBase3) &scale_vector,const FLOATNAME(LMatrix3 #ifdef _DEBUG assert(&other_mat != this); #endif - + // optimize for 0.0 or 1.0 factors? _m.m._00 = other_mat._m.m._00 * scale_vector._v.v._0; @@ -574,7 +587,7 @@ scale_multiply(const FLOATNAME(LVecBase3) &scale_vector,const FLOATNAME(LMatrix3 //////////////////////////////////////////////////////////////////// // Function: LMatrix3::matrix * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LMatrix3):: operator * (FLOATTYPE scalar) const { @@ -598,7 +611,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::matrix / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LMatrix3):: operator / (FLOATTYPE scalar) const { @@ -653,7 +666,7 @@ operator -= (const FLOATNAME(LMatrix3) &other) { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::matrix *= matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix3) &FLOATNAME(LMatrix3):: operator *= (const FLOATNAME(LMatrix3) &other) { @@ -775,12 +788,12 @@ det2(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e10, FLOATTYPE e11) const { INLINE_LINMATH FLOATTYPE FLOATNAME(LMatrix3):: determinant() const { /* - return + return (*this)(0,0) * det2((*this)(1,1),(*this)(1,2),(*this)(2,1),(*this)(2,2)) -(*this)(0,1) * det2((*this)(1,0),(*this)(1,2),(*this)(2,0),(*this)(2,2)) +(*this)(0,2) * det2((*this)(1,0),(*this)(1,1),(*this)(2,0),(*this)(2,1)); */ - + return MATRIX3_DETERMINANT(_m.m); } @@ -802,7 +815,7 @@ determinant() const { //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LMatrix3):: invert_from(const FLOATNAME(LMatrix3) &other) { - + FLOATTYPE other_det = MATRIX3_DETERMINANT(other._m.m); if (IS_NEARLY_ZERO(other_det)) { @@ -934,16 +947,16 @@ rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis, FLOATTYPE axis_1 = axis._v.v._1; FLOATTYPE axis_2 = axis._v.v._2; - // Normalize the axis. + // Normalize the axis. FLOATTYPE length_sq = axis_0 * axis_0 + axis_1 * axis_1 + axis_2 * axis_2; #ifdef _DEBUG nassertr(length_sq != 0.0f, ident_mat()); #endif FLOATTYPE recip_length = 1.0f/csqrt(length_sq); - + axis_0 *= recip_length; axis_1 *= recip_length; - axis_2 *= recip_length; + axis_2 *= recip_length; FLOATTYPE angle_rad=deg_2_rad(angle); FLOATTYPE s,c; @@ -983,7 +996,7 @@ rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis, mat._m.m._20 = t * axis._v.v._2 * axis._v.v._0 + s * axis._v.v._1; mat._m.m._21 = t * axis._v.v._2 * axis._v.v._1 - s * axis._v.v._0; mat._m.m._22 = t * axis._v.v._2 * axis._v.v._2 + c; -*/ +*/ return mat; } @@ -1051,7 +1064,7 @@ rotate_mat_normaxis(FLOATTYPE angle, const FLOATNAME(LVecBase3) &axis, mat._m.m._20 = t * axis._v.v._2 * axis._v.v._0 + s * axis._v.v._1; mat._m.m._21 = t * axis._v.v._2 * axis._v.v._1 - s * axis._v.v._0; mat._m.m._22 = t * axis._v.v._2 * axis._v.v._2 + c; -*/ +*/ return mat; } diff --git a/panda/src/linmath/lmatrix3_src.cxx b/panda/src/linmath/lmatrix3_src.cxx index 41de8e835f..f06c766567 100644 --- a/panda/src/linmath/lmatrix3_src.cxx +++ b/panda/src/linmath/lmatrix3_src.cxx @@ -1,6 +1,19 @@ -// Filename: lmatrix3_src.h +// Filename: lmatrix3_src.cxx // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LMatrix3)::_type_handle; @@ -66,21 +79,21 @@ almost_equal(const FLOATNAME(LMatrix3) &other, FLOATTYPE threshold) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LMatrix3):: output(ostream &out) const { - out << "[ " + out << "[ " << MAYBE_ZERO(_m.m._00) << " " - << MAYBE_ZERO(_m.m._01) << " " + << MAYBE_ZERO(_m.m._01) << " " << MAYBE_ZERO(_m.m._02) << " ] [ " << MAYBE_ZERO(_m.m._10) << " " - << MAYBE_ZERO(_m.m._11) << " " + << MAYBE_ZERO(_m.m._11) << " " << MAYBE_ZERO(_m.m._12) << " ] [ " << MAYBE_ZERO(_m.m._20) << " " - << MAYBE_ZERO(_m.m._21) << " " + << MAYBE_ZERO(_m.m._21) << " " << MAYBE_ZERO(_m.m._22) << " ]"; } @@ -88,23 +101,23 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LMatrix3):: write(ostream &out, int indent_level) const { - indent(out, indent_level) + indent(out, indent_level) << MAYBE_ZERO(_m.m._00) << " " - << MAYBE_ZERO(_m.m._01) << " " + << MAYBE_ZERO(_m.m._01) << " " << MAYBE_ZERO(_m.m._02) << "\n"; indent(out, indent_level) << MAYBE_ZERO(_m.m._10) << " " - << MAYBE_ZERO(_m.m._11) << " " + << MAYBE_ZERO(_m.m._11) << " " << MAYBE_ZERO(_m.m._12) << "\n"; indent(out, indent_level) << MAYBE_ZERO(_m.m._20) << " " - << MAYBE_ZERO(_m.m._21) << " " + << MAYBE_ZERO(_m.m._21) << " " << MAYBE_ZERO(_m.m._22) << "\n"; } @@ -153,14 +166,14 @@ read_datagram(DatagramIterator &scan) { //////////////////////////////////////////////////////////////////// // Function: LMatrix3::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LMatrix3):: init_type() { if (_type_handle == TypeHandle::none()) { // Format a string to describe the type. string name = "LMatrix3"; - name += FLOATTOKEN; + name += FLOATTOKEN; register_type(_type_handle, name); } } diff --git a/panda/src/linmath/lmatrix3_src.h b/panda/src/linmath/lmatrix3_src.h index 9c257ff6ae..45562cbb1d 100644 --- a/panda/src/linmath/lmatrix3_src.h +++ b/panda/src/linmath/lmatrix3_src.h @@ -1,6 +1,19 @@ // Filename: lmatrix3_src.h // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -75,7 +88,7 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVecBase2) xform_point(const FLOATNAME(LVecBase2) &v) const; - + INLINE_LINMATH FLOATNAME(LVecBase2) xform_vec(const FLOATNAME(LVecBase2) &v) const; @@ -93,7 +106,7 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LMatrix3) &operator -= (const FLOATNAME(LMatrix3) &other); INLINE_LINMATH FLOATNAME(LMatrix3) &operator *= (const FLOATNAME(LMatrix3) &other); - + INLINE_LINMATH FLOATNAME(LMatrix3) &operator *= (FLOATTYPE scalar); INLINE_LINMATH FLOATNAME(LMatrix3) &operator /= (FLOATTYPE scalar); @@ -125,12 +138,12 @@ PUBLISHED: rotate_mat(FLOATTYPE angle); static INLINE_LINMATH FLOATNAME(LMatrix3) scale_mat(const FLOATNAME(LVecBase2) &scale); - static INLINE_LINMATH FLOATNAME(LMatrix3) + static INLINE_LINMATH FLOATNAME(LMatrix3) scale_mat(FLOATTYPE sx, FLOATTYPE sy); // The following named constructors return 3x3 matrices suitable for // scale/rotate transforms in 3-d coordinate space. - static INLINE_LINMATH FLOATNAME(LMatrix3) + static INLINE_LINMATH FLOATNAME(LMatrix3) rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis, CoordinateSystem cs = CS_default); @@ -138,7 +151,7 @@ PUBLISHED: rotate_mat_normaxis(FLOATTYPE angle, const FLOATNAME(LVecBase3) &axis, CoordinateSystem cs = CS_default); - + static INLINE_LINMATH FLOATNAME(LMatrix3) scale_mat(const FLOATNAME(LVecBase3) &scale); static INLINE_LINMATH FLOATNAME(LMatrix3) @@ -148,11 +161,11 @@ PUBLISHED: // parameter, because it would be ambiguous whether we mean a 2-d or // a 3-d scale. - bool almost_equal(const FLOATNAME(LMatrix3) &other, + bool almost_equal(const FLOATNAME(LMatrix3) &other, FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LMatrix3) &other) const; - + void output(ostream &out) const; void write(ostream &out, int indent_level = 0) const; @@ -187,7 +200,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lmatrix4.cxx b/panda/src/linmath/lmatrix4.cxx index d992bf0751..f727b1d69f 100644 --- a/panda/src/linmath/lmatrix4.cxx +++ b/panda/src/linmath/lmatrix4.cxx @@ -1,6 +1,19 @@ -// Filename: lmatrix3.cxx +// Filename: lmatrix4.cxx // Created by: drose (29Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_linmath.h" diff --git a/panda/src/linmath/lmatrix4.h b/panda/src/linmath/lmatrix4.h index a61df24d30..91f30ae58d 100644 --- a/panda/src/linmath/lmatrix4.h +++ b/panda/src/linmath/lmatrix4.h @@ -2,6 +2,19 @@ // Created by: drose (29Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LMATRIX4_H #define LMATRIX4_H diff --git a/panda/src/linmath/lmatrix4_src.I b/panda/src/linmath/lmatrix4_src.I index 048bb3c7d4..aeb3cced7d 100644 --- a/panda/src/linmath/lmatrix4_src.I +++ b/panda/src/linmath/lmatrix4_src.I @@ -1,6 +1,19 @@ // Filename: lmatrix4_src.I // Created by: drose (15Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -19,18 +32,18 @@ ident_mat() { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4):: -FLOATNAME(LMatrix4)() { +FLOATNAME(LMatrix4)() { } //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LMatrix4):: +INLINE_LINMATH FLOATNAME(LMatrix4):: FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix4) ©) { memcpy(_m.data,copy._m.data,sizeof(_m.data)); // (*this) = copy; @@ -39,12 +52,12 @@ FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix4) ©) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LMatrix4) &FLOATNAME(LMatrix4):: +INLINE_LINMATH FLOATNAME(LMatrix4) &FLOATNAME(LMatrix4):: operator = (const FLOATNAME(LMatrix4) ©) { //xxx888 - memcpy(_m.data,copy._m.data,sizeof(_m.data)); + memcpy(_m.data,copy._m.data,sizeof(_m.data)); // set(copy(0, 0), copy(0, 1), copy(0, 2), copy(0, 3), // copy(1, 0), copy(1, 1), copy(1, 2), copy(1, 3), // copy(2, 0), copy(2, 1), copy(2, 2), copy(2, 3), @@ -56,7 +69,7 @@ operator = (const FLOATNAME(LMatrix4) ©) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Fill Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) &FLOATNAME(LMatrix4):: operator = (FLOATTYPE fill_value) { @@ -67,7 +80,7 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4):: FLOATNAME(LMatrix4)(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e02, FLOATTYPE e03, @@ -99,7 +112,7 @@ FLOATNAME(LMatrix4)(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e02, FLOATTYPE e03, //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Constructor, upper 3x3 // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4):: FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix3) &upper3) { @@ -133,7 +146,7 @@ FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix3) &upper3) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Constructor, upper 3x3 plus translation // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4):: FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix3) &upper3, @@ -183,7 +196,7 @@ fill(FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::set // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LMatrix4):: set(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e02, FLOATTYPE e03, @@ -231,7 +244,7 @@ set_upper_3(const FLOATNAME(LMatrix3) &upper3) { _m.m._21 = upper3(2, 1); _m.m._22 = upper3(2, 2); } - + //////////////////////////////////////////////////////////////////// // Function: LMatrix4::get_upper_3 // Access: Public @@ -371,7 +384,7 @@ get_col3(int col) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Indexing operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE &FLOATNAME(LMatrix4):: operator () (int row, int col) { @@ -383,7 +396,7 @@ operator () (int row, int col) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Indexing operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LMatrix4):: operator () (int row, int col) const { @@ -400,10 +413,10 @@ operator () (int row, int col) const { //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LMatrix4):: is_nan() const { - return + return cnan(_m.data[0]) || cnan(_m.data[1]) || cnan(_m.data[2]) || cnan(_m.data[3]) || - cnan(_m.data[4]) || cnan(_m.data[5]) || cnan(_m.data[6]) || cnan(_m.data[7]) || - cnan(_m.data[8]) || cnan(_m.data[9]) || cnan(_m.data[10]) || cnan(_m.data[11]) || + cnan(_m.data[4]) || cnan(_m.data[5]) || cnan(_m.data[6]) || cnan(_m.data[7]) || + cnan(_m.data[8]) || cnan(_m.data[9]) || cnan(_m.data[10]) || cnan(_m.data[11]) || cnan(_m.data[12]) || cnan(_m.data[13]) || cnan(_m.data[14]) || cnan(_m.data[15]); } @@ -514,7 +527,7 @@ operator < (const FLOATNAME(LMatrix4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LMatrix4):: operator == (const FLOATNAME(LMatrix4) &other) const { @@ -524,7 +537,7 @@ operator == (const FLOATNAME(LMatrix4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LMatrix4):: operator != (const FLOATNAME(LMatrix4) &other) const { @@ -546,7 +559,7 @@ compare_to(const FLOATNAME(LMatrix4) &other) const { v_res._v.v._0 = v._v.v._0*mat._m.m._00 + v._v.v._1*mat._m.m._10 + v._v.v._2*mat._m.m._20 + v._v.v._3*mat._m.m._30; \ v_res._v.v._1 = v._v.v._0*mat._m.m._01 + v._v.v._1*mat._m.m._11 + v._v.v._2*mat._m.m._21 + v._v.v._3*mat._m.m._31; \ v_res._v.v._2 = v._v.v._0*mat._m.m._02 + v._v.v._1*mat._m.m._12 + v._v.v._2*mat._m.m._22 + v._v.v._3*mat._m.m._32; \ -v_res._v.v._3 = v._v.v._0*mat._m.m._03 + v._v.v._1*mat._m.m._13 + v._v.v._2*mat._m.m._23 + v._v.v._3*mat._m.m._33; +v_res._v.v._3 = v._v.v._0*mat._m.m._03 + v._v.v._1*mat._m.m._13 + v._v.v._2*mat._m.m._23 + v._v.v._3*mat._m.m._33; //////////////////////////////////////////////////////////////////// // Function: LMatrix4::xform @@ -559,7 +572,7 @@ xform(const FLOATNAME(LVecBase4) &v) const { FLOATNAME(LVecBase4) v_res; VECTOR4_MATRIX4_PRODUCT(v_res, v,(*this)); - return v_res; + return v_res; /* return FLOATNAME(LVecBase4)(v.dot(get_col(0)), v.dot(get_col(1)), @@ -655,7 +668,7 @@ res._m.m._33 = a._m.m._30*b._m.m._03 + a._m.m._31*b._m.m._13 + a._m.m._32*b._m.m //////////////////////////////////////////////////////////////////// // Function: LMatrix4::matrix * matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) FLOATNAME(LMatrix4):: operator * (const FLOATNAME(LMatrix4) &other) const { @@ -727,9 +740,9 @@ scale_multiply(const FLOATNAME(LVecBase3) &scale_vector,const FLOATNAME(LMatrix4 #ifdef _DEBUG assert(&other_mat != this); #endif - + // optimize for 0.0 or 1.0 factors? - + _m.m._00 = other_mat._m.m._00 * scale_vector._v.v._0; _m.m._01 = other_mat._m.m._01 * scale_vector._v.v._0; _m.m._02 = other_mat._m.m._02 * scale_vector._v.v._0; @@ -749,7 +762,7 @@ scale_multiply(const FLOATNAME(LVecBase3) &scale_vector,const FLOATNAME(LMatrix4 //////////////////////////////////////////////////////////////////// // Function: LMatrix4::matrix * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) FLOATNAME(LMatrix4):: operator * (FLOATTYPE scalar) const { @@ -781,7 +794,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::matrix / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) FLOATNAME(LMatrix4):: operator / (FLOATTYPE scalar) const { @@ -874,7 +887,7 @@ operator -= (const FLOATNAME(LMatrix4) &other) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::matrix *= matrix // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) &FLOATNAME(LMatrix4):: operator *= (const FLOATNAME(LMatrix4) &other) { @@ -885,7 +898,7 @@ operator *= (const FLOATNAME(LMatrix4) &other) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::matrix *= scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) &FLOATNAME(LMatrix4):: operator *= (FLOATTYPE scalar) { @@ -915,7 +928,7 @@ operator *= (FLOATTYPE scalar) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::matrix /= scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) &FLOATNAME(LMatrix4):: operator /= (FLOATTYPE scalar) { @@ -1021,7 +1034,7 @@ invert_from(const FLOATNAME(LMatrix4) &other) { } (*this) = other; - + int index[4]; if (!decompose_mat(index)) { @@ -1030,14 +1043,14 @@ invert_from(const FLOATNAME(LMatrix4) &other) { #endif return false; } - + FLOATNAME(LMatrix4) inv = FLOATNAME(LMatrix4)::ident_mat(); int row; - + for (row = 0; row < 4; row++) { back_sub_mat(index, inv, row); } - + transpose_from(inv); return true; } @@ -1064,7 +1077,7 @@ invert_from(const FLOATNAME(LMatrix4) &other) { INLINE_LINMATH bool FLOATNAME(LMatrix4):: invert_affine_from(const FLOATNAME(LMatrix4) &other) { FLOATNAME(LMatrix3) rot; - + rot.invert_from(other.get_upper_3()); // probably could use transpose here set_upper_3(rot); @@ -1084,16 +1097,16 @@ invert_affine_from(const FLOATNAME(LMatrix4) &other) { } } */ - - _m.m._30 = -(other._m.m._30 * _m.m._00 + + + _m.m._30 = -(other._m.m._30 * _m.m._00 + other._m.m._31 * _m.m._10 + other._m.m._32 * _m.m._20); - _m.m._31 = -(other._m.m._30 * _m.m._01 + + _m.m._31 = -(other._m.m._30 * _m.m._01 + other._m.m._31 * _m.m._11 + other._m.m._32 * _m.m._21); - _m.m._32 = -(other._m.m._30 * _m.m._02 + + _m.m._32 = -(other._m.m._30 * _m.m._02 + other._m.m._31 * _m.m._12 + other._m.m._32 * _m.m._22); @@ -1166,16 +1179,16 @@ rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis, FLOATTYPE axis_1 = axis._v.v._1; FLOATTYPE axis_2 = axis._v.v._2; - // Normalize the axis. + // Normalize the axis. -/* - // hack check for prenormalization, only works for simple unit vecs, +/* + // hack check for prenormalization, only works for simple unit vecs, // which is what we usually pass in anyway. screws up if you happen to // pass in something like (.5,.5,0). need to add flag parameter so caller // can request normalization if needed - + if((cabs(axis_0)+cabs(axis_1)+cabs(axis_2)) != 1.0f) { -*/ +*/ FLOATTYPE length_sq = axis_0 * axis_0 + axis_1 * axis_1 + axis_2 * axis_2; #ifdef _DEBUG @@ -1185,7 +1198,7 @@ rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis, axis_0 *= recip_length; axis_1 *= recip_length; - axis_2 *= recip_length; + axis_2 *= recip_length; // } FLOATTYPE angle_rad=deg_2_rad(angle); @@ -1226,7 +1239,7 @@ rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis, return mat; } - + //////////////////////////////////////////////////////////////////// // Function: LMatrix::rotate_mat_normaxis // Access: Public, Static diff --git a/panda/src/linmath/lmatrix4_src.cxx b/panda/src/linmath/lmatrix4_src.cxx index 200add732b..019548fff1 100644 --- a/panda/src/linmath/lmatrix4_src.cxx +++ b/panda/src/linmath/lmatrix4_src.cxx @@ -1,6 +1,19 @@ // Filename: lmatrix4_src.cxx // Created by: drose (15Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LMatrix4)::_type_handle; @@ -136,28 +149,28 @@ almost_equal(const FLOATNAME(LMatrix4) &other, FLOATTYPE threshold) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LMatrix4):: output(ostream &out) const { - out << "[ " + out << "[ " << MAYBE_ZERO(_m.m._00) << " " - << MAYBE_ZERO(_m.m._01) << " " + << MAYBE_ZERO(_m.m._01) << " " << MAYBE_ZERO(_m.m._02) << " " << MAYBE_ZERO(_m.m._03) << " ] [ " << MAYBE_ZERO(_m.m._10) << " " - << MAYBE_ZERO(_m.m._11) << " " + << MAYBE_ZERO(_m.m._11) << " " << MAYBE_ZERO(_m.m._12) << " " << MAYBE_ZERO(_m.m._13) << " ] [ " << MAYBE_ZERO(_m.m._20) << " " - << MAYBE_ZERO(_m.m._21) << " " + << MAYBE_ZERO(_m.m._21) << " " << MAYBE_ZERO(_m.m._22) << " " << MAYBE_ZERO(_m.m._23) << " ] [ " << MAYBE_ZERO(_m.m._30) << " " - << MAYBE_ZERO(_m.m._31) << " " + << MAYBE_ZERO(_m.m._31) << " " << MAYBE_ZERO(_m.m._32) << " " << MAYBE_ZERO(_m.m._33) << " ]"; @@ -166,31 +179,31 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LMatrix4):: write(ostream &out, int indent_level) const { indent(out, indent_level) << MAYBE_ZERO(_m.m._00) << " " - << MAYBE_ZERO(_m.m._01) << " " + << MAYBE_ZERO(_m.m._01) << " " << MAYBE_ZERO(_m.m._02) << " " << MAYBE_ZERO(_m.m._03) << "\n"; indent(out, indent_level) << MAYBE_ZERO(_m.m._10) << " " - << MAYBE_ZERO(_m.m._11) << " " + << MAYBE_ZERO(_m.m._11) << " " << MAYBE_ZERO(_m.m._12) << " " << MAYBE_ZERO(_m.m._13) << "\n"; indent(out, indent_level) << MAYBE_ZERO(_m.m._20) << " " - << MAYBE_ZERO(_m.m._21) << " " + << MAYBE_ZERO(_m.m._21) << " " << MAYBE_ZERO(_m.m._22) << " " << MAYBE_ZERO(_m.m._23) << "\n"; indent(out, indent_level) << MAYBE_ZERO(_m.m._30) << " " - << MAYBE_ZERO(_m.m._31) << " " + << MAYBE_ZERO(_m.m._31) << " " << MAYBE_ZERO(_m.m._32) << " " << MAYBE_ZERO(_m.m._33) << "\n"; @@ -349,7 +362,7 @@ read_datagram(DatagramIterator &scan) { //////////////////////////////////////////////////////////////////// // Function: LMatrix4::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LMatrix4):: init_type() { diff --git a/panda/src/linmath/lmatrix4_src.h b/panda/src/linmath/lmatrix4_src.h index 307c0e0f95..2af113156b 100644 --- a/panda/src/linmath/lmatrix4_src.h +++ b/panda/src/linmath/lmatrix4_src.h @@ -1,6 +1,19 @@ // Filename: lmatrix4_src.h // Created by: drose (15Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -22,7 +35,7 @@ PUBLISHED: FLOATTYPE e10, FLOATTYPE e11, FLOATTYPE e12, FLOATTYPE e13, FLOATTYPE e20, FLOATTYPE e21, FLOATTYPE e22, FLOATTYPE e23, FLOATTYPE e30, FLOATTYPE e31, FLOATTYPE e32, FLOATTYPE e33); - + // Construct a 4x4 matrix given a 3x3 rotation matrix and an optional // translation component. INLINE_LINMATH FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix3) &upper3); @@ -33,7 +46,7 @@ PUBLISHED: FLOATTYPE e10, FLOATTYPE e11, FLOATTYPE e12, FLOATTYPE e13, FLOATTYPE e20, FLOATTYPE e21, FLOATTYPE e22, FLOATTYPE e23, FLOATTYPE e30, FLOATTYPE e31, FLOATTYPE e32, FLOATTYPE e33); - + // Get and set the upper 3x3 rotation matrix. INLINE_LINMATH void set_upper_3(const FLOATNAME(LMatrix3) &upper3); INLINE_LINMATH FLOATNAME(LMatrix3) get_upper_3() const; @@ -84,7 +97,7 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVecBase3) xform_point(const FLOATNAME(LVecBase3) &v) const; - + INLINE_LINMATH FLOATNAME(LVecBase3) xform_vec(const FLOATNAME(LVecBase3) &v) const; @@ -115,7 +128,7 @@ PUBLISHED: INLINE_LINMATH bool invert_in_place(); INLINE_LINMATH static const FLOATNAME(LMatrix4) &ident_mat(); - INLINE_LINMATH static FLOATNAME(LMatrix4) + INLINE_LINMATH static FLOATNAME(LMatrix4) translate_mat(const FLOATNAME(LVecBase3) &trans); INLINE_LINMATH static FLOATNAME(LMatrix4) translate_mat(FLOATTYPE tx, FLOATTYPE ty, FLOATTYPE tz); @@ -123,7 +136,7 @@ PUBLISHED: rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis, CoordinateSystem cs = CS_default); - INLINE_LINMATH static FLOATNAME(LMatrix4) + INLINE_LINMATH static FLOATNAME(LMatrix4) rotate_mat_normaxis(FLOATTYPE angle, const FLOATNAME(LVecBase3) &axis, CoordinateSystem cs = CS_default); @@ -145,10 +158,10 @@ PUBLISHED: static FLOATNAME(LMatrix4) convert_mat(CoordinateSystem from, CoordinateSystem to); - bool almost_equal(const FLOATNAME(LMatrix4) &other, + bool almost_equal(const FLOATNAME(LMatrix4) &other, FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LMatrix4) &other) const; - + void output(ostream &out) const; void write(ostream &out, int indent_level = 0) const; @@ -167,7 +180,7 @@ public: FLOATTYPE data[4 * 4]; } _m; - + private: INLINE_LINMATH FLOATTYPE mult_cel(const FLOATNAME(LMatrix4) &other, int x, int y) const; bool decompose_mat(int index[4]); @@ -187,7 +200,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lorientation.cxx b/panda/src/linmath/lorientation.cxx index 75684c3a61..930c6af5a5 100644 --- a/panda/src/linmath/lorientation.cxx +++ b/panda/src/linmath/lorientation.cxx @@ -1,6 +1,19 @@ -// Filename: lorientation.h +// Filename: lorientation.cxx // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lorientation.h" diff --git a/panda/src/linmath/lorientation.h b/panda/src/linmath/lorientation.h index bb427e0909..2df1174e9f 100644 --- a/panda/src/linmath/lorientation.h +++ b/panda/src/linmath/lorientation.h @@ -1,6 +1,19 @@ // Filename: lorientation.h // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __LORIENTATION_H__ diff --git a/panda/src/linmath/lorientation_src.I b/panda/src/linmath/lorientation_src.I index 1a56d9aece..c0e5d3ccb5 100644 --- a/panda/src/linmath/lorientation_src.I +++ b/panda/src/linmath/lorientation_src.I @@ -1,12 +1,25 @@ -// Filename: lorientation_src.h +// Filename: lorientation_src.I // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LOrientation::Default Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LOrientation):: FLOATNAME(LOrientation)() { @@ -15,7 +28,7 @@ FLOATNAME(LOrientation)() { //////////////////////////////////////////////////////////////////// // Function: LOrientation::Copy Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LOrientation):: FLOATNAME(LOrientation)(const FLOATNAME(LQuaternion)& c) : @@ -25,7 +38,7 @@ FLOATNAME(LOrientation)(const FLOATNAME(LQuaternion)& c) : //////////////////////////////////////////////////////////////////// // Function: LOrientation::Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LOrientation):: FLOATNAME(LOrientation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k) : diff --git a/panda/src/linmath/lorientation_src.cxx b/panda/src/linmath/lorientation_src.cxx index 5549ea86f7..ad60e9814f 100644 --- a/panda/src/linmath/lorientation_src.cxx +++ b/panda/src/linmath/lorientation_src.cxx @@ -1,6 +1,19 @@ -// Filename: lorientation_src.h +// Filename: lorientation_src.cxx // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LOrientation)::_type_handle; @@ -8,15 +21,15 @@ TypeHandle FLOATNAME(LOrientation)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LOrientation::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LOrientation):: init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LQuaternion)::init_type(); string name = "LOrientation"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LQuaternion)::get_class_type()); } } diff --git a/panda/src/linmath/lorientation_src.h b/panda/src/linmath/lorientation_src.h index 8a01feaddd..5c871e67d8 100644 --- a/panda/src/linmath/lorientation_src.h +++ b/panda/src/linmath/lorientation_src.h @@ -1,6 +1,19 @@ // Filename: lorientation_src.h // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// @@ -16,7 +29,7 @@ public: INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix3) &); INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix4) &); - INLINE_LINMATH FLOATNAME(LOrientation) + INLINE_LINMATH FLOATNAME(LOrientation) operator *(const FLOATNAME(LQuaternion)& other) const; INLINE_LINMATH FLOATNAME(LOrientation) diff --git a/panda/src/linmath/lpoint2.cxx b/panda/src/linmath/lpoint2.cxx index cf31bc093e..6a7d807781 100644 --- a/panda/src/linmath/lpoint2.cxx +++ b/panda/src/linmath/lpoint2.cxx @@ -1,6 +1,19 @@ // Filename: lpoint2.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lpoint2.h" diff --git a/panda/src/linmath/lpoint2.h b/panda/src/linmath/lpoint2.h index 939bba5779..03b91b93ac 100644 --- a/panda/src/linmath/lpoint2.h +++ b/panda/src/linmath/lpoint2.h @@ -1,6 +1,19 @@ // Filename: lpoint2.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LPOINT2_H diff --git a/panda/src/linmath/lpoint2_src.I b/panda/src/linmath/lpoint2_src.I index 0419fbaaed..811d3be358 100644 --- a/panda/src/linmath/lpoint2_src.I +++ b/panda/src/linmath/lpoint2_src.I @@ -1,13 +1,26 @@ // Filename: lpoint2_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LPoint2::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2):: FLOATNAME(LPoint2)() { @@ -16,7 +29,7 @@ FLOATNAME(LPoint2)() { //////////////////////////////////////////////////////////////////// // Function: LPoint2::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2):: FLOATNAME(LPoint2)(const FLOATNAME(LVecBase2) ©) : FLOATNAME(LVecBase2)(copy) { @@ -25,7 +38,7 @@ FLOATNAME(LPoint2)(const FLOATNAME(LVecBase2) ©) : FLOATNAME(LVecBase2)(copy //////////////////////////////////////////////////////////////////// // Function: LPoint2::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) &FLOATNAME(LPoint2):: operator = (const FLOATNAME(LVecBase2) ©) { @@ -36,7 +49,7 @@ operator = (const FLOATNAME(LVecBase2) ©) { //////////////////////////////////////////////////////////////////// // Function: LPoint2::Copy Fill Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) &FLOATNAME(LPoint2):: operator = (FLOATTYPE fill_value) { @@ -47,22 +60,22 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LPoint2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2):: FLOATNAME(LPoint2)(FLOATTYPE fill_value) : - FLOATNAME(LVecBase2)(fill_value) + FLOATNAME(LVecBase2)(fill_value) { } //////////////////////////////////////////////////////////////////// // Function: LPoint2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2):: -FLOATNAME(LPoint2)(FLOATTYPE x, FLOATTYPE y) : - FLOATNAME(LVecBase2)(x, y) +FLOATNAME(LPoint2)(FLOATTYPE x, FLOATTYPE y) : + FLOATNAME(LVecBase2)(x, y) { } @@ -99,7 +112,7 @@ unit_y() { //////////////////////////////////////////////////////////////////// // Function: LPoint2::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) FLOATNAME(LPoint2):: operator - () const { @@ -109,7 +122,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LPoint2::point + vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LPoint2):: operator + (const FLOATNAME(LVecBase2) &other) const { @@ -119,7 +132,7 @@ operator + (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint2::point + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) FLOATNAME(LPoint2):: operator + (const FLOATNAME(LVector2) &other) const { @@ -129,7 +142,7 @@ operator + (const FLOATNAME(LVector2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint2::point - vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LPoint2):: operator - (const FLOATNAME(LVecBase2) &other) const { @@ -139,7 +152,7 @@ operator - (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint2::point - point // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) FLOATNAME(LPoint2):: operator - (const FLOATNAME(LPoint2) &other) const { @@ -149,7 +162,7 @@ operator - (const FLOATNAME(LPoint2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint2::point - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) FLOATNAME(LPoint2):: operator - (const FLOATNAME(LVector2) &other) const { @@ -159,7 +172,7 @@ operator - (const FLOATNAME(LVector2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint2::operator * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) FLOATNAME(LPoint2):: operator * (FLOATTYPE scalar) const { @@ -169,7 +182,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LPoint2::operator / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint2) FLOATNAME(LPoint2):: operator / (FLOATTYPE scalar) const { diff --git a/panda/src/linmath/lpoint2_src.cxx b/panda/src/linmath/lpoint2_src.cxx index 0ea190dc4b..f7e2de8c35 100644 --- a/panda/src/linmath/lpoint2_src.cxx +++ b/panda/src/linmath/lpoint2_src.cxx @@ -1,6 +1,19 @@ -// Filename: lpoint2_src.h +// Filename: lpoint2_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LPoint2)::_type_handle; @@ -8,7 +21,7 @@ TypeHandle FLOATNAME(LPoint2)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LPoint2::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LPoint2):: @@ -16,8 +29,8 @@ init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LVecBase2)::init_type(); string name = "LPoint2"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LVecBase2)::get_class_type()); } } diff --git a/panda/src/linmath/lpoint2_src.h b/panda/src/linmath/lpoint2_src.h index ec4e62b166..1a09ee04c5 100644 --- a/panda/src/linmath/lpoint2_src.h +++ b/panda/src/linmath/lpoint2_src.h @@ -1,6 +1,19 @@ // Filename: lpoint2_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -43,7 +56,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lpoint3.cxx b/panda/src/linmath/lpoint3.cxx index af010c1fc9..d203f11fe1 100644 --- a/panda/src/linmath/lpoint3.cxx +++ b/panda/src/linmath/lpoint3.cxx @@ -1,6 +1,19 @@ -// Filename: lpoint2.cxx +// Filename: lpoint3.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lpoint3.h" diff --git a/panda/src/linmath/lpoint3.h b/panda/src/linmath/lpoint3.h index f3a09c0ced..f802c20d54 100644 --- a/panda/src/linmath/lpoint3.h +++ b/panda/src/linmath/lpoint3.h @@ -2,6 +2,19 @@ // Created by: drose (25Sep99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LPOINT3_H #define LPOINT3_H diff --git a/panda/src/linmath/lpoint3_src.I b/panda/src/linmath/lpoint3_src.I index 466bde0319..55479c8189 100644 --- a/panda/src/linmath/lpoint3_src.I +++ b/panda/src/linmath/lpoint3_src.I @@ -1,13 +1,26 @@ // Filename: lpoint3_src.I // Created by: drose (25Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LPoint3::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3):: FLOATNAME(LPoint3)() { @@ -16,7 +29,7 @@ FLOATNAME(LPoint3)() { //////////////////////////////////////////////////////////////////// // Function: LPoint3::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3):: FLOATNAME(LPoint3)(const FLOATNAME(LVecBase3) ©) : FLOATNAME(LVecBase3)(copy) { @@ -25,7 +38,7 @@ FLOATNAME(LPoint3)(const FLOATNAME(LVecBase3) ©) : FLOATNAME(LVecBase3)(copy //////////////////////////////////////////////////////////////////// // Function: LPoint3::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) &FLOATNAME(LPoint3):: operator = (const FLOATNAME(LVecBase3) ©) { @@ -36,7 +49,7 @@ operator = (const FLOATNAME(LVecBase3) ©) { //////////////////////////////////////////////////////////////////// // Function: LPoint3::Copy Fill Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) &FLOATNAME(LPoint3):: operator = (FLOATTYPE fill_value) { @@ -47,22 +60,22 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LPoint3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3):: FLOATNAME(LPoint3)(FLOATTYPE fill_value) : - FLOATNAME(LVecBase3)(fill_value) + FLOATNAME(LVecBase3)(fill_value) { } //////////////////////////////////////////////////////////////////// // Function: LPoint3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3):: -FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) : - FLOATNAME(LVecBase3)(x, y, z) +FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) : + FLOATNAME(LVecBase3)(x, y, z) { } @@ -109,7 +122,7 @@ unit_z() { //////////////////////////////////////////////////////////////////// // Function: LPoint3::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3):: operator - () const { @@ -119,7 +132,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::point + vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LPoint3):: operator + (const FLOATNAME(LVecBase3) &other) const { @@ -129,7 +142,7 @@ operator + (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::point + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3):: operator + (const FLOATNAME(LVector3) &other) const { @@ -139,7 +152,7 @@ operator + (const FLOATNAME(LVector3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::point - vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LPoint3):: operator - (const FLOATNAME(LVecBase3) &other) const { @@ -149,7 +162,7 @@ operator - (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::point - point // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LPoint3):: operator - (const FLOATNAME(LPoint3) &other) const { @@ -159,7 +172,7 @@ operator - (const FLOATNAME(LPoint3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::point - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3):: operator - (const FLOATNAME(LVector3) &other) const { @@ -169,7 +182,7 @@ operator - (const FLOATNAME(LVector3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::cross // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3):: cross(const FLOATNAME(LVecBase3) &other) const { @@ -179,7 +192,7 @@ cross(const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::operator * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3):: operator * (FLOATTYPE scalar) const { @@ -189,7 +202,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LPoint3::operator / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3):: operator / (FLOATTYPE scalar) const { @@ -219,7 +232,7 @@ origin(CoordinateSystem) { INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3):: rfu(FLOATTYPE right_v, FLOATTYPE fwd_v, FLOATTYPE up_v, CoordinateSystem cs) { - return origin(cs) + + return origin(cs) + FLOATNAME(LVector3)::rfu(right_v, fwd_v, up_v, cs); } diff --git a/panda/src/linmath/lpoint3_src.cxx b/panda/src/linmath/lpoint3_src.cxx index 7577dc9502..3da6f4ce0c 100644 --- a/panda/src/linmath/lpoint3_src.cxx +++ b/panda/src/linmath/lpoint3_src.cxx @@ -1,6 +1,19 @@ -// Filename: lpoint3_src.h +// Filename: lpoint3_src.cxx // Created by: drose (25Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LPoint3)::_type_handle; @@ -8,7 +21,7 @@ TypeHandle FLOATNAME(LPoint3)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LPoint3::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LPoint3):: @@ -16,8 +29,8 @@ init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LVecBase3)::init_type(); string name = "LPoint3"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LVecBase3)::get_class_type()); } } diff --git a/panda/src/linmath/lpoint3_src.h b/panda/src/linmath/lpoint3_src.h index 6ac924b4f8..3d032ca732 100644 --- a/panda/src/linmath/lpoint3_src.h +++ b/panda/src/linmath/lpoint3_src.h @@ -1,6 +1,19 @@ // Filename: lpoint3_src.h // Created by: drose (25Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -57,7 +70,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lpoint4.cxx b/panda/src/linmath/lpoint4.cxx index 82289ebda3..1ab55baff7 100644 --- a/panda/src/linmath/lpoint4.cxx +++ b/panda/src/linmath/lpoint4.cxx @@ -1,6 +1,19 @@ -// Filename: lpoint2.cxx +// Filename: lpoint4.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lpoint4.h" diff --git a/panda/src/linmath/lpoint4.h b/panda/src/linmath/lpoint4.h index 8047f88ef0..6bc955ac1a 100644 --- a/panda/src/linmath/lpoint4.h +++ b/panda/src/linmath/lpoint4.h @@ -1,6 +1,19 @@ // Filename: lpoint4.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LPOINT4_H diff --git a/panda/src/linmath/lpoint4_src.I b/panda/src/linmath/lpoint4_src.I index 74dbc8c06a..fe0f886f98 100644 --- a/panda/src/linmath/lpoint4_src.I +++ b/panda/src/linmath/lpoint4_src.I @@ -1,13 +1,26 @@ // Filename: lpoint4_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LPoint4::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4):: FLOATNAME(LPoint4)() { @@ -16,7 +29,7 @@ FLOATNAME(LPoint4)() { //////////////////////////////////////////////////////////////////// // Function: LPoint4::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4):: FLOATNAME(LPoint4)(const FLOATNAME(LVecBase4) ©) : FLOATNAME(LVecBase4)(copy) { @@ -25,7 +38,7 @@ FLOATNAME(LPoint4)(const FLOATNAME(LVecBase4) ©) : FLOATNAME(LVecBase4)(copy //////////////////////////////////////////////////////////////////// // Function: LPoint4::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4) &FLOATNAME(LPoint4):: operator = (const FLOATNAME(LVecBase4) ©) { @@ -36,7 +49,7 @@ operator = (const FLOATNAME(LVecBase4) ©) { //////////////////////////////////////////////////////////////////// // Function: LPoint4::Copy Fill Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4) &FLOATNAME(LPoint4):: operator = (FLOATTYPE fill_value) { @@ -47,22 +60,22 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LPoint4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4):: FLOATNAME(LPoint4)(FLOATTYPE fill_value) : - FLOATNAME(LVecBase4)(fill_value) + FLOATNAME(LVecBase4)(fill_value) { } //////////////////////////////////////////////////////////////////// // Function: LPoint4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4):: -FLOATNAME(LPoint4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) : - FLOATNAME(LVecBase4)(x, y, z, w) +FLOATNAME(LPoint4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) : + FLOATNAME(LVecBase4)(x, y, z, w) { } @@ -119,7 +132,7 @@ unit_w() { //////////////////////////////////////////////////////////////////// // Function: LPoint4::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4) FLOATNAME(LPoint4):: operator - () const { @@ -129,7 +142,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LPoint4::point + vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LPoint4):: operator + (const FLOATNAME(LVecBase4) &other) const { @@ -139,7 +152,7 @@ operator + (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint4::point + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4) FLOATNAME(LPoint4):: operator + (const FLOATNAME(LVector4) &other) const { @@ -149,7 +162,7 @@ operator + (const FLOATNAME(LVector4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint4::point - vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LPoint4):: operator - (const FLOATNAME(LVecBase4) &other) const { @@ -159,7 +172,7 @@ operator - (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint4::point - point // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) FLOATNAME(LPoint4):: operator - (const FLOATNAME(LPoint4) &other) const { @@ -169,7 +182,7 @@ operator - (const FLOATNAME(LPoint4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint4::point - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4) FLOATNAME(LPoint4):: operator - (const FLOATNAME(LVector4) &other) const { @@ -179,7 +192,7 @@ operator - (const FLOATNAME(LVector4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LPoint4::operator * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4) FLOATNAME(LPoint4):: operator * (FLOATTYPE scalar) const { @@ -189,7 +202,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LPoint4::operator / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LPoint4) FLOATNAME(LPoint4):: operator / (FLOATTYPE scalar) const { diff --git a/panda/src/linmath/lpoint4_src.cxx b/panda/src/linmath/lpoint4_src.cxx index 55e50cc8c3..370acf57ef 100644 --- a/panda/src/linmath/lpoint4_src.cxx +++ b/panda/src/linmath/lpoint4_src.cxx @@ -1,6 +1,19 @@ -// Filename: lpoint4_src.h +// Filename: lpoint4_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LPoint4)::_type_handle; @@ -8,7 +21,7 @@ TypeHandle FLOATNAME(LPoint4)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LPoint4::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LPoint4):: @@ -16,8 +29,8 @@ init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LVecBase4)::init_type(); string name = "LPoint4"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LVecBase4)::get_class_type()); } } diff --git a/panda/src/linmath/lpoint4_src.h b/panda/src/linmath/lpoint4_src.h index 597e58d910..7f68e26dfd 100644 --- a/panda/src/linmath/lpoint4_src.h +++ b/panda/src/linmath/lpoint4_src.h @@ -1,6 +1,19 @@ // Filename: lpoint4_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -44,7 +57,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lquaternion.cxx b/panda/src/linmath/lquaternion.cxx index fd7ba496e9..bd221831c6 100644 --- a/panda/src/linmath/lquaternion.cxx +++ b/panda/src/linmath/lquaternion.cxx @@ -1,6 +1,19 @@ // Filename: lquaternion.cxx // Created by: frang (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lquaternion.h" diff --git a/panda/src/linmath/lquaternion.h b/panda/src/linmath/lquaternion.h index a7a1f5f46d..67bb739652 100644 --- a/panda/src/linmath/lquaternion.h +++ b/panda/src/linmath/lquaternion.h @@ -1,6 +1,19 @@ // Filename: lquaternion.h // Created by: frang (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LQUATERNION_H diff --git a/panda/src/linmath/lquaternion_src.I b/panda/src/linmath/lquaternion_src.I index a1af91ffdf..cdad0b3e3d 100644 --- a/panda/src/linmath/lquaternion_src.I +++ b/panda/src/linmath/lquaternion_src.I @@ -1,12 +1,25 @@ // Filename: lquaternion_src.I // Created by: frang (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::Default Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LQuaternion):: FLOATNAME(LQuaternion)() { @@ -15,18 +28,18 @@ FLOATNAME(LQuaternion)() { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::Copy Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LQuaternion):: -FLOATNAME(LQuaternion)(const FLOATNAME(LQuaternion) &c) : - FLOATNAME(LVecBase4)(c) +FLOATNAME(LQuaternion)(const FLOATNAME(LQuaternion) &c) : + FLOATNAME(LVecBase4)(c) { } //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LQuaternion):: FLOATNAME(LQuaternion)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k) { @@ -51,7 +64,7 @@ multiply(const FLOATNAME(LQuaternion)& rhs) const { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::Multiply Operator // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LQuaternion) FLOATNAME(LQuaternion):: operator *(const FLOATNAME(LQuaternion)& c) { @@ -61,7 +74,7 @@ operator *(const FLOATNAME(LQuaternion)& c) { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::Multiply Assignment Operator // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LQuaternion)& FLOATNAME(LQuaternion):: operator *=(const FLOATNAME(LQuaternion)& c) { @@ -75,7 +88,7 @@ operator *=(const FLOATNAME(LQuaternion)& c) { // Description: Quat * Matrix = matrix //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LQuaternion):: -operator *(const FLOATNAME(LMatrix3) &m) { +operator *(const FLOATNAME(LMatrix3) &m) { FLOATNAME(LMatrix3) result; extract_to_matrix(result); return result * m; @@ -128,7 +141,7 @@ almost_equal(const FLOATNAME(LQuaternion)& c) const { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::output // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LQuaternion):: output(ostream& os) const { @@ -141,7 +154,7 @@ output(ostream& os) const { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::get_r // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LQuaternion):: get_r() const { @@ -151,7 +164,7 @@ get_r() const { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::get_i // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LQuaternion):: get_i() const { @@ -161,7 +174,7 @@ get_i() const { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::get_j // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LQuaternion):: get_j() const { @@ -171,7 +184,7 @@ get_j() const { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::get_k // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LQuaternion):: get_k() const { @@ -181,7 +194,7 @@ get_k() const { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::set_r // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LQuaternion):: set_r(FLOATTYPE r) { @@ -191,7 +204,7 @@ set_r(FLOATTYPE r) { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::set_i // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LQuaternion):: set_i(FLOATTYPE i) { @@ -201,7 +214,7 @@ set_i(FLOATTYPE i) { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::set_j // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LQuaternion):: set_j(FLOATTYPE j) { @@ -211,7 +224,7 @@ set_j(FLOATTYPE j) { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::set_k // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LQuaternion):: set_k(FLOATTYPE k) { @@ -221,7 +234,7 @@ set_k(FLOATTYPE k) { //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::normalize // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LQuaternion):: normalize() { @@ -240,7 +253,7 @@ normalize() { //////////////////////////////////////////////////////////////////// // Function: set_from_matrix // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LQuaternion):: set_from_matrix(const FLOATNAME(LMatrix4) &m) { @@ -250,7 +263,7 @@ set_from_matrix(const FLOATNAME(LMatrix4) &m) { //////////////////////////////////////////////////////////////////// // Function: operator *(Matrix3, Quat) // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix3) operator *(const FLOATNAME(LMatrix3) &m, const FLOATNAME(LQuaternion) &q) { @@ -263,7 +276,7 @@ INLINE_LINMATH FLOATNAME(LMatrix3) operator *(const FLOATNAME(LMatrix3) &m, //////////////////////////////////////////////////////////////////// // Function: operator *(Matrix4, Quat) // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LMatrix4) operator *(const FLOATNAME(LMatrix4) &m, const FLOATNAME(LQuaternion) &q) { diff --git a/panda/src/linmath/lquaternion_src.cxx b/panda/src/linmath/lquaternion_src.cxx index 207428ad40..e509fefbc3 100644 --- a/panda/src/linmath/lquaternion_src.cxx +++ b/panda/src/linmath/lquaternion_src.cxx @@ -1,3 +1,20 @@ +// Filename: lquaternion_src.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LQuaternion)::_type_handle; @@ -7,7 +24,7 @@ const FLOATNAME(LQuaternion) FLOATNAME(LQuaternion)::_ident_quat = //////////////////////////////////////////////////////////////////// // Function: FLOATNAME(LQuaternion)::pure_imaginary_quat // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// FLOATNAME(LQuaternion) FLOATNAME(LQuaternion):: pure_imaginary(const FLOATNAME(LVector3) &v) { @@ -38,7 +55,7 @@ extract_to_matrix(FLOATNAME(LMatrix3) &m) const { //////////////////////////////////////////////////////////////////// // Function: extract (LMatrix4) // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LQuaternion):: extract_to_matrix(FLOATNAME(LMatrix4) &m) const { @@ -223,15 +240,15 @@ set_from_matrix(const FLOATNAME(LMatrix3) &m) { //////////////////////////////////////////////////////////////////// // Function: LQuaternion::init_type // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LQuaternion):: init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LVecBase4)::init_type(); string name = "LQuaternion"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LVecBase4)::get_class_type()); } } diff --git a/panda/src/linmath/lquaternion_src.h b/panda/src/linmath/lquaternion_src.h index 53df4dd3ff..28b481ff2c 100644 --- a/panda/src/linmath/lquaternion_src.h +++ b/panda/src/linmath/lquaternion_src.h @@ -1,6 +1,19 @@ // Filename: lquaternion_src.h // Created by: frang (06Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// class EXPCL_PANDA FLOATNAME(LQuaternion) : public FLOATNAME(LVecBase4) { protected: - INLINE_LINMATH FLOATNAME(LQuaternion) + INLINE_LINMATH FLOATNAME(LQuaternion) multiply(const FLOATNAME(LQuaternion)&) const; PUBLISHED: diff --git a/panda/src/linmath/lrotation.cxx b/panda/src/linmath/lrotation.cxx index d28aeb7565..f70d62e949 100644 --- a/panda/src/linmath/lrotation.cxx +++ b/panda/src/linmath/lrotation.cxx @@ -1,6 +1,19 @@ -// Filename: lrotation_src.h +// Filename: lrotation.cxx // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lrotation.h" diff --git a/panda/src/linmath/lrotation.h b/panda/src/linmath/lrotation.h index 169c30cf60..f4c5959b9c 100644 --- a/panda/src/linmath/lrotation.h +++ b/panda/src/linmath/lrotation.h @@ -1,6 +1,19 @@ // Filename: lrotation.h // Created by: frang, charles (07Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __LROTATION_H__ diff --git a/panda/src/linmath/lrotation_src.I b/panda/src/linmath/lrotation_src.I index 54adccab86..db50a7416d 100644 --- a/panda/src/linmath/lrotation_src.I +++ b/panda/src/linmath/lrotation_src.I @@ -1,12 +1,25 @@ // Filename: lrotation_src.I // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LRotation::Default Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LRotation):: FLOATNAME(LRotation)() { @@ -15,20 +28,20 @@ FLOATNAME(LRotation)() { //////////////////////////////////////////////////////////////////// // Function: LRotation::Copy Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LRotation):: -FLOATNAME(LRotation)(const FLOATNAME(LQuaternion)& c) : +FLOATNAME(LRotation)(const FLOATNAME(LQuaternion)& c) : FLOATNAME(LQuaternion)(c) { } //////////////////////////////////////////////////////////////////// // Function: LRotation::Constructor // Access: public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LRotation):: -FLOATNAME(LRotation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k) : +FLOATNAME(LRotation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k) : FLOATNAME(LQuaternion)(r, i, j, k) { } diff --git a/panda/src/linmath/lrotation_src.cxx b/panda/src/linmath/lrotation_src.cxx index 0504372cfe..13b575a7ba 100644 --- a/panda/src/linmath/lrotation_src.cxx +++ b/panda/src/linmath/lrotation_src.cxx @@ -1,6 +1,19 @@ -// Filename: lrotation_src.h +// Filename: lrotation_src.cxx // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LRotation)::_type_handle; @@ -8,7 +21,7 @@ TypeHandle FLOATNAME(LRotation)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LRotation::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LRotation):: init_type() { @@ -16,8 +29,8 @@ init_type() { FLOATNAME(LQuaternion)::init_type(); // Format a string to describe the type. string name = "LRotation"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LQuaternion)::get_class_type()); } } diff --git a/panda/src/linmath/lrotation_src.h b/panda/src/linmath/lrotation_src.h index 96eef5e8fb..8f5f225b93 100644 --- a/panda/src/linmath/lrotation_src.h +++ b/panda/src/linmath/lrotation_src.h @@ -1,6 +1,19 @@ // Filename: lrotation_src.h // Created by: frang, charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/luse.I b/panda/src/linmath/luse.I index 13fd2a7957..5bd49cd493 100644 --- a/panda/src/linmath/luse.I +++ b/panda/src/linmath/luse.I @@ -1,4 +1,17 @@ // Filename: luse.I // Created by: drose (13Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/linmath/luse.cxx b/panda/src/linmath/luse.cxx index 1e7b76a060..788cca0819 100644 --- a/panda/src/linmath/luse.cxx +++ b/panda/src/linmath/luse.cxx @@ -1,6 +1,19 @@ // Filename: luse.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "luse.h" diff --git a/panda/src/linmath/luse.h b/panda/src/linmath/luse.h index eb30a3895a..3bbe238d58 100644 --- a/panda/src/linmath/luse.h +++ b/panda/src/linmath/luse.h @@ -2,6 +2,19 @@ // Created by: drose (13Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LUSE_H #define LUSE_H diff --git a/panda/src/linmath/lvec2_ops.h b/panda/src/linmath/lvec2_ops.h index 2bfb82a07f..e768a003fc 100644 --- a/panda/src/linmath/lvec2_ops.h +++ b/panda/src/linmath/lvec2_ops.h @@ -1,6 +1,19 @@ // Filename: lvec2_ops.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVEC2_OPS_H diff --git a/panda/src/linmath/lvec2_ops_src.I b/panda/src/linmath/lvec2_ops_src.I index 032c20fff7..9848f5d631 100644 --- a/panda/src/linmath/lvec2_ops_src.I +++ b/panda/src/linmath/lvec2_ops_src.I @@ -1,38 +1,51 @@ // Filename: lvec2_ops_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: scalar * LVecBase2 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LVecBase2) +INLINE_LINMATH FLOATNAME(LVecBase2) operator * (FLOATTYPE scalar, const FLOATNAME(LVecBase2) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: scalar * LPoint2 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LPoint2) +INLINE_LINMATH FLOATNAME(LPoint2) operator * (FLOATTYPE scalar, const FLOATNAME(LPoint2) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: scalar * LVector2 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LVector2) +INLINE_LINMATH FLOATNAME(LVector2) operator * (FLOATTYPE scalar, const FLOATNAME(LVector2) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: dot product of LVecBase2 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE dot(const FLOATNAME(LVecBase2) &a, const FLOATNAME(LVecBase2) &b) { @@ -41,7 +54,7 @@ dot(const FLOATNAME(LVecBase2) &a, const FLOATNAME(LVecBase2) &b) { //////////////////////////////////////////////////////////////////// // Function: length of a vector -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE length(const FLOATNAME(LVector2) &a) { diff --git a/panda/src/linmath/lvec2_ops_src.h b/panda/src/linmath/lvec2_ops_src.h index fbfeb9c5ce..7a2d0b4abb 100644 --- a/panda/src/linmath/lvec2_ops_src.h +++ b/panda/src/linmath/lvec2_ops_src.h @@ -1,6 +1,19 @@ // Filename: lvec2_ops_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // When possible, operators have been defined within the classes. @@ -10,13 +23,13 @@ // scalar * vec (vec * scalar is defined in class) -INLINE_LINMATH FLOATNAME(LVecBase2) +INLINE_LINMATH FLOATNAME(LVecBase2) operator * (FLOATTYPE scalar, const FLOATNAME(LVecBase2) &a); -INLINE_LINMATH FLOATNAME(LPoint2) +INLINE_LINMATH FLOATNAME(LPoint2) operator * (FLOATTYPE scalar, const FLOATNAME(LPoint2) &a); -INLINE_LINMATH FLOATNAME(LVector2) +INLINE_LINMATH FLOATNAME(LVector2) operator * (FLOATTYPE scalar, const FLOATNAME(LVector2) &a); diff --git a/panda/src/linmath/lvec3_ops.h b/panda/src/linmath/lvec3_ops.h index ac4e4c3262..db22203c5b 100644 --- a/panda/src/linmath/lvec3_ops.h +++ b/panda/src/linmath/lvec3_ops.h @@ -1,6 +1,19 @@ // Filename: lvec3_ops.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVEC3_OPS_H diff --git a/panda/src/linmath/lvec3_ops_src.I b/panda/src/linmath/lvec3_ops_src.I index 80574a8c27..e5cd182351 100644 --- a/panda/src/linmath/lvec3_ops_src.I +++ b/panda/src/linmath/lvec3_ops_src.I @@ -1,39 +1,52 @@ // Filename: lvec3_ops_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: scalar * LVecBase3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LVecBase3) +INLINE_LINMATH FLOATNAME(LVecBase3) operator * (FLOATTYPE scalar, const FLOATNAME(LVecBase3) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: scalar * LPoint3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LPoint3) +INLINE_LINMATH FLOATNAME(LPoint3) operator * (FLOATTYPE scalar, const FLOATNAME(LPoint3) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: scalar * LVector3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LVector3) +INLINE_LINMATH FLOATNAME(LVector3) operator * (FLOATTYPE scalar, const FLOATNAME(LVector3) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: dot product of LVecBase3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE @@ -43,7 +56,7 @@ dot(const FLOATNAME(LVecBase3) &a, const FLOATNAME(LVecBase3) &b) { //////////////////////////////////////////////////////////////////// // Function: cross product of LVecBase3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) @@ -53,7 +66,7 @@ cross(const FLOATNAME(LVecBase3) &a, const FLOATNAME(LVecBase3) &b) { //////////////////////////////////////////////////////////////////// // Function: cross product of LVector3 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) @@ -64,7 +77,7 @@ cross(const FLOATNAME(LVector3) &a, const FLOATNAME(LVector3) &b) { //////////////////////////////////////////////////////////////////// // Function: length of a vector -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE diff --git a/panda/src/linmath/lvec3_ops_src.h b/panda/src/linmath/lvec3_ops_src.h index 4938e7e621..9eafe4eed8 100644 --- a/panda/src/linmath/lvec3_ops_src.h +++ b/panda/src/linmath/lvec3_ops_src.h @@ -1,6 +1,19 @@ // Filename: lvec3_ops_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // When possible, operators have been defined within the classes. @@ -10,13 +23,13 @@ // scalar * vec (vec * scalar is defined in class) -INLINE_LINMATH FLOATNAME(LVecBase3) +INLINE_LINMATH FLOATNAME(LVecBase3) operator * (FLOATTYPE scalar, const FLOATNAME(LVecBase3) &a); -INLINE_LINMATH FLOATNAME(LPoint3) +INLINE_LINMATH FLOATNAME(LPoint3) operator * (FLOATTYPE scalar, const FLOATNAME(LPoint3) &a); -INLINE_LINMATH FLOATNAME(LVector3) +INLINE_LINMATH FLOATNAME(LVector3) operator * (FLOATTYPE scalar, const FLOATNAME(LVector3) &a); diff --git a/panda/src/linmath/lvec4_ops.h b/panda/src/linmath/lvec4_ops.h index 1e9599f638..409afa4a2c 100644 --- a/panda/src/linmath/lvec4_ops.h +++ b/panda/src/linmath/lvec4_ops.h @@ -1,6 +1,19 @@ // Filename: lvec4_ops.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVEC4_OPS_H diff --git a/panda/src/linmath/lvec4_ops_src.I b/panda/src/linmath/lvec4_ops_src.I index 9bd2bdfe1e..14a18b0614 100644 --- a/panda/src/linmath/lvec4_ops_src.I +++ b/panda/src/linmath/lvec4_ops_src.I @@ -1,38 +1,51 @@ // Filename: lvec4_ops_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: scalar * LVecBase4 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LVecBase4) +INLINE_LINMATH FLOATNAME(LVecBase4) operator * (FLOATTYPE scalar, const FLOATNAME(LVecBase4) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: scalar * LPoint4 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LPoint4) +INLINE_LINMATH FLOATNAME(LPoint4) operator * (FLOATTYPE scalar, const FLOATNAME(LPoint4) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: scalar * LVector4 -// Description: +// Description: //////////////////////////////////////////////////////////////////// -INLINE_LINMATH FLOATNAME(LVector4) +INLINE_LINMATH FLOATNAME(LVector4) operator * (FLOATTYPE scalar, const FLOATNAME(LVector4) &a) { return a * scalar; } //////////////////////////////////////////////////////////////////// // Function: dot product of LVecBase4 -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE @@ -42,7 +55,7 @@ dot(const FLOATNAME(LVecBase4) &a, const FLOATNAME(LVecBase4) &b) { //////////////////////////////////////////////////////////////////// // Function: length of a vector -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE diff --git a/panda/src/linmath/lvec4_ops_src.h b/panda/src/linmath/lvec4_ops_src.h index 21b124baee..8f970ead3c 100644 --- a/panda/src/linmath/lvec4_ops_src.h +++ b/panda/src/linmath/lvec4_ops_src.h @@ -1,6 +1,19 @@ // Filename: lvec4_ops_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // When possible, operators have been defined within the classes. @@ -10,13 +23,13 @@ // scalar * vec (vec * scalar is defined in class) -INLINE_LINMATH FLOATNAME(LVecBase4) +INLINE_LINMATH FLOATNAME(LVecBase4) operator * (FLOATTYPE scalar, const FLOATNAME(LVecBase4) &a); -INLINE_LINMATH FLOATNAME(LPoint4) +INLINE_LINMATH FLOATNAME(LPoint4) operator * (FLOATTYPE scalar, const FLOATNAME(LPoint4) &a); -INLINE_LINMATH FLOATNAME(LVector4) +INLINE_LINMATH FLOATNAME(LVector4) operator * (FLOATTYPE scalar, const FLOATNAME(LVector4) &a); diff --git a/panda/src/linmath/lvecBase2.cxx b/panda/src/linmath/lvecBase2.cxx index c151f5d6b3..96bfafcdc6 100644 --- a/panda/src/linmath/lvecBase2.cxx +++ b/panda/src/linmath/lvecBase2.cxx @@ -1,6 +1,19 @@ // Filename: lvecBase2.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lvecBase2.h" diff --git a/panda/src/linmath/lvecBase2.h b/panda/src/linmath/lvecBase2.h index 7d26b32239..0ff5817f4b 100644 --- a/panda/src/linmath/lvecBase2.h +++ b/panda/src/linmath/lvecBase2.h @@ -1,6 +1,19 @@ // Filename: lvecBase2.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVECBASE2_H diff --git a/panda/src/linmath/lvecBase2_src.I b/panda/src/linmath/lvecBase2_src.I index 2f3cafeb9c..179d570848 100644 --- a/panda/src/linmath/lvecBase2_src.I +++ b/panda/src/linmath/lvecBase2_src.I @@ -1,13 +1,26 @@ // Filename: lvecBase2_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2):: FLOATNAME(LVecBase2)() { @@ -16,7 +29,7 @@ FLOATNAME(LVecBase2)() { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2):: FLOATNAME(LVecBase2)(const FLOATNAME(LVecBase2) ©) { @@ -28,7 +41,7 @@ FLOATNAME(LVecBase2)(const FLOATNAME(LVecBase2) ©) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) &FLOATNAME(LVecBase2):: operator = (const FLOATNAME(LVecBase2) ©) { @@ -41,7 +54,7 @@ operator = (const FLOATNAME(LVecBase2) ©) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Fill Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) &FLOATNAME(LVecBase2):: operator = (FLOATTYPE fill_value) { @@ -52,7 +65,7 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2):: FLOATNAME(LVecBase2)(FLOATTYPE fill_value) { @@ -62,7 +75,7 @@ FLOATNAME(LVecBase2)(FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2):: FLOATNAME(LVecBase2)(FLOATTYPE x, FLOATTYPE y) { @@ -104,7 +117,7 @@ unit_y() { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2):: ~FLOATNAME(LVecBase2)() { @@ -113,7 +126,7 @@ INLINE_LINMATH FLOATNAME(LVecBase2):: //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Indexing Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase2):: operator [](int i) const { @@ -124,7 +137,7 @@ operator [](int i) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::Indexing Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE &FLOATNAME(LVecBase2):: operator [](int i) { @@ -146,7 +159,7 @@ is_nan() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::get_cell // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase2):: get_cell(int i) const { @@ -157,7 +170,7 @@ get_cell(int i) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::get_x // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase2):: get_x() const { @@ -167,7 +180,7 @@ get_x() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::get_y // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase2):: get_y() const { @@ -177,7 +190,7 @@ get_y() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::set_cell // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: set_cell(int i, FLOATTYPE value) { @@ -188,7 +201,7 @@ set_cell(int i, FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::set_x // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: set_x(FLOATTYPE value) { @@ -198,7 +211,7 @@ set_x(FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::set_y // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: set_y(FLOATTYPE value) { @@ -287,7 +300,7 @@ fill(FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::set // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: set(FLOATTYPE x, FLOATTYPE y) { @@ -298,7 +311,7 @@ set(FLOATTYPE x, FLOATTYPE y) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::dot // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase2):: dot(const FLOATNAME(LVecBase2) &other) const { @@ -322,7 +335,7 @@ operator < (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LVecBase2):: operator == (const FLOATNAME(LVecBase2) &other) const { @@ -333,7 +346,7 @@ operator == (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LVecBase2):: operator != (const FLOATNAME(LVecBase2) &other) const { @@ -374,7 +387,7 @@ compare_to(const FLOATNAME(LVecBase2) &other, FLOATTYPE threshold) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVecBase2):: operator - () const { @@ -384,7 +397,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::vector + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVecBase2):: operator + (const FLOATNAME(LVecBase2) &other) const { @@ -395,7 +408,7 @@ operator + (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::vector - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVecBase2):: operator - (const FLOATNAME(LVecBase2) &other) const { @@ -406,7 +419,7 @@ operator - (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::vector * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVecBase2):: operator * (FLOATTYPE scalar) const { @@ -417,7 +430,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::vector / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVecBase2):: operator / (FLOATTYPE scalar) const { @@ -429,7 +442,7 @@ operator / (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::operator += // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: operator += (const FLOATNAME(LVecBase2) &other) { @@ -440,7 +453,7 @@ operator += (const FLOATNAME(LVecBase2) &other) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::operator -= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: operator -= (const FLOATNAME(LVecBase2) &other) { @@ -451,7 +464,7 @@ operator -= (const FLOATNAME(LVecBase2) &other) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::operator *= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: operator *= (FLOATTYPE scalar) { @@ -462,7 +475,7 @@ operator *= (FLOATTYPE scalar) { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::operator /= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: operator /= (FLOATTYPE scalar) { @@ -497,11 +510,11 @@ almost_equal(const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase2::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase2):: output(ostream &out) const { - out << MAYBE_ZERO(_v.v._0) << " " + out << MAYBE_ZERO(_v.v._0) << " " << MAYBE_ZERO(_v.v._1); } diff --git a/panda/src/linmath/lvecBase2_src.cxx b/panda/src/linmath/lvecBase2_src.cxx index 5a83110ed3..326b74f99e 100644 --- a/panda/src/linmath/lvecBase2_src.cxx +++ b/panda/src/linmath/lvecBase2_src.cxx @@ -1,6 +1,19 @@ -// Filename: lvecBase2_src.h +// Filename: lvecBase2_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LVecBase2)::_type_handle; @@ -15,14 +28,14 @@ const FLOATNAME(LVecBase2) FLOATNAME(LVecBase2)::_unit_y = //////////////////////////////////////////////////////////////////// // Function: LVecBase2::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LVecBase2):: init_type() { if (_type_handle == TypeHandle::none()) { // Format a string to describe the type. string name = "LVecBase2"; - name += FLOATTOKEN; + name += FLOATTOKEN; register_type(_type_handle, name); } } diff --git a/panda/src/linmath/lvecBase2_src.h b/panda/src/linmath/lvecBase2_src.h index c35a122f11..7433d6acd4 100644 --- a/panda/src/linmath/lvecBase2_src.h +++ b/panda/src/linmath/lvecBase2_src.h @@ -1,6 +1,19 @@ // Filename: lvecBase2_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //typedef struct {FLOATTYPE _0, _1} FLOATNAME(data); @@ -82,7 +95,7 @@ PUBLISHED: INLINE_LINMATH void operator *= (FLOATTYPE scalar); INLINE_LINMATH void operator /= (FLOATTYPE scalar); - INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase2) &other, + INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase2) &other, FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase2) &other) const; @@ -113,7 +126,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lvecBase3.cxx b/panda/src/linmath/lvecBase3.cxx index 40f6db34fb..8e10381344 100644 --- a/panda/src/linmath/lvecBase3.cxx +++ b/panda/src/linmath/lvecBase3.cxx @@ -1,6 +1,19 @@ // Filename: lvecBase3.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lvecBase3.h" diff --git a/panda/src/linmath/lvecBase3.h b/panda/src/linmath/lvecBase3.h index 50545df7d4..4c2a1ab10a 100644 --- a/panda/src/linmath/lvecBase3.h +++ b/panda/src/linmath/lvecBase3.h @@ -1,6 +1,19 @@ // Filename: lvecBase3.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVECBASE3_H diff --git a/panda/src/linmath/lvecBase3_src.I b/panda/src/linmath/lvecBase3_src.I index 487a02077d..4e876d20a5 100644 --- a/panda/src/linmath/lvecBase3_src.I +++ b/panda/src/linmath/lvecBase3_src.I @@ -1,12 +1,25 @@ // Filename: lvecBase3_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3):: FLOATNAME(LVecBase3)() { @@ -15,7 +28,7 @@ FLOATNAME(LVecBase3)() { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3):: FLOATNAME(LVecBase3)(const FLOATNAME(LVecBase3) ©) { @@ -28,7 +41,7 @@ FLOATNAME(LVecBase3)(const FLOATNAME(LVecBase3) ©) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) &FLOATNAME(LVecBase3):: operator = (const FLOATNAME(LVecBase3) ©) { @@ -42,7 +55,7 @@ operator = (const FLOATNAME(LVecBase3) ©) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Fill Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) &FLOATNAME(LVecBase3):: operator = (FLOATTYPE fill_value) { @@ -53,7 +66,7 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3):: FLOATNAME(LVecBase3)(FLOATTYPE fill_value) { @@ -63,7 +76,7 @@ FLOATNAME(LVecBase3)(FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3):: FLOATNAME(LVecBase3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) { @@ -116,7 +129,7 @@ unit_z() { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3):: ~FLOATNAME(LVecBase3)() { @@ -125,7 +138,7 @@ INLINE_LINMATH FLOATNAME(LVecBase3):: //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Indexing Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase3):: operator [](int i) const { @@ -136,7 +149,7 @@ operator [](int i) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::Indexing Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE &FLOATNAME(LVecBase3):: operator [](int i) { @@ -158,7 +171,7 @@ is_nan() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::get_cell // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase3):: get_cell(int i) const { @@ -169,7 +182,7 @@ get_cell(int i) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::get_x // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase3):: get_x() const { @@ -179,7 +192,7 @@ get_x() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::get_y // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase3):: get_y() const { @@ -189,7 +202,7 @@ get_y() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::get_z // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase3):: get_z() const { @@ -199,7 +212,7 @@ get_z() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::set_cell // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: set_cell(int i, FLOATTYPE value) { @@ -210,7 +223,7 @@ set_cell(int i, FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::set_x // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: set_x(FLOATTYPE value) { @@ -220,7 +233,7 @@ set_x(FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::set_y // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: set_y(FLOATTYPE value) { @@ -230,7 +243,7 @@ set_y(FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::set_z // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: set_z(FLOATTYPE value) { @@ -320,7 +333,7 @@ fill(FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::set // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: set(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) { @@ -332,7 +345,7 @@ set(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::dot // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase3):: dot(const FLOATNAME(LVecBase3) &other) const { @@ -342,7 +355,7 @@ dot(const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::cross // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3):: cross(const FLOATNAME(LVecBase3) &other) const { @@ -368,7 +381,7 @@ operator < (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LVecBase3):: operator == (const FLOATNAME(LVecBase3) &other) const { @@ -380,7 +393,7 @@ operator == (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LVecBase3):: operator != (const FLOATNAME(LVecBase3) &other) const { @@ -424,7 +437,7 @@ compare_to(const FLOATNAME(LVecBase3) &other, FLOATTYPE threshold) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3):: operator - () const { @@ -434,7 +447,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::vector + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3):: operator + (const FLOATNAME(LVecBase3) &other) const { @@ -446,7 +459,7 @@ operator + (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::vector - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3):: operator - (const FLOATNAME(LVecBase3) &other) const { @@ -458,7 +471,7 @@ operator - (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::vector * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3):: operator * (FLOATTYPE scalar) const { @@ -470,7 +483,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::vector / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3):: operator / (FLOATTYPE scalar) const { @@ -483,7 +496,7 @@ operator / (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::operator += // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: operator += (const FLOATNAME(LVecBase3) &other) { @@ -495,7 +508,7 @@ operator += (const FLOATNAME(LVecBase3) &other) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::operator -= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: operator -= (const FLOATNAME(LVecBase3) &other) { @@ -507,7 +520,7 @@ operator -= (const FLOATNAME(LVecBase3) &other) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::operator *= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: operator *= (FLOATTYPE scalar) { @@ -519,7 +532,7 @@ operator *= (FLOATTYPE scalar) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::operator /= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: operator /= (FLOATTYPE scalar) { @@ -532,7 +545,7 @@ operator /= (FLOATTYPE scalar) { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::cross product (with assigment) // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: cross_into(const FLOATNAME(LVecBase3) &other) { @@ -566,12 +579,12 @@ almost_equal(const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase3::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase3):: output(ostream &out) const { - out << MAYBE_ZERO(_v.v._0) << " " - << MAYBE_ZERO(_v.v._1) << " " + out << MAYBE_ZERO(_v.v._0) << " " + << MAYBE_ZERO(_v.v._1) << " " << MAYBE_ZERO(_v.v._2); } diff --git a/panda/src/linmath/lvecBase3_src.cxx b/panda/src/linmath/lvecBase3_src.cxx index 900e96b250..48081f2cfd 100644 --- a/panda/src/linmath/lvecBase3_src.cxx +++ b/panda/src/linmath/lvecBase3_src.cxx @@ -1,6 +1,19 @@ -// Filename: lvecBase3_src.h +// Filename: lvecBase3_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LVecBase3)::_type_handle; @@ -17,14 +30,14 @@ const FLOATNAME(LVecBase3) FLOATNAME(LVecBase3)::_unit_z = //////////////////////////////////////////////////////////////////// // Function: LVecBase3::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LVecBase3):: init_type() { if (_type_handle == TypeHandle::none()) { // Format a string to describe the type. string name = "LVecBase3"; - name += FLOATTOKEN; + name += FLOATTOKEN; register_type(_type_handle, name); } } diff --git a/panda/src/linmath/lvecBase3_src.h b/panda/src/linmath/lvecBase3_src.h index 466b5adfb5..1728c7a14b 100644 --- a/panda/src/linmath/lvecBase3_src.h +++ b/panda/src/linmath/lvecBase3_src.h @@ -1,6 +1,19 @@ // Filename: lvecBase3_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -84,7 +97,7 @@ PUBLISHED: INLINE_LINMATH void cross_into(const FLOATNAME(LVecBase3) &other); - INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase3) &other, + INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase3) &other, FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase3) &other) const; @@ -116,7 +129,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lvecBase4.cxx b/panda/src/linmath/lvecBase4.cxx index 294b1d09a1..18f98520f1 100644 --- a/panda/src/linmath/lvecBase4.cxx +++ b/panda/src/linmath/lvecBase4.cxx @@ -1,6 +1,19 @@ // Filename: lvecBase4.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lvecBase4.h" diff --git a/panda/src/linmath/lvecBase4.h b/panda/src/linmath/lvecBase4.h index 81dc7fd171..7734226b60 100644 --- a/panda/src/linmath/lvecBase4.h +++ b/panda/src/linmath/lvecBase4.h @@ -1,6 +1,19 @@ // Filename: lvecBase4.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVECBASE4_H diff --git a/panda/src/linmath/lvecBase4_src.I b/panda/src/linmath/lvecBase4_src.I index a4d6798cfa..79b2e2e5a4 100644 --- a/panda/src/linmath/lvecBase4_src.I +++ b/panda/src/linmath/lvecBase4_src.I @@ -1,13 +1,26 @@ // Filename: lvecBase4_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4):: FLOATNAME(LVecBase4)() { @@ -16,7 +29,7 @@ FLOATNAME(LVecBase4)() { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4):: FLOATNAME(LVecBase4)(const FLOATNAME(LVecBase4) ©) { @@ -30,7 +43,7 @@ FLOATNAME(LVecBase4)(const FLOATNAME(LVecBase4) ©) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) &FLOATNAME(LVecBase4):: operator = (const FLOATNAME(LVecBase4) ©) { @@ -45,7 +58,7 @@ operator = (const FLOATNAME(LVecBase4) ©) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Fill Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) &FLOATNAME(LVecBase4):: operator = (FLOATTYPE fill_value) { @@ -56,7 +69,7 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4):: FLOATNAME(LVecBase4)(FLOATTYPE fill_value) { @@ -66,7 +79,7 @@ FLOATNAME(LVecBase4)(FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4):: FLOATNAME(LVecBase4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) { @@ -80,7 +93,7 @@ FLOATNAME(LVecBase4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4):: ~FLOATNAME(LVecBase4)() { @@ -139,7 +152,7 @@ unit_w() { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Indexing Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase4):: operator [](int i) const { @@ -150,7 +163,7 @@ operator [](int i) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::Indexing Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE &FLOATNAME(LVecBase4):: operator [](int i) { @@ -172,7 +185,7 @@ is_nan() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::get_cell // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase4):: get_cell(int i) const { @@ -183,7 +196,7 @@ get_cell(int i) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::get_x // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase4):: get_x() const { @@ -193,7 +206,7 @@ get_x() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::get_y // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase4):: get_y() const { @@ -203,7 +216,7 @@ get_y() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::get_z // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase4):: get_z() const { @@ -213,7 +226,7 @@ get_z() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::get_w // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase4):: get_w() const { @@ -223,7 +236,7 @@ get_w() const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::set_cell // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: set_cell(int i, FLOATTYPE value) { @@ -234,7 +247,7 @@ set_cell(int i, FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::set_x // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: set_x(FLOATTYPE value) { @@ -244,7 +257,7 @@ set_x(FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::set_y // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: set_y(FLOATTYPE value) { @@ -254,7 +267,7 @@ set_y(FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::set_z // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: set_z(FLOATTYPE value) { @@ -264,7 +277,7 @@ set_z(FLOATTYPE value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::set_w // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: set_w(FLOATTYPE value) { @@ -355,7 +368,7 @@ fill(FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::set // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: set(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) { @@ -368,12 +381,12 @@ set(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::dot // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATTYPE FLOATNAME(LVecBase4):: dot(const FLOATNAME(LVecBase4) &other) const { - return - _v.v._0 * other._v.v._0 + _v.v._1 * other._v.v._1 + + return + _v.v._0 * other._v.v._0 + _v.v._1 * other._v.v._1 + _v.v._2 * other._v.v._2 + _v.v._3 * other._v.v._3; } @@ -394,7 +407,7 @@ operator < (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LVecBase4):: operator == (const FLOATNAME(LVecBase4) &other) const { @@ -407,7 +420,7 @@ operator == (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH bool FLOATNAME(LVecBase4):: operator != (const FLOATNAME(LVecBase4) &other) const { @@ -454,7 +467,7 @@ compare_to(const FLOATNAME(LVecBase4) &other, FLOATTYPE threshold) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVecBase4):: operator - () const { @@ -464,7 +477,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::vector + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVecBase4):: operator + (const FLOATNAME(LVecBase4) &other) const { @@ -477,7 +490,7 @@ operator + (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::vector - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVecBase4):: operator - (const FLOATNAME(LVecBase4) &other) const { @@ -490,7 +503,7 @@ operator - (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::vector * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVecBase4):: operator * (FLOATTYPE scalar) const { @@ -503,7 +516,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::vector / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVecBase4):: operator / (FLOATTYPE scalar) const { @@ -517,7 +530,7 @@ operator / (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::operator += // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: operator += (const FLOATNAME(LVecBase4) &other) { @@ -530,7 +543,7 @@ operator += (const FLOATNAME(LVecBase4) &other) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::operator -= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: operator -= (const FLOATNAME(LVecBase4) &other) { @@ -543,7 +556,7 @@ operator -= (const FLOATNAME(LVecBase4) &other) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::operator *= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: operator *= (FLOATTYPE scalar) { @@ -556,7 +569,7 @@ operator *= (FLOATTYPE scalar) { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::operator /= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: operator /= (FLOATTYPE scalar) { @@ -595,13 +608,13 @@ almost_equal(const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVecBase4::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH void FLOATNAME(LVecBase4):: output(ostream &out) const { - out << MAYBE_ZERO(_v.v._0) << " " - << MAYBE_ZERO(_v.v._1) << " " - << MAYBE_ZERO(_v.v._2) << " " + out << MAYBE_ZERO(_v.v._0) << " " + << MAYBE_ZERO(_v.v._1) << " " + << MAYBE_ZERO(_v.v._2) << " " << MAYBE_ZERO(_v.v._3); } diff --git a/panda/src/linmath/lvecBase4_src.cxx b/panda/src/linmath/lvecBase4_src.cxx index 7a126fa4f0..974b484fd4 100644 --- a/panda/src/linmath/lvecBase4_src.cxx +++ b/panda/src/linmath/lvecBase4_src.cxx @@ -1,6 +1,19 @@ -// Filename: lvecBase4_src.h +// Filename: lvecBase4_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LVecBase4)::_type_handle; @@ -19,7 +32,7 @@ const FLOATNAME(LVecBase4) FLOATNAME(LVecBase4)::_unit_w = //////////////////////////////////////////////////////////////////// // Function: LVecBase4::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LVecBase4):: @@ -27,7 +40,7 @@ init_type() { if (_type_handle == TypeHandle::none()) { // Format a string to describe the type. string name = "LVecBase4"; - name += FLOATTOKEN; + name += FLOATTOKEN; register_type(_type_handle, name); } } diff --git a/panda/src/linmath/lvecBase4_src.h b/panda/src/linmath/lvecBase4_src.h index 6174c89088..8d16eca8f3 100644 --- a/panda/src/linmath/lvecBase4_src.h +++ b/panda/src/linmath/lvecBase4_src.h @@ -1,6 +1,19 @@ // Filename: lvecBase4_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -67,7 +80,7 @@ PUBLISHED: INLINE_LINMATH int compare_to(const FLOATNAME(LVecBase4) &other) const; INLINE_LINMATH int compare_to(const FLOATNAME(LVecBase4) &other, FLOATTYPE threshold) const; - + INLINE_LINMATH FLOATNAME(LVecBase4) operator - () const; INLINE_LINMATH FLOATNAME(LVecBase4) @@ -84,7 +97,7 @@ PUBLISHED: INLINE_LINMATH void operator *= (FLOATTYPE scalar); INLINE_LINMATH void operator /= (FLOATTYPE scalar); - INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase4) &other, + INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase4) &other, FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase4) &other) const; @@ -117,7 +130,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lvector2.cxx b/panda/src/linmath/lvector2.cxx index 641007ba6e..a9440e9517 100644 --- a/panda/src/linmath/lvector2.cxx +++ b/panda/src/linmath/lvector2.cxx @@ -1,6 +1,19 @@ // Filename: lvector2.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lvector2.h" diff --git a/panda/src/linmath/lvector2.h b/panda/src/linmath/lvector2.h index b17815b288..1bb3306caa 100644 --- a/panda/src/linmath/lvector2.h +++ b/panda/src/linmath/lvector2.h @@ -1,6 +1,19 @@ // Filename: lvector2.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVECTOR2_H diff --git a/panda/src/linmath/lvector2_src.I b/panda/src/linmath/lvector2_src.I index 7517d6893e..5d26788f6c 100644 --- a/panda/src/linmath/lvector2_src.I +++ b/panda/src/linmath/lvector2_src.I @@ -1,12 +1,25 @@ // Filename: lvector2_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LVector2::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2):: FLOATNAME(LVector2)() { @@ -15,7 +28,7 @@ FLOATNAME(LVector2)() { //////////////////////////////////////////////////////////////////// // Function: LVector2::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2):: FLOATNAME(LVector2)(const FLOATNAME(LVecBase2) ©) : FLOATNAME(LVecBase2)(copy) { @@ -24,7 +37,7 @@ FLOATNAME(LVector2)(const FLOATNAME(LVecBase2) ©) : FLOATNAME(LVecBase2)(cop //////////////////////////////////////////////////////////////////// // Function: LVector2::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) &FLOATNAME(LVector2):: operator = (const FLOATNAME(LVecBase2) ©) { @@ -35,7 +48,7 @@ operator = (const FLOATNAME(LVecBase2) ©) { //////////////////////////////////////////////////////////////////// // Function: LVector2::Copy Fill Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) &FLOATNAME(LVector2):: operator = (FLOATTYPE fill_value) { @@ -46,22 +59,22 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVector2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2):: FLOATNAME(LVector2)(FLOATTYPE fill_value) : - FLOATNAME(LVecBase2)(fill_value) + FLOATNAME(LVecBase2)(fill_value) { } //////////////////////////////////////////////////////////////////// // Function: LVector2::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2):: -FLOATNAME(LVector2)(FLOATTYPE x, FLOATTYPE y) : - FLOATNAME(LVecBase2)(x, y) +FLOATNAME(LVector2)(FLOATTYPE x, FLOATTYPE y) : + FLOATNAME(LVecBase2)(x, y) { } @@ -98,7 +111,7 @@ unit_y() { //////////////////////////////////////////////////////////////////// // Function: LVector2::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) FLOATNAME(LVector2):: operator - () const { @@ -108,7 +121,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LVector2::vector + vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVector2):: operator + (const FLOATNAME(LVecBase2) &other) const { @@ -118,7 +131,7 @@ operator + (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector2::vector + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) FLOATNAME(LVector2):: operator + (const FLOATNAME(LVector2) &other) const { @@ -128,7 +141,7 @@ operator + (const FLOATNAME(LVector2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector2::vector - vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVector2):: operator - (const FLOATNAME(LVecBase2) &other) const { @@ -138,7 +151,7 @@ operator - (const FLOATNAME(LVecBase2) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector2::vector - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) FLOATNAME(LVector2):: operator - (const FLOATNAME(LVector2) &other) const { @@ -191,7 +204,7 @@ normalize() { //////////////////////////////////////////////////////////////////// // Function: LVector2::operator * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) FLOATNAME(LVector2):: operator * (FLOATTYPE scalar) const { @@ -201,7 +214,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVector2::operator / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector2) FLOATNAME(LVector2):: operator / (FLOATTYPE scalar) const { diff --git a/panda/src/linmath/lvector2_src.cxx b/panda/src/linmath/lvector2_src.cxx index 5211af215a..4828e421f5 100644 --- a/panda/src/linmath/lvector2_src.cxx +++ b/panda/src/linmath/lvector2_src.cxx @@ -1,6 +1,19 @@ -// Filename: lvector2_src.h +// Filename: lvector2_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LVector2)::_type_handle; @@ -8,7 +21,7 @@ TypeHandle FLOATNAME(LVector2)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LVector2::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LVector2):: @@ -16,8 +29,8 @@ init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LVecBase2)::init_type(); string name = "LVector2"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LVecBase2)::get_class_type()); } } diff --git a/panda/src/linmath/lvector2_src.h b/panda/src/linmath/lvector2_src.h index a7acefe841..bd77c6c765 100644 --- a/panda/src/linmath/lvector2_src.h +++ b/panda/src/linmath/lvector2_src.h @@ -1,6 +1,19 @@ // Filename: lvector2_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -39,7 +52,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lvector3.cxx b/panda/src/linmath/lvector3.cxx index 9ab4779876..cf0570faef 100644 --- a/panda/src/linmath/lvector3.cxx +++ b/panda/src/linmath/lvector3.cxx @@ -1,6 +1,19 @@ // Filename: lvector3.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lvector3.h" diff --git a/panda/src/linmath/lvector3.h b/panda/src/linmath/lvector3.h index c6fe9035ae..97e8069677 100644 --- a/panda/src/linmath/lvector3.h +++ b/panda/src/linmath/lvector3.h @@ -2,6 +2,19 @@ // Created by: drose (24Sep99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LVECTOR3_H #define LVECTOR3_H diff --git a/panda/src/linmath/lvector3_src.I b/panda/src/linmath/lvector3_src.I index 507a26aeb6..0915aa4655 100644 --- a/panda/src/linmath/lvector3_src.I +++ b/panda/src/linmath/lvector3_src.I @@ -1,13 +1,26 @@ // Filename: lvector3_src.I // Created by: drose (24Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LVector3::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3):: FLOATNAME(LVector3)() { @@ -16,7 +29,7 @@ FLOATNAME(LVector3)() { //////////////////////////////////////////////////////////////////// // Function: LVector3::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3):: FLOATNAME(LVector3)(const FLOATNAME(LVecBase3) ©) : FLOATNAME(LVecBase3)(copy) { @@ -25,7 +38,7 @@ FLOATNAME(LVector3)(const FLOATNAME(LVecBase3) ©) : FLOATNAME(LVecBase3)(cop //////////////////////////////////////////////////////////////////// // Function: LVector3::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) &FLOATNAME(LVector3):: operator = (const FLOATNAME(LVecBase3) ©) { @@ -36,7 +49,7 @@ operator = (const FLOATNAME(LVecBase3) ©) { //////////////////////////////////////////////////////////////////// // Function: LVector3::Copy Fill Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) &FLOATNAME(LVector3):: operator = (FLOATTYPE fill_value) { @@ -47,22 +60,22 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVector3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3):: FLOATNAME(LVector3)(FLOATTYPE fill_value) : - FLOATNAME(LVecBase3)(fill_value) + FLOATNAME(LVecBase3)(fill_value) { } //////////////////////////////////////////////////////////////////// // Function: LVector3::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3):: -FLOATNAME(LVector3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) : - FLOATNAME(LVecBase3)(x, y, z) +FLOATNAME(LVector3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) : + FLOATNAME(LVecBase3)(x, y, z) { } @@ -109,7 +122,7 @@ unit_z() { //////////////////////////////////////////////////////////////////// // Function: LVector3::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LVector3):: operator - () const { @@ -119,7 +132,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LVector3::vector + vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVector3):: operator + (const FLOATNAME(LVecBase3) &other) const { @@ -129,7 +142,7 @@ operator + (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector3::vector + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LVector3):: operator + (const FLOATNAME(LVector3) &other) const { @@ -139,7 +152,7 @@ operator + (const FLOATNAME(LVector3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector3::vector - vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVector3):: operator - (const FLOATNAME(LVecBase3) &other) const { @@ -149,7 +162,7 @@ operator - (const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector3::vector - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LVector3):: operator - (const FLOATNAME(LVector3) &other) const { @@ -202,7 +215,7 @@ normalize() { //////////////////////////////////////////////////////////////////// // Function: LVector3::cross // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LVector3):: cross(const FLOATNAME(LVecBase3) &other) const { @@ -212,7 +225,7 @@ cross(const FLOATNAME(LVecBase3) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector3::operator * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LVector3):: operator * (FLOATTYPE scalar) const { @@ -222,7 +235,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVector3::operator / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LVector3):: operator / (FLOATTYPE scalar) const { @@ -346,7 +359,7 @@ rfu(FLOATTYPE right_v, FLOATTYPE fwd_v, FLOATTYPE up_v, CoordinateSystem cs) { /* return forward(cs) * fwd_v + up(cs) * up_v + right(cs) * right_v; */ - + // fast implementation of above for axis-aligned coordinate systems @@ -359,17 +372,17 @@ rfu(FLOATTYPE right_v, FLOATTYPE fwd_v, FLOATTYPE up_v, vz = -fwd_v; vy = up_v; break; - + case CS_yup_left: vz = fwd_v; vy = up_v; break; - + case CS_zup_right: vy = fwd_v; vz = up_v; break; - + case CS_zup_left: vy = -fwd_v; vz = up_v; diff --git a/panda/src/linmath/lvector3_src.cxx b/panda/src/linmath/lvector3_src.cxx index 6a4159a9ad..b931b54527 100644 --- a/panda/src/linmath/lvector3_src.cxx +++ b/panda/src/linmath/lvector3_src.cxx @@ -1,6 +1,19 @@ -// Filename: lvector3_src.h +// Filename: lvector3_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LVector3)::_type_handle; @@ -8,7 +21,7 @@ TypeHandle FLOATNAME(LVector3)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LVector3::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LVector3):: @@ -16,8 +29,8 @@ init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LVecBase3)::init_type(); string name = "LVector3"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LVecBase3)::get_class_type()); } } diff --git a/panda/src/linmath/lvector3_src.h b/panda/src/linmath/lvector3_src.h index b0630703c8..32893318f8 100644 --- a/panda/src/linmath/lvector3_src.h +++ b/panda/src/linmath/lvector3_src.h @@ -1,6 +1,19 @@ // Filename: lvector3_src.h // Created by: drose (24Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -61,7 +74,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/lvector4.cxx b/panda/src/linmath/lvector4.cxx index c832fa4d69..bc404d436c 100644 --- a/panda/src/linmath/lvector4.cxx +++ b/panda/src/linmath/lvector4.cxx @@ -1,6 +1,19 @@ // Filename: lvector4.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lvector4.h" diff --git a/panda/src/linmath/lvector4.h b/panda/src/linmath/lvector4.h index b392e24393..fddd83e78d 100644 --- a/panda/src/linmath/lvector4.h +++ b/panda/src/linmath/lvector4.h @@ -1,6 +1,19 @@ // Filename: lvector4.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LVECTOR4_H diff --git a/panda/src/linmath/lvector4_src.I b/panda/src/linmath/lvector4_src.I index e709e85b21..628f7735d5 100644 --- a/panda/src/linmath/lvector4_src.I +++ b/panda/src/linmath/lvector4_src.I @@ -1,13 +1,26 @@ // Filename: lvector4_src.I // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LVector4::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4):: FLOATNAME(LVector4)() { @@ -16,7 +29,7 @@ FLOATNAME(LVector4)() { //////////////////////////////////////////////////////////////////// // Function: LVector4::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4):: FLOATNAME(LVector4)(const FLOATNAME(LVecBase4) ©) : FLOATNAME(LVecBase4)(copy) { @@ -25,7 +38,7 @@ FLOATNAME(LVector4)(const FLOATNAME(LVecBase4) ©) : FLOATNAME(LVecBase4)(cop //////////////////////////////////////////////////////////////////// // Function: LVector4::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) &FLOATNAME(LVector4):: operator = (const FLOATNAME(LVecBase4) ©) { @@ -36,7 +49,7 @@ operator = (const FLOATNAME(LVecBase4) ©) { //////////////////////////////////////////////////////////////////// // Function: LVector4::Copy Fill Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) &FLOATNAME(LVector4):: operator = (FLOATTYPE fill_value) { @@ -47,22 +60,22 @@ operator = (FLOATTYPE fill_value) { //////////////////////////////////////////////////////////////////// // Function: LVector4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4):: FLOATNAME(LVector4)(FLOATTYPE fill_value) : - FLOATNAME(LVecBase4)(fill_value) + FLOATNAME(LVecBase4)(fill_value) { } //////////////////////////////////////////////////////////////////// // Function: LVector4::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4):: -FLOATNAME(LVector4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) : - FLOATNAME(LVecBase4)(x, y, z, w) +FLOATNAME(LVector4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w) : + FLOATNAME(LVecBase4)(x, y, z, w) { } @@ -119,7 +132,7 @@ unit_w() { //////////////////////////////////////////////////////////////////// // Function: LVector4::unary - // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) FLOATNAME(LVector4):: operator - () const { @@ -129,7 +142,7 @@ operator - () const { //////////////////////////////////////////////////////////////////// // Function: LVector4::vector + vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVector4):: operator + (const FLOATNAME(LVecBase4) &other) const { @@ -139,7 +152,7 @@ operator + (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector4::vector + vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) FLOATNAME(LVector4):: operator + (const FLOATNAME(LVector4) &other) const { @@ -149,7 +162,7 @@ operator + (const FLOATNAME(LVector4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector4::vector - vecbase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVector4):: operator - (const FLOATNAME(LVecBase4) &other) const { @@ -159,7 +172,7 @@ operator - (const FLOATNAME(LVecBase4) &other) const { //////////////////////////////////////////////////////////////////// // Function: LVector4::vector - vector // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) FLOATNAME(LVector4):: operator - (const FLOATNAME(LVector4) &other) const { @@ -212,7 +225,7 @@ normalize() { //////////////////////////////////////////////////////////////////// // Function: LVector4::operator * scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) FLOATNAME(LVector4):: operator * (FLOATTYPE scalar) const { @@ -222,7 +235,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// // Function: LVector4::operator / scalar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LVector4) FLOATNAME(LVector4):: operator / (FLOATTYPE scalar) const { diff --git a/panda/src/linmath/lvector4_src.cxx b/panda/src/linmath/lvector4_src.cxx index 4aec4f5aed..762532ae89 100644 --- a/panda/src/linmath/lvector4_src.cxx +++ b/panda/src/linmath/lvector4_src.cxx @@ -1,6 +1,19 @@ -// Filename: lvector4_src.h +// Filename: lvector4_src.cxx // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// TypeHandle FLOATNAME(LVector4)::_type_handle; @@ -8,7 +21,7 @@ TypeHandle FLOATNAME(LVector4)::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LVector2::init_type // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FLOATNAME(LVector4):: @@ -16,8 +29,8 @@ init_type() { if (_type_handle == TypeHandle::none()) { FLOATNAME(LVecBase4)::init_type(); string name = "LVector4"; - name += FLOATTOKEN; - register_type(_type_handle, name, + name += FLOATTOKEN; + register_type(_type_handle, name, FLOATNAME(LVecBase4)::get_class_type()); } } diff --git a/panda/src/linmath/lvector4_src.h b/panda/src/linmath/lvector4_src.h index 8d175b3b45..9c255e55ce 100644 --- a/panda/src/linmath/lvector4_src.h +++ b/panda/src/linmath/lvector4_src.h @@ -1,6 +1,19 @@ // Filename: lvector4_src.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -41,7 +54,7 @@ public: return _type_handle; } static void init_type(); - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/linmath/mathNumbers.cxx b/panda/src/linmath/mathNumbers.cxx index de725cfe5c..a3190973f5 100644 --- a/panda/src/linmath/mathNumbers.cxx +++ b/panda/src/linmath/mathNumbers.cxx @@ -1,9 +1,22 @@ // Filename: mathNumbers.cxx // Created by: mike (24Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// -#include "mathNumbers.h" +#include "mathNumbers.h" #include const double MathNumbers::pi = 4.0 * atan(1.0); diff --git a/panda/src/linmath/mathNumbers.h b/panda/src/linmath/mathNumbers.h index 5d42efc476..580640f07a 100644 --- a/panda/src/linmath/mathNumbers.h +++ b/panda/src/linmath/mathNumbers.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MATHNUMBERS_H #define MATHNUMBERS_H diff --git a/panda/src/linmath/nearly_zero.h b/panda/src/linmath/nearly_zero.h index a4d3b3aef1..8f4d4b7e64 100644 --- a/panda/src/linmath/nearly_zero.h +++ b/panda/src/linmath/nearly_zero.h @@ -1,6 +1,19 @@ // Filename: nearly_zero.h // Created by: drose (08Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NEARLY_ZERO_H diff --git a/panda/src/linmath/pta_Colorf.cxx b/panda/src/linmath/pta_Colorf.cxx index fe648db736..a571c555fe 100644 --- a/panda/src/linmath/pta_Colorf.cxx +++ b/panda/src/linmath/pta_Colorf.cxx @@ -1,6 +1,19 @@ // Filename: pta_Colorf.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_Colorf.h" diff --git a/panda/src/linmath/pta_Colorf.h b/panda/src/linmath/pta_Colorf.h index e7f4f0a28b..3442392d6b 100644 --- a/panda/src/linmath/pta_Colorf.h +++ b/panda/src/linmath/pta_Colorf.h @@ -1,6 +1,19 @@ // Filename: pta_Colorf.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_COLORF_H diff --git a/panda/src/linmath/pta_Normalf.cxx b/panda/src/linmath/pta_Normalf.cxx index 596e3595a8..91a8e54bc0 100644 --- a/panda/src/linmath/pta_Normalf.cxx +++ b/panda/src/linmath/pta_Normalf.cxx @@ -1,6 +1,19 @@ // Filename: pta_Normalf.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_Normalf.h" diff --git a/panda/src/linmath/pta_Normalf.h b/panda/src/linmath/pta_Normalf.h index 12df8d4eae..8e45c5088c 100644 --- a/panda/src/linmath/pta_Normalf.h +++ b/panda/src/linmath/pta_Normalf.h @@ -1,6 +1,19 @@ // Filename: pta_Normalf.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_NORMALF_H diff --git a/panda/src/linmath/pta_TexCoordf.cxx b/panda/src/linmath/pta_TexCoordf.cxx index 149e36b800..e0c2f34cc6 100644 --- a/panda/src/linmath/pta_TexCoordf.cxx +++ b/panda/src/linmath/pta_TexCoordf.cxx @@ -1,6 +1,19 @@ // Filename: pta_TexCoordf.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_TexCoordf.h" diff --git a/panda/src/linmath/pta_TexCoordf.h b/panda/src/linmath/pta_TexCoordf.h index ae321bac5b..3e408fd319 100644 --- a/panda/src/linmath/pta_TexCoordf.h +++ b/panda/src/linmath/pta_TexCoordf.h @@ -1,6 +1,19 @@ // Filename: pta_TexCoordf.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_TEXCOORDF_H diff --git a/panda/src/linmath/pta_Vertexf.cxx b/panda/src/linmath/pta_Vertexf.cxx index 1c145bc5b0..61fb0f2abd 100644 --- a/panda/src/linmath/pta_Vertexf.cxx +++ b/panda/src/linmath/pta_Vertexf.cxx @@ -1,6 +1,19 @@ // Filename: pta_Vertexf.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_Vertexf.h" diff --git a/panda/src/linmath/pta_Vertexf.h b/panda/src/linmath/pta_Vertexf.h index 7f3eed9c9b..128882f6c0 100644 --- a/panda/src/linmath/pta_Vertexf.h +++ b/panda/src/linmath/pta_Vertexf.h @@ -1,6 +1,19 @@ // Filename: pta_Vertexf.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_VERTEXF_H diff --git a/panda/src/linmath/test_math.cxx b/panda/src/linmath/test_math.cxx index 402c7b9761..b67b29f985 100644 --- a/panda/src/linmath/test_math.cxx +++ b/panda/src/linmath/test_math.cxx @@ -1,6 +1,19 @@ // Filename: test_math.cxx // Created by: drose (14Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "luse.h" @@ -77,7 +90,7 @@ int main(int argc, char *argv[]) { nout << "p is " << p << "\n" << "p * x is " << p * x << "\n" << "p * y is " << p * y << "\n" - << "p * invert(y) is " << p * invert(y) << "\n" + << "p * invert(y) is " << p * invert(y) << "\n" << "p * a is " << p * a << "\n"; LVecBase4d q(0.0f, 1.0f, 1.0f, 1.0f); @@ -93,9 +106,9 @@ int main(int argc, char *argv[]) { p2 = p2 - v1; - nout << "v1 = " << v1 + nout << "v1 = " << v1 << "\nv2 = " << v2 - << "\np1 = " << p1 + << "\np1 = " << p1 << "\np2 = " << p2 << "\nc1 = " << c1 << "\n(c1 == c2) = " << (c1 == c2) @@ -144,4 +157,4 @@ int main(int argc, char *argv[]) { return(0); } - + diff --git a/panda/src/linmath/vector_Colorf.cxx b/panda/src/linmath/vector_Colorf.cxx index 64c8a3ac08..0647ce356d 100644 --- a/panda/src/linmath/vector_Colorf.cxx +++ b/panda/src/linmath/vector_Colorf.cxx @@ -1,12 +1,25 @@ // Filename: vector_Colorf.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_Colorf.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Colorf #define NAME vector_Colorf diff --git a/panda/src/linmath/vector_Colorf.h b/panda/src/linmath/vector_Colorf.h index dcec94593b..67d3e1f732 100644 --- a/panda/src/linmath/vector_Colorf.h +++ b/panda/src/linmath/vector_Colorf.h @@ -1,6 +1,19 @@ // Filename: vector_Colorf.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_COLORF_H @@ -21,8 +34,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Colorf #define NAME vector_Colorf diff --git a/panda/src/linmath/vector_LPoint2f.cxx b/panda/src/linmath/vector_LPoint2f.cxx index 9e7ab9c38c..b5d184ce7f 100644 --- a/panda/src/linmath/vector_LPoint2f.cxx +++ b/panda/src/linmath/vector_LPoint2f.cxx @@ -1,12 +1,25 @@ // Filename: vector_LPoint2f.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_LPoint2f.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE LPoint2f #define NAME vector_LPoint2f diff --git a/panda/src/linmath/vector_LPoint2f.h b/panda/src/linmath/vector_LPoint2f.h index 9f74e14833..5ad12fcca9 100644 --- a/panda/src/linmath/vector_LPoint2f.h +++ b/panda/src/linmath/vector_LPoint2f.h @@ -1,6 +1,19 @@ // Filename: vector_LPoint2f.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_LPOINT2F_H @@ -21,8 +34,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE LPoint2f #define NAME vector_LPoint2f diff --git a/panda/src/linmath/vector_LVecBase3f.cxx b/panda/src/linmath/vector_LVecBase3f.cxx index 64b3f1d148..16b3ddd768 100644 --- a/panda/src/linmath/vector_LVecBase3f.cxx +++ b/panda/src/linmath/vector_LVecBase3f.cxx @@ -1,12 +1,25 @@ // Filename: vector_LVecBase3f.cxx // Created by: drose (11Dec00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_LVecBase3f.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE LVecBase3f #define NAME vector_LVecBase3f diff --git a/panda/src/linmath/vector_LVecBase3f.h b/panda/src/linmath/vector_LVecBase3f.h index 0cb1082b8d..06bc430f7e 100644 --- a/panda/src/linmath/vector_LVecBase3f.h +++ b/panda/src/linmath/vector_LVecBase3f.h @@ -1,6 +1,19 @@ // Filename: vector_LVecBase3f.h // Created by: drose (11Dec00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_LVECBASE3F_H @@ -21,8 +34,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE LVecBase3f #define NAME vector_LVecBase3f diff --git a/panda/src/linmath/vector_Normalf.cxx b/panda/src/linmath/vector_Normalf.cxx index 0a48cb2613..60dc70902a 100644 --- a/panda/src/linmath/vector_Normalf.cxx +++ b/panda/src/linmath/vector_Normalf.cxx @@ -1,12 +1,25 @@ // Filename: vector_Normalf.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_Normalf.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Normalf #define NAME vector_Normalf diff --git a/panda/src/linmath/vector_Normalf.h b/panda/src/linmath/vector_Normalf.h index 38e1c29b8b..6250fd1678 100644 --- a/panda/src/linmath/vector_Normalf.h +++ b/panda/src/linmath/vector_Normalf.h @@ -1,6 +1,19 @@ // Filename: vector_Normalf.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_NORMALF_H @@ -21,8 +34,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Normalf #define NAME vector_Normalf diff --git a/panda/src/linmath/vector_TexCoordf.h b/panda/src/linmath/vector_TexCoordf.h index f3153b1d7e..a196351f98 100644 --- a/panda/src/linmath/vector_TexCoordf.h +++ b/panda/src/linmath/vector_TexCoordf.h @@ -1,6 +1,19 @@ // Filename: vector_TexCoordf.h // Created by: drose (11May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_TEXCOORDF_H diff --git a/panda/src/linmath/vector_Vertexf.cxx b/panda/src/linmath/vector_Vertexf.cxx index 90bcb904bc..455f1617f9 100644 --- a/panda/src/linmath/vector_Vertexf.cxx +++ b/panda/src/linmath/vector_Vertexf.cxx @@ -1,12 +1,25 @@ // Filename: vector_Vertexf.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_Vertexf.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Vertexf #define NAME vector_Vertexf diff --git a/panda/src/linmath/vector_Vertexf.h b/panda/src/linmath/vector_Vertexf.h index f2d909e613..bcbac3656e 100644 --- a/panda/src/linmath/vector_Vertexf.h +++ b/panda/src/linmath/vector_Vertexf.h @@ -1,6 +1,19 @@ // Filename: vector_Vertexf.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_VERTEXF_H @@ -21,8 +34,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Vertexf #define NAME vector_Vertexf diff --git a/panda/src/loader/bamFile.I b/panda/src/loader/bamFile.I index dbb8fca804..4441e8a96f 100644 --- a/panda/src/loader/bamFile.I +++ b/panda/src/loader/bamFile.I @@ -1,6 +1,19 @@ // Filename: bamFile.I // Created by: drose (02Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/loader/bamFile.cxx b/panda/src/loader/bamFile.cxx index e195b0fae0..708cc51c32 100644 --- a/panda/src/loader/bamFile.cxx +++ b/panda/src/loader/bamFile.cxx @@ -1,6 +1,19 @@ // Filename: bamFile.cxx // Created by: drose (02Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "bamFile.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: BamFile::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BamFile:: BamFile() { @@ -26,7 +39,7 @@ BamFile() { //////////////////////////////////////////////////////////////////// // Function: BamFile::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BamFile:: ~BamFile() { diff --git a/panda/src/loader/bamFile.h b/panda/src/loader/bamFile.h index 157809f231..5b2a8e2873 100644 --- a/panda/src/loader/bamFile.h +++ b/panda/src/loader/bamFile.h @@ -1,6 +1,19 @@ // Filename: bamFile.h // Created by: drose (02Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BAMFILE_H diff --git a/panda/src/loader/config_loader.cxx b/panda/src/loader/config_loader.cxx index 7af72ba8a4..31248178ed 100644 --- a/panda/src/loader/config_loader.cxx +++ b/panda/src/loader/config_loader.cxx @@ -1,6 +1,19 @@ // Filename: config_loader.cxx // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_loader.h" diff --git a/panda/src/loader/config_loader.h b/panda/src/loader/config_loader.h index 9e16a4aa40..fb6318eae1 100644 --- a/panda/src/loader/config_loader.h +++ b/panda/src/loader/config_loader.h @@ -1,6 +1,19 @@ // Filename: config_loader.h // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_LOADER_H diff --git a/panda/src/loader/loader.I b/panda/src/loader/loader.I index ed58162c69..25848a97b1 100644 --- a/panda/src/loader/loader.I +++ b/panda/src/loader/loader.I @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Loader::load_sync diff --git a/panda/src/loader/loader.cxx b/panda/src/loader/loader.cxx index 6e3e8cf441..5cb1b92b22 100644 --- a/panda/src/loader/loader.cxx +++ b/panda/src/loader/loader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loader.h" #include "loaderFileType.h" @@ -97,7 +106,7 @@ resolve_filename(Filename &filename) const { } LoaderFileTypeRegistry *reg = LoaderFileTypeRegistry::get_ptr(); - LoaderFileType *requested_type = + LoaderFileType *requested_type = reg->get_type_from_extension(extension); if (requested_type != (LoaderFileType *)NULL) { @@ -134,7 +143,7 @@ request_load(const Filename &filename, const string &event_name) { << "never called! Calling it now..." << endl; create_thread(); } - + // We need to grab the lock in order to signal the condition variable #ifdef HAVE_IPC _lock.lock(); @@ -298,7 +307,7 @@ load_file(const Filename &filename) const { } LoaderFileTypeRegistry *reg = LoaderFileTypeRegistry::get_ptr(); - LoaderFileType *requested_type = + LoaderFileType *requested_type = reg->get_type_from_extension(extension); if (requested_type == (LoaderFileType *)NULL) { @@ -319,7 +328,7 @@ load_file(const Filename &filename) const { if (loader_cat.is_debug()) { loader_cat.debug() - << "Loading " << requested_type->get_name() << " file: " + << "Loading " << requested_type->get_name() << " file: " << requested_filename << "\n"; } @@ -415,7 +424,7 @@ load_unknown_file_type(const Filename &filename) const { } if (loader_cat.is_debug()) { loader_cat.debug() - << "Couldn't read " << consider._type->get_name() + << "Couldn't read " << consider._type->get_name() << " file " << consider._path << "\n"; } } diff --git a/panda/src/loader/loader.h b/panda/src/loader/loader.h index 74ba8fb661..a47026ae15 100644 --- a/panda/src/loader/loader.h +++ b/panda/src/loader/loader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LOADER_H #define LOADER_H // diff --git a/panda/src/loader/loaderFileType.cxx b/panda/src/loader/loaderFileType.cxx index fc848cde77..6406ffa6e7 100644 --- a/panda/src/loader/loaderFileType.cxx +++ b/panda/src/loader/loaderFileType.cxx @@ -1,6 +1,19 @@ // Filename: loaderFileType.cxx // Created by: drose (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loaderFileType.h" @@ -10,7 +23,7 @@ TypeHandle LoaderFileType::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LoaderFileType::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// LoaderFileType:: LoaderFileType() { @@ -19,7 +32,7 @@ LoaderFileType() { //////////////////////////////////////////////////////////////////// // Function: LoaderFileType::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// LoaderFileType:: ~LoaderFileType() { diff --git a/panda/src/loader/loaderFileType.h b/panda/src/loader/loaderFileType.h index e90aabee71..2833684ed1 100644 --- a/panda/src/loader/loaderFileType.h +++ b/panda/src/loader/loaderFileType.h @@ -1,6 +1,19 @@ // Filename: loaderFileType.h // Created by: drose (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LOADERFILETYPE_H @@ -46,7 +59,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/loader/loaderFileTypeBam.cxx b/panda/src/loader/loaderFileTypeBam.cxx index 1a91369953..2c29746d6f 100644 --- a/panda/src/loader/loaderFileTypeBam.cxx +++ b/panda/src/loader/loaderFileTypeBam.cxx @@ -1,6 +1,19 @@ // Filename: loaderFileTypeBam.cxx // Created by: jason (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loaderFileTypeBam.h" @@ -15,20 +28,20 @@ TypeHandle LoaderFileTypeBam::_type_handle; //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeBam::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// LoaderFileTypeBam:: -LoaderFileTypeBam() +LoaderFileTypeBam() { } //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeBam::get_name // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string LoaderFileTypeBam:: -get_name() const +get_name() const { return "Bam"; } @@ -36,10 +49,10 @@ get_name() const //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeBam::get_extension // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// string LoaderFileTypeBam:: -get_extension() const +get_extension() const { return "bam"; } @@ -60,10 +73,10 @@ resolve_filename(Filename &path) const { //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeBam::load_file // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PT_Node LoaderFileTypeBam:: -load_file(const Filename &path, bool report_errors) const +load_file(const Filename &path, bool report_errors) const { BamFile bam_file; if (!bam_file.open_read(path, report_errors)) { @@ -77,17 +90,17 @@ load_file(const Filename &path, bool report_errors) const if (report_errors) { loader_cat.error() << "Bam file " << path << " is empty.\n"; } - + } else if (!object->is_of_type(Node::get_class_type())) { if (report_errors) { - loader_cat.error() - << "Bam file " << path + loader_cat.error() + << "Bam file " << path << " contains a " << object->get_type() << ", not a Node.\n"; } - + } else { result = DCAST(Node, object); - + if (report_errors) { bam_file.read_object(); if (!bam_file.is_eof()) { @@ -96,14 +109,14 @@ load_file(const Filename &path, bool report_errors) const } } } - + if (!bam_file.resolve()) { if (report_errors) { - loader_cat.error() + loader_cat.error() << "Unable to resolve Bam file.\n"; result = (Node *)NULL; } - } + } return result; } diff --git a/panda/src/loader/loaderFileTypeBam.h b/panda/src/loader/loaderFileTypeBam.h index 755f4cd448..4e5084f7c1 100644 --- a/panda/src/loader/loaderFileTypeBam.h +++ b/panda/src/loader/loaderFileTypeBam.h @@ -1,6 +1,19 @@ // Filename: loaderFileTypeBam.h // Created by: drose (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LOADERFILETYPEBAM_H @@ -37,7 +50,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/loader/loaderFileTypeRegistry.cxx b/panda/src/loader/loaderFileTypeRegistry.cxx index fb0d571122..4736fe915d 100644 --- a/panda/src/loader/loaderFileTypeRegistry.cxx +++ b/panda/src/loader/loaderFileTypeRegistry.cxx @@ -1,6 +1,19 @@ // Filename: loaderFileTypeRegistry.cxx // Created by: drose (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "loaderFileTypeRegistry.h" @@ -17,7 +30,7 @@ LoaderFileTypeRegistry *LoaderFileTypeRegistry::_global_ptr; //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeRegistry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// LoaderFileTypeRegistry:: LoaderFileTypeRegistry() { @@ -26,7 +39,7 @@ LoaderFileTypeRegistry() { //////////////////////////////////////////////////////////////////// // Function: LoaderFileTypeRegistry::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// LoaderFileTypeRegistry:: ~LoaderFileTypeRegistry() { @@ -102,7 +115,7 @@ write_types(ostream &out, int indent_level) const { LoaderFileType *type = (*ti); string name = type->get_name(); indent(out, indent_level) << name; - indent(out, max(30 - (int)name.length(), 0)) + indent(out, max(30 - (int)name.length(), 0)) << " ." << type->get_extension() << "\n"; } } @@ -118,7 +131,7 @@ register_type(LoaderFileType *type) { // Make sure we haven't already registered this type. if (find(_types.begin(), _types.end(), type) != _types.end()) { loader_cat.warning() - << "Attempt to register LoaderFileType " << type->get_name() + << "Attempt to register LoaderFileType " << type->get_name() << " (" << type->get_type() << ") more than once.\n"; return; } @@ -129,8 +142,8 @@ register_type(LoaderFileType *type) { Extensions::const_iterator ei; ei = _extensions.find(extension); if (ei != _extensions.end()) { - loader_cat.warning() - << "Multiple LoaderFileTypes registered that use the extension " + loader_cat.warning() + << "Multiple LoaderFileTypes registered that use the extension " << extension << "\n"; } else { _extensions.insert(Extensions::value_type(extension, type)); diff --git a/panda/src/loader/loaderFileTypeRegistry.h b/panda/src/loader/loaderFileTypeRegistry.h index 25c327c2f8..09b2ee07bc 100644 --- a/panda/src/loader/loaderFileTypeRegistry.h +++ b/panda/src/loader/loaderFileTypeRegistry.h @@ -1,6 +1,19 @@ // Filename: loaderFileTypeRegistry.h // Created by: drose (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LOADERFILETYPEREGISTRY_H diff --git a/panda/src/loader/modelPool.I b/panda/src/loader/modelPool.I index d72dc0043a..ec6ebd1ae9 100644 --- a/panda/src/loader/modelPool.I +++ b/panda/src/loader/modelPool.I @@ -1,6 +1,19 @@ // Filename: modelPool.I // Created by: drose (25Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/loader/modelPool.cxx b/panda/src/loader/modelPool.cxx index 1ba00343f3..8fc77fd9e1 100644 --- a/panda/src/loader/modelPool.cxx +++ b/panda/src/loader/modelPool.cxx @@ -1,6 +1,19 @@ // Filename: modelPool.cxx // Created by: drose (25Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "modelPool.h" diff --git a/panda/src/loader/modelPool.h b/panda/src/loader/modelPool.h index e295e43aab..5f0a8d50f4 100644 --- a/panda/src/loader/modelPool.h +++ b/panda/src/loader/modelPool.h @@ -1,6 +1,19 @@ // Filename: modelPool.h // Created by: drose (25Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MODELPOOL_H @@ -68,4 +81,4 @@ private: #endif - + diff --git a/panda/src/mathutil/boundingHexahedron.I b/panda/src/mathutil/boundingHexahedron.I index 7eb5d53f22..328c0d75d2 100644 --- a/panda/src/mathutil/boundingHexahedron.I +++ b/panda/src/mathutil/boundingHexahedron.I @@ -1,6 +1,19 @@ // Filename: boundingHexahedron.I // Created by: drose (03Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL BoundingHexahedron:: diff --git a/panda/src/mathutil/boundingHexahedron.cxx b/panda/src/mathutil/boundingHexahedron.cxx index 32cf0b1e57..c12d8a3caf 100644 --- a/panda/src/mathutil/boundingHexahedron.cxx +++ b/panda/src/mathutil/boundingHexahedron.cxx @@ -1,6 +1,19 @@ // Filename: boundingHexahedron.cxx // Created by: drose (03Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "boundingHexahedron.h" @@ -154,26 +167,26 @@ extend_by_point(const LPoint3f &) { bool BoundingHexahedron:: extend_by_sphere(const BoundingSphere *) { mathutil_cat.error() - << "BoundingHexahedron::extend_by_sphere() called\n"; + << "BoundingHexahedron::extend_by_sphere() called\n"; return false; } bool BoundingHexahedron:: extend_by_hexahedron(const BoundingHexahedron *) { mathutil_cat.error() - << "BoundingHexahedron::extend_by_hexahedron() called\n"; + << "BoundingHexahedron::extend_by_hexahedron() called\n"; return false; } bool BoundingHexahedron:: around_points(const LPoint3f *, const LPoint3f *) { mathutil_cat.error() - << "BoundingHexahedron::around_points() called\n"; + << "BoundingHexahedron::around_points() called\n"; return false; } bool BoundingHexahedron:: -around_spheres(const BoundingVolume **, +around_spheres(const BoundingVolume **, const BoundingVolume **) { mathutil_cat.error() << "BoundingHexahedron::around_spheres() called\n"; @@ -181,7 +194,7 @@ around_spheres(const BoundingVolume **, } bool BoundingHexahedron:: -around_hexahedrons(const BoundingVolume **, +around_hexahedrons(const BoundingVolume **, const BoundingVolume **) { mathutil_cat.error() << "BoundingHexahedron::around_hexahedrons() called\n"; @@ -227,7 +240,7 @@ contains_lineseg(const LPoint3f &a, const LPoint3f &b) const { return IF_no_intersection; } } - + // If there is no plane that both points are in front of, the // hexahedron may or may not contain the line segment. For the // moment, we won't bother to check that more thoroughly, though. @@ -259,7 +272,7 @@ contains_sphere(const BoundingSphere *sphere) const { // The sphere is not completely behind this plane, but some of // it is. result &= ~IF_all; - } + } } return result; @@ -269,13 +282,13 @@ int BoundingHexahedron:: contains_hexahedron(const BoundingHexahedron *hexahedron) const { nassertr(!is_empty(), 0); nassertr(!hexahedron->is_empty(), 0); - + // Check minmax. LPoint3f min1 = get_min(); LPoint3f min2 = hexahedron->get_min(); LPoint3f max1 = get_max(); LPoint3f max2 = hexahedron->get_max(); - + if (min1[0] > max2[0] || min1[1] > max2[1] || min1[2] > max2[2] || min2[0] > max1[0] || min2[1] > max1[1] || min2[2] > max1[2] || max1[0] < min2[0] || max1[1] < min2[1] || max1[2] < min2[2] || @@ -316,7 +329,7 @@ set_planes() { nassertv(_planes[0].dist_to_plane(_centroid) < 0); - } else { + } else { // No, a perfectly sane universe. _planes[1] = Planef(_points[0], _points[1], _points[5]); _planes[2] = Planef(_points[1], _points[2], _points[6]); diff --git a/panda/src/mathutil/boundingHexahedron.h b/panda/src/mathutil/boundingHexahedron.h index 4d4dd4b120..80050b3362 100644 --- a/panda/src/mathutil/boundingHexahedron.h +++ b/panda/src/mathutil/boundingHexahedron.h @@ -2,6 +2,19 @@ // Created by: drose (03Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BOUNDINGHEXAHEDRON_H #define BOUNDINGHEXAHEDRON_H diff --git a/panda/src/mathutil/boundingLine.I b/panda/src/mathutil/boundingLine.I index 0127a32dc1..d4b6e3be64 100644 --- a/panda/src/mathutil/boundingLine.I +++ b/panda/src/mathutil/boundingLine.I @@ -1,6 +1,19 @@ // Filename: boundingLine.I // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL BoundingLine:: @@ -9,7 +22,7 @@ BoundingLine() { INLINE_MATHUTIL BoundingLine:: BoundingLine(const LPoint3f &a, const LPoint3f &b) : - _origin(a), _vector(b - a) + _origin(a), _vector(b - a) { _vector.normalize(); _flags = 0; diff --git a/panda/src/mathutil/boundingLine.cxx b/panda/src/mathutil/boundingLine.cxx index 22191b6cc4..de1cc0c04a 100644 --- a/panda/src/mathutil/boundingLine.cxx +++ b/panda/src/mathutil/boundingLine.cxx @@ -1,6 +1,19 @@ // Filename: boundingLine.cxx // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "boundingLine.h" diff --git a/panda/src/mathutil/boundingLine.h b/panda/src/mathutil/boundingLine.h index 88ff442296..9f6f721c5f 100644 --- a/panda/src/mathutil/boundingLine.h +++ b/panda/src/mathutil/boundingLine.h @@ -1,6 +1,19 @@ // Filename: boundingLine.h // Created by: drose (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BOUNDINGLINE_H diff --git a/panda/src/mathutil/boundingSphere.I b/panda/src/mathutil/boundingSphere.I index 2abe3e27c7..44c262a3e4 100644 --- a/panda/src/mathutil/boundingSphere.I +++ b/panda/src/mathutil/boundingSphere.I @@ -1,6 +1,19 @@ // Filename: boundingSphere.I // Created by: drose (02Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL BoundingSphere:: @@ -9,7 +22,7 @@ BoundingSphere() { INLINE_MATHUTIL BoundingSphere:: BoundingSphere(const LPoint3f ¢er, float radius) : - _center(center), _radius(radius) + _center(center), _radius(radius) { _flags = 0; nassertd(!_center.is_nan() && !cnan(_radius)) { diff --git a/panda/src/mathutil/boundingSphere.cxx b/panda/src/mathutil/boundingSphere.cxx index 444dca3e2f..37989ae38e 100644 --- a/panda/src/mathutil/boundingSphere.cxx +++ b/panda/src/mathutil/boundingSphere.cxx @@ -1,6 +1,19 @@ // Filename: boundingSphere.cxx // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "boundingSphere.h" @@ -142,7 +155,7 @@ extend_by_sphere(const BoundingSphere *sphere) { _flags = 0; } else { float dist = length(sphere->_center - _center); - + _radius = max(_radius, dist + sphere->_radius); } return true; @@ -183,7 +196,7 @@ around_points(const LPoint3f *first, const LPoint3f *last) { // First, get the minmax of all the points to construct a bounding // box. const LPoint3f *p = first; - + #ifndef NDEBUG // Skip any NaN points. int skipped_nan = 0; @@ -239,7 +252,7 @@ around_points(const LPoint3f *first, const LPoint3f *last) { // Now take the center of the bounding box as the center of the sphere. _center = (min_box + max_box) * 0.5f; - + // Now walk back through to get the max distance from center. float max_dist2 = 0.0f; for (p = first; p != last; ++p) { @@ -247,7 +260,7 @@ around_points(const LPoint3f *first, const LPoint3f *last) { float dist2 = dot(v, v); max_dist2 = max(max_dist2, dist2); } - + _radius = sqrtf(max_dist2); } @@ -265,19 +278,19 @@ around_points(const LPoint3f *first, const LPoint3f *last) { } bool BoundingSphere:: -around_spheres(const BoundingVolume **first, +around_spheres(const BoundingVolume **first, const BoundingVolume **last) { return around_finite(first, last); } bool BoundingSphere:: -around_hexahedrons(const BoundingVolume **first, +around_hexahedrons(const BoundingVolume **first, const BoundingVolume **last) { return around_finite(first, last); } bool BoundingSphere:: -around_finite(const BoundingVolume **first, +around_finite(const BoundingVolume **first, const BoundingVolume **last) { nassertr(first != last, false); @@ -298,7 +311,7 @@ around_finite(const BoundingVolume **first, for (++p; p != last; ++p) { nassertr(!(*p)->is_infinite(), false); - if (!(*p)->is_empty() && + if (!(*p)->is_empty() && (*p)->is_of_type(FiniteBoundingVolume::get_class_type())) { const FiniteBoundingVolume *vol = DCAST(FiniteBoundingVolume, *p); LPoint3f min1 = vol->get_min(); @@ -362,7 +375,7 @@ contains_point(const LPoint3f &point) const { } else { LVector3f v = point - _center; float dist2 = dot(v, v); - return (dist2 <= _radius * _radius) ? + return (dist2 <= _radius * _radius) ? IF_possible | IF_some | IF_all : IF_no_intersection; } } @@ -384,37 +397,37 @@ contains_lineseg(const LPoint3f &a, const LPoint3f &b) const { LPoint3f from = a; LVector3f delta = b - a; float t1, t2; - + // Solve the equation for the intersection of a line with a sphere // using the quadratic equation. float A = dot(delta, delta); - + nassertr(A != 0.0f, 0); // Trivial line segment. LVector3f fc = from - _center; float B = 2.0f * dot(delta, fc); float C = dot(fc, fc) - _radius * _radius; - + float radical = B*B - 4.0f*A*C; if (IS_NEARLY_ZERO(radical)) { // Tangent. t1 = t2 = -B / (2.0f*A); - return (t1 >= 0.0f && t1 <= 1.0f) ? + return (t1 >= 0.0f && t1 <= 1.0f) ? IF_possible | IF_some : IF_no_intersection; } - + if (radical < 0.0f) { // No real roots: no intersection with the line. return IF_no_intersection; } - + float reciprocal_2A = 1.0f/(2.0f*A); float sqrt_radical = sqrtf(radical); t1 = ( -B - sqrt_radical ) * reciprocal_2A; t2 = ( -B + sqrt_radical ) * reciprocal_2A; - + if (t1 >= 0.0f && t2 <= 1.0f) { return IF_possible | IF_some | IF_all; } else if (t1 <= 1.0f && t2 >= 0.0f) { diff --git a/panda/src/mathutil/boundingSphere.h b/panda/src/mathutil/boundingSphere.h index 28667cd4c6..ea4cf72354 100644 --- a/panda/src/mathutil/boundingSphere.h +++ b/panda/src/mathutil/boundingSphere.h @@ -2,6 +2,19 @@ // Created by: drose (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BOUNDINGSPHERE_H #define BOUNDINGSPHERE_H diff --git a/panda/src/mathutil/boundingVolume.I b/panda/src/mathutil/boundingVolume.I index f751cb0d54..fd7170c2ff 100644 --- a/panda/src/mathutil/boundingVolume.I +++ b/panda/src/mathutil/boundingVolume.I @@ -1,12 +1,25 @@ // Filename: boundingVolume.I // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: BoundingVolume::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL BoundingVolume:: BoundingVolume() { diff --git a/panda/src/mathutil/boundingVolume.cxx b/panda/src/mathutil/boundingVolume.cxx index da8ac610b8..d5fe2dfa54 100644 --- a/panda/src/mathutil/boundingVolume.cxx +++ b/panda/src/mathutil/boundingVolume.cxx @@ -1,6 +1,19 @@ // Filename: boundingVolume.cxx // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "boundingVolume.h" @@ -21,7 +34,7 @@ TypeHandle BoundingVolume::_type_handle; bool BoundingVolume:: around(const BoundingVolume **first, const BoundingVolume **last) { _flags = F_empty; - + // Skip any empty volumes at the beginning of the list. We want to // get to the first real volume. while (first != last && (*first)->is_empty()) { @@ -60,7 +73,7 @@ around(const BoundingVolume **first, const BoundingVolume **last) { //////////////////////////////////////////////////////////////////// // Function: BoundingVolume::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void BoundingVolume:: write(ostream &out, int indent_level) const { diff --git a/panda/src/mathutil/boundingVolume.h b/panda/src/mathutil/boundingVolume.h index bc1b6f4da6..974b22ee63 100644 --- a/panda/src/mathutil/boundingVolume.h +++ b/panda/src/mathutil/boundingVolume.h @@ -2,6 +2,19 @@ // Created by: drose (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BOUNDINGVOLUME_H #define BOUNDINGVOLUME_H @@ -117,7 +130,7 @@ protected: virtual int contains_hexahedron(const BoundingHexahedron *hexahedron) const; virtual int contains_line(const BoundingLine *line) const; - + public: static TypeHandle get_class_type() { return _type_handle; diff --git a/panda/src/mathutil/config_mathutil.cxx b/panda/src/mathutil/config_mathutil.cxx index 407a92178b..d0ddaaaf2b 100644 --- a/panda/src/mathutil/config_mathutil.cxx +++ b/panda/src/mathutil/config_mathutil.cxx @@ -1,6 +1,19 @@ // Filename: config_mathutil.cxx // Created by: drose (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_mathutil.h" diff --git a/panda/src/mathutil/config_mathutil.h b/panda/src/mathutil/config_mathutil.h index 80b4b77ebf..8e8175f47d 100644 --- a/panda/src/mathutil/config_mathutil.h +++ b/panda/src/mathutil/config_mathutil.h @@ -2,6 +2,19 @@ // Created by: drose (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_MATHUTIL_H #define CONFIG_MATHUTIL_H diff --git a/panda/src/mathutil/fftCompressor.cxx b/panda/src/mathutil/fftCompressor.cxx index 24d65d4053..b312ce4bc7 100644 --- a/panda/src/mathutil/fftCompressor.cxx +++ b/panda/src/mathutil/fftCompressor.cxx @@ -1,6 +1,19 @@ // Filename: fftCompressor.cxx // Created by: drose (11Dec00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "fftCompressor.h" @@ -70,7 +83,7 @@ is_compression_available() { // user's Configrc file, rather than the single quality // dial. Quality 101 or higher means to generate // lossless output (this is the default if libfftw is -// not available). +// not available). // // Quality 102 writes all four components of quaternions // to the output file, rather than just three, quality @@ -101,7 +114,7 @@ set_quality(int quality) { _fft_exponent = fft_exponent; } else if (_quality < 40) { - // 0 - 40 : + // 0 - 40 : // fft-offset 1.0 - 0.001 // fft-factor 1.0 // fft-exponent 4.0 @@ -188,7 +201,7 @@ write_reals(Datagram &datagram, const float *array, int length) { // If we don't have FFTW, we shouldn't get here. nassertv(false); -#else +#else if (length == 0) { // Special case: do nothing. @@ -200,7 +213,7 @@ write_reals(Datagram &datagram, const float *array, int length) { datagram.add_float32(array[0]); return; } - + // Normal case: FFT the array, and write that out. double *data = (double *)alloca(length * sizeof(double)); int i; @@ -234,7 +247,7 @@ write_reals(Datagram &datagram, const float *array, int length) { if (a == 0.0) { num_width = RW_0; - + } else if (a <= max_range_8) { num_width = RW_8; @@ -304,7 +317,7 @@ write_hprs(Datagram &datagram, const LVecBase3f *array, int length) { if (_quality >= 103) { // If quality level is 103, we convert hpr to a table of matrices. // This is just for debugging. - vector_float + vector_float m00, m01, m02, m10, m11, m12, m20, m21, m22; @@ -478,7 +491,7 @@ read_reals(DatagramIterator &di, vector_float &array) { if (_quality > 100) { array.reserve(array.size() + length); - + // Special case: lossless output. for (int i = 0; i < length; i++) { array.push_back(di.get_float32()); @@ -549,7 +562,7 @@ read_hprs(DatagramIterator &di, vector_LVecBase3f &array) { // quat. This is just for debugging. vector_float h, p, r; bool okflag = true; - okflag = + okflag = read_reals(di, h) && read_reals(di, p) && read_reals(di, r); @@ -566,12 +579,12 @@ read_hprs(DatagramIterator &di, vector_LVecBase3f &array) { if (_quality >= 103) { // If quality level is 103, we read in a table of 3x3 rotation // matrices. This is just for debugging. - vector_float + vector_float m00, m01, m02, m10, m11, m12, m20, m21, m22; bool okflag = true; - okflag = + okflag = read_reals(di, m00) && read_reals(di, m01) && read_reals(di, m02) && @@ -614,7 +627,7 @@ read_hprs(DatagramIterator &di, vector_LVecBase3f &array) { } #endif - okflag = + okflag = okflag && read_reals(di, qi) && read_reals(di, qj) && @@ -622,7 +635,7 @@ read_hprs(DatagramIterator &di, vector_LVecBase3f &array) { if (okflag) { nassertr(qi.size() == qj.size() && qj.size() == qk.size(), false); - + array.reserve(array.size() + qi.size()); for (int i = 0; i < (int)qi.size(); i++) { LOrientationf rot; @@ -631,7 +644,7 @@ read_hprs(DatagramIterator &di, vector_LVecBase3f &array) { float qr2 = 1.0 - (qi[i] * qi[i] + qj[i] * qj[i] + qk[i] * qk[i]); float qr1 = qr2 < 0.0 ? 0.0 : sqrtf(qr2); - rot.set(qr1, qi[i], qj[i], qk[i]); + rot.set(qr1, qi[i], qj[i], qk[i]); #ifndef NDEBUG if (_quality >= 102) { @@ -640,7 +653,7 @@ read_hprs(DatagramIterator &di, vector_LVecBase3f &array) { if (!IS_THRESHOLD_EQUAL(qr[i], qr1, 0.001)) { mathutil_cat.warning() - << "qr[" << i << "] = " << qr[i] << ", qr1 = " << qr1 + << "qr[" << i << "] = " << qr[i] << ", qr1 = " << qr1 << ", diff is " << qr1 - qr[i] << "\n"; } } else @@ -653,7 +666,7 @@ read_hprs(DatagramIterator &di, vector_LVecBase3f &array) { LVecBase3f scale, hpr; bool success = decompose_matrix(mat, scale, hpr); nassertr(success, false); - + array.push_back(hpr); } } @@ -675,15 +688,15 @@ void FFTCompressor:: free_storage() { #ifdef HAVE_FFTW RealPlans::iterator pi; - for (pi = _real_compress_plans.begin(); + for (pi = _real_compress_plans.begin(); pi != _real_compress_plans.end(); ++pi) { rfftw_destroy_plan((*pi).second); } _real_compress_plans.clear(); - for (pi = _real_decompress_plans.begin(); - pi != _real_decompress_plans.end(); + for (pi = _real_decompress_plans.begin(); + pi != _real_decompress_plans.end(); ++pi) { rfftw_destroy_plan((*pi).second); } @@ -718,16 +731,16 @@ write_run(Datagram &datagram, FFTCompressor::RunWidth run_width, // careful, however, not to accidentally write a byte that looks // like an RW_double flag. datagram.add_uint8((int)run_width | run.size()); - + } else { // Otherwise, write zero as the length, to indicate that we'll // write the actual length in the following 16-bit word. datagram.add_uint8(run_width); - + // Assuming, of course, that the length fits within 16 bits. nassertr(run.size() < 65536, 0); nassertr(run.size() != 0, 0); - + datagram.add_uint16(run.size()); } } @@ -860,7 +873,7 @@ get_scale_factor(int i, int length) const { int k = (i < m) ? i : length - i; nassertr(k >= 0 && k < m, 1.0); - return _fft_offset + + return _fft_offset + _fft_factor * pow((double)(m-1 - k) / (double)(m-1), _fft_exponent); } diff --git a/panda/src/mathutil/fftCompressor.h b/panda/src/mathutil/fftCompressor.h index 15ab9bd0c6..07afdb2445 100644 --- a/panda/src/mathutil/fftCompressor.h +++ b/panda/src/mathutil/fftCompressor.h @@ -1,6 +1,19 @@ // Filename: fftCompressor.h // Created by: drose (11Dec00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FFTCOMPRESSOR_H @@ -67,7 +80,7 @@ private: RW_invalid = 0x01 }; - int write_run(Datagram &datagram, RunWidth run_width, + int write_run(Datagram &datagram, RunWidth run_width, const vector_double &run); int read_run(DatagramIterator &di, vector_double &run); double get_scale_factor(int i, int length) const; diff --git a/panda/src/mathutil/finiteBoundingVolume.cxx b/panda/src/mathutil/finiteBoundingVolume.cxx index 216096c741..bdd0f6dd7b 100644 --- a/panda/src/mathutil/finiteBoundingVolume.cxx +++ b/panda/src/mathutil/finiteBoundingVolume.cxx @@ -1,6 +1,19 @@ // Filename: finiteBoundingVolume.cxx // Created by: drose (02Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "finiteBoundingVolume.h" diff --git a/panda/src/mathutil/finiteBoundingVolume.h b/panda/src/mathutil/finiteBoundingVolume.h index 836141c4a4..130795e5a4 100644 --- a/panda/src/mathutil/finiteBoundingVolume.h +++ b/panda/src/mathutil/finiteBoundingVolume.h @@ -2,6 +2,19 @@ // Created by: drose (02Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FINITEBOUNDINGVOLUME_H #define FINITEBOUNDINGVOLUME_H @@ -22,7 +35,7 @@ PUBLISHED: virtual LPoint3f get_min() const=0; virtual LPoint3f get_max() const=0; - + public: static TypeHandle get_class_type() { return _type_handle; diff --git a/panda/src/mathutil/frustum.h b/panda/src/mathutil/frustum.h index 49be89221d..a383808a07 100644 --- a/panda/src/mathutil/frustum.h +++ b/panda/src/mathutil/frustum.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FRUSTUM_H #define FRUSTUM_H // diff --git a/panda/src/mathutil/frustum_src.I b/panda/src/mathutil/frustum_src.I index 7119921165..b97d1b34ac 100644 --- a/panda/src/mathutil/frustum_src.I +++ b/panda/src/mathutil/frustum_src.I @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Constructor @@ -19,18 +32,18 @@ FLOATNAME(Frustum)() { } //////////////////////////////////////////////////////////////////// -// Function: make_ortho_2D +// Function: make_ortho_2D // Access: -// Description: Sets up a two-dimensional orthographic frustum +// Description: Sets up a two-dimensional orthographic frustum //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void FLOATNAME(Frustum)::make_ortho_2D(void) { make_ortho(-1.0f, 1.0f); } //////////////////////////////////////////////////////////////////// -// Function: make_ortho_2D +// Function: make_ortho_2D // Access: -// Description: Sets up a two-dimensional orthographic frustum +// Description: Sets up a two-dimensional orthographic frustum //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void FLOATNAME(Frustum):: make_ortho_2D(FLOATTYPE l, FLOATTYPE r, FLOATTYPE t, FLOATTYPE b) { @@ -44,7 +57,7 @@ make_ortho_2D(FLOATTYPE l, FLOATTYPE r, FLOATTYPE t, FLOATTYPE b) { //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void FLOATNAME(Frustum)::make_ortho(FLOATTYPE fnear, FLOATTYPE ffar) { _fnear = fnear; - _ffar = ffar; + _ffar = ffar; _l = -1.0f; _r = 1.0f; _t = 1.0f; @@ -60,7 +73,7 @@ INLINE_MATHUTIL void FLOATNAME(Frustum):: make_ortho(FLOATTYPE fnear, FLOATTYPE ffar, FLOATTYPE l, FLOATTYPE r, FLOATTYPE t, FLOATTYPE b) { _fnear = fnear; - _ffar = ffar; + _ffar = ffar; _l = l; _r = r; _t = t; @@ -162,7 +175,7 @@ get_perspective_projection_mat(CoordinateSystem cs) const { if (cs == CS_default) { cs = default_coordinate_system; } - + FLOATTYPE recip_far_minus_near = 1.0f/(_ffar - _fnear); FLOATTYPE recip_r_minus_l = 1.0f/(_r - _l); FLOATTYPE recip_t_minus_b = 1.0f/(_t - _b); @@ -182,7 +195,7 @@ get_perspective_projection_mat(CoordinateSystem cs) const { FLOATTYPE d = (_r + _l) / (_r - _l); FLOATTYPE e = (2.0f * _fnear) / (_t - _b); FLOATTYPE f = (-2.0f * _ffar * _fnear) / (_ffar - _fnear); -*/ +*/ switch (cs) { case CS_zup_right: @@ -204,7 +217,7 @@ get_perspective_projection_mat(CoordinateSystem cs) const { case CS_yup_left: return FLOATNAME(LMatrix4)::convert_mat(CS_yup_right, CS_yup_left) * get_perspective_projection_mat(CS_yup_right); - + default: mathutil_cat.error() << "Invalid coordinate system!\n"; diff --git a/panda/src/mathutil/frustum_src.h b/panda/src/mathutil/frustum_src.h index e647d55c31..bfb955b0af 100644 --- a/panda/src/mathutil/frustum_src.h +++ b/panda/src/mathutil/frustum_src.h @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Class : Frustum @@ -10,14 +23,14 @@ class EXPCL_PANDA FLOATNAME(Frustum) { PUBLISHED: INLINE_MATHUTIL FLOATNAME(Frustum)(); - + INLINE_MATHUTIL void make_ortho_2D(void); INLINE_MATHUTIL void make_ortho_2D(FLOATTYPE l, FLOATTYPE r, FLOATTYPE t, FLOATTYPE b); INLINE_MATHUTIL void make_ortho(FLOATTYPE fnear, FLOATTYPE ffar); INLINE_MATHUTIL void make_ortho(FLOATTYPE fnear, FLOATTYPE ffar, FLOATTYPE l, FLOATTYPE r, FLOATTYPE t, FLOATTYPE b); - + INLINE_MATHUTIL void make_perspective_hfov(FLOATTYPE xfov, FLOATTYPE aspect, FLOATTYPE fnear, FLOATTYPE ffar); INLINE_MATHUTIL void make_perspective_vfov(FLOATTYPE yfov, FLOATTYPE aspect, @@ -29,14 +42,14 @@ PUBLISHED: INLINE_MATHUTIL void get_perspective_params(FLOATTYPE &xfov, FLOATTYPE &yfov, FLOATTYPE &aspect, FLOATTYPE &fnear, FLOATTYPE &ffar) const; - -public: + +public: INLINE_MATHUTIL FLOATNAME(LMatrix4) get_perspective_projection_mat(CoordinateSystem cs = CS_default) const; INLINE_MATHUTIL FLOATNAME(LMatrix4) get_ortho_projection_mat(CoordinateSystem cs = CS_default) const; - + public: FLOATTYPE _l, _r, _b, _t; FLOATTYPE _fnear, _ffar; diff --git a/panda/src/mathutil/geometricBoundingVolume.I b/panda/src/mathutil/geometricBoundingVolume.I index 7a30b80025..8866f8a4ab 100644 --- a/panda/src/mathutil/geometricBoundingVolume.I +++ b/panda/src/mathutil/geometricBoundingVolume.I @@ -1,12 +1,25 @@ // Filename: geometricBoundingVolume.I // Created by: drose (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GeometricBoundingVolume::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL GeometricBoundingVolume:: GeometricBoundingVolume() { @@ -41,9 +54,9 @@ extend_by(const LPoint3f &point) { // indicated. //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL bool GeometricBoundingVolume:: -around(const GeometricBoundingVolume **first, +around(const GeometricBoundingVolume **first, const GeometricBoundingVolume **last) { - return BoundingVolume::around((const BoundingVolume **)first, + return BoundingVolume::around((const BoundingVolume **)first, (const BoundingVolume **)last); } diff --git a/panda/src/mathutil/geometricBoundingVolume.cxx b/panda/src/mathutil/geometricBoundingVolume.cxx index f8275607a5..d52ae40369 100644 --- a/panda/src/mathutil/geometricBoundingVolume.cxx +++ b/panda/src/mathutil/geometricBoundingVolume.cxx @@ -1,6 +1,19 @@ // Filename: geometricBoundingVolume.cxx // Created by: drose (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geometricBoundingVolume.h" diff --git a/panda/src/mathutil/geometricBoundingVolume.h b/panda/src/mathutil/geometricBoundingVolume.h index 8ce156d7a1..0a670285b3 100644 --- a/panda/src/mathutil/geometricBoundingVolume.h +++ b/panda/src/mathutil/geometricBoundingVolume.h @@ -2,6 +2,19 @@ // Created by: drose (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GEOMETRICBOUNDINGVOLUME_H #define GEOMETRICBOUNDINGVOLUME_H @@ -52,7 +65,7 @@ protected: virtual int contains_point(const LPoint3f &point) const; virtual int contains_lineseg(const LPoint3f &a, const LPoint3f &b) const; - + public: static TypeHandle get_class_type() { return _type_handle; diff --git a/panda/src/mathutil/look_at.cxx b/panda/src/mathutil/look_at.cxx index 9d9842c339..948a1fb285 100644 --- a/panda/src/mathutil/look_at.cxx +++ b/panda/src/mathutil/look_at.cxx @@ -1,6 +1,19 @@ // Filename: look_at.cxx // Created by: drose (25Apr97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "look_at.h" diff --git a/panda/src/mathutil/look_at.h b/panda/src/mathutil/look_at.h index d314ca5feb..547ee126fa 100644 --- a/panda/src/mathutil/look_at.h +++ b/panda/src/mathutil/look_at.h @@ -2,6 +2,19 @@ // Created by: drose (25Apr97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LOOKAT_H #define LOOKAT_H diff --git a/panda/src/mathutil/look_at_src.I b/panda/src/mathutil/look_at_src.I index f9d8ac6e40..eb292f89c4 100644 --- a/panda/src/mathutil/look_at_src.I +++ b/panda/src/mathutil/look_at_src.I @@ -1,16 +1,29 @@ // Filename: look_at_src.I // Created by: drose (25Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void -heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, +heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, CoordinateSystem cs) { heads_up(mat, fwd, FLOATNAME(LVector3)::up(cs), cs); } INLINE_MATHUTIL void -look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, +look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, CoordinateSystem cs) { look_at(mat, fwd, FLOATNAME(LVector3)::up(cs), cs); } @@ -24,7 +37,7 @@ heads_up(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, } INLINE_MATHUTIL void -look_at(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, +look_at(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, const FLOATNAME(LVector3) &up, CoordinateSystem cs) { FLOATNAME(LMatrix3) mat3; look_at(mat3, fwd, up, cs); @@ -32,14 +45,14 @@ look_at(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, } INLINE_MATHUTIL void -heads_up(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, +heads_up(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, CoordinateSystem cs) { heads_up(mat, fwd, FLOATNAME(LVector3)::up(cs), cs); } INLINE_MATHUTIL void -look_at(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, +look_at(FLOATNAME(LMatrix4) &mat, const FLOATNAME(LVector3) &fwd, CoordinateSystem cs) { look_at(mat, fwd, FLOATNAME(LVector3)::up(cs), cs); } - + diff --git a/panda/src/mathutil/look_at_src.cxx b/panda/src/mathutil/look_at_src.cxx index f3dd37e94b..6cd3e2c3f5 100644 --- a/panda/src/mathutil/look_at_src.cxx +++ b/panda/src/mathutil/look_at_src.cxx @@ -1,6 +1,19 @@ -// Filename: lookAt.cxx +// Filename: look_at_src.cxx // Created by: drose (25Apr97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL FLOATNAME(LMatrix3) @@ -46,7 +59,7 @@ make_z_mat(const FLOATNAME(LVector2) &z) { // vectors are not perpendicular. //////////////////////////////////////////////////////////////////// void -heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, +heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, const FLOATNAME(LVector3) &up, CoordinateSystem cs) { if (cs == CS_default) { cs = default_coordinate_system; @@ -66,11 +79,11 @@ heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, } else { y /= csqrt(d); } - + // x is the up vector rotated into the YZ plane. Its angle to the Z // axis is the amount to rotate about the X axis to bring the up // vector to the Z axis. - + FLOATNAME(LVector2) x(up[1], up[0]*y[0]+up[2]*y[1]); d = dot(x, x); if (d==0.0f) { @@ -78,13 +91,13 @@ heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, } else { x /= csqrt(d); } - + // Now apply both rotations to the forward vector. This will rotate // the forward vector by the same amount we would have had to rotate // the up vector to bring it to the Z axis. If the vectors were // perpendicular, this will put the forward vector somewhere in the // XY plane. - + // z is the projection of the newly rotated fwd vector into the XY // plane. Its angle to the Y axis is the amount to rotate about the // Z axis in order to bring the fwd vector to the Y axis. @@ -96,15 +109,15 @@ heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, } else { z /= csqrt(d); } - + // Now build the net rotation matrix. if (cs == CS_zup_right) { - mat = + mat = make_z_mat(z) * make_x_mat(x) * make_y_mat(y); } else { // cs == CS_zup_left - mat = + mat = make_z_mat(z) * make_x_mat(-x) * make_y_mat(-y); @@ -156,12 +169,12 @@ heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, // Now build the net rotation matrix. if (cs == CS_yup_right) { - mat = + mat = make_y_mat(y) * make_xi_mat(-x) * make_z_mat(-z); } else { // cs == CS_yup_left - mat = + mat = make_y_mat(y) * make_xi_mat(x) * make_z_mat(z); @@ -182,7 +195,7 @@ heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, // up vectors are not perpendicular. //////////////////////////////////////////////////////////////////// void -look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, +look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, const FLOATNAME(LVector3) &up, CoordinateSystem cs) { if (cs == CS_default) { cs = default_coordinate_system; @@ -194,7 +207,7 @@ look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, // z is the projection of the forward vector into the XY plane. Its // angle to the Y axis is the amount to rotate about the Z axis to // bring the forward vector into the YZ plane. - + FLOATNAME(LVector2) z(fwd[0], fwd[1]); FLOATTYPE d = dot(z, z); if (d==0.0f) { @@ -206,7 +219,7 @@ look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, // x is the forward vector rotated into the YZ plane. Its angle to // the Y axis is the amount to rotate about the X axis to bring the // forward vector to the Y axis. - + FLOATNAME(LVector2) x(fwd[0]*z[0] + fwd[1]*z[1], fwd[2]); d = dot(x, x); if (d==0.0f) { @@ -214,13 +227,13 @@ look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, } else { x /= csqrt(d); } - + // Now apply both rotations to the up vector. This will rotate // the up vector by the same amount we would have had to rotate // the forward vector to bring it to the Y axis. If the vectors were // perpendicular, this will put the up vector somewhere in the // XZ plane. - + // y is the projection of the newly rotated up vector into the XZ // plane. Its angle to the Z axis is the amount to rotate about the // Y axis in order to bring the up vector to the Z axis. @@ -251,7 +264,7 @@ look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, // y is the projection of the up vector into the XZ plane. Its // angle to the Z axis is the amount to rotate about the Y axis to // bring the up vector into the YZ plane. - + FLOATNAME(LVector2) y(fwd[0], fwd[2]); FLOATTYPE d = dot(y, y); if (d==0.0f) { @@ -259,11 +272,11 @@ look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, } else { y /= csqrt(d); } - + // x is the up vector rotated into the YZ plane. Its angle to the Z // axis is the amount to rotate about the X axis to bring the up // vector to the Z axis. - + FLOATNAME(LVector2) x(fwd[1], fwd[0]*y[0]+fwd[2]*y[1]); d = dot(x, x); if (d==0.0f) { @@ -277,7 +290,7 @@ look_at(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd, // the up vector to bring it to the Z axis. If the vectors were // perpendicular, this will put the forward vector somewhere in the // XY plane. - + // z is the projection of the newly rotated fwd vector into the XY // plane. Its angle to the Y axis is the amount to rotate about the // Z axis in order to bring the fwd vector to the Y axis. diff --git a/panda/src/mathutil/look_at_src.h b/panda/src/mathutil/look_at_src.h index a9460a260d..9d45bda8cc 100644 --- a/panda/src/mathutil/look_at_src.h +++ b/panda/src/mathutil/look_at_src.h @@ -1,6 +1,19 @@ // Filename: look_at_src.h // Created by: drose (25Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// // These functions return a matrix that rotates between a coordinate diff --git a/panda/src/mathutil/mathHelpers.I b/panda/src/mathutil/mathHelpers.I index 81a7fb4cfc..cfab0240b0 100644 --- a/panda/src/mathutil/mathHelpers.I +++ b/panda/src/mathutil/mathHelpers.I @@ -1,10 +1,19 @@ -// Filename: mathHelpers.I +// Filename: mathHelpers.I // Created by: mike (25Apr97) -// -//////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////// -// Includes +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/mathutil/mathHelpers.h b/panda/src/mathutil/mathHelpers.h index 832370dd0f..06759de5b2 100644 --- a/panda/src/mathutil/mathHelpers.h +++ b/panda/src/mathutil/mathHelpers.h @@ -2,6 +2,19 @@ // Created by: mike (25Apr97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MATHHELPERS_H #define MATHHELPERS_H diff --git a/panda/src/mathutil/omniBoundingVolume.I b/panda/src/mathutil/omniBoundingVolume.I index a73d1fda4a..4e814afc44 100644 --- a/panda/src/mathutil/omniBoundingVolume.I +++ b/panda/src/mathutil/omniBoundingVolume.I @@ -1,12 +1,25 @@ // Filename: omniBoundingVolume.I // Created by: drose (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL OmniBoundingVolume:: OmniBoundingVolume() { diff --git a/panda/src/mathutil/omniBoundingVolume.cxx b/panda/src/mathutil/omniBoundingVolume.cxx index 9d50d323b6..3a86b38297 100644 --- a/panda/src/mathutil/omniBoundingVolume.cxx +++ b/panda/src/mathutil/omniBoundingVolume.cxx @@ -1,6 +1,19 @@ // Filename: omniBoundingVolume.cxx // Created by: drose (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "omniBoundingVolume.h" @@ -14,7 +27,7 @@ TypeHandle OmniBoundingVolume::_type_handle; //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::make_copy // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// BoundingVolume *OmniBoundingVolume:: make_copy() const { @@ -24,7 +37,7 @@ make_copy() const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::get_approx_center // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// LPoint3f OmniBoundingVolume:: get_approx_center() const { @@ -34,7 +47,7 @@ get_approx_center() const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::xform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OmniBoundingVolume:: xform(const LMatrix4f &) { @@ -43,7 +56,7 @@ xform(const LMatrix4f &) { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void OmniBoundingVolume:: output(ostream &out) const { @@ -53,7 +66,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::extend_other // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: extend_other(BoundingVolume *other) const { @@ -64,7 +77,7 @@ extend_other(BoundingVolume *other) const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::around_other // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: around_other(BoundingVolume *other, @@ -77,7 +90,7 @@ around_other(BoundingVolume *other, //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::contains_other // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int OmniBoundingVolume:: contains_other(const BoundingVolume *) const { @@ -87,7 +100,7 @@ contains_other(const BoundingVolume *) const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::extend_by_point // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: extend_by_point(const LPoint3f &) { @@ -97,7 +110,7 @@ extend_by_point(const LPoint3f &) { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::extend_by_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: extend_by_sphere(const BoundingSphere *) { @@ -107,7 +120,7 @@ extend_by_sphere(const BoundingSphere *) { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::extend_by_hexahedron // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: extend_by_hexahedron(const BoundingHexahedron *) { @@ -117,7 +130,7 @@ extend_by_hexahedron(const BoundingHexahedron *) { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::around_points // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: around_points(const LPoint3f *, const LPoint3f *) { @@ -127,10 +140,10 @@ around_points(const LPoint3f *, const LPoint3f *) { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::around_spheres // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: -around_spheres(const BoundingVolume **, +around_spheres(const BoundingVolume **, const BoundingVolume **) { return true; } @@ -138,10 +151,10 @@ around_spheres(const BoundingVolume **, //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::around_hexahedrons // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool OmniBoundingVolume:: -around_hexahedrons(const BoundingVolume **, +around_hexahedrons(const BoundingVolume **, const BoundingVolume **) { return true; } @@ -149,7 +162,7 @@ around_hexahedrons(const BoundingVolume **, //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::contains_point // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int OmniBoundingVolume:: contains_point(const LPoint3f &) const { @@ -159,7 +172,7 @@ contains_point(const LPoint3f &) const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::contains_lineseg // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int OmniBoundingVolume:: contains_lineseg(const LPoint3f &, const LPoint3f &) const { @@ -169,7 +182,7 @@ contains_lineseg(const LPoint3f &, const LPoint3f &) const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::contains_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int OmniBoundingVolume:: contains_sphere(const BoundingSphere *) const { @@ -179,7 +192,7 @@ contains_sphere(const BoundingSphere *) const { //////////////////////////////////////////////////////////////////// // Function: OmniBoundingVolume::contains_hexahedron // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int OmniBoundingVolume:: contains_hexahedron(const BoundingHexahedron *) const { diff --git a/panda/src/mathutil/omniBoundingVolume.h b/panda/src/mathutil/omniBoundingVolume.h index 249ece36c7..7b997a965e 100644 --- a/panda/src/mathutil/omniBoundingVolume.h +++ b/panda/src/mathutil/omniBoundingVolume.h @@ -1,6 +1,19 @@ // Filename: omniBoundingVolume.h // Created by: drose (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef OMNIBOUNDINGVOLUME_H diff --git a/panda/src/mathutil/plane.cxx b/panda/src/mathutil/plane.cxx index 95504474b4..b4f28afc96 100644 --- a/panda/src/mathutil/plane.cxx +++ b/panda/src/mathutil/plane.cxx @@ -1,6 +1,19 @@ // Filename: plane.cxx // Created by: drose (19May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "plane.h" diff --git a/panda/src/mathutil/plane.h b/panda/src/mathutil/plane.h index e6f9a90502..87e1520bad 100644 --- a/panda/src/mathutil/plane.h +++ b/panda/src/mathutil/plane.h @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PLANE_H #define PLANE_H diff --git a/panda/src/mathutil/plane_src.I b/panda/src/mathutil/plane_src.I index b94cd94c60..0a32cfbd3f 100644 --- a/panda/src/mathutil/plane_src.I +++ b/panda/src/mathutil/plane_src.I @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Plane::Constructor @@ -12,16 +25,16 @@ //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL FLOATNAME(Plane):: FLOATNAME(Plane)(void) { - _a = 0.0f; - _b = 0.0f; - _c = 1.0f; + _a = 0.0f; + _b = 0.0f; + _c = 1.0f; _d = 0.0f; } //////////////////////////////////////////////////////////////////// // Function: Plane::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL FLOATNAME(Plane):: FLOATNAME(Plane)(const FLOATNAME(Plane) ©) : @@ -41,7 +54,7 @@ FLOATNAME(Plane)(const FLOATNAME(Plane) ©) : // down). //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL FLOATNAME(Plane):: -FLOATNAME(Plane)(const FLOATNAME(LPoint3) &a, const FLOATNAME(LPoint3) &b, +FLOATNAME(Plane)(const FLOATNAME(LPoint3) &a, const FLOATNAME(LPoint3) &b, const FLOATNAME(LPoint3) &c) { FLOATNAME(LVector3) u = b - a; FLOATNAME(LVector3) v = c - a; @@ -64,22 +77,22 @@ FLOATNAME(Plane)(const FLOATNAME(LVector3) &normal, const FLOATNAME(LPoint3) &po FLOATNAME(LVector3) p = normalize(normal); _a = p[0]; - _b = p[1]; + _b = p[1]; _c = p[2]; _d = -dot(p, point); } //////////////////////////////////////////////////////////////////// -// Function: Plane::Operator = +// Function: Plane::Operator = // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL FLOATNAME(Plane)& FLOATNAME(Plane):: operator = (const FLOATNAME(Plane)& p) { - _a = p._a; + _a = p._a; _b = p._b; _c = p._c; - _d = p._d; + _d = p._d; return (*this); } @@ -172,14 +185,14 @@ intersects_line(FLOATNAME(LPoint3) &intersection_point, // delta, with other values of t accordingly. //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL bool FLOATNAME(Plane):: -intersects_line(FLOATTYPE &t, - const FLOATNAME(LPoint3) &from, +intersects_line(FLOATTYPE &t, + const FLOATNAME(LPoint3) &from, const FLOATNAME(LVector3) &delta) const { FLOATTYPE denom = dot(get_normal(), delta); if (IS_NEARLY_ZERO(denom)) { return false; } - + t = -(dist_to_plane(from) / denom); return true; } @@ -187,7 +200,7 @@ intersects_line(FLOATTYPE &t, //////////////////////////////////////////////////////////////////// // Function: Plane::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void FLOATNAME(Plane):: output(ostream &out) const { @@ -197,7 +210,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: Plane::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void FLOATNAME(Plane):: write(ostream &out, int indent_level) const { @@ -207,10 +220,10 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: Plane::write_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void FLOATNAME(Plane):: -write_datagram(Datagram &dest) +write_datagram(Datagram &dest) { dest.add_float32(_a); dest.add_float32(_b); @@ -221,10 +234,10 @@ write_datagram(Datagram &dest) //////////////////////////////////////////////////////////////////// // Function: Plane::read_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE_MATHUTIL void FLOATNAME(Plane):: -read_datagram(DatagramIterator &source) +read_datagram(DatagramIterator &source) { _a = source.get_float32(); _b = source.get_float32(); diff --git a/panda/src/mathutil/plane_src.cxx b/panda/src/mathutil/plane_src.cxx index c6964a68e5..64ec16efc1 100644 --- a/panda/src/mathutil/plane_src.cxx +++ b/panda/src/mathutil/plane_src.cxx @@ -2,6 +2,19 @@ // Created by: drose (03Apr01) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -19,7 +32,7 @@ get_reflection_mat(void) const { FLOATTYPE cc = _c * _c; FLOATTYPE cd = _c * _d; return FLOATNAME(LMatrix4)( 1-2*aa, -2*ab, -2*ac, 0, - -2*ab, 1-2*bb, -2*bc, 0, + -2*ab, 1-2*bb, -2*bc, 0, -2*ac, -2*bc, 1-2*cc, 0, -2*ad, -2*bd, -2*cd, 1 ); } diff --git a/panda/src/mathutil/plane_src.h b/panda/src/mathutil/plane_src.h index 02e4e1a874..505b7a4948 100644 --- a/panda/src/mathutil/plane_src.h +++ b/panda/src/mathutil/plane_src.h @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Class : Plane @@ -13,27 +26,27 @@ PUBLISHED: INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(Plane) ©); INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(LPoint3) &a, const FLOATNAME(LPoint3) &b, const FLOATNAME(LPoint3) &c); - INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(LVector3) &normal, + INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(LVector3) &normal, const FLOATNAME(LPoint3) &point); INLINE_MATHUTIL FLOATNAME(Plane)& operator = (const FLOATNAME(Plane)& copy); INLINE_MATHUTIL FLOATNAME(Plane) operator * (const FLOATNAME(LMatrix3) &mat) const; INLINE_MATHUTIL FLOATNAME(Plane) operator * (const FLOATNAME(LMatrix4) &mat) const; - + FLOATNAME(LMatrix4) get_reflection_mat(void) const; INLINE_MATHUTIL FLOATNAME(LVector3) get_normal() const; FLOATNAME(LPoint3) get_point() const; - INLINE_MATHUTIL FLOATTYPE dist_to_plane(const FLOATNAME(LPoint3) &point) const; + INLINE_MATHUTIL FLOATTYPE dist_to_plane(const FLOATNAME(LPoint3) &point) const; INLINE_MATHUTIL bool intersects_line(FLOATNAME(LPoint3) &intersection_point, const FLOATNAME(LPoint3) &p1, const FLOATNAME(LPoint3) &p2) const; INLINE_MATHUTIL bool intersects_line(FLOATTYPE &t, - const FLOATNAME(LPoint3) &from, + const FLOATNAME(LPoint3) &from, const FLOATNAME(LVector3) &delta) const; - + INLINE_MATHUTIL void output(ostream &out) const; INLINE_MATHUTIL void write(ostream &out, int indent_level = 0) const; diff --git a/panda/src/mathutil/rotate_to.cxx b/panda/src/mathutil/rotate_to.cxx index 15ff059b6d..9ba1aab45d 100644 --- a/panda/src/mathutil/rotate_to.cxx +++ b/panda/src/mathutil/rotate_to.cxx @@ -1,6 +1,19 @@ // Filename: rotate_to.cxx // Created by: drose (04Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/mathutil/rotate_to.h b/panda/src/mathutil/rotate_to.h index 24142443b2..380d46e381 100644 --- a/panda/src/mathutil/rotate_to.h +++ b/panda/src/mathutil/rotate_to.h @@ -2,6 +2,19 @@ // Created by: drose (04Nov99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ROTATE_TO_H #define ROTATE_TO_H diff --git a/panda/src/mathutil/rotate_to_src.cxx b/panda/src/mathutil/rotate_to_src.cxx index 9e22f4be07..b29407bddd 100644 --- a/panda/src/mathutil/rotate_to_src.cxx +++ b/panda/src/mathutil/rotate_to_src.cxx @@ -1,6 +1,19 @@ // Filename: rotate_to_src.cxx // Created by: drose (04Nov99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -10,7 +23,7 @@ // normalized. //////////////////////////////////////////////////////////////////// static void -_rotate_to(FLOATNAME(LMatrix3) &mat, +_rotate_to(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &a, const FLOATNAME(LVector3) &b) { FLOATTYPE cos_theta = a.dot(b); @@ -28,7 +41,7 @@ _rotate_to(FLOATNAME(LMatrix3) &mat, FLOATNAME(LVector3) lca(0., 0., 0.); lca[absa[0]<=absa[1] ? absa[0]<=absa[2] ? 0 : 2 : absa[1]<=absa[2] ? 1 : 2] = 1.0f; - + axis = normalize(a.cross(lca)); } else { mat = FLOATNAME(LMatrix3)::ident_mat(); @@ -43,7 +56,7 @@ _rotate_to(FLOATNAME(LMatrix3) &mat, FLOATTYPE x = axis[0]; FLOATTYPE y = axis[1]; FLOATTYPE z = axis[2]; - + FLOATTYPE t = 1.0f - cos_theta; mat(0, 0) = t * x * x + cos_theta; diff --git a/panda/src/mathutil/test_mathutil.cxx b/panda/src/mathutil/test_mathutil.cxx index 1ce16b02ce..f4accfb8a5 100644 --- a/panda/src/mathutil/test_mathutil.cxx +++ b/panda/src/mathutil/test_mathutil.cxx @@ -1,6 +1,19 @@ // Filename: test_mathutil.cxx // Created by: drose (16Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -24,14 +37,14 @@ main() { nout << "a * rot = " << a * rot << " length " << length(a * rot) << "\n" << "a * invert(rot) = " << a * invert(rot) << " length " << length(a * invert(rot)) << "\n" - << "b * rot = " << b * rot + << "b * rot = " << b * rot << " length " << length(b * rot) << "\n" << "b * invert(rot) = " << b * invert(rot) << " length " << length(a * invert(rot)) << "\n"; */ BoundingLine line(LPoint3f(0, 0, 1), LPoint3f(0, 0, 0)); - + BoundingSphere s1(LPoint3f(0, 0, 10), 1); BoundingSphere s2(LPoint3f(10, 0, 10), 1); BoundingSphere s3(LPoint3f(1, 0, 0), 1); diff --git a/panda/src/mpg123/audio.c b/panda/src/mpg123/audio.c index d91778ae73..0369094c8f 100644 --- a/panda/src/mpg123/audio.c +++ b/panda/src/mpg123/audio.c @@ -1,3 +1,20 @@ +/* Filename: audio.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "mpg123.h" #ifdef WIN32 @@ -36,7 +53,7 @@ void audio_info_struct_init(struct audio_info_struct *ai) struct audio_name audio_val2name[NUM_ENCODINGS+1] = { { AUDIO_FORMAT_SIGNED_16 , "signed 16 bit" , "s16 " } , - { AUDIO_FORMAT_UNSIGNED_16, "unsigned 16 bit" , "u16 " } , + { AUDIO_FORMAT_UNSIGNED_16, "unsigned 16 bit" , "u16 " } , { AUDIO_FORMAT_UNSIGNED_8 , "unsigned 8 bit" , "u8 " } , { AUDIO_FORMAT_SIGNED_8 , "signed 8 bit" , "s8 " } , { AUDIO_FORMAT_ULAW_8 , "mu-law (8 bit)" , "ulaw " } , @@ -45,20 +62,20 @@ struct audio_name audio_val2name[NUM_ENCODINGS+1] = { }; #if 0 -static char *channel_name[NUM_CHANNELS] = +static char *channel_name[NUM_CHANNELS] = { "mono" , "stereo" }; #endif static int channels[NUM_CHANNELS] = { 1 , 2 }; -static int rates[NUM_RATES] = { - 8000, 11025, 12000, +static int rates[NUM_RATES] = { + 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 8000 /* 8000 = dummy for user forced */ }; static int encodings[NUM_ENCODINGS] = { - AUDIO_FORMAT_SIGNED_16, + AUDIO_FORMAT_SIGNED_16, AUDIO_FORMAT_UNSIGNED_16, AUDIO_FORMAT_UNSIGNED_8, AUDIO_FORMAT_SIGNED_8, @@ -135,7 +152,7 @@ void audio_capabilities(struct audio_info_struct *ai) static int rate2num(int r) { int i; - for(i=0;i #include @@ -161,7 +177,7 @@ int read_frame(struct frame *fr) if(oldhead) { if((oldhead & 0xc00) == (newhead & 0xc00)) { if( (oldhead & 0xc0) == 0 && (newhead & 0xc0) == 0) - fr->header_change = 1; + fr->header_change = 1; else if( (oldhead & 0xc0) > 0 && (newhead & 0xc0) > 0) fr->header_change = 1; } @@ -200,7 +216,7 @@ int read_frame(struct frame *fr) return 0; } } - /* + /* * should we additionaly check, whether a new frame starts at * the next expected position? (some kind of read ahead) * We could implement this easily, at least for files. @@ -272,7 +288,7 @@ int read_frame(struct frame *fr) if(!rd->read_frame_body(rd,bsbuf,fr->framesize)) return 0; - { + { /* Test */ static struct vbrHeader head; static int vbr = 0; @@ -301,32 +317,32 @@ int back_frame(struct reader *rds,struct frame *fr,int num) { long bytes; unsigned long newhead; - + if(!firsthead) return 0; - + bytes = (fr->framesize+8)*(num+2); - + if(rds->back_bytes(rds,bytes) < 0) return -1; if(!rds->head_read(rds,&newhead)) return -1; - + while( (newhead & HDRCMPMASK) != (firsthead & HDRCMPMASK) ) { if(!rds->head_shift(rds,&newhead)) return -1; } - + if(rds->back_bytes(rds,4) <0) return -1; read_frame(fr); read_frame(fr); - + if(fr->lay == 3) { set_pointer(512); } - + return 0; } @@ -350,7 +366,7 @@ static int decode_header(struct frame *fr,unsigned long newhead) fr->lsf = 1; fr->mpeg25 = 1; } - + if (!param.tryresync || !oldhead) { /* If "tryresync" is true, assume that certain parameters do not change within the stream! */ @@ -406,9 +422,9 @@ static int decode_header(struct frame *fr,unsigned long newhead) fr->framesize = (long) tabsel_123[fr->lsf][2][fr->bitrate_index] * 144000; fr->framesize /= freqs[fr->sampling_frequency]<<(fr->lsf); fr->framesize = fr->framesize + fr->padding - 4; - break; + break; default: - fprintf(stderr,"Sorry, unknown layer type.\n"); + fprintf(stderr,"Sorry, unknown layer type.\n"); return (0); } return 1; @@ -435,7 +451,7 @@ void print_header(struct frame *fr) static char *modes[4] = { "Stereo", "Joint-Stereo", "Dual-Channel", "Single-Channel" }; static char *layers[4] = { "Unknown" , "I", "II", "III" }; - fprintf(stderr,"MPEG %s, Layer: %s, Freq: %ld, mode: %s, modext: %d, BPF : %d\n", + fprintf(stderr,"MPEG %s, Layer: %s, Freq: %ld, mode: %s, modext: %d, BPF : %d\n", fr->mpeg25 ? "2.5" : (fr->lsf ? "2.0" : "1.0"), layers[fr->lay],freqs[fr->sampling_frequency], modes[fr->mode],fr->mode_ext,fr->framesize+4); @@ -451,7 +467,7 @@ void print_header_compact(struct frame *fr) { static char *modes[4] = { "stereo", "joint-stereo", "dual-channel", "mono" }; static char *layers[4] = { "Unknown" , "I", "II", "III" }; - + fprintf(stderr,"MPEG %s layer %s, %d kbit/s, %ld Hz %s\n", fr->mpeg25 ? "2.5" : (fr->lsf ? "2.0" : "1.0"), layers[fr->lay], @@ -571,7 +587,7 @@ void set_pointer(long backstep) bsi.wordpointer = bsbuf + ssize - backstep; if (backstep) memcpy(bsi.wordpointer,bsbufold+fsizeold-backstep,backstep); - bsi.bitindex = 0; + bsi.bitindex = 0; } /********************************/ @@ -610,7 +626,7 @@ double compute_tpf(struct frame *fr) } /* - * Returns number of frames queued up in output buffer, i.e. + * Returns number of frames queued up in output buffer, i.e. * offset between currently played and currently decoded frame. */ @@ -628,7 +644,7 @@ long compute_buffer_offset(struct frame *fr) || !buffermem->buf[0] || !buffermem->buf[1]) return 0; - bufsize = (long)((double) bufsize / buffermem->buf[0] / + bufsize = (long)((double) bufsize / buffermem->buf[0] / buffermem->buf[1] / compute_tpf(fr)); if((buffermem->buf[2] & AUDIO_FORMAT_MASK) == AUDIO_FORMAT_16) @@ -644,7 +660,7 @@ void print_stat(struct frame *fr,int no,long buffsize,struct audio_info_struct * int sno,rno; char outbuf[256]; - if(!rd || !fr) + if(!rd || !fr) return; outbuf[0] = 0; diff --git a/panda/src/mpg123/common.h b/panda/src/mpg123/common.h index 716a3c836d..bab4198d03 100644 --- a/panda/src/mpg123/common.h +++ b/panda/src/mpg123/common.h @@ -1,6 +1,20 @@ -/* - * common.h - */ +/* Filename: common.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ extern void print_id3_tag(unsigned char *buf); extern unsigned long firsthead; diff --git a/panda/src/mpg123/dct64.c b/panda/src/mpg123/dct64.c index 6890551c42..97cf54df4e 100644 --- a/panda/src/mpg123/dct64.c +++ b/panda/src/mpg123/dct64.c @@ -1,14 +1,24 @@ - -/* - * Discrete Cosine Tansform (DCT) for subband synthesis +/* Filename: dct64.c + * Created by: * - * -funroll-loops (for gcc) will remove the loops for better performance - * using loops in the source-code enhances readabillity - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * TODO: write an optimized version for the down-sampling modes - * (in these modes the bands 16-31 (2:1) or 8-31 (4:1) are zero + * (in these modes the bands 16-31 (2:1) or 8-31 (4:1) are zero */ #include "mpg123.h" @@ -27,7 +37,7 @@ void dct64(real *out0,real *out1,real *samples) b2 = b1 + 32; for(i=15;i>=0;i--) - *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ + *--b2); for(i=15;i>=0;i--) *bs++ = (*--b2 - *b1++) * *--costab; @@ -37,15 +47,15 @@ void dct64(real *out0,real *out1,real *samples) { for(i=7;i>=0;i--) - *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ + *--b2); for(i=7;i>=0;i--) - *bs++ = (*--b2 - *b1++) * *--costab; + *bs++ = (*--b2 - *b1++) * *--costab; b2 += 32; costab += 8; for(i=7;i>=0;i--) - *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ + *--b2); for(i=7;i>=0;i--) - *bs++ = (*b1++ - *--b2) * *--costab; + *bs++ = (*b1++ - *--b2) * *--costab; b2 += 32; } @@ -56,14 +66,14 @@ void dct64(real *out0,real *out1,real *samples) for(j=2;j;j--) { for(i=3;i>=0;i--) - *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ + *--b2); for(i=3;i>=0;i--) - *bs++ = (*--b2 - *b1++) * costab[i]; + *bs++ = (*--b2 - *b1++) * costab[i]; b2 += 16; for(i=3;i>=0;i--) - *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ + *--b2); for(i=3;i>=0;i--) - *bs++ = (*b1++ - *--b2) * costab[i]; + *bs++ = (*b1++ - *--b2) * costab[i]; b2 += 16; } @@ -73,14 +83,14 @@ void dct64(real *out0,real *out1,real *samples) for(j=4;j;j--) { - *bs++ = (*b1++ + *--b2); *bs++ = (*b1++ + *--b2); - *bs++ = (*--b2 - *b1++) * costab[1]; + *bs++ = (*b1++ + *--b2); + *bs++ = (*--b2 - *b1++) * costab[1]; *bs++ = (*--b2 - *b1++) * costab[0]; b2 += 8; - *bs++ = (*b1++ + *--b2); *bs++ = (*b1++ + *--b2); - *bs++ = (*b1++ - *--b2) * costab[1]; + *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ - *--b2) * costab[1]; *bs++ = (*b1++ - *--b2) * costab[0]; b2 += 8; } diff --git a/panda/src/mpg123/decode.c b/panda/src/mpg123/decode.c index 9e4b78011c..0fd53bf3d1 100644 --- a/panda/src/mpg123/decode.c +++ b/panda/src/mpg123/decode.c @@ -1,10 +1,20 @@ -/* - * Mpeg Layer-1,2,3 audio decoder - * ------------------------------ - * copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved. - * See also 'README' +/* Filename: decode.c + * Created by: * - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include @@ -52,7 +62,7 @@ int synth_1to1_8bit_mono(real *bandPtr,unsigned char *samples,int *pnt) tmp1 += 2; } *pnt += 32; - + return ret; } @@ -121,7 +131,7 @@ int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt) short *samples = (short *) (out+*pnt); real *b0,(*buf)[0x110]; - int clip = 0; + int clip = 0; int bo1; if(param.enable_equalizer) @@ -152,7 +162,7 @@ int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt) { register int j; real *window = decwin + 16 - bo1; - + for (j=16;j;j--,window+=0x10,samples+=step) { real sum; diff --git a/panda/src/mpg123/decode_2to1.c b/panda/src/mpg123/decode_2to1.c index ae6c4e1215..731c0b84fa 100644 --- a/panda/src/mpg123/decode_2to1.c +++ b/panda/src/mpg123/decode_2to1.c @@ -1,11 +1,20 @@ -/* - * Mpeg Layer-1,2,3 audio decoder - * ------------------------------ - * copyright (c) 1995 by Michael Hipp, All rights reserved. See also 'README' - * version for slower machines .. decodes only every second sample - * sounds like 24000,22050 or 16000 kHz .. (depending on original sample freq.) +/* Filename: decode_2to1.c + * Created by: * - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include @@ -109,7 +118,7 @@ int synth_2to1_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt) ((short *)samples)[1] = ((short *)samples)[0]; samples+=4; } - + return ret; } @@ -121,7 +130,7 @@ int synth_2to1(real *bandPtr,int channel,unsigned char *out,int *pnt) short *samples = (short *) (out + *pnt); real *b0,(*buf)[0x110]; - int clip = 0; + int clip = 0; int bo1; if(param.enable_equalizer) diff --git a/panda/src/mpg123/decode_4to1.c b/panda/src/mpg123/decode_4to1.c index c2a16faecb..dfe33578ec 100644 --- a/panda/src/mpg123/decode_4to1.c +++ b/panda/src/mpg123/decode_4to1.c @@ -1,12 +1,20 @@ -/* - * Mpeg Layer-1,2,3 audio decoder - * ------------------------------ - * copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved. - * See also 'README' - * version for slower machines .. decodes only every fourth sample - * dunno why it sounds THIS annoying (maybe we should adapt the window?) - * absolutely not optimized for this operation - */ +/* Filename: decode_4to1.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include @@ -122,7 +130,7 @@ int synth_4to1(real *bandPtr,int channel,unsigned char *out,int *pnt) short *samples = (short *) (out + *pnt); real *b0,(*buf)[0x110]; - int clip = 0; + int clip = 0; int bo1; if(param.enable_equalizer) @@ -229,7 +237,7 @@ int synth_4to1(real *bandPtr,int channel,unsigned char *out,int *pnt) #endif } } - + *pnt += 32; return clip; diff --git a/panda/src/mpg123/decode_ntom.c b/panda/src/mpg123/decode_ntom.c index 7eb84ee974..f12c0df816 100644 --- a/panda/src/mpg123/decode_ntom.c +++ b/panda/src/mpg123/decode_ntom.c @@ -1,11 +1,20 @@ -/* - * Mpeg Layer-1,2,3 audio decoder - * ------------------------------ - * copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved. - * See also 'README' +/* Filename: decode_ntom.c + * Created by: * - * N->M down/up sampling. Not optimized for speed. - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include @@ -79,7 +88,7 @@ int synth_ntom_8bit_mono(real *bandPtr,unsigned char *samples,int *pnt) tmp1 += 2; } *pnt += pnt1 >> 2; - + return ret; } @@ -131,7 +140,7 @@ int synth_ntom_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt) ret = synth_ntom(bandPtr,0,samples,pnt); samples += pnt1; - + for(i=0;i<((*pnt-pnt1)>>2);i++) { ((short *)samples)[1] = ((short *)samples)[0]; samples+=4; @@ -149,7 +158,7 @@ int synth_ntom(real *bandPtr,int channel,unsigned char *out,int *pnt) short *samples = (short *) (out + *pnt); real *b0,(*buf)[0x110]; - int clip = 0; + int clip = 0; int bo1; int ntom; @@ -184,7 +193,7 @@ int synth_ntom(real *bandPtr,int channel,unsigned char *out,int *pnt) { register int j; real *window = decwin + 16 - bo1; - + for (j=16;j;j--,window+=0x10) { real sum; diff --git a/panda/src/mpg123/equalizer.c b/panda/src/mpg123/equalizer.c index 631220edd3..427bc8c4b7 100644 --- a/panda/src/mpg123/equalizer.c +++ b/panda/src/mpg123/equalizer.c @@ -1,3 +1,20 @@ +/* Filename: equalizer.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "mpg123.h" @@ -7,7 +24,7 @@ int equalizer_cnt; real equalizerband[2][SBLIMIT*SSLIMIT]; -void do_equalizer(real *bandPtr,int channel) +void do_equalizer(real *bandPtr,int channel) { int i; diff --git a/panda/src/mpg123/genre.h b/panda/src/mpg123/genre.h index 02dba93c4a..72de99ba5e 100644 --- a/panda/src/mpg123/genre.h +++ b/panda/src/mpg123/genre.h @@ -1,3 +1,21 @@ +// Filename: genre.h +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + char *genre_table[] = { "Blues", diff --git a/panda/src/mpg123/getbits.c b/panda/src/mpg123/getbits.c index 7c8358a9df..a0e5e58640 100644 --- a/panda/src/mpg123/getbits.c +++ b/panda/src/mpg123/getbits.c @@ -1,3 +1,21 @@ +/* Filename: getbits.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + #include "mpg123.h" #include "common.h" @@ -19,7 +37,7 @@ void backbits(struct bitstream_info *bsi,int number_of_bits) bsi->bitindex &= 0x7; } -int getbitoffset(struct bitstream_info *bsi) +int getbitoffset(struct bitstream_info *bsi) { return (-bsi->bitindex)&0x7; } @@ -27,7 +45,7 @@ int getbitoffset(struct bitstream_info *bsi) int getbyte(struct bitstream_info *bsi) { #ifdef DEBUG_GETBITS - if(bsi->bitindex) + if(bsi->bitindex) fprintf(stderr,"getbyte called unsynched!\n"); #endif return *bsi->wordpointer++; diff --git a/panda/src/mpg123/getbits.h b/panda/src/mpg123/getbits.h index 034023d4b6..d6ca37e8b5 100644 --- a/panda/src/mpg123/getbits.h +++ b/panda/src/mpg123/getbits.h @@ -1,6 +1,20 @@ - -/* that's the same file as getits.c but with defines to - force inlining */ +/* Filename: getbits.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ static unsigned long rval; static unsigned char rval_uc; diff --git a/panda/src/mpg123/httpget.c b/panda/src/mpg123/httpget.c index d5a8e2c616..c28f237223 100644 --- a/panda/src/mpg123/httpget.c +++ b/panda/src/mpg123/httpget.c @@ -1,9 +1,20 @@ -/* - * httpget.c +/* Filename: httpget.c + * Created by: * - * Oliver Fromme - * Wed Apr 9 20:57:47 MET DST 1997 - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #undef ALSA diff --git a/panda/src/mpg123/huffman.h b/panda/src/mpg123/huffman.h index 7fec0d589e..76331d0102 100644 --- a/panda/src/mpg123/huffman.h +++ b/panda/src/mpg123/huffman.h @@ -1,19 +1,29 @@ -/* - * huffman tables ... recalcualted to work with my optimzed - * decoder scheme (MH) - * - * probably we could save a few bytes of memory, because the - * smaller tables are often the part of a bigger table - */ +/* Filename: huffman.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -struct newhuff +struct newhuff { unsigned int linbits; short *table; }; -static short tab0[] = -{ +static short tab0[] = +{ 0 }; @@ -286,7 +296,7 @@ static short tab_c1[] = -static struct newhuff ht[] = +static struct newhuff ht[] = { { /* 0 */ 0 , tab0 } , { /* 2 */ 0 , tab1 } , @@ -323,7 +333,7 @@ static struct newhuff ht[] = { /* 16 */ 13, tab24 } }; -static struct newhuff htc[] = +static struct newhuff htc[] = { { /* 1 , 1 , */ 0 , tab_c0 } , { /* 1 , 1 , */ 0 , tab_c1 } diff --git a/panda/src/mpg123/l2tables.h b/panda/src/mpg123/l2tables.h index 980897d01e..d68dbf7de2 100644 --- a/panda/src/mpg123/l2tables.h +++ b/panda/src/mpg123/l2tables.h @@ -1,9 +1,20 @@ -/* - * Layer 2 Alloc tables .. - * most other tables are calculated on program start (which is (of course) - * not ISO-conform) .. - * Layer-3 huffman table is in huffman.h - */ +/* Filename: l2tables.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ struct al_table alloc_0[] = { {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, diff --git a/panda/src/mpg123/layer1.c b/panda/src/mpg123/layer1.c index 2bdb5b2e2e..c8bf9df710 100644 --- a/panda/src/mpg123/layer1.c +++ b/panda/src/mpg123/layer1.c @@ -1,12 +1,20 @@ -/* - * Mpeg Layer-1 audio decoder - * -------------------------- - * copyright (c) 1995 by Michael Hipp, All rights reserved. See also 'README' - * near unoptimzed ... +/* Filename: layer1.c + * Created by: * - * may have a few bugs after last optimization ... + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "mpg123.h" @@ -20,7 +28,7 @@ void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],stru if(fr->stereo) { int i; int jsbound = fr->jsbound; - for (i=0;ibits; for (j=0;jbits; - if( (d1=alloc2->d) < 0) + if( (d1=alloc2->d) < 0) { real cm=muls[k][scale[x1]]; fraction[j][0][i] = ((real) ((int)getbits(k) + d1)) * cm; fraction[j][1][i] = ((real) ((int)getbits(k) + d1)) * cm; fraction[j][2][i] = ((real) ((int)getbits(k) + d1)) * cm; - } - else + } + else { static int *table[] = { 0,0,0,grp_3tab,0,grp_5tab,0,0,0,grp_9tab }; unsigned int idx,*tab,m=scale[x1]; @@ -171,7 +182,7 @@ void II_step_two(unsigned int *bit_alloc,real fraction[2][4][SBLIMIT],int *scale tab = (unsigned int *) (table[d1] + idx + idx + idx); fraction[j][0][i] = muls[*tab++][m]; fraction[j][1][i] = muls[*tab++][m]; - fraction[j][2][i] = muls[*tab][m]; + fraction[j][2][i] = muls[*tab][m]; } scale+=3; } @@ -214,13 +225,13 @@ void II_step_two(unsigned int *bit_alloc,real fraction[2][4][SBLIMIT],int *scale fraction[0][0][i] = fraction[0][1][i] = fraction[0][2][i] = fraction[1][0][i] = fraction[1][1][i] = fraction[1][2][i] = 0.0; } -/* +/* should we use individual scalefac for channel 2 or is the current way the right one , where we just copy channel 1 to - channel 2 ?? + channel 2 ?? The current 'strange' thing is, that we throw away the scalefac values for the second channel ...!! --> changed .. now we use the scalefac values of channel one !! +-> changed .. now we use the scalefac values of channel one !! */ } @@ -278,10 +289,10 @@ int do_layer2(struct mpstr *mp,struct frame *fr,int outmode,struct audio_info_st II_step_one(bit_alloc, scale, fr); - for (i=0;i>2); - for (j=0;j<3;j++) + for (j=0;j<3;j++) { if(single >= 0) { diff --git a/panda/src/mpg123/layer3.c b/panda/src/mpg123/layer3.c index baf336e05c..ad2758bca7 100644 --- a/panda/src/mpg123/layer3.c +++ b/panda/src/mpg123/layer3.c @@ -1,13 +1,20 @@ -/* - * Mpeg Layer-3 audio decoder - * -------------------------- - * copyright (c) 1995-1999 by Michael Hipp. - * All rights reserved. See also 'README' +/* Filename: layer3.c + * Created by: * - * Optimize-TODO: put short bands into the band-field without the stride - * of 3 reals - * Length-optimze: unify long and short band code where it is possible - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include "mpg123.h" @@ -45,7 +52,7 @@ struct bandInfoStruct { int longLimit[9][23]; int shortLimit[9][14]; -struct bandInfoStruct bandInfo[9] = { +struct bandInfoStruct bandInfo[9] = { /* MPEG 1.0 */ { {0,4,8,12,16,20,24,30,36,44,52,62,74, 90,110,134,162,196,238,288,342,418,576}, @@ -109,8 +116,8 @@ static unsigned int i_slen2[256]; /* MPEG 2.0 slen for intensity stereo */ static real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16]; static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16]; -/* - * init tables for layer-3 +/* + * init tables for layer-3 */ void init_layer3(int down_sample_sblimit) { @@ -322,11 +329,11 @@ static int III_get_side_info(struct III_sideinfo *si,int stereo, static const int tabs[2][5] = { { 2,9,5,3,4 } , { 1,8,1,2,9 } }; const int *tab = tabs[lsf]; - + si->main_data_begin = getbits(tab[1]); if (stereo == 1) si->private_bits = getbits_fast(tab[2]); - else + else si->private_bits = getbits_fast(tab[3]); if(!lsf) { @@ -369,8 +376,8 @@ static int III_get_side_info(struct III_sideinfo *si,int stereo, fprintf(stderr,"Blocktype == 0 and window-switching == 1 not allowed.\n"); return 0; } - - /* region_count/start parameters are implicit in this case. */ + + /* region_count/start parameters are implicit in this case. */ if(!lsf || gr_info->block_type == 2) gr_info->region1start = 36>>1; else { @@ -456,7 +463,7 @@ static int III_get_scale_factors_1(int *scf,struct gr_info_s *gr_info) numbits += num0 * 6; } else { - scf += 6; + scf += 6; } if(!(scfsi & 0x4)) { @@ -474,7 +481,7 @@ static int III_get_scale_factors_1(int *scf,struct gr_info_s *gr_info) numbits += num1 * 5; } else { - scf += 5; + scf += 5; } if(!(scfsi & 0x1)) { @@ -503,7 +510,7 @@ static int III_get_scale_factors_2(int *scf,struct gr_info_s *gr_info,int i_ster { { 9, 9, 9,9 } , { 9, 9,12,6 } , { 18,18,0,0} , {12,12,12,0 } , {12, 9, 9,6 } , { 15,12,9,0} } , { { 6, 9, 9,9 } , { 6, 9,12,6 } , { 15,18,0,0} , - { 6,15,12,0 } , { 6,12, 9,6 } , { 6,18,9,0} } }; + { 6,15,12,0 } , { 6,12, 9,6 } , { 6,18,9,0} } }; if(i_stereo) /* i_stereo AND second channel -> do_layer3() checks this */ slen = i_slen2[gr_info->scalefac_compress>>1]; @@ -512,7 +519,7 @@ static int III_get_scale_factors_2(int *scf,struct gr_info_s *gr_info,int i_ster gr_info->preflag = (slen>>15) & 0x1; - n = 0; + n = 0; if( gr_info->block_type == 2 ) { n++; if(gr_info->mixed_block_flag) @@ -534,7 +541,7 @@ static int III_get_scale_factors_2(int *scf,struct gr_info_s *gr_info,int i_ster *scf++ = 0; } } - + n = (n << 1) + 1; for(i=0;iregion1start; int region2 = gr_info->region2start; - l3 = ((576>>1)-bv)>>1; + l3 = ((576>>1)-bv)>>1; /* - * we may lose the 'odd' bit here !! - * check this later again + * we may lose the 'odd' bit here !! + * check this later again */ if(bv <= region1) { l[0] = bv; l[1] = l[2] = 0; @@ -595,10 +602,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf, } } } - + if(gr_info->block_type == 2) { /* - * decoding with short or mixed mode BandIndex table + * decoding with short or mixed mode BandIndex table */ int i,max[4]; int step=0,lwin=3,cb=0; @@ -740,7 +747,7 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf, if(part2remain+num <= 0) { break; } - if(mask < 0) + if(mask < 0) *xrpnt = -v; else *xrpnt = v; @@ -930,7 +937,7 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf, backbits(num); num = 0; - while(xrpnt < &xr[SBLIMIT][0]) + while(xrpnt < &xr[SBLIMIT][0]) *xrpnt++ = 0.0; while( part2remain > 16 ) { @@ -948,7 +955,7 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf, return 0; } -/* +/* * III_stereo: calculate real channel values for Joint-I-Stereo-mode */ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac, @@ -960,10 +967,10 @@ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac, const real *tab1,*tab2; int tab; - static const real *tabs[3][2][2] = { + static const real *tabs[3][2][2] = { { { tan1_1,tan2_1 } , { tan1_2,tan2_2 } }, { { pow1_1[0],pow2_1[0] } , { pow1_2[0],pow2_2[0] } } , - { { pow1_1[1],pow2_1[1] } , { pow1_2[1],pow2_2[1] } } + { { pow1_1[1],pow2_1[1] } , { pow1_2[1],pow2_2[1] } } }; tab = lsf + (gr_info->scalefac_compress & lsf); @@ -1001,7 +1008,7 @@ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac, do_l = 0; for(;sfb<12;sfb++) { - is_p = scalefac[sfb*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ + is_p = scalefac[sfb*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ if(is_p != 7) { real t1,t2; sb = bi->shortDiff[sfb]; @@ -1016,7 +1023,7 @@ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac, } #if 1 -/* in the original: copy 10 to 11 , here: copy 11 to 12 +/* in the original: copy 10 to 11 , here: copy 11 to 12 maybe still wrong??? (copy 12 to 13?) */ is_p = scalefac[11*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ sb = bi->shortDiff[12]; @@ -1029,7 +1036,7 @@ maybe still wrong??? (copy 12 to 13?) */ if(is_p != 7) { real t1,t2; t1 = tab1[is_p]; t2 = tab2[is_p]; - for ( ; sb > 0; sb--,idx+=3 ) { + for ( ; sb > 0; sb--,idx+=3 ) { real v = xr[0][idx]; xr[0][idx] = v * t1; xr[1][idx] = v * t2; @@ -1038,7 +1045,7 @@ maybe still wrong??? (copy 12 to 13?) */ } /* end for(lwin; .. ; . ) */ /* also check l-part, if ALL bands in the three windows are 'empty' - * and mode = mixed_mode + * and mode = mixed_mode */ if (do_l) { int sfb = gr_info->maxbandl; @@ -1056,17 +1063,17 @@ maybe still wrong??? (copy 12 to 13?) */ xr[1][idx] = v * t2; } } - else + else idx += sb; } - } - } + } + } else { /* ((gr_info->block_type != 2)) */ int sfb = gr_info->maxbandl; int is_p,idx = bi->longIdx[sfb]; /* hmm ... maybe the maxbandl stuff for i-stereo is buggy? */ - if(sfb <= 21) { + if(sfb <= 21) { for ( ; sfb<21; sfb++) { int sb = bi->longDiff[sfb]; is_p = scalefac[sfb]; /* scale: 0-15 */ @@ -1086,7 +1093,7 @@ maybe still wrong??? (copy 12 to 13?) */ is_p = scalefac[20]; if(is_p != 7) { /* copy l-band 20 to l-band 21 */ int sb; - real t1 = tab1[is_p],t2 = tab2[is_p]; + real t1 = tab1[is_p],t2 = tab2[is_p]; for ( sb = bi->longDiff[21]; sb > 0; sb--,idx++ ) { real v = xr[0][idx]; @@ -1102,9 +1109,9 @@ static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) { int sblim; if(gr_info->block_type == 2) { - if(!gr_info->mixed_block_flag) + if(!gr_info->mixed_block_flag) return; - sblim = 1; + sblim = 1; } else { sblim = gr_info->maxb-1; @@ -1132,7 +1139,7 @@ static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) { } } -/* +/* This is an optimized DCT from Jeff Tsay's maplay 1.2+ package. Saved one multiplication by doing the 'twiddle factor' stuff together with the window mul. (MH) @@ -1197,7 +1204,7 @@ void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf) #if 1 { real t3; - { + { real t0, t1, t2; t0 = COS6_2 * (in[8] + in[16] - in[4]); @@ -1374,7 +1381,7 @@ void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf) out2[8-(v)] = tmp * w[26-(v)]; } \ sum0 -= sum1; \ ts[SBLIMIT*(8-(v))] = out1[8-(v)] + sum0 * w[8-(v)]; \ - ts[SBLIMIT*(9+(v))] = out1[9+(v)] + sum0 * w[9+(v)]; + ts[SBLIMIT*(9+(v))] = out1[9+(v)] + sum0 * w[9+(v)]; #define MACRO1(v) { \ real sum0,sum1; \ sum0 = tmp1a + tmp2a; \ @@ -1399,7 +1406,7 @@ void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf) tb33 = in[2*3+1] * c[3]; tb66 = in[2*6+1] * c[6] + in[2*0+1]; - { + { real tmp1a,tmp2a,tmp1b,tmp2b; tmp1a = in[2*1+0] * c[1] + ta33 + in[2*5+0] * c[5] + in[2*7+0] * c[7]; tmp1b = in[2*1+1] * c[1] + tb33 + in[2*5+1] * c[5] + in[2*7+1] * c[7]; @@ -1496,7 +1503,7 @@ static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,registe register real *out1 = rawout1; ts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2]; ts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5]; - + DCT12_PART1 { @@ -1530,7 +1537,7 @@ static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,registe { real in0,in1,in2,in3,in4,in5; register real *out2 = rawout2; - + DCT12_PART1 { @@ -1559,7 +1566,7 @@ static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,registe ts[(17-2)*SBLIMIT] += in4 * wi[5-2]; } - in++; + in++; { real in0,in1,in2,in3,in4,in5; @@ -1617,7 +1624,7 @@ static void III_hybrid(struct mpstr *mp,real fsIn[SBLIMIT][SSLIMIT],real tsOut[S rawout2=mp->hybrid_block[b][ch]; mp->hybrid_blc[ch] = b; } - + if(gr_info->mixed_block_flag) { sb = 2; #ifdef USE_3DNOW @@ -1629,7 +1636,7 @@ static void III_hybrid(struct mpstr *mp,real fsIn[SBLIMIT][SSLIMIT],real tsOut[S #endif rawout1 += 36; rawout2 += 36; tspnt += 2; } - + bt = gr_info->block_type; if(bt == 2) { for (; sbmaxb; sb+=2,tspnt+=2,rawout1+=36,rawout2+=36) { @@ -1713,7 +1720,7 @@ int do_layer3(struct mpstr *mp,struct frame *fr,int outmode,struct audio_info_st if(stereo == 2) { struct gr_info_s *gr_info = &(sideinfo.ch[1].gr[gr]); long part2bits; - if(fr->lsf) + if(fr->lsf) part2bits = III_get_scale_factors_2(scalefacs[1],gr_info,i_stereo); else part2bits = III_get_scale_factors_1(scalefacs[1],gr_info); @@ -1740,7 +1747,7 @@ int do_layer3(struct mpstr *mp,struct frame *fr,int outmode,struct audio_info_st III_i_stereo(hybridIn,scalefacs[1],gr_info,sfreq,ms_stereo,fr->lsf); if(ms_stereo || i_stereo || (single == 3) ) { - if(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb) + if(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb) sideinfo.ch[0].gr[gr].maxb = gr_info->maxb; else gr_info->maxb = sideinfo.ch[0].gr[gr].maxb; @@ -1752,7 +1759,7 @@ int do_layer3(struct mpstr *mp,struct frame *fr,int outmode,struct audio_info_st register int i; register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1]; for(i=0;imaxb;i++,in0++) - *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */ + *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */ } break; case 1: @@ -1796,19 +1803,19 @@ int do_layer3(struct mpstr *mp,struct frame *fr,int outmode,struct audio_info_st int n; n=(audiobufsize - pcm_point) / (2*2*32); if (n > (SSLIMIT-ss)) n=SSLIMIT-ss; - + synth_1to1_486(hybridOut[0][ss],0,pcm_sample+pcm_point,n); synth_1to1_486(hybridOut[1][ss],1,pcm_sample+pcm_point,n); ss+=n; pcm_point+=(2*2*32)*n; - + if(pcm_point >= audiobufsize) audio_flush(outmode,ai); } } #endif } - + return clip; } diff --git a/panda/src/mpg123/mpg123.h b/panda/src/mpg123/mpg123.h index 955de61401..c194a65a67 100644 --- a/panda/src/mpg123/mpg123.h +++ b/panda/src/mpg123/mpg123.h @@ -1,7 +1,20 @@ -/* - * mpg123 defines - * used source: musicout.h from mpegaudio package - */ +/* Filename: mpg123.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include @@ -99,7 +112,7 @@ typedef unsigned char byte; #define AUSHIFT (3) -struct al_table +struct al_table { short bits; short d; @@ -381,7 +394,7 @@ extern int au_close(void); extern int cdr_open(struct audio_info_struct *ai, char *cdrfilename); extern int cdr_close(void); -extern int getVBRHeader(struct vbrHeader *head,unsigned char *buf, +extern int getVBRHeader(struct vbrHeader *head,unsigned char *buf, struct frame *fr); diff --git a/panda/src/mpg123/mpgaudio.h b/panda/src/mpg123/mpgaudio.h index b5b294e5d3..8521d4d747 100644 --- a/panda/src/mpg123/mpgaudio.h +++ b/panda/src/mpg123/mpgaudio.h @@ -1,6 +1,20 @@ -/* - * Audio 'LIB' defines - */ +/* Filename: mpgaudio.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #define AUDIO_OUT_HEADPHONES 0x01 #define AUDIO_OUT_INTERNAL_SPEAKER 0x02 diff --git a/panda/src/mpg123/mpgbuffer.c b/panda/src/mpg123/mpgbuffer.c index 1d7d643bce..e64b18a638 100644 --- a/panda/src/mpg123/mpgbuffer.c +++ b/panda/src/mpg123/mpgbuffer.c @@ -1,9 +1,20 @@ -/* - * buffer.c +/* Filename: mpgbuffer.c + * Created by: * - * Oliver Fromme - * Mon Apr 14 03:53:18 MET DST 1997 - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include @@ -83,7 +94,7 @@ void buffer_sig(int signal, int block) if (!buffermem || !block) return; - if(xfermem_block(XF_WRITER, buffermem) != XF_CMD_WAKEUP) + if(xfermem_block(XF_WRITER, buffermem) != XF_CMD_WAKEUP) perror("Could not resync/reset buffers"); #endif @@ -125,7 +136,7 @@ void buffer_loop(struct audio_info_struct *ai, sigset_t *oldsigset) * changing the sample rate. [OF] */ /* writer must block when sending SIGUSR1 - * or we will lose all data processed + * or we will lose all data processed * in the meantime! [dk] */ xf->readindex = xf->freeindex; @@ -136,8 +147,8 @@ void buffer_loop(struct audio_info_struct *ai, sigset_t *oldsigset) xfermem_putcmd(my_fd, XF_CMD_WAKEUP); if (param.outmode == DECODE_AUDIO) { audio_close (ai); - ai->rate = xf->buf[0]; - ai->channels = xf->buf[1]; + ai->rate = xf->buf[0]; + ai->channels = xf->buf[1]; ai->format = xf->buf[2]; if (audio_open(ai) < 0) { perror("audio"); @@ -155,7 +166,7 @@ void buffer_loop(struct audio_info_struct *ai, sigset_t *oldsigset) } if(bytes < preload) { int cmd; - if (done && !bytes) { + if (done && !bytes) { break; } @@ -174,7 +185,7 @@ void buffer_loop(struct audio_info_struct *ai, sigset_t *oldsigset) case XF_CMD_WAKEUP: break; /* Proceed playing. */ case XF_CMD_TERMINATE: - /* Proceed playing without + /* Proceed playing without * blocking any further. */ done=TRUE; @@ -211,7 +222,7 @@ void buffer_loop(struct audio_info_struct *ai, sigset_t *oldsigset) /* * done==TRUE tells writer process to stop * sending data. There might be some latency - * involved when resetting readindex to + * involved when resetting readindex to * freeindex so we might need more than one * cycle to terminate. (The number of cycles * should be finite unless I managed to mess diff --git a/panda/src/mpg123/mpgbuffer.h b/panda/src/mpg123/mpgbuffer.h index c1c771d4de..b4e2c4ba0e 100644 --- a/panda/src/mpg123/mpgbuffer.h +++ b/panda/src/mpg123/mpgbuffer.h @@ -1,9 +1,20 @@ -/* - * Application specific interaction between main and buffer - * process. This is much less generic than the functions in - * xfermem so I chose to put it in buffer.[hc]. - * 01/28/99 [dk] - */ +/* Filename: mpgbuffer.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ void buffer_ignore_lowmem(void); void buffer_end(void); diff --git a/panda/src/mpg123/readers.c b/panda/src/mpg123/readers.c index 4933152333..1656999320 100644 --- a/panda/src/mpg123/readers.c +++ b/panda/src/mpg123/readers.c @@ -1,3 +1,21 @@ +/* Filename: readers.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + #include #include @@ -33,7 +51,7 @@ static int fullread(int fd,unsigned char *buf,int count) if(ret == 0) break; cnt += ret; - } + } return cnt; } @@ -44,7 +62,7 @@ static int default_init(struct reader *rds) rds->filepos = 0; rds->filelen = get_fileinfo(rds,buf); - + if(rds->filelen > 0) { if(!strncmp(buf,"TAG",3)) { rds->flags |= READER_ID3TAG; @@ -60,8 +78,8 @@ void stream_close(struct reader *rds) close(rds->filept); } -/**************************************** - * HACK,HACK,HACK: step back frames +/**************************************** + * HACK,HACK,HACK: step back frames * can only work if the 'stream' isn't a real stream but a file */ static int stream_back_bytes(struct reader *rds,int bytes) @@ -84,8 +102,8 @@ static int stream_back_frame(struct reader *rds,struct frame *fr,int num) bytes = (fr->framesize+8)*(num+2); - /* Skipping back/forth requires a bit more work in buffered mode. - * See mapped_back_frame(). + /* Skipping back/forth requires a bit more work in buffered mode. + * See mapped_back_frame(). */ if(param.usebuffer) bytes += (long)(xfermem_get_usedspace(buffermem) / @@ -134,12 +152,12 @@ static int stream_head_read(struct reader *rds,unsigned long *newhead) if(fullread(rds->filept,hbuf,4) != 4) return FALSE; - + *newhead = ((unsigned long) hbuf[0] << 24) | ((unsigned long) hbuf[1] << 16) | ((unsigned long) hbuf[2] << 8) | (unsigned long) hbuf[3]; - + return TRUE; } @@ -192,7 +210,7 @@ static long stream_tell(struct reader *rds) static void stream_rewind(struct reader *rds) { lseek(rds->filept,0,SEEK_SET); - if(param.usebuffer) + if(param.usebuffer) buffer_resync(); } @@ -225,14 +243,14 @@ static int get_fileinfo(struct reader *rds,char *buf) #ifdef READ_MMAP /*********************************************************+ - * memory mapped operation + * memory mapped operation * */ static unsigned char *mapbuf; static unsigned char *mappnt; static unsigned char *mapend; -static int mapped_init(struct reader *rds) +static int mapped_init(struct reader *rds) { long len; char buf[128]; @@ -263,7 +281,7 @@ static int mapped_init(struct reader *rds) static void mapped_rewind(struct reader *rds) { mappnt = mapbuf; - if (param.usebuffer) + if (param.usebuffer) buffer_resync(); } @@ -274,7 +292,7 @@ static void mapped_close(struct reader *rds) close(rds->filept); } -static int mapped_head_read(struct reader *rds,unsigned long *newhead) +static int mapped_head_read(struct reader *rds,unsigned long *newhead) { unsigned long nh; @@ -350,14 +368,14 @@ static int mapped_back_frame(struct reader *rds,struct frame *fr,int num) * output audio stream we have to make a guess at the number of frames * this corresponds to. */ - if(param.usebuffer) + if(param.usebuffer) bytes += (long)(xfermem_get_usedspace(buffermem) / - (buffermem->buf[0] * buffermem->buf[1] + (buffermem->buf[0] * buffermem->buf[1] * (buffermem->buf[2] & AUDIO_FORMAT_MASK ? - 16.0 : 8.0 )) + 16.0 : 8.0 )) * (tabsel_123[fr->lsf][fr->lay-1][fr->bitrate_index] << 10)); /* - bytes += (long)(compute_buffer_offset(fr)*compute_bpf(fr)); + bytes += (long)(compute_buffer_offset(fr)*compute_bpf(fr)); */ if( (mappnt - bytes) < mapbuf || (mappnt - bytes + 4) > mapend) @@ -384,7 +402,7 @@ static int mapped_back_frame(struct reader *rds,struct frame *fr,int num) if(param.usebuffer) buffer_resync(); - + return 0; } @@ -422,8 +440,8 @@ struct reader readers[] = { mapped_back_bytes, mapped_back_frame, mapped_tell, - mapped_rewind } , -#endif + mapped_rewind } , +#endif { default_init, stream_close, stream_head_read, @@ -454,7 +472,7 @@ struct reader *open_stream(char *bs_filenam,int fd) else filept = fd; } - else if (!strncmp(bs_filenam, "http://", 7)) + else if (!strncmp(bs_filenam, "http://", 7)) filept = http_open(bs_filenam); #ifndef O_BINARY #define O_BINARY (0) diff --git a/panda/src/mpg123/tabinit.c b/panda/src/mpg123/tabinit.c index 4b58db123f..0898c904d4 100644 --- a/panda/src/mpg123/tabinit.c +++ b/panda/src/mpg123/tabinit.c @@ -1,3 +1,20 @@ +/* Filename: tabinit.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include @@ -47,7 +64,7 @@ void make_decode_tables(long scaleval) real *costab; int idx; - + for(i=0;i<5;i++) { kr=0x10>>i; divv=0x40>>i; @@ -112,7 +129,7 @@ void make_conv16to8_table(int mode) c1 = 127 - (int) (log( 1.0 - 255.0 * (double) i*mul / 32768.0 ) * m); else c1 = 255 - (int) (log( 1.0 + 255.0 * (double) i*mul / 32768.0 ) * m); - if(c1 < 0 || c1 > 255) + if(c1 < 0 || c1 > 255) fprintf(stderr,"Converror %d %d\n",i,c1); if(c1 == 0) c1 = 2; diff --git a/panda/src/mpg123/vbrhead.c b/panda/src/mpg123/vbrhead.c index b7d6ab8d2e..f41e160e2a 100644 --- a/panda/src/mpg123/vbrhead.c +++ b/panda/src/mpg123/vbrhead.c @@ -1,6 +1,20 @@ -/* - * This checks for the VBR Header defined by Xing(tm) - */ +/* Filename: vbrhead.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "mpg123.h" @@ -15,7 +29,7 @@ static unsigned long get32bits(unsigned char *buf) { return ret; } -int getVBRHeader(struct vbrHeader *head,unsigned char *buf, struct frame *fr) +int getVBRHeader(struct vbrHeader *head,unsigned char *buf, struct frame *fr) { int ssize; @@ -31,20 +45,20 @@ int getVBRHeader(struct vbrHeader *head,unsigned char *buf, struct frame *fr) buf += ssize; if(( buf[0] != 'X' ) || ( buf[1] != 'i' ) || - ( buf[2] != 'n' ) || ( buf[3] != 'g' ) ) + ( buf[2] != 'n' ) || ( buf[3] != 'g' ) ) return 0; buf+=4; - + head->flags = get32bits(buf); buf+=4; - + if(head->flags & VBR_FRAMES_FLAG) { head->frames = get32bits(buf); buf += 4; } if(head->flags & VBR_BYTES_FLAG) { - head->bytes = get32bits(buf); + head->bytes = get32bits(buf); buf += 4; } diff --git a/panda/src/mpg123/xfermem.c b/panda/src/mpg123/xfermem.c index 092576e00f..73e4f69d90 100644 --- a/panda/src/mpg123/xfermem.c +++ b/panda/src/mpg123/xfermem.c @@ -1,11 +1,20 @@ -/* - * xfermem.c +/* Filename: xfermem.c + * Created by: * - * Oliver Fromme - * Sun Apr 6 02:26:26 MET DST 1997 + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * See xfermem.h for documentation/description. - */ + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef NOXFERMEM diff --git a/panda/src/mpg123/xfermem.h b/panda/src/mpg123/xfermem.h index c78402d710..0a34bc06f9 100644 --- a/panda/src/mpg123/xfermem.h +++ b/panda/src/mpg123/xfermem.h @@ -1,17 +1,20 @@ -/* - * xfermem.h +/* Filename: xfermem.h + * Created by: * - * Oliver Fromme - * Sat Mar 29 04:41:34 MET 1997 + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * This is a stand-alone module which implements a unidirectional, - * fast pipe using mmap(). Its primary use is to transfer large - * amounts of data from a parent process to its child process, - * with a buffer in between which decouples blocking conditions - * on both sides. Control information is transferred between the - * processes through a socketpair. See xftest.c for an example on - * how to use this module. - */ + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef TRUE #define FALSE 0 diff --git a/panda/src/net/config_net.cxx b/panda/src/net/config_net.cxx index 4d621a60c3..cb85ca6928 100644 --- a/panda/src/net/config_net.cxx +++ b/panda/src/net/config_net.cxx @@ -1,6 +1,19 @@ // Filename: config_net.cxx // Created by: drose (25Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_net.h" diff --git a/panda/src/net/config_net.h b/panda/src/net/config_net.h index da2f5289f1..d894e99c85 100644 --- a/panda/src/net/config_net.h +++ b/panda/src/net/config_net.h @@ -1,6 +1,19 @@ // Filename: config_net.h // Created by: drose (25Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_NET_H diff --git a/panda/src/net/connection.cxx b/panda/src/net/connection.cxx index 666b49ec12..6e28c368e6 100644 --- a/panda/src/net/connection.cxx +++ b/panda/src/net/connection.cxx @@ -1,6 +1,19 @@ // Filename: connection.cxx // Created by: jns (07Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "connection.h" @@ -147,7 +160,7 @@ send_datagram(const NetDatagram &datagram) { if (_manager != (ConnectionManager *)NULL) { _manager->connection_reset(this); } - + } else if (errcode != PR_PENDING_INTERRUPT_ERROR) { pprerror("PR_SendTo"); } diff --git a/panda/src/net/connection.h b/panda/src/net/connection.h index 7cb59b26a1..4cefb48bfe 100644 --- a/panda/src/net/connection.h +++ b/panda/src/net/connection.h @@ -2,6 +2,19 @@ // Created by: jns (07Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONNECTION_H #define CONNECTION_H diff --git a/panda/src/net/connectionListener.cxx b/panda/src/net/connectionListener.cxx index 4d191842d8..b5845318fb 100644 --- a/panda/src/net/connectionListener.cxx +++ b/panda/src/net/connectionListener.cxx @@ -1,6 +1,19 @@ // Filename: connectionListener.cxx // Created by: drose (09Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "connectionListener.h" @@ -13,11 +26,11 @@ //////////////////////////////////////////////////////////////////// // Function: ConnectionListener::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ConnectionListener:: ConnectionListener(ConnectionManager *manager, int num_threads) : - ConnectionReader(manager, num_threads) + ConnectionReader(manager, num_threads) { } diff --git a/panda/src/net/connectionListener.h b/panda/src/net/connectionListener.h index f85427bdfc..77a1ee2ba2 100644 --- a/panda/src/net/connectionListener.h +++ b/panda/src/net/connectionListener.h @@ -2,6 +2,19 @@ // Created by: drose (09Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONNECTIONLISTENER_H #define CONNECTIONLISTENER_H diff --git a/panda/src/net/connectionManager.cxx b/panda/src/net/connectionManager.cxx index e3945fefc1..8033df960b 100644 --- a/panda/src/net/connectionManager.cxx +++ b/panda/src/net/connectionManager.cxx @@ -1,6 +1,19 @@ // Filename: connectionManager.cxx // Created by: jns (07Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "connectionManager.h" @@ -20,7 +33,7 @@ //////////////////////////////////////////////////////////////////// // Function: ConnectionManager::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ConnectionManager:: ConnectionManager() { @@ -30,7 +43,7 @@ ConnectionManager() { //////////////////////////////////////////////////////////////////// // Function: ConnectionManager::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// ConnectionManager:: ~ConnectionManager() { @@ -81,7 +94,7 @@ open_UDP_connection(int port) { PR_Close(socket); return PT(Connection)(); } - + net_cat.info() << "Creating UDP connection for port " << port << "\n"; } else { @@ -160,14 +173,14 @@ open_TCP_client_connection(const NetAddress &address, int timeout_ms) { return PT(Connection)(); } - PRStatus result = PR_Connect(socket, address.get_addr(), + PRStatus result = PR_Connect(socket, address.get_addr(), PR_MillisecondsToInterval(timeout_ms)); if (result != PR_SUCCESS) { if (PR_GetError() != PR_CONNECT_RESET_ERROR) { pprerror("PR_Connect"); } net_cat.info() - << "Unable to open TCP connection to server " + << "Unable to open TCP connection to server " << address.get_ip_string() << " on port " << address.get_port() << "\n"; PR_Close(socket); return PT(Connection)(); @@ -196,7 +209,7 @@ open_TCP_client_connection(const string &hostname, int port, if (!address.set_host(hostname, port)) { return PT(Connection)(); } - + return open_TCP_client_connection(address, timeout_ms); } diff --git a/panda/src/net/connectionManager.h b/panda/src/net/connectionManager.h index 7a1458f9f8..aa94150107 100644 --- a/panda/src/net/connectionManager.h +++ b/panda/src/net/connectionManager.h @@ -2,6 +2,19 @@ // Created by: jns (07Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONNECTIONMANAGER_H #define CONNECTIONMANAGER_H @@ -51,11 +64,11 @@ PUBLISHED: bool close_connection(const PT(Connection) &connection); static string get_host_name(); - + protected: void new_connection(const PT(Connection) &connection); virtual void connection_reset(const PT(Connection) &connection)=0; - + void add_reader(ConnectionReader *reader); void remove_reader(ConnectionReader *reader); void add_writer(ConnectionWriter *writer); diff --git a/panda/src/net/connectionReader.cxx b/panda/src/net/connectionReader.cxx index 23ea79e9cf..16c4b4542a 100644 --- a/panda/src/net/connectionReader.cxx +++ b/panda/src/net/connectionReader.cxx @@ -1,6 +1,19 @@ // Filename: connectionReader.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "connectionReader.h" @@ -25,11 +38,11 @@ static const PRUint32 max_timeout_ms = 100; //////////////////////////////////////////////////////////////////// // Function: ConnectionReader::SocketInfo::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ConnectionReader::SocketInfo:: SocketInfo(const PT(Connection) &connection) : - _connection(connection) + _connection(connection) { _busy = false; _error = false; @@ -38,7 +51,7 @@ SocketInfo(const PT(Connection) &connection) : //////////////////////////////////////////////////////////////////// // Function: ConnectionReader::SocketInfo::is_udp // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool ConnectionReader::SocketInfo:: is_udp() const { @@ -48,7 +61,7 @@ is_udp() const { //////////////////////////////////////////////////////////////////// // Function: ConnectionReader::SocketInfo::get_socket // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PRFileDesc *ConnectionReader::SocketInfo:: get_socket() const { @@ -88,14 +101,14 @@ ConnectionReader(ConnectionManager *manager, int num_threads) : PR_Lock(_startup_mutex); for (int i = 0; i < num_threads; i++) { - PRThread *thread = + PRThread *thread = PR_CreateThread(PR_USER_THREAD, thread_start, (void *)this, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, // Since thread will mostly do I/O. - PR_JOINABLE_THREAD, + PR_JOINABLE_THREAD, 0); // Select a suitable stack size. - + nassertv(thread != (PRThread *)NULL); _threads.push_back(thread); } @@ -108,7 +121,7 @@ ConnectionReader(ConnectionManager *manager, int num_threads) : //////////////////////////////////////////////////////////////////// // Function: ConnectionReader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// ConnectionReader:: ~ConnectionReader() { @@ -332,7 +345,7 @@ shutdown() { if (result != PR_SUCCESS) { pprerror("PR_Interrupt"); } - + result = PR_JoinThread(*ti); if (result != PR_SUCCESS) { pprerror("PR_JoinThread"); @@ -369,7 +382,7 @@ finish_socket(SocketInfo *sinfo) { // future polls. sinfo->_busy = false; _reexamine_sockets = true; - + // However, someone might be already blocking on an // earlier-established PR_Poll() that doesn't involve this socket. // That complicates things. It means we'll have to wake that thread @@ -402,14 +415,14 @@ process_incoming_data(SocketInfo *sinfo) { if (sinfo->is_udp()) { process_incoming_udp_data(sinfo); } else { - process_incoming_tcp_data(sinfo); - } + process_incoming_tcp_data(sinfo); + } } //////////////////////////////////////////////////////////////////// // Function: ConnectionReader::process_incoming_udp_data // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ConnectionReader:: process_incoming_udp_data(SocketInfo *sinfo) { @@ -444,7 +457,7 @@ process_incoming_udp_data(SocketInfo *sinfo) { // Now we must decode the header to determine how big the datagram // is. This means we must have read at least a full header. if (bytes_read < datagram_udp_header_size) { - net_cat.error() + net_cat.error() << "Did not read entire header, discarding UDP datagram.\n"; finish_socket(sinfo); return; @@ -468,7 +481,7 @@ process_incoming_udp_data(SocketInfo *sinfo) { // And now do whatever we need to do to process the datagram. if (!header.verify_datagram(datagram)) { - net_cat.error() + net_cat.error() << "Ignoring invalid UDP datagram.\n"; } else { datagram.set_connection(sinfo->_connection); @@ -480,7 +493,7 @@ process_incoming_udp_data(SocketInfo *sinfo) { //////////////////////////////////////////////////////////////////// // Function: ConnectionReader::process_incoming_tcp_data // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ConnectionReader:: process_incoming_tcp_data(SocketInfo *sinfo) { @@ -498,7 +511,7 @@ process_incoming_tcp_data(SocketInfo *sinfo) { // First, we have to read the first datagram_tcp_header_size bytes. while (header_bytes_read < datagram_tcp_header_size) { PRInt32 bytes_read = - PR_Recv(socket, buffer + header_bytes_read, + PR_Recv(socket, buffer + header_bytes_read, datagram_tcp_header_size - header_bytes_read, 0, PR_INTERVAL_NO_TIMEOUT); @@ -552,17 +565,17 @@ process_incoming_tcp_data(SocketInfo *sinfo) { while (!_shutdown && (int)datagram.get_length() < size) { PRInt32 bytes_read; - + bytes_read = - PR_Recv(socket, buffer, - min((PRInt32)read_buffer_size, + PR_Recv(socket, buffer, + min((PRInt32)read_buffer_size, (PRInt32)(size - datagram.get_length())), 0, PR_INTERVAL_NO_TIMEOUT); PRInt8 *dp = buffer; - + if (bytes_read < 0) { PRErrorCode errcode = PR_GetError(); - if (errcode == PR_CONNECT_RESET_ERROR + if (errcode == PR_CONNECT_RESET_ERROR #ifdef PR_SOCKET_SHUTDOWN_ERROR || errcode == PR_SOCKET_SHUTDOWN_ERROR || errcode == PR_CONNECT_ABORTED_ERROR @@ -578,7 +591,7 @@ process_incoming_tcp_data(SocketInfo *sinfo) { } finish_socket(sinfo); return; - + } else if (bytes_read == 0) { // The socket was closed. Report that and return. if (_manager != (ConnectionManager *)NULL) { @@ -587,7 +600,7 @@ process_incoming_tcp_data(SocketInfo *sinfo) { finish_socket(sinfo); return; } - + PRInt32 datagram_bytes = min(bytes_read, (PRInt32)(size - datagram.get_length())); datagram.append_data(dp, datagram_bytes); @@ -647,7 +660,7 @@ thread_run() { // First determine our own thread index. PR_Lock(_startup_mutex); - Threads::const_iterator ti = + Threads::const_iterator ti = find(_threads.begin(), _threads.end(), PR_GetCurrentThread()); nassertv(ti != _threads.end()); @@ -657,7 +670,7 @@ thread_run() { PR_Unlock(_startup_mutex); while (!_shutdown) { - SocketInfo *sinfo = + SocketInfo *sinfo = get_next_available_socket(PR_INTERVAL_NO_TIMEOUT, current_thread_index); if (sinfo != (SocketInfo *)NULL) { @@ -680,12 +693,12 @@ thread_run() { // PR_INTERVAL_NO_WAIT. //////////////////////////////////////////////////////////////////// ConnectionReader::SocketInfo *ConnectionReader:: -get_next_available_socket(PRIntervalTime timeout, +get_next_available_socket(PRIntervalTime timeout, PRInt32 current_thread_index) { // Go to sleep on the select() mutex. This guarantees that only one // thread is in this function at a time. PR_Lock(_select_mutex); - + int num_sockets = _polled_sockets.size(); nassertr(num_sockets == (int)_poll.size(), NULL); @@ -696,7 +709,7 @@ get_next_available_socket(PRIntervalTime timeout, nassertr(_next_index < num_sockets, NULL); int i = _next_index; _next_index++; - + if (_poll[i].out_flags != 0) { _num_results--; SocketInfo *sinfo = _polled_sockets[i]; @@ -709,7 +722,7 @@ get_next_available_socket(PRIntervalTime timeout, PR_Sleep(PR_INTERVAL_NO_WAIT); return sinfo; - } else if ((_poll[i].out_flags & + } else if ((_poll[i].out_flags & (PR_POLL_ERR | PR_POLL_NVAL | PR_POLL_HUP)) != 0) { // Something bad happened to this socket. Tell the // ConnectionManager to drop it. @@ -728,7 +741,7 @@ get_next_available_socket(PRIntervalTime timeout, // Ok, no results from previous PR_Poll() calls. Prepare to set // up for a new poll. - + // First, report to anyone else who cares that we're the thread // about to do the poll. That way, if any new sockets come // available while we're polling, we can service them. @@ -747,7 +760,7 @@ get_next_available_socket(PRIntervalTime timeout, _next_index = 0; if (!_shutdown) { - PRIntervalTime poll_timeout = + PRIntervalTime poll_timeout = PR_MillisecondsToInterval(max_timeout_ms); if (timeout != PR_INTERVAL_NO_TIMEOUT) { poll_timeout = min(timeout, poll_timeout); @@ -783,7 +796,7 @@ get_next_available_socket(PRIntervalTime timeout, // Repeat the above until we (a) find a socket with actual noise // on it, or (b) return from PR_Poll() with no sockets available. } while (!_shutdown && _num_results > 0); - + PR_Unlock(_select_mutex); return (SocketInfo *)NULL; } diff --git a/panda/src/net/connectionReader.h b/panda/src/net/connectionReader.h index 8c11c08296..315fc6baea 100644 --- a/panda/src/net/connectionReader.h +++ b/panda/src/net/connectionReader.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONNECTIONREADER_H #define CONNECTIONREADER_H diff --git a/panda/src/net/connectionWriter.cxx b/panda/src/net/connectionWriter.cxx index 68be4dcec9..e003082266 100644 --- a/panda/src/net/connectionWriter.cxx +++ b/panda/src/net/connectionWriter.cxx @@ -1,6 +1,19 @@ // Filename: connectionWriter.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "connectionWriter.h" @@ -28,12 +41,12 @@ ConnectionWriter(ConnectionManager *manager, int num_threads) : _immediate = (num_threads <= 0); for (int i = 0; i < num_threads; i++) { - PRThread *thread = + PRThread *thread = PR_CreateThread(PR_USER_THREAD, thread_start, (void *)this, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, // Since thread will mostly do I/O. - PR_JOINABLE_THREAD, + PR_JOINABLE_THREAD, 0); // Select a suitable stack size. nassertv(thread != (PRThread *)NULL); @@ -46,7 +59,7 @@ ConnectionWriter(ConnectionManager *manager, int num_threads) : //////////////////////////////////////////////////////////////////// // Function: ConnectionWriter::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ConnectionWriter:: ~ConnectionWriter() { @@ -97,13 +110,13 @@ send(const Datagram &datagram, const PT(Connection) &connection) { if (net_cat.is_debug()) { net_cat.debug() - << "Sending TCP datagram of " << datagram.get_length() + << "Sending TCP datagram of " << datagram.get_length() << " bytes\n"; } NetDatagram copy(datagram); copy.set_connection(connection); - + if (_immediate) { return connection->send_datagram(copy); } else { @@ -135,7 +148,7 @@ send(const Datagram &datagram, const PT(Connection) &connection, if (net_cat.is_debug()) { net_cat.debug() - << "Sending UDP datagram of " << datagram.get_length() + << "Sending UDP datagram of " << datagram.get_length() << " bytes\n"; } diff --git a/panda/src/net/connectionWriter.h b/panda/src/net/connectionWriter.h index 0e05058295..0db69e1821 100644 --- a/panda/src/net/connectionWriter.h +++ b/panda/src/net/connectionWriter.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONNECTIONWRITER_H #define CONNECTIONWRITER_H @@ -49,7 +62,7 @@ PUBLISHED: protected: void clear_manager(); - + private: static void thread_start(void *data); void thread_run(); diff --git a/panda/src/net/datagramQueue.cxx b/panda/src/net/datagramQueue.cxx index c1fc37fcce..2024e95611 100644 --- a/panda/src/net/datagramQueue.cxx +++ b/panda/src/net/datagramQueue.cxx @@ -1,6 +1,19 @@ // Filename: datagramQueue.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "datagramQueue.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: DatagramQueue::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DatagramQueue:: DatagramQueue() { @@ -22,7 +35,7 @@ DatagramQueue() { //////////////////////////////////////////////////////////////////// // Function: DatagramQueue::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DatagramQueue:: ~DatagramQueue() { @@ -124,7 +137,7 @@ extract(NetDatagram &result) { result = _queue.front(); #endif _queue.pop_front(); - + PR_Unlock(_cvlock); return true; } diff --git a/panda/src/net/datagramQueue.h b/panda/src/net/datagramQueue.h index 8ccc2862a1..0f31564ec0 100644 --- a/panda/src/net/datagramQueue.h +++ b/panda/src/net/datagramQueue.h @@ -2,6 +2,19 @@ // Created by: drose (07Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAMQUEUE_H #define DATAGRAMQUEUE_H diff --git a/panda/src/net/datagramTCPHeader.cxx b/panda/src/net/datagramTCPHeader.cxx index c666dd9c74..0d64a53ed0 100644 --- a/panda/src/net/datagramTCPHeader.cxx +++ b/panda/src/net/datagramTCPHeader.cxx @@ -1,6 +1,19 @@ // Filename: datagramTCPHeader.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "datagramTCPHeader.h" @@ -84,13 +97,13 @@ verify_datagram(const NetDatagram &datagram) const { << "Invalid datagram!\n"; if (size != get_datagram_size()) { net_cat.debug() - << " size is " << size << " bytes, header reports " + << " size is " << size << " bytes, header reports " << get_datagram_size() << "\n"; } - + // We write the hex dump into a ostringstream first, to guarantee // an atomic write to the output stream in case we're threaded. - + ostringstream hex; datagram.dump_hex(hex); hex << "\n"; diff --git a/panda/src/net/datagramTCPHeader.h b/panda/src/net/datagramTCPHeader.h index cd57157104..4914bfbed6 100644 --- a/panda/src/net/datagramTCPHeader.h +++ b/panda/src/net/datagramTCPHeader.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAMTCPHEADER_H #define DATAGRAMTCPHEADER_H @@ -44,4 +57,4 @@ private: #endif - + diff --git a/panda/src/net/datagramUDPHeader.cxx b/panda/src/net/datagramUDPHeader.cxx index 42785f0447..ae350a0f82 100644 --- a/panda/src/net/datagramUDPHeader.cxx +++ b/panda/src/net/datagramUDPHeader.cxx @@ -1,6 +1,19 @@ // Filename: datagramUDPHeader.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "datagramUDPHeader.h" @@ -89,13 +102,13 @@ verify_datagram(const NetDatagram &datagram) const { << "Invalid datagram!\n"; if (checksum != get_datagram_checksum()) { net_cat.debug() - << " checksum is " << checksum << ", header reports " + << " checksum is " << checksum << ", header reports " << get_datagram_checksum() << "\n"; } - + // We write the hex dump into a ostringstream first, to guarantee // an atomic write to the output stream in case we're threaded. - + ostringstream hex; datagram.dump_hex(hex); hex << "\n"; diff --git a/panda/src/net/datagramUDPHeader.h b/panda/src/net/datagramUDPHeader.h index a214260aa1..5fe32dfe6a 100644 --- a/panda/src/net/datagramUDPHeader.h +++ b/panda/src/net/datagramUDPHeader.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAMUDPHEADER_H #define DATAGRAMUDPHEADER_H @@ -44,4 +57,4 @@ private: #endif - + diff --git a/panda/src/net/datagram_ui.cxx b/panda/src/net/datagram_ui.cxx index a8a7497da4..da579e6ae9 100644 --- a/panda/src/net/datagram_ui.cxx +++ b/panda/src/net/datagram_ui.cxx @@ -1,6 +1,19 @@ // Filename: datagram_ui.cxx // Created by: drose (09Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "datagram_ui.h" @@ -96,11 +109,11 @@ operator << (ostream &out, const NetDatagram &datagram) { case DE_int32: out << di.get_int32() << " "; break; - + case DE_float64: out << di.get_float64() << " "; break; - + case DE_string: out << "\"" << di.get_string() << "\" "; break; diff --git a/panda/src/net/datagram_ui.h b/panda/src/net/datagram_ui.h index 2965837148..f4a98b30ac 100644 --- a/panda/src/net/datagram_ui.h +++ b/panda/src/net/datagram_ui.h @@ -2,6 +2,19 @@ // Created by: drose (09Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DATAGRAM_UI_H #define DATAGRAM_UI_H diff --git a/panda/src/net/netAddress.cxx b/panda/src/net/netAddress.cxx index 35559bf058..19e156cfa8 100644 --- a/panda/src/net/netAddress.cxx +++ b/panda/src/net/netAddress.cxx @@ -1,6 +1,19 @@ // Filename: netAddress.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "netAddress.h" @@ -111,7 +124,7 @@ set_host(const string &hostname, int port) { if (p == hostname.length() && ni < 4 && is_ip && p > q) { ipaddr.n[ni] = (unsigned char)num; ni++; - + if (num >= 256) { is_ip = false; } @@ -141,9 +154,9 @@ set_host(const string &hostname, int port) { << "Unable to look up hostname " << hostname << ".\n"; return false; } - + PRIntn next = PR_EnumerateHostEnt(0, &host, port, &_addr); - + if (next == -1) { pprerror("PR_EnumerateHostEnt"); return false; @@ -199,7 +212,7 @@ get_ip_string() const { static const int buf_len = 1024; char buf[buf_len]; - PRStatus result = + PRStatus result = PR_NetAddrToString(&_addr, buf, buf_len); if (result != PR_SUCCESS) { pprerror("PR_NetAddrToString"); diff --git a/panda/src/net/netAddress.h b/panda/src/net/netAddress.h index 50b93b6173..3484fac92f 100644 --- a/panda/src/net/netAddress.h +++ b/panda/src/net/netAddress.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NETADDRESS_H #define NETADDRESS_H diff --git a/panda/src/net/netDatagram.I b/panda/src/net/netDatagram.I index 00868da3ca..396a9508ee 100644 --- a/panda/src/net/netDatagram.I +++ b/panda/src/net/netDatagram.I @@ -1,12 +1,25 @@ -// Filename: datagram.I +// Filename: netDatagram.I // Created by: drose (17May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: NetDatagram::operator == +// Function: NetDatagram::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool NetDatagram:: operator == (const NetDatagram &) const { @@ -14,9 +27,9 @@ operator == (const NetDatagram &) const { } //////////////////////////////////////////////////////////////////// -// Function: NetDatagram::operator != +// Function: NetDatagram::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool NetDatagram:: operator != (const NetDatagram &) const { @@ -26,7 +39,7 @@ operator != (const NetDatagram &) const { //////////////////////////////////////////////////////////////////// // Function: NetDatagram::operator < // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool NetDatagram:: operator < (const NetDatagram &) const { diff --git a/panda/src/net/netDatagram.cxx b/panda/src/net/netDatagram.cxx index 9672b9f2ae..b64b6fe733 100644 --- a/panda/src/net/netDatagram.cxx +++ b/panda/src/net/netDatagram.cxx @@ -1,6 +1,19 @@ -// Filename: datagram.cxx +// Filename: netDatagram.cxx // Created by: jns (07Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "netDatagram.h" @@ -22,14 +35,14 @@ NetDatagram() { // Description: Constructs a datagram from an existing block of data. //////////////////////////////////////////////////////////////////// NetDatagram:: -NetDatagram(const void *data, size_t size) : +NetDatagram(const void *data, size_t size) : Datagram(data, size) { } //////////////////////////////////////////////////////////////////// // Function: NetDatagram::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NetDatagram:: NetDatagram(const Datagram ©) : @@ -40,20 +53,20 @@ NetDatagram(const Datagram ©) : //////////////////////////////////////////////////////////////////// // Function: NetDatagram::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NetDatagram:: NetDatagram(const NetDatagram ©) : Datagram(copy), _connection(copy._connection), - _address(copy._address) + _address(copy._address) { } //////////////////////////////////////////////////////////////////// // Function: NetDatagram::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NetDatagram:: operator = (const Datagram ©) { @@ -65,7 +78,7 @@ operator = (const Datagram ©) { //////////////////////////////////////////////////////////////////// // Function: NetDatagram::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NetDatagram:: operator = (const NetDatagram ©) { diff --git a/panda/src/net/netDatagram.h b/panda/src/net/netDatagram.h index fac7c5a262..3bcf4f9339 100644 --- a/panda/src/net/netDatagram.h +++ b/panda/src/net/netDatagram.h @@ -2,6 +2,19 @@ // Created by: jns (07Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NETDATAGRAM_H #define NETDATAGRAM_H diff --git a/panda/src/net/pprerror.cxx b/panda/src/net/pprerror.cxx index c278900944..090a2167ca 100644 --- a/panda/src/net/pprerror.cxx +++ b/panda/src/net/pprerror.cxx @@ -1,6 +1,19 @@ // Filename: pprerror.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -209,7 +222,7 @@ get_error_message(PRErrorCode code) { case PR_SOCKET_SHUTDOWN_ERROR: return "PR_SOCKET_SHUTDOWN_ERROR--The socket has been shut down."; - + case PR_CONNECT_ABORTED_ERROR: return "PR_CONNECT_ABORTED_ERROR--The connection has been aborted."; diff --git a/panda/src/net/pprerror.h b/panda/src/net/pprerror.h index 512f3c233d..69dcda0cd0 100644 --- a/panda/src/net/pprerror.h +++ b/panda/src/net/pprerror.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PPRERROR_H #define PPRERROR_H diff --git a/panda/src/net/queuedConnectionListener.I b/panda/src/net/queuedConnectionListener.I index 08597d8930..4004fe34f8 100644 --- a/panda/src/net/queuedConnectionListener.I +++ b/panda/src/net/queuedConnectionListener.I @@ -1,12 +1,25 @@ // Filename: queuedConnectionListener.I // Created by: drose (17May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: ConnectionListenerData::operator == +// Function: ConnectionListenerData::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ConnectionListenerData:: operator == (const ConnectionListenerData &) const { @@ -14,9 +27,9 @@ operator == (const ConnectionListenerData &) const { } //////////////////////////////////////////////////////////////////// -// Function: ConnectionListenerData::operator != +// Function: ConnectionListenerData::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ConnectionListenerData:: operator != (const ConnectionListenerData &) const { @@ -26,7 +39,7 @@ operator != (const ConnectionListenerData &) const { //////////////////////////////////////////////////////////////////// // Function: ConnectionListenerData::operator < // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ConnectionListenerData:: operator < (const ConnectionListenerData &) const { diff --git a/panda/src/net/queuedConnectionListener.cxx b/panda/src/net/queuedConnectionListener.cxx index b0710e2b02..b2ee17b94b 100644 --- a/panda/src/net/queuedConnectionListener.cxx +++ b/panda/src/net/queuedConnectionListener.cxx @@ -1,6 +1,19 @@ // Filename: queuedConnectionListener.cxx // Created by: drose (09Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "queuedConnectionListener.h" @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionListener::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// QueuedConnectionListener:: QueuedConnectionListener(ConnectionManager *manager, int num_threads) : @@ -20,7 +33,7 @@ QueuedConnectionListener(ConnectionManager *manager, int num_threads) : //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionListener::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// QueuedConnectionListener:: ~QueuedConnectionListener() { @@ -64,7 +77,7 @@ new_connection_available() { // QueuedConnectionListener). //////////////////////////////////////////////////////////////////// bool QueuedConnectionListener:: -get_new_connection(PT(Connection) &rendezvous, +get_new_connection(PT(Connection) &rendezvous, NetAddress &address, PT(Connection) &new_connection) { ConnectionListenerData result; @@ -92,8 +105,8 @@ get_new_connection(PT(Connection) &new_connection) { NetAddress address; return get_new_connection(rendezvous, address, new_connection); } - - + + //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionListener::connection_opened // Access: Protected, Virtual @@ -103,16 +116,16 @@ get_new_connection(PT(Connection) &new_connection) { // for later retrieval by get_new_connection(). //////////////////////////////////////////////////////////////////// void QueuedConnectionListener:: -connection_opened(const PT(Connection) &rendezvous, +connection_opened(const PT(Connection) &rendezvous, const NetAddress &address, const PT(Connection) &new_connection) { ConnectionListenerData nc; nc._rendezvous = rendezvous; nc._address = address; nc._new_connection = new_connection; - + if (!enqueue_thing(nc)) { - net_cat.error() + net_cat.error() << "QueuedConnectionListener queue full!\n"; } } diff --git a/panda/src/net/queuedConnectionListener.h b/panda/src/net/queuedConnectionListener.h index efdde759d8..1387c6c9a0 100644 --- a/panda/src/net/queuedConnectionListener.h +++ b/panda/src/net/queuedConnectionListener.h @@ -2,6 +2,19 @@ // Created by: drose (09Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef QUEUEDCONNECTIONLISTENER_H #define QUEUEDCONNECTIONLISTENER_H @@ -49,7 +62,7 @@ PUBLISHED: NetAddress &address, PT(Connection) &new_connection); bool get_new_connection(PT(Connection) &new_connection); - + protected: virtual void connection_opened(const PT(Connection) &rendezvous, const NetAddress &address, diff --git a/panda/src/net/queuedConnectionManager.cxx b/panda/src/net/queuedConnectionManager.cxx index adeee74a6c..f84ea4a908 100644 --- a/panda/src/net/queuedConnectionManager.cxx +++ b/panda/src/net/queuedConnectionManager.cxx @@ -1,6 +1,19 @@ // Filename: queuedConnectionManager.cxx // Created by: drose (09Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "queuedConnectionManager.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionManager::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// QueuedConnectionManager:: QueuedConnectionManager() { @@ -19,7 +32,7 @@ QueuedConnectionManager() { //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionManager::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// QueuedConnectionManager:: ~QueuedConnectionManager() { @@ -73,8 +86,8 @@ bool QueuedConnectionManager:: get_reset_connection(PT(Connection) &connection) { return get_thing(connection); } - - + + //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionManager::connection_reset // Access: Protected, Virtual diff --git a/panda/src/net/queuedConnectionManager.h b/panda/src/net/queuedConnectionManager.h index 5e61505919..5a2371846e 100644 --- a/panda/src/net/queuedConnectionManager.h +++ b/panda/src/net/queuedConnectionManager.h @@ -2,6 +2,19 @@ // Created by: drose (09Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef QUEUEDCONNECTIONMANAGER_H #define QUEUEDCONNECTIONMANAGER_H diff --git a/panda/src/net/queuedConnectionReader.cxx b/panda/src/net/queuedConnectionReader.cxx index d9afe5f107..ce68f10bc3 100644 --- a/panda/src/net/queuedConnectionReader.cxx +++ b/panda/src/net/queuedConnectionReader.cxx @@ -1,6 +1,19 @@ // Filename: queuedConnectionReader.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "queuedConnectionReader.h" @@ -9,18 +22,18 @@ //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionReader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// QueuedConnectionReader:: -QueuedConnectionReader(ConnectionManager *manager, int num_threads) : - ConnectionReader(manager, num_threads) +QueuedConnectionReader(ConnectionManager *manager, int num_threads) : + ConnectionReader(manager, num_threads) { } //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionReader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// QueuedConnectionReader:: ~QueuedConnectionReader() { @@ -78,7 +91,7 @@ get_data(Datagram &result) { result = nd; return true; } - + //////////////////////////////////////////////////////////////////// // Function: QueuedConnectionReader::receive_datagram // Access: Protected, Virtual @@ -91,12 +104,12 @@ void QueuedConnectionReader:: receive_datagram(const NetDatagram &datagram) { if (net_cat.is_debug()) { net_cat.debug() - << "Received datagram of " << datagram.get_length() + << "Received datagram of " << datagram.get_length() << " bytes\n"; } if (!enqueue_thing(datagram)) { - net_cat.error() + net_cat.error() << "QueuedConnectionReader queue full!\n"; } } diff --git a/panda/src/net/queuedConnectionReader.h b/panda/src/net/queuedConnectionReader.h index a0ea7f99b7..218e8aa694 100644 --- a/panda/src/net/queuedConnectionReader.h +++ b/panda/src/net/queuedConnectionReader.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef QUEUEDCONNECTIONREADER_H #define QUEUEDCONNECTIONREADER_H @@ -26,7 +39,7 @@ EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, QueuedReturn); // threading and is willing to poll for datagrams at its // convenience. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA QueuedConnectionReader : public ConnectionReader, +class EXPCL_PANDA QueuedConnectionReader : public ConnectionReader, public QueuedReturn { PUBLISHED: QueuedConnectionReader(ConnectionManager *manager, int num_threads); @@ -35,7 +48,7 @@ PUBLISHED: bool data_available(); bool get_data(NetDatagram &result); bool get_data(Datagram &result); - + protected: virtual void receive_datagram(const NetDatagram &datagram); }; diff --git a/panda/src/net/queuedReturn.I b/panda/src/net/queuedReturn.I index 41c8e2067a..e3f39ef99b 100644 --- a/panda/src/net/queuedReturn.I +++ b/panda/src/net/queuedReturn.I @@ -1,6 +1,19 @@ // Filename: queuedReturn.I // Created by: drose (25Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_net.h" @@ -56,7 +69,7 @@ get_current_queue_size() const { //////////////////////////////////////////////////////////////////// // Function: QueuedReturn::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template QueuedReturn:: @@ -69,7 +82,7 @@ QueuedReturn() { //////////////////////////////////////////////////////////////////// // Function: QueuedReturn::Destructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// template QueuedReturn:: @@ -119,7 +132,7 @@ get_thing(Thing &result) { PR_Unlock(_mutex); return true; } - + //////////////////////////////////////////////////////////////////// // Function: QueuedReturn::enqueue_thing // Access: Protected @@ -140,7 +153,7 @@ enqueue_thing(const Thing &thing) { return enqueue_ok; } - + //////////////////////////////////////////////////////////////////// // Function: QueuedReturn::enqueue_unique_thing // Access: Protected diff --git a/panda/src/net/queuedReturn.h b/panda/src/net/queuedReturn.h index 391dc03320..26e644ebad 100644 --- a/panda/src/net/queuedReturn.h +++ b/panda/src/net/queuedReturn.h @@ -1,6 +1,19 @@ // Filename: queuedReturn.h // Created by: drose (25Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef QUEUEDRETURN_H @@ -35,7 +48,7 @@ protected: INLINE bool thing_available() const; bool get_thing(Thing &thing); - + bool enqueue_thing(const Thing &thing); bool enqueue_unique_thing(const Thing &thing); diff --git a/panda/src/net/recentConnectionReader.cxx b/panda/src/net/recentConnectionReader.cxx index 673f63356f..b41189a45a 100644 --- a/panda/src/net/recentConnectionReader.cxx +++ b/panda/src/net/recentConnectionReader.cxx @@ -1,6 +1,19 @@ // Filename: recentConnectionReader.cxx // Created by: drose (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "recentConnectionReader.h" @@ -9,11 +22,11 @@ //////////////////////////////////////////////////////////////////// // Function: RecentConnectionReader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// RecentConnectionReader:: -RecentConnectionReader(ConnectionManager *manager) : - ConnectionReader(manager, 1) +RecentConnectionReader(ConnectionManager *manager) : + ConnectionReader(manager, 1) { // We should not receive any datagrams before the constructor is // done initializing, or our thread may get confused. Fortunately @@ -26,7 +39,7 @@ RecentConnectionReader(ConnectionManager *manager) : //////////////////////////////////////////////////////////////////// // Function: RecentConnectionReader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// RecentConnectionReader:: ~RecentConnectionReader() { @@ -95,7 +108,7 @@ get_data(Datagram &result) { result = nd; return true; } - + //////////////////////////////////////////////////////////////////// // Function: RecentConnectionReader::receive_datagram // Access: Protected, Virtual @@ -108,7 +121,7 @@ void RecentConnectionReader:: receive_datagram(const NetDatagram &datagram) { if (net_cat.is_debug()) { net_cat.debug() - << "Received datagram of " << datagram.get_length() + << "Received datagram of " << datagram.get_length() << " bytes\n"; } diff --git a/panda/src/net/recentConnectionReader.h b/panda/src/net/recentConnectionReader.h index 5828d36c84..f1891f9307 100644 --- a/panda/src/net/recentConnectionReader.h +++ b/panda/src/net/recentConnectionReader.h @@ -1,6 +1,19 @@ // Filename: recentConnectionReader.h // Created by: drose (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef RECENTCONNECTIONREADER_H @@ -33,7 +46,7 @@ PUBLISHED: bool data_available(); bool get_data(NetDatagram &result); bool get_data(Datagram &result); - + protected: virtual void receive_datagram(const NetDatagram &datagram); diff --git a/panda/src/net/test_datagram.cxx b/panda/src/net/test_datagram.cxx index 3099437247..65dac02bf8 100644 --- a/panda/src/net/test_datagram.cxx +++ b/panda/src/net/test_datagram.cxx @@ -1,6 +1,19 @@ // Filename: test_datagram.cxx // Created by: jns (07Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/net/test_spam_client.cxx b/panda/src/net/test_spam_client.cxx index 47bb1ed528..e6f48d105a 100644 --- a/panda/src/net/test_spam_client.cxx +++ b/panda/src/net/test_spam_client.cxx @@ -1,6 +1,19 @@ // Filename: test_spam_client.cxx // Created by: drose (24Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "queuedConnectionManager.h" @@ -37,7 +50,7 @@ main(int argc, char *argv[]) { exit(1); } - nout << "Successfully opened TCP connection to " << hostname + nout << "Successfully opened TCP connection to " << hostname << " on port " << port << "\n"; QueuedConnectionReader reader(&cm, 10); @@ -102,5 +115,5 @@ main(int argc, char *argv[]) { - - + + diff --git a/panda/src/net/test_spam_server.cxx b/panda/src/net/test_spam_server.cxx index 5243f80d7f..ff5f816189 100644 --- a/panda/src/net/test_spam_server.cxx +++ b/panda/src/net/test_spam_server.cxx @@ -1,6 +1,19 @@ // Filename: test_spam_server.cxx // Created by: drose (24Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -110,5 +123,5 @@ main(int argc, char *argv[]) { - - + + diff --git a/panda/src/net/test_tcp_client.cxx b/panda/src/net/test_tcp_client.cxx index b6aff15b35..0f34a4c77d 100644 --- a/panda/src/net/test_tcp_client.cxx +++ b/panda/src/net/test_tcp_client.cxx @@ -1,6 +1,19 @@ // Filename: test_tcp_client.cxx // Created by: drose (09Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "queuedConnectionManager.h" @@ -36,7 +49,7 @@ main(int argc, char *argv[]) { } nout << "Successfully opened TCP connection to " << hostname - << " on port " + << " on port " << c->get_address().get_port() << " and IP " << c->get_address() << "\n"; @@ -53,7 +66,7 @@ main(int argc, char *argv[]) { while (!cin.fail() && !lost_connection) { // Send the datagram. writer.send(datagram, c); - + // Check for a lost connection. while (cm.reset_connection_available()) { PT(Connection) connection; @@ -70,7 +83,7 @@ main(int argc, char *argv[]) { // Now poll for new datagrams on the socket. while (reader.data_available()) { if (reader.get_data(datagram)) { - nout << "Got datagram " << datagram << "from " + nout << "Got datagram " << datagram << "from " << datagram.get_address() << "\n"; } } @@ -87,5 +100,5 @@ main(int argc, char *argv[]) { - - + + diff --git a/panda/src/net/test_tcp_server.cxx b/panda/src/net/test_tcp_server.cxx index 8e3a85b0d8..e20c2d499a 100644 --- a/panda/src/net/test_tcp_server.cxx +++ b/panda/src/net/test_tcp_server.cxx @@ -1,6 +1,19 @@ // Filename: test_tcp_server.cxx // Created by: drose (09Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -74,7 +87,7 @@ main(int argc, char *argv[]) { while (reader.data_available()) { NetDatagram datagram; if (reader.get_data(datagram)) { - nout << "Got datagram " << datagram << "from " + nout << "Got datagram " << datagram << "from " << datagram.get_address() << ", sending to " << clients.size() << " clients.\n"; @@ -90,7 +103,7 @@ main(int argc, char *argv[]) { if (connection.is_null()) { nout << "Empty datagram from a null connection.\n"; } else { - nout << "Closing connection from " + nout << "Closing connection from " << connection->get_address() << "\n"; clients.erase(connection); cm.close_connection(connection); @@ -103,7 +116,7 @@ main(int argc, char *argv[]) { } } } - + // Yield the timeslice before we poll again. PR_Sleep(PR_MillisecondsToInterval(100)); } @@ -113,5 +126,5 @@ main(int argc, char *argv[]) { - - + + diff --git a/panda/src/net/test_udp.cxx b/panda/src/net/test_udp.cxx index 0181e14d7a..a67c638683 100644 --- a/panda/src/net/test_udp.cxx +++ b/panda/src/net/test_udp.cxx @@ -1,6 +1,19 @@ // Filename: test_udp.cxx // Created by: drose (08Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "queuedConnectionManager.h" @@ -35,7 +48,7 @@ main(int argc, char *argv[]) { exit(1); } - nout << "Successfully opened UDP connection on port " + nout << "Successfully opened UDP connection on port " << c->get_address().get_port() << " and IP " << c->get_address() << "\n"; @@ -48,7 +61,7 @@ main(int argc, char *argv[]) { cin >> datagram; bool lost_connection = false; - + while (!cin.fail() && !lost_connection) { // Send the datagram. writer.send(datagram, c, host); @@ -69,7 +82,7 @@ main(int argc, char *argv[]) { // Now poll for new datagrams on the socket. while (reader.data_available()) { if (reader.get_data(datagram)) { - nout << "Got datagram " << datagram << "from " + nout << "Got datagram " << datagram << "from " << datagram.get_address() << "\n"; } } @@ -84,5 +97,5 @@ main(int argc, char *argv[]) { - - + + diff --git a/panda/src/pandabase/pandabase.cxx b/panda/src/pandabase/pandabase.cxx index 8521cab47f..02f9004445 100644 --- a/panda/src/pandabase/pandabase.cxx +++ b/panda/src/pandabase/pandabase.cxx @@ -1,6 +1,19 @@ -// Filename: pandabase.cc +// Filename: pandabase.cxx // Created by: drose (15Sep00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pandabase.h" diff --git a/panda/src/pandabase/pandabase.h b/panda/src/pandabase/pandabase.h index b02586bc71..4d9af3ec56 100644 --- a/panda/src/pandabase/pandabase.h +++ b/panda/src/pandabase/pandabase.h @@ -1,8 +1,20 @@ -/* - * Filename: pandabase.h +/* Filename: pandabase.h * Created by: drose (12Sep00) * - */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This file is included at the beginning of every header file and/or C or C++ file. It must be compilable for C as well as C++ files, diff --git a/panda/src/pandabase/pandasymbols.h b/panda/src/pandabase/pandasymbols.h index 8801680a95..0940348df1 100644 --- a/panda/src/pandabase/pandasymbols.h +++ b/panda/src/pandabase/pandasymbols.h @@ -1,9 +1,20 @@ -/* -// Filename: pandasymbols.h -// Created by: drose (18Feb00) -// -//////////////////////////////////////////////////////////////////// -*/ +/* Filename: pandasymbols.h + * Created by: drose (18Feb00) + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef PANDASYMBOLS_H #define PANDASYMBOLS_H @@ -128,8 +139,8 @@ #else #define INLINE_GRAPH #define DONT_INLINE_GRAPH -#define INLINE_DISPLAY -#define DONT_INLINE_DISPLAY +#define INLINE_DISPLAY +#define DONT_INLINE_DISPLAY #endif #else diff --git a/panda/src/parametrics/classicNurbsCurve.I b/panda/src/parametrics/classicNurbsCurve.I index 4d93d6f32f..4452c271d6 100644 --- a/panda/src/parametrics/classicNurbsCurve.I +++ b/panda/src/parametrics/classicNurbsCurve.I @@ -1,13 +1,26 @@ // Filename: classicNurbsCurve.I // Created by: drose (02Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClassicNurbsCurve::get_curveseg // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CubicCurveseg *ClassicNurbsCurve:: get_curveseg(int ti) { diff --git a/panda/src/parametrics/classicNurbsCurve.cxx b/panda/src/parametrics/classicNurbsCurve.cxx index 7a34bc3793..1edb353ffd 100644 --- a/panda/src/parametrics/classicNurbsCurve.cxx +++ b/panda/src/parametrics/classicNurbsCurve.cxx @@ -1,6 +1,19 @@ -// Filename: classicNurbsCurve.C +// Filename: classicNurbsCurve.cxx // Created by: drose (27Feb98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "classicNurbsCurve.h" @@ -27,7 +40,7 @@ static const LVecBase3f zero = LVecBase3f(0.0, 0.0, 0.0); //////////////////////////////////////////////////////////////////// // Function: ClassicNurbsCurve::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// ClassicNurbsCurve:: ClassicNurbsCurve() { @@ -43,9 +56,9 @@ ClassicNurbsCurve() { ClassicNurbsCurve:: ClassicNurbsCurve(const ParametricCurve &pc) { _order = 4; - + if (!pc.convert_to_nurbs(this)) { - parametrics_cat->warning() + parametrics_cat->warning() << "Cannot make a NURBS from the indicated curve.\n"; } } @@ -78,7 +91,7 @@ ClassicNurbsCurve(int order, int num_cvs, //////////////////////////////////////////////////////////////////// // Function: ClassicNurbsCurve::Destructor // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// ClassicNurbsCurve:: ~ClassicNurbsCurve() { @@ -102,7 +115,7 @@ set_order(int order) { //////////////////////////////////////////////////////////////////// // Function: ClassicNurbsCurve::get_order // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ClassicNurbsCurve:: get_order() const { @@ -112,7 +125,7 @@ get_order() const { //////////////////////////////////////////////////////////////////// // Function: ClassicNurbsCurve::get_num_cvs // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ClassicNurbsCurve:: get_num_cvs() const { @@ -366,7 +379,7 @@ rebuild_curveseg(int rtype0, float t0, const LVecBase4f &v0, for (c = 0; c < 4; c++) { static const LVecBase4f zero(0.0, 0.0, 0.0, 0.0); const LVecBase4f &s = (c < _order) ? _cvs[c+cv]._p : zero; - + G.set_col(c, s); } } @@ -429,7 +442,7 @@ stitch(const ParametricCurve *a, const ParametricCurve *b) { // First, translate curve B to move its first CV to curve A's last // CV. - LVecBase3f point_offset = + LVecBase3f point_offset = na->get_cv_point(na->get_num_cvs() - 1) - nb->get_cv_point(0); int num_b_cvs = nb->get_num_cvs(); for (int i = 0; i < num_b_cvs; i++) { @@ -485,7 +498,7 @@ convert_to_nurbs(ParametricCurve *nc) const { //////////////////////////////////////////////////////////////////// // Function: ClassicNurbsCurve::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ClassicNurbsCurve:: write(ostream &out, int indent_level) const { diff --git a/panda/src/parametrics/classicNurbsCurve.h b/panda/src/parametrics/classicNurbsCurve.h index db79d176ad..536228b07b 100644 --- a/panda/src/parametrics/classicNurbsCurve.h +++ b/panda/src/parametrics/classicNurbsCurve.h @@ -1,6 +1,19 @@ // Filename: classicNurbsCurve.h // Created by: drose (27Feb98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLASSICNURBSCURVE_H @@ -82,7 +95,7 @@ public: protected: virtual int append_cv_impl(const LVecBase4f &v); - virtual bool format_egg(ostream &out, const string &name, + virtual bool format_egg(ostream &out, const string &name, const string &curve_type, int indent_level) const; int find_cv(float t); @@ -106,7 +119,7 @@ public: protected: static TypedWritable *make_ClassicNurbsCurve(const FactoryParams ¶ms); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); void fillin(DatagramIterator &scan, BamReader *manager); public: @@ -127,7 +140,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; static TypeHandle _orig_type_handle; diff --git a/panda/src/parametrics/config_parametrics.cxx b/panda/src/parametrics/config_parametrics.cxx index b34e8d65a0..7470803503 100644 --- a/panda/src/parametrics/config_parametrics.cxx +++ b/panda/src/parametrics/config_parametrics.cxx @@ -1,6 +1,19 @@ // Filename: config_parametrics.cxx // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "classicNurbsCurve.h" diff --git a/panda/src/parametrics/config_parametrics.h b/panda/src/parametrics/config_parametrics.h index 3e9e61bc59..9eb11d0ab4 100644 --- a/panda/src/parametrics/config_parametrics.h +++ b/panda/src/parametrics/config_parametrics.h @@ -1,6 +1,19 @@ // Filename: config_parametrics.h // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_PARAMETRICS_H diff --git a/panda/src/parametrics/cubicCurveseg.cxx b/panda/src/parametrics/cubicCurveseg.cxx index 422649db78..2c1b93a62d 100644 --- a/panda/src/parametrics/cubicCurveseg.cxx +++ b/panda/src/parametrics/cubicCurveseg.cxx @@ -1,6 +1,19 @@ // Filename: cubicCurveseg.cxx // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "piecewiseCurve.h" @@ -134,7 +147,7 @@ void CubicCurveseg:: hermite_basis(const HermiteCurveCV &cv0, const HermiteCurveCV &cv1, float tlength) { - static LMatrix4f + static LMatrix4f Mh(2, -3, 0, 1, -2, 3, 0, 0, 1, -2, 1, 0, @@ -144,7 +157,7 @@ hermite_basis(const HermiteCurveCV &cv0, cv0._out[0]*tlength, cv1._in[0]*tlength); LVecBase4f Gy(cv0._p[1], cv1._p[1], cv0._out[1]*tlength, cv1._in[1]*tlength); - LVecBase4f Gz(cv0._p[2], cv1._p[2], + LVecBase4f Gz(cv0._p[2], cv1._p[2], cv0._out[2]*tlength, cv1._in[2]*tlength); Bx = Gx * Mh; diff --git a/panda/src/parametrics/cubicCurveseg.h b/panda/src/parametrics/cubicCurveseg.h index 4079f3f1bc..3e6a52b970 100644 --- a/panda/src/parametrics/cubicCurveseg.h +++ b/panda/src/parametrics/cubicCurveseg.h @@ -1,6 +1,19 @@ // Filename: cubicCurveseg.h // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CUBICCURVESEG_H @@ -111,7 +124,7 @@ public: protected: static TypedWritable *make_CubicCurveseg(const FactoryParams ¶ms); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); void fillin(DatagramIterator &scan, BamReader *manager); public: diff --git a/panda/src/parametrics/curveFitter.I b/panda/src/parametrics/curveFitter.I index e1e8b2fa69..5b11bf7948 100644 --- a/panda/src/parametrics/curveFitter.I +++ b/panda/src/parametrics/curveFitter.I @@ -1,28 +1,41 @@ // Filename: curveFitter.I // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CurveFitter::DataPoint::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CurveFitter::DataPoint:: -DataPoint() : +DataPoint() : _t(0.0), _xyz(0.0, 0.0, 0.0), _hpr(0.0, 0.0, 0.0), _tangent(0.0, 0.0, 0.0), - _hpr_tangent(0.0, 0.0, 0.0) + _hpr_tangent(0.0, 0.0, 0.0) { } //////////////////////////////////////////////////////////////////// // Function: CurveFitter::DataPoint::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CurveFitter::DataPoint:: output(ostream &out) const { @@ -33,7 +46,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: CurveFitter::DataPoint::operator < // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool CurveFitter::DataPoint:: operator < (const DataPoint &other) const { diff --git a/panda/src/parametrics/curveFitter.cxx b/panda/src/parametrics/curveFitter.cxx index 361d32ba1d..18ec2592cc 100644 --- a/panda/src/parametrics/curveFitter.cxx +++ b/panda/src/parametrics/curveFitter.cxx @@ -1,6 +1,19 @@ -// Filename: curveFitter.C +// Filename: curveFitter.cxx // Created by: drose (17Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pandabase.h" @@ -18,7 +31,7 @@ TypeHandle CurveFitter::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CurveFitter::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CurveFitter:: CurveFitter() { @@ -29,7 +42,7 @@ CurveFitter() { //////////////////////////////////////////////////////////////////// // Function: CurveFitter::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// CurveFitter:: ~CurveFitter() { @@ -216,17 +229,17 @@ wrap_hpr() { int i; for (i = 0; i < 3; i++) { (*di)._hpr[i] += net[i]; - + while (((*di)._hpr[i] - last[i]) > 180.0) { (*di)._hpr[i] -= 360.0; net[i] -= 360.0; } - + while (((*di)._hpr[i] - last[i]) < -180.0) { (*di)._hpr[i] += 360.0; net[i] += 360.0; } - + last[i] = (*di)._hpr[i]; } } @@ -303,14 +316,14 @@ compute_tangents(float scale) { // not. if (_got_xyz) { for (i = 1; i < len-1; i++) { - _data[i]._tangent = + _data[i]._tangent = (_data[i+1]._xyz - _data[i-1]._xyz) * scale / (_data[i+1]._t - _data[i-1]._t); } } if (_got_hpr) { for (i = 1; i < len-1; i++) { - _data[i]._hpr_tangent = + _data[i]._hpr_tangent = (_data[i+1]._hpr - _data[i-1]._hpr) * scale / (_data[i+1]._t - _data[i-1]._t); } @@ -328,7 +341,7 @@ compute_tangents(float scale) { (_data[1]._hpr - _data[len-2]._hpr) * scale / ((_data[1]._t - _data[0]._t) + (_data[len-1]._t - _data[len-2]._t)); } - + } else { if (_got_xyz) { _data[0]._tangent = @@ -363,7 +376,7 @@ make_hermite() const { HermiteCurve *hc = new HermiteCurve; result->add_curve(hc); hc->set_curve_type(PCT_XYZ); - + Data::const_iterator di; for (di = _data.begin(); di != _data.end(); ++di) { int n = hc->insert_cv((*di)._t); @@ -378,7 +391,7 @@ make_hermite() const { HermiteCurve *hc = new HermiteCurve; result->add_curve(hc); hc->set_curve_type(PCT_HPR); - + Data::const_iterator di; for (di = _data.begin(); di != _data.end(); ++di) { int n = hc->insert_cv((*di)._t); @@ -415,7 +428,7 @@ make_nurbs() const { // everything c2 continuous. int num_knots = nc->get_num_knots(); - + // We expect this to be a 4th order curve, since we just converted // it from a Hermite. assert(nc->get_order() == 4); @@ -423,11 +436,11 @@ make_nurbs() const { // Now the knot sequence goes something like this: // 0 0 0 0 1 1 1 2 2 2 3 3 3 4 4 4 4 - + // We'll consider pairs of knot values beginning at position 3 and // every third position thereafter. We just even out these values // between their two neighbors. - + int i; float k1, k2 = nc->get_knot(num_knots-1); for (i = 3; i < num_knots - 4; i += 3) { @@ -439,28 +452,28 @@ make_nurbs() const { // The last knot must have the terminal value. nc->set_knot(num_knots-4, k2); - + // Finally, recompute the curve. nc->recompute(); } return result; } - + //////////////////////////////////////////////////////////////////// // Function: CurveFitter::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CurveFitter:: output(ostream &out) const { out << "CurveFitter, " << _data.size() << " samples.\n"; } - + //////////////////////////////////////////////////////////////////// // Function: CurveFitter::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CurveFitter:: write(ostream &out) const { diff --git a/panda/src/parametrics/curveFitter.h b/panda/src/parametrics/curveFitter.h index fe40c57770..35330d135a 100644 --- a/panda/src/parametrics/curveFitter.h +++ b/panda/src/parametrics/curveFitter.h @@ -1,6 +1,19 @@ // Filename: curveFitter.h // Created by: drose (17Sep98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CURVEFITTER_H @@ -21,7 +34,7 @@ class ClassicNurbsCurve; //////////////////////////////////////////////////////////////////// // Class : CurveFitter -// Description : +// Description : //////////////////////////////////////////////////////////////////// class CurveFitter { PUBLISHED: @@ -48,7 +61,7 @@ PUBLISHED: void compute_tangents(float scale); PT(ParametricCurveCollection) make_hermite() const; PT(ParametricCurveCollection) make_nurbs() const; - + void output(ostream &out) const; void write(ostream &out) const; @@ -58,14 +71,14 @@ public: INLINE DataPoint(); INLINE void output(ostream &out) const; INLINE bool operator < (const DataPoint &other) const; - + float _t; LVecBase3f _xyz; LVecBase3f _hpr; LVecBase3f _tangent; LVecBase3f _hpr_tangent; }; - + typedef vector Data; Data _data; @@ -79,7 +92,7 @@ public: static void init_type() { register_type(_type_handle, "CurveFitter"); } - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/parametrics/hermiteCurve.cxx b/panda/src/parametrics/hermiteCurve.cxx index 79393a260a..f8ddd4277a 100644 --- a/panda/src/parametrics/hermiteCurve.cxx +++ b/panda/src/parametrics/hermiteCurve.cxx @@ -1,6 +1,19 @@ -// Filename: hermiteCurve.C +// Filename: hermiteCurve.cxx // Created by: drose (27Feb98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pandabase.h" @@ -29,7 +42,7 @@ static const LVecBase3f zero = LVecBase3f(0.0, 0.0, 0.0); // number of significant dimensions. //////////////////////////////////////////////////////////////////// static ostream & -show_vec3(ostream &out, int indent_level, const LVecBase3f &v, +show_vec3(ostream &out, int indent_level, const LVecBase3f &v, int num_dimensions) { indent(out, indent_level) << v[0]; for (int i = 1; i {\n"; - show_vec3(out, indent_level + 2, _p - scale_in * _in / 3.0, + show_vec3(out, indent_level + 2, _p - scale_in * _in / 3.0, num_dimensions) << "\n"; indent(out, indent_level) << "}\n"; } @@ -189,15 +202,15 @@ format_egg(ostream &out, int indent_level, int num_dimensions, case HC_CUT: out << "Cut"; break; - + case HC_FREE: out << "Free"; break; - + case HC_G1: out << "G1"; break; - + case HC_SMOOTH: out << "Smooth"; break; @@ -208,7 +221,7 @@ format_egg(ostream &out, int indent_level, int num_dimensions, if (show_out) { indent(out, indent_level) << " {\n"; - show_vec3(out, indent_level + 2, _p + scale_out * _out / 3.0, + show_vec3(out, indent_level + 2, _p + scale_out * _out / 3.0, num_dimensions) << "\n"; indent(out, indent_level) << "}\n"; } @@ -250,7 +263,7 @@ fillin(DatagramIterator &scan, BamReader *) { //////////////////////////////////////////////////////////////////// // Function: HermiteCurve::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// HermiteCurve:: HermiteCurve() { @@ -275,7 +288,7 @@ HermiteCurve(const ParametricCurve &nc) { //////////////////////////////////////////////////////////////////// // Function: HermiteCurve::Destructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// HermiteCurve:: ~HermiteCurve() { @@ -388,7 +401,7 @@ remove_cv(int n) { if (_segs.size()>0) { remove_curveseg(_segs.size()-1); } - + recompute_basis(); invalidate_all(); return true; @@ -404,7 +417,7 @@ void HermiteCurve:: remove_all_cvs() { _points.erase(_points.begin(), _points.end()); remove_all_curvesegs(); - + invalidate_all(); } @@ -640,7 +653,7 @@ get_cv_name(int n) const { //////////////////////////////////////////////////////////////////// // Function: HermiteCurve::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void HermiteCurve:: output(ostream &out) const { @@ -670,7 +683,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: HermiteCurve::write_cv // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void HermiteCurve:: write_cv(ostream &out, int n) const { @@ -742,13 +755,13 @@ format_egg(ostream &out, const string &name, const string &curve_type, for (i = 0; i < (int)_points.size(); i++) { bool show_in = (i != 0); bool show_out = (i != (int)_points.size()-1); - _points[i].format_egg(out, indent_level + 2, _num_dimensions, + _points[i].format_egg(out, indent_level + 2, _num_dimensions, show_in, show_out, show_in ? get_tlength(i-1) : 0.0, show_out ? get_tlength(i) : 0.0); } indent(out, indent_level) << "}\n"; - + indent(out, indent_level) << " " << name << " {\n"; if (!curve_type.empty()) { @@ -793,7 +806,7 @@ wrap_hpr(const LVecBase3f &hpr1, LVecBase3f &hpr2) { while ((hpr2[i] - hpr1[i]) > 180.0) { hpr2[i] -= 360.0; } - + while ((hpr2[i] - hpr1[i]) < -180.0) { hpr2[i] += 360.0; } diff --git a/panda/src/parametrics/hermiteCurve.h b/panda/src/parametrics/hermiteCurve.h index 01b577644a..bdc17db146 100644 --- a/panda/src/parametrics/hermiteCurve.h +++ b/panda/src/parametrics/hermiteCurve.h @@ -1,6 +1,19 @@ // Filename: hermiteCurve.h // Created by: drose (27Feb98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef HERMITECURVE_H @@ -12,15 +25,15 @@ BEGIN_PUBLISH //[ // Hermite curve continuity types. -#define HC_CUT 1 +#define HC_CUT 1 // The curve is disconnected at this point. All points between // this and the following CV are not part of the curve. -#define HC_FREE 2 +#define HC_FREE 2 // Tangents are unconstrained. The curve is continuous, but its first // derivative is not. This is G0 geometric continuity. -#define HC_G1 3 +#define HC_G1 3 // Tangents are constrained to be collinear. The curve's derivative // is not continuous in parametric space, but its geometric slope is. // The distinction is mainly relevant in the context of animation @@ -45,7 +58,7 @@ public: HermiteCurveCV(); HermiteCurveCV(const HermiteCurveCV &c); ~HermiteCurveCV(); - + void set_point(const LVecBase3f &point) { _p = point; } void set_in(const LVecBase3f &in); void set_out(const LVecBase3f &out); @@ -58,7 +71,7 @@ public: void write_datagram(BamWriter *manager, Datagram &me) const; void fillin(DatagramIterator &scan, BamReader *manager); - + LVecBase3f _p, _in, _out; int _type; string _name; @@ -122,7 +135,7 @@ PUBLISHED: virtual void output(ostream &out) const; void write_cv(ostream &out, int n) const; - + public: CubicCurveseg *get_curveseg(int ti) { @@ -136,7 +149,7 @@ public: int rtype3, float t3, const LVecBase4f &v3); protected: - virtual bool format_egg(ostream &out, const string &name, + virtual bool format_egg(ostream &out, const string &name, const string &curve_type, int indent_level) const; void invalidate_cv(int n, bool redo_all); @@ -151,7 +164,7 @@ public: protected: static TypedWritable *make_HermiteCurve(const FactoryParams ¶ms); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); void fillin(DatagramIterator &scan, BamReader *manager); public: @@ -165,7 +178,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/parametrics/nurbsCurve.h b/panda/src/parametrics/nurbsCurve.h index a2f300a9de..782eb9cb74 100644 --- a/panda/src/parametrics/nurbsCurve.h +++ b/panda/src/parametrics/nurbsCurve.h @@ -1,6 +1,19 @@ // Filename: nurbsCurve.h // Created by: drose (01Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NURBSCURVE_H diff --git a/panda/src/parametrics/nurbsCurveDrawer.I b/panda/src/parametrics/nurbsCurveDrawer.I index d476367ef7..8f2452e49e 100644 --- a/panda/src/parametrics/nurbsCurveDrawer.I +++ b/panda/src/parametrics/nurbsCurveDrawer.I @@ -1,6 +1,19 @@ // Filename: nurbsCurveDrawer.I // Created by: drose (05Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/parametrics/nurbsCurveDrawer.cxx b/panda/src/parametrics/nurbsCurveDrawer.cxx index 431ece7c72..09b8924ba8 100644 --- a/panda/src/parametrics/nurbsCurveDrawer.cxx +++ b/panda/src/parametrics/nurbsCurveDrawer.cxx @@ -1,6 +1,19 @@ -// Filename: nurbsCurveDrawer.C +// Filename: nurbsCurveDrawer.cxx // Created by: drose (27Feb98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nurbsCurveDrawer.h" @@ -21,11 +34,11 @@ NurbsCurveDrawer() { set_cv_color(1.0, 0.0, 0.0); set_hull_color(1.0, 0.5, 0.5); set_knot_color(0.0, 0.0, 1.0); - + _cvs.set_thickness(4.0); _hull.set_thickness(1.0); _knots.set_thickness(4.0); - + _show_cvs = true; _show_hull = true; _show_knots = true; @@ -155,7 +168,7 @@ draw() { return true; } - + //////////////////////////////////////////////////////////////////// // Function: NurbsCurveDrawer::recompute @@ -256,7 +269,7 @@ hilight(int n, float hr, float hg, float hb) { return true; } - + //////////////////////////////////////////////////////////////////// // Function: NurbsCurveDrawer::unhilight diff --git a/panda/src/parametrics/nurbsCurveDrawer.h b/panda/src/parametrics/nurbsCurveDrawer.h index 300a4da095..9f0573f93e 100644 --- a/panda/src/parametrics/nurbsCurveDrawer.h +++ b/panda/src/parametrics/nurbsCurveDrawer.h @@ -1,6 +1,19 @@ // Filename: nurbsCurveDrawer.h // Created by: drose (27Feb98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NURBSCURVEDRAWER_H @@ -62,13 +75,13 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #include "nurbsCurveDrawer.I" - + #endif diff --git a/panda/src/parametrics/nurbsCurveInterface.I b/panda/src/parametrics/nurbsCurveInterface.I index 793ce630a2..50404279e9 100644 --- a/panda/src/parametrics/nurbsCurveInterface.I +++ b/panda/src/parametrics/nurbsCurveInterface.I @@ -1,13 +1,26 @@ // Filename: nurbsCurveInterface.I // Created by: drose (02Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NurbsCurveInterface::append_cv // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int NurbsCurveInterface:: append_cv(float x, float y, float z) { @@ -17,7 +30,7 @@ append_cv(float x, float y, float z) { //////////////////////////////////////////////////////////////////// // Function: NurbsCurveInterface::append_cv // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int NurbsCurveInterface:: append_cv(const LVecBase3f &v) { @@ -27,7 +40,7 @@ append_cv(const LVecBase3f &v) { //////////////////////////////////////////////////////////////////// // Function: NurbsCurveInterface::append_cv // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int NurbsCurveInterface:: append_cv(const LVecBase4f &v) { diff --git a/panda/src/parametrics/nurbsCurveInterface.cxx b/panda/src/parametrics/nurbsCurveInterface.cxx index aeed6e1d5f..d93504c46a 100644 --- a/panda/src/parametrics/nurbsCurveInterface.cxx +++ b/panda/src/parametrics/nurbsCurveInterface.cxx @@ -1,6 +1,19 @@ // Filename: nurbsCurveInterface.cxx // Created by: drose (02Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nurbsCurveInterface.h" @@ -30,20 +43,20 @@ set_cv_weight(int n, float w) { //////////////////////////////////////////////////////////////////// // Function: NurbsCurveInterface::write_cv // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NurbsCurveInterface:: write_cv(ostream &out, int n) const { nassertv(n >= 0 && n < get_num_cvs()); - out << "CV " << n << ": " << get_cv_point(n) << ", weight " + out << "CV " << n << ": " << get_cv_point(n) << ", weight " << get_cv_weight(n) << "\n"; } //////////////////////////////////////////////////////////////////// // Function: NurbsCurveInterface::write // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NurbsCurveInterface:: write(ostream &out, int indent_level) const { @@ -66,7 +79,7 @@ write(ostream &out, int indent_level) const { int num_cvs = get_num_cvs(); for (i = 0; i < num_cvs; i++) { indent(out, indent_level) - << i << ") " << get_cv_point(i) << ", weight " + << i << ") " << get_cv_point(i) << ", weight " << get_cv_weight(i) << "\n"; } @@ -99,7 +112,7 @@ format_egg(ostream &out, const string &name, const string &curve_type, } indent(out, indent_level) << "}\n"; - + indent(out, indent_level) << " " << name << " {\n"; @@ -109,7 +122,7 @@ format_egg(ostream &out, const string &name, const string &curve_type, } indent(out, indent_level+2) << " { " << get_order() << " }\n"; - + indent(out, indent_level+2) << " {"; int k; int num_knots = get_num_knots(); diff --git a/panda/src/parametrics/nurbsCurveInterface.h b/panda/src/parametrics/nurbsCurveInterface.h index 47fe651591..ff518de182 100644 --- a/panda/src/parametrics/nurbsCurveInterface.h +++ b/panda/src/parametrics/nurbsCurveInterface.h @@ -1,6 +1,19 @@ // Filename: nurbsCurveInterface.h // Created by: drose (02Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NURBSCURVEINTERFACE_H diff --git a/panda/src/parametrics/nurbsPPCurve.I b/panda/src/parametrics/nurbsPPCurve.I index b3e73912bc..e1067b1d95 100644 --- a/panda/src/parametrics/nurbsPPCurve.I +++ b/panda/src/parametrics/nurbsPPCurve.I @@ -1,4 +1,17 @@ // Filename: nurbsPPCurve.I // Created by: drose (02Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/parametrics/nurbsPPCurve.cxx b/panda/src/parametrics/nurbsPPCurve.cxx index 3eda8cb83e..87045c3084 100644 --- a/panda/src/parametrics/nurbsPPCurve.cxx +++ b/panda/src/parametrics/nurbsPPCurve.cxx @@ -1,6 +1,19 @@ // Filename: nurbsPPCurve.cxx // Created by: drose (01Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nurbsPPCurve.h" @@ -15,7 +28,7 @@ TypeHandle NurbsPPCurve::_type_handle; //////////////////////////////////////////////////////////////////// // Function: NurbsPPCurve::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// NurbsPPCurve:: NurbsPPCurve() { @@ -33,9 +46,9 @@ NurbsPPCurve:: NurbsPPCurve(const ParametricCurve &pc) { _nurbs_valid = false; _order = 4; - + if (!pc.convert_to_nurbs(this)) { - parametrics_cat->warning() + parametrics_cat->warning() << "Cannot make a NURBS from the indicated curve.\n"; } } @@ -59,7 +72,7 @@ NurbsPPCurve(int order, int num_cvs, //////////////////////////////////////////////////////////////////// // Function: NurbsPPCurve::Destructor // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// NurbsPPCurve:: ~NurbsPPCurve() { @@ -104,7 +117,7 @@ set_order(int order) { //////////////////////////////////////////////////////////////////// // Function: NurbsPPCurve::get_order // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int NurbsPPCurve:: get_order() const { @@ -119,7 +132,7 @@ get_order() const { //////////////////////////////////////////////////////////////////// // Function: NurbsPPCurve::get_num_cvs // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int NurbsPPCurve:: get_num_cvs() const { @@ -133,7 +146,7 @@ get_num_cvs() const { //////////////////////////////////////////////////////////////////// // Function: NurbsPPCurve::get_num_knots // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int NurbsPPCurve:: get_num_knots() const { @@ -439,7 +452,7 @@ stitch(const ParametricCurve *a, const ParametricCurve *b) { // First, translate curve B to move its first CV to curve A's last // CV. - LVecBase3f point_offset = + LVecBase3f point_offset = na->get_cv_point(na->get_num_cvs() - 1) - nb->get_cv_point(0); int num_b_cvs = nb->get_num_cvs(); for (int i = 0; i < num_b_cvs; i++) { @@ -470,7 +483,7 @@ stitch(const ParametricCurve *a, const ParametricCurve *b) { if (!result.mergeOf(na->_nurbs, b_nurbs)) { return false; } - + _nurbs = result; _nurbs_valid = true; return true; @@ -504,7 +517,7 @@ convert_to_nurbs(ParametricCurve *nc) const { //////////////////////////////////////////////////////////////////// // Function: NurbsPPCurve::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NurbsPPCurve:: write(ostream &out, int indent_level) const { @@ -612,7 +625,7 @@ copy_nurbs(PLib::NurbsCurvef &nurbs) const { // Description: Fills the arrays up with a copy of the nurbs data. //////////////////////////////////////////////////////////////////// void NurbsPPCurve:: -copy_arrays(NurbsPPCurve::Points &points, NurbsPPCurve::Knots &knots, +copy_arrays(NurbsPPCurve::Points &points, NurbsPPCurve::Knots &knots, int &order) const { if (_nurbs_valid) { make_arrays_from(_nurbs, points, knots, order); diff --git a/panda/src/parametrics/nurbsPPCurve.h b/panda/src/parametrics/nurbsPPCurve.h index 89a8cb3751..5a4467c1cc 100644 --- a/panda/src/parametrics/nurbsPPCurve.h +++ b/panda/src/parametrics/nurbsPPCurve.h @@ -1,6 +1,19 @@ // Filename: nurbsPPCurve.h // Created by: drose (01Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NURBSPPCURVE_H @@ -56,7 +69,7 @@ public: virtual float get_knot(int n) const; virtual bool recompute(); - + public: virtual bool get_point(float t, LVecBase3f &point) const; virtual bool get_tangent(float t, LVecBase3f &tangent) const; @@ -71,7 +84,7 @@ public: protected: virtual int append_cv_impl(const LVecBase4f &v); - virtual bool format_egg(ostream &out, const string &name, + virtual bool format_egg(ostream &out, const string &name, const string &curve_type, int indent_level) const; private: @@ -111,7 +124,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/parametrics/parametricCurve.cxx b/panda/src/parametrics/parametricCurve.cxx index 81916dd6ce..3aaf922eda 100644 --- a/panda/src/parametrics/parametricCurve.cxx +++ b/panda/src/parametrics/parametricCurve.cxx @@ -1,6 +1,19 @@ // Filename: parametricCurve.cxx // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parametricCurve.h" @@ -394,15 +407,15 @@ write_egg(ostream &out, const Filename &filename, CoordinateSystem cs) { case CS_zup_right: out << "Z-Up"; break; - + case CS_yup_right: out << "Y-Up"; break; - + case CS_zup_left: out << "Z-Up-Left"; break; - + case CS_yup_left: out << "Y-Up-Left"; break; @@ -524,7 +537,7 @@ convert_to_hermite(HermiteCurve *hc) const { if (hc->get_cv_type(n)!=HC_CUT) { LVector3f in = hc->get_cv_in(n); LVector3f out = hc->get_cv_out(n); - + if (in.almost_equal(out, 0.0001)) { hc->set_cv_type(n, HC_SMOOTH); } else { @@ -612,7 +625,7 @@ draw_traverse() { _implicit_drawer->set_curve(this); _implicit_drawer->draw(); _viz_arc = new RenderRelation(this, _implicit_drawer->detach_geom_node()); - + // We must then tell the drawer to forget about us, so we don't // maintain a circular reference count. _implicit_drawer->clear_curves(); @@ -776,7 +789,7 @@ r_calc_length(float t1, float t2, const LPoint3f &p1, const LPoint3f &p2, //////////////////////////////////////////////////////////////////// bool ParametricCurve:: r_find_length(float target_length, float &found_t, - float t1, float t2, + float t1, float t2, const LPoint3f &p1, const LPoint3f &p2, float &seglength) const { static const float length_tolerance = 0.0000001; diff --git a/panda/src/parametrics/parametricCurve.h b/panda/src/parametrics/parametricCurve.h index 29eada1390..9a88aed723 100644 --- a/panda/src/parametrics/parametricCurve.h +++ b/panda/src/parametrics/parametricCurve.h @@ -1,6 +1,19 @@ // Filename: parametricCurve.h // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETRICCURVE_H @@ -110,7 +123,7 @@ protected: void invalidate(float t1, float t2); void invalidate_all(); - virtual bool format_egg(ostream &out, const string &name, + virtual bool format_egg(ostream &out, const string &name, const string &curve_type, int indent_level) const; private: @@ -118,7 +131,7 @@ private: const LPoint3f &p1, const LPoint3f &p2, float seglength) const; bool r_find_length(float target_length, float &found_t, - float t1, float t2, + float t1, float t2, const LPoint3f &p1, const LPoint3f &p2, float &seglength) const; @@ -134,7 +147,7 @@ private: // TypedWritable stuff protected: - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); void fillin(DatagramIterator &scan, BamReader *manager); public: diff --git a/panda/src/parametrics/parametricCurveCollection.I b/panda/src/parametrics/parametricCurveCollection.I index 68c3e7544e..7740646eab 100644 --- a/panda/src/parametrics/parametricCurveCollection.I +++ b/panda/src/parametrics/parametricCurveCollection.I @@ -1,13 +1,26 @@ // Filename: parametricCurveCollection.I // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ParametricCurveCollection::Destructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ParametricCurveCollection:: ~ParametricCurveCollection() { diff --git a/panda/src/parametrics/parametricCurveCollection.cxx b/panda/src/parametrics/parametricCurveCollection.cxx index 658b63e69b..45a7a78b03 100644 --- a/panda/src/parametrics/parametricCurveCollection.cxx +++ b/panda/src/parametrics/parametricCurveCollection.cxx @@ -1,6 +1,19 @@ // Filename: parametricCurveCollection.cxx // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "parametricCurveCollection.h" @@ -18,7 +31,7 @@ //////////////////////////////////////////////////////////////////// // Function: ParametricCurveCollection::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// ParametricCurveCollection:: ParametricCurveCollection() { @@ -663,7 +676,7 @@ recompute() { // Returns true if successful, false on failure. //////////////////////////////////////////////////////////////////// bool ParametricCurveCollection:: -stitch(const ParametricCurveCollection *a, +stitch(const ParametricCurveCollection *a, const ParametricCurveCollection *b) { PT(ParametricCurve) a_xyz = a->get_xyz_curve(); PT(ParametricCurve) b_xyz = b->get_xyz_curve(); @@ -763,15 +776,15 @@ write_egg(ostream &out, const Filename &filename, CoordinateSystem cs) { case CS_zup_right: out << "Z-Up"; break; - + case CS_yup_right: out << "Y-Up"; break; - + case CS_zup_left: out << "Z-Up-Left"; break; - + case CS_yup_left: out << "Y-Up-Left"; break; @@ -819,7 +832,7 @@ write_egg(ostream &out, const Filename &filename, CoordinateSystem cs) { t_count++; break; } - + curve->set_name(name); } diff --git a/panda/src/parametrics/parametricCurveCollection.h b/panda/src/parametrics/parametricCurveCollection.h index a935c14b19..e8c88c6f23 100644 --- a/panda/src/parametrics/parametricCurveCollection.h +++ b/panda/src/parametrics/parametricCurveCollection.h @@ -1,6 +1,19 @@ // Filename: parametricCurveCollection.h // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODEPATHCOLLECTION_H @@ -45,7 +58,7 @@ PUBLISHED: INLINE int get_num_curves() const; INLINE ParametricCurve *get_curve(int index) const; - + ParametricCurve *get_xyz_curve() const; ParametricCurve *get_hpr_curve() const; ParametricCurve *get_default_curve() const; @@ -72,7 +85,7 @@ PUBLISHED: bool recompute(); - bool stitch(const ParametricCurveCollection *a, + bool stitch(const ParametricCurveCollection *a, const ParametricCurveCollection *b); void output(ostream &out) const; diff --git a/panda/src/parametrics/parametricCurveDrawer.I b/panda/src/parametrics/parametricCurveDrawer.I index f180be40fc..8b7b56795e 100644 --- a/panda/src/parametrics/parametricCurveDrawer.I +++ b/panda/src/parametrics/parametricCurveDrawer.I @@ -1,6 +1,19 @@ // Filename: parametricCurveDrawer.I // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/parametrics/parametricCurveDrawer.cxx b/panda/src/parametrics/parametricCurveDrawer.cxx index 9bb8480ba7..d2a208067b 100644 --- a/panda/src/parametrics/parametricCurveDrawer.cxx +++ b/panda/src/parametrics/parametricCurveDrawer.cxx @@ -1,6 +1,19 @@ -// Filename: parametricCurveDrawer.C +// Filename: parametricCurveDrawer.cxx // Created by: drose (14Mar97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -73,14 +86,14 @@ set_curves(ParametricCurveCollection *curves) { if (_curves != (ParametricCurveCollection *)NULL) { _curves->unregister_drawer(this); } - + _curves = curves; - + // Now, register the new ones. if (_curves != (ParametricCurveCollection *)NULL) { _curves->register_drawer(this); } - + redraw(); } } @@ -388,7 +401,7 @@ draw() { return true; } - + //////////////////////////////////////////////////////////////////// diff --git a/panda/src/parametrics/parametricCurveDrawer.h b/panda/src/parametrics/parametricCurveDrawer.h index cd7473bfc4..95f20cfe69 100644 --- a/panda/src/parametrics/parametricCurveDrawer.h +++ b/panda/src/parametrics/parametricCurveDrawer.h @@ -1,6 +1,19 @@ // Filename: parametricCurveDrawer.h // Created by: drose (14Mar97) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARAMETRICCURVEDRAWER_H @@ -87,11 +100,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #include "parametricCurveDrawer.I" - + #endif diff --git a/panda/src/parametrics/piecewiseCurve.cxx b/panda/src/parametrics/piecewiseCurve.cxx index 1168369629..12168ba1bd 100644 --- a/panda/src/parametrics/piecewiseCurve.cxx +++ b/panda/src/parametrics/piecewiseCurve.cxx @@ -1,6 +1,19 @@ // Filename: piecewiseCurve.cxx // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "piecewiseCurve.h" @@ -125,7 +138,7 @@ adjust_point(float t, << "Adjusting point at " << t << " to " << px << " " << py << " " << pz << "\n"; } - + const ParametricCurve *curve; bool result = find_curve(curve, t); @@ -608,7 +621,7 @@ fillin(DatagramIterator &scan, BamReader *manager) { // Function: PiecewiseCurve::complete_pointers // Access: Protected, Virtual // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int PiecewiseCurve:: @@ -621,6 +634,6 @@ complete_pointers(vector_typedWritable &plist, BamReader *manager) { for (i = 0; i < _segs.size(); i++) { DCAST_INTO_R(_segs[i]._curve, plist[used + i], used); } - + return used + _segs.size(); } diff --git a/panda/src/parametrics/piecewiseCurve.h b/panda/src/parametrics/piecewiseCurve.h index fed1b7d242..b2296a86d2 100644 --- a/panda/src/parametrics/piecewiseCurve.h +++ b/panda/src/parametrics/piecewiseCurve.h @@ -1,6 +1,19 @@ // Filename: piecewiseCurve.h // Created by: drose (04Mar01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PIECEWISECURVE_H @@ -83,9 +96,9 @@ protected: // TypedWritable stuff protected: - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); void fillin(DatagramIterator &scan, BamReader *manager); - virtual int complete_pointers(vector_typedWritable &plist, + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); public: diff --git a/panda/src/parametrics/test_parametrics.cxx b/panda/src/parametrics/test_parametrics.cxx index 2522a76fce..2db96da011 100644 --- a/panda/src/parametrics/test_parametrics.cxx +++ b/panda/src/parametrics/test_parametrics.cxx @@ -1,4 +1,17 @@ -/* - Currently, there is not any test code for parametrics. - Feel free to create some. -*/ \ No newline at end of file +/* Filename: test_parametrics.cxx + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/panda/src/particlesystem/baseParticle.I b/panda/src/particlesystem/baseParticle.I index acc3709249..1f3f1587c8 100644 --- a/panda/src/particlesystem/baseParticle.I +++ b/panda/src/particlesystem/baseParticle.I @@ -1,7 +1,20 @@ -// Filename: BaseParticle.I +// Filename: baseParticle.I // Created by: charles (16Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// INLINE void BaseParticle::set_age(float age) { _age = age; diff --git a/panda/src/particlesystem/baseParticle.cxx b/panda/src/particlesystem/baseParticle.cxx index c5a240203b..af74c24f49 100644 --- a/panda/src/particlesystem/baseParticle.cxx +++ b/panda/src/particlesystem/baseParticle.cxx @@ -2,6 +2,19 @@ // Created by: charles (14Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "baseParticle.h" diff --git a/panda/src/particlesystem/baseParticle.h b/panda/src/particlesystem/baseParticle.h index 81c9648860..7ba40d500a 100644 --- a/panda/src/particlesystem/baseParticle.h +++ b/panda/src/particlesystem/baseParticle.h @@ -2,6 +2,19 @@ // Created by: charles (14Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BASEPARTICLE_H #define BASEPARTICLE_H diff --git a/panda/src/particlesystem/baseParticleEmitter.I b/panda/src/particlesystem/baseParticleEmitter.I index 93f0ef7ce4..74fe7d090d 100644 --- a/panda/src/particlesystem/baseParticleEmitter.I +++ b/panda/src/particlesystem/baseParticleEmitter.I @@ -1,6 +1,19 @@ // Filename: baseParticleEmitter.I // Created by: charles (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -69,8 +82,8 @@ get_radiate_origin(void) const { // Description : amplitude assignment //////////////////////////////////////////////////////////////////// INLINE void BaseParticleEmitter:: -set_amplitude(float a) { - _amplitude = a; +set_amplitude(float a) { + _amplitude = a; } //////////////////////////////////////////////////////////////////// @@ -89,7 +102,7 @@ get_amplitude(void) const { // Description : amplitude spread assignment //////////////////////////////////////////////////////////////////// INLINE void BaseParticleEmitter:: -set_amplitude_spread(float as) { +set_amplitude_spread(float as) { _amplitude_spread = as; } diff --git a/panda/src/particlesystem/baseParticleEmitter.cxx b/panda/src/particlesystem/baseParticleEmitter.cxx index e6b363ccbf..2af41f9d7b 100644 --- a/panda/src/particlesystem/baseParticleEmitter.cxx +++ b/panda/src/particlesystem/baseParticleEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (14Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "baseParticleEmitter.h" diff --git a/panda/src/particlesystem/baseParticleEmitter.h b/panda/src/particlesystem/baseParticleEmitter.h index 3a05cffff8..49d0d53652 100644 --- a/panda/src/particlesystem/baseParticleEmitter.h +++ b/panda/src/particlesystem/baseParticleEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (14Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BASEPARTICLEEMITTER_H #define BASEPARTICLEEMITTER_H diff --git a/panda/src/particlesystem/baseParticleFactory.I b/panda/src/particlesystem/baseParticleFactory.I index 6682eca9cb..149a15b3bc 100644 --- a/panda/src/particlesystem/baseParticleFactory.I +++ b/panda/src/particlesystem/baseParticleFactory.I @@ -1,6 +1,19 @@ // Filename: baseParticleFactory.I // Created by: charles (05Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/baseParticleFactory.cxx b/panda/src/particlesystem/baseParticleFactory.cxx index a78b6c6367..e9a22afb3a 100644 --- a/panda/src/particlesystem/baseParticleFactory.cxx +++ b/panda/src/particlesystem/baseParticleFactory.cxx @@ -2,6 +2,19 @@ // Created by: charles (05Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "baseParticleFactory.h" diff --git a/panda/src/particlesystem/baseParticleFactory.h b/panda/src/particlesystem/baseParticleFactory.h index 42ef24f784..0de8b0abc0 100644 --- a/panda/src/particlesystem/baseParticleFactory.h +++ b/panda/src/particlesystem/baseParticleFactory.h @@ -2,6 +2,19 @@ // Created by: charles (05Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BASEPARTICLEFACTORY_H #define BASEPARTICLEFACTORY_H diff --git a/panda/src/particlesystem/baseParticleRenderer.I b/panda/src/particlesystem/baseParticleRenderer.I index cd3d3f42f2..0876f2d36e 100644 --- a/panda/src/particlesystem/baseParticleRenderer.I +++ b/panda/src/particlesystem/baseParticleRenderer.I @@ -1,6 +1,19 @@ // Filename: baseParticleRenderer.I // Created by: charles (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/baseParticleRenderer.cxx b/panda/src/particlesystem/baseParticleRenderer.cxx index 175af62492..685be76b12 100644 --- a/panda/src/particlesystem/baseParticleRenderer.cxx +++ b/panda/src/particlesystem/baseParticleRenderer.cxx @@ -2,6 +2,19 @@ // Created by: charles (20Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include diff --git a/panda/src/particlesystem/baseParticleRenderer.h b/panda/src/particlesystem/baseParticleRenderer.h index e4e37e7a79..40ebf6127c 100644 --- a/panda/src/particlesystem/baseParticleRenderer.h +++ b/panda/src/particlesystem/baseParticleRenderer.h @@ -2,6 +2,19 @@ // Created by: charles (20Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BASEPARTICLERENDERER_H #define BASEPARTICLERENDERER_H diff --git a/panda/src/particlesystem/boxEmitter.I b/panda/src/particlesystem/boxEmitter.I index 68160bd692..82021cc638 100644 --- a/panda/src/particlesystem/boxEmitter.I +++ b/panda/src/particlesystem/boxEmitter.I @@ -1,6 +1,19 @@ // Filename: boxEmitter.I // Created by: charles (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/boxEmitter.cxx b/panda/src/particlesystem/boxEmitter.cxx index 203cc5ad7e..e85246500a 100644 --- a/panda/src/particlesystem/boxEmitter.cxx +++ b/panda/src/particlesystem/boxEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "boxEmitter.h" diff --git a/panda/src/particlesystem/boxEmitter.h b/panda/src/particlesystem/boxEmitter.h index 33d3e2ecfc..096f7bef4c 100644 --- a/panda/src/particlesystem/boxEmitter.h +++ b/panda/src/particlesystem/boxEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BOXEMITTER_H #define BOXEMITTER_H diff --git a/panda/src/particlesystem/config_particlesystem.cxx b/panda/src/particlesystem/config_particlesystem.cxx index c3fe20559a..a7f36feac1 100644 --- a/panda/src/particlesystem/config_particlesystem.cxx +++ b/panda/src/particlesystem/config_particlesystem.cxx @@ -2,6 +2,19 @@ // Created by: charles (05Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "config_particlesystem.h" #include "particleSystem.h" diff --git a/panda/src/particlesystem/config_particlesystem.h b/panda/src/particlesystem/config_particlesystem.h index f9ff43ad29..1d24729ca9 100644 --- a/panda/src/particlesystem/config_particlesystem.h +++ b/panda/src/particlesystem/config_particlesystem.h @@ -2,6 +2,19 @@ // Created by: charles (05Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_PARTICLESYSTEM_H #define CONFIG_PARTICLESYSTEM_H diff --git a/panda/src/particlesystem/discEmitter.I b/panda/src/particlesystem/discEmitter.I index bd856fd110..1100232112 100644 --- a/panda/src/particlesystem/discEmitter.I +++ b/panda/src/particlesystem/discEmitter.I @@ -1,6 +1,19 @@ // Filename: discEmitter.I // Created by: charles (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -10,8 +23,8 @@ //////////////////////////////////////////////////////////////////// INLINE void DiscEmitter:: -set_radius(float r) { - _radius = r; +set_radius(float r) { + _radius = r; } //////////////////////////////////////////////////////////////////// @@ -43,8 +56,8 @@ set_inner_angle(float i_angle) { //////////////////////////////////////////////////////////////////// INLINE void DiscEmitter:: -set_outer_magnitude(float o_mag) { - _outer_magnitude = o_mag; +set_outer_magnitude(float o_mag) { + _outer_magnitude = o_mag; } //////////////////////////////////////////////////////////////////// @@ -54,8 +67,8 @@ set_outer_magnitude(float o_mag) { //////////////////////////////////////////////////////////////////// INLINE void DiscEmitter:: -set_inner_magnitude(float i_mag) { - _inner_magnitude = i_mag; +set_inner_magnitude(float i_mag) { + _inner_magnitude = i_mag; } //////////////////////////////////////////////////////////////////// @@ -65,8 +78,8 @@ set_inner_magnitude(float i_mag) { //////////////////////////////////////////////////////////////////// INLINE void DiscEmitter:: -set_cubic_lerping(bool clerp) { - _cubic_lerping = clerp; +set_cubic_lerping(bool clerp) { + _cubic_lerping = clerp; } //////////////////////////////////////////////////////////////////// @@ -98,8 +111,8 @@ get_outer_angle(void) const { //////////////////////////////////////////////////////////////////// INLINE float DiscEmitter:: -get_inner_angle(void) const { - return _inner_aoe; +get_inner_angle(void) const { + return _inner_aoe; } //////////////////////////////////////////////////////////////////// @@ -109,8 +122,8 @@ get_inner_angle(void) const { //////////////////////////////////////////////////////////////////// INLINE float DiscEmitter:: -get_outer_magnitude(void) const { - return _outer_magnitude; +get_outer_magnitude(void) const { + return _outer_magnitude; } //////////////////////////////////////////////////////////////////// @@ -120,8 +133,8 @@ get_outer_magnitude(void) const { //////////////////////////////////////////////////////////////////// INLINE float DiscEmitter:: -get_inner_magnitude(void) const { - return _inner_magnitude; +get_inner_magnitude(void) const { + return _inner_magnitude; } //////////////////////////////////////////////////////////////////// @@ -131,6 +144,6 @@ get_inner_magnitude(void) const { //////////////////////////////////////////////////////////////////// INLINE bool DiscEmitter:: -get_cubic_lerping(void) const { - return _cubic_lerping; +get_cubic_lerping(void) const { + return _cubic_lerping; } diff --git a/panda/src/particlesystem/discEmitter.cxx b/panda/src/particlesystem/discEmitter.cxx index 1469aa87b1..41be5df6f8 100644 --- a/panda/src/particlesystem/discEmitter.cxx +++ b/panda/src/particlesystem/discEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "discEmitter.h" diff --git a/panda/src/particlesystem/discEmitter.h b/panda/src/particlesystem/discEmitter.h index 37e4703415..32b39c5af7 100644 --- a/panda/src/particlesystem/discEmitter.h +++ b/panda/src/particlesystem/discEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DISCEMITTER_H #define DISCEMITTER_H diff --git a/panda/src/particlesystem/emitters.h b/panda/src/particlesystem/emitters.h index 66a701e770..bfe78f235e 100644 --- a/panda/src/particlesystem/emitters.h +++ b/panda/src/particlesystem/emitters.h @@ -1,6 +1,19 @@ // Filename: emitters.h // Created by: charles (22Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef EMITTERS_H diff --git a/panda/src/particlesystem/geomParticleRenderer.I b/panda/src/particlesystem/geomParticleRenderer.I index b72901a390..8b16aba33d 100644 --- a/panda/src/particlesystem/geomParticleRenderer.I +++ b/panda/src/particlesystem/geomParticleRenderer.I @@ -1,6 +1,19 @@ // Filename: geomParticleRenderer.I // Created by: charles (05Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/geomParticleRenderer.cxx b/panda/src/particlesystem/geomParticleRenderer.cxx index 0aa62e7c19..5c0d4d362b 100644 --- a/panda/src/particlesystem/geomParticleRenderer.cxx +++ b/panda/src/particlesystem/geomParticleRenderer.cxx @@ -2,6 +2,19 @@ // Created by: charles (05Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "geomParticleRenderer.h" #include "baseParticle.h" @@ -155,7 +168,7 @@ render(vector< PT(PhysicsObject) >& po_vector, int ttl_particles) { alpha_scalar=get_user_alpha(); } else { alpha_scalar = cur_particle->get_parameterized_age(); - if (_alpha_mode == PR_ALPHA_OUT) + if (_alpha_mode == PR_ALPHA_OUT) alpha_scalar = 1.0f - alpha_scalar; } diff --git a/panda/src/particlesystem/geomParticleRenderer.h b/panda/src/particlesystem/geomParticleRenderer.h index cbe6ce9c80..549a51bbb0 100644 --- a/panda/src/particlesystem/geomParticleRenderer.h +++ b/panda/src/particlesystem/geomParticleRenderer.h @@ -1,6 +1,19 @@ // Filename: geomParticleRenderer.h // Created by: charles (05Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMPARTICLERENDERER_H diff --git a/panda/src/particlesystem/lineEmitter.I b/panda/src/particlesystem/lineEmitter.I index f0e296d2ce..632cf14cf4 100644 --- a/panda/src/particlesystem/lineEmitter.I +++ b/panda/src/particlesystem/lineEmitter.I @@ -1,6 +1,19 @@ // Filename: lineEmitter.I // Created by: charles (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/lineEmitter.cxx b/panda/src/particlesystem/lineEmitter.cxx index 0eb948a68d..eee700b8a8 100644 --- a/panda/src/particlesystem/lineEmitter.cxx +++ b/panda/src/particlesystem/lineEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "lineEmitter.h" diff --git a/panda/src/particlesystem/lineEmitter.h b/panda/src/particlesystem/lineEmitter.h index 8ade5a55fd..a2151e28a7 100644 --- a/panda/src/particlesystem/lineEmitter.h +++ b/panda/src/particlesystem/lineEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LINEEMITTER_H #define LINEEMITTER_H diff --git a/panda/src/particlesystem/lineParticleRenderer.I b/panda/src/particlesystem/lineParticleRenderer.I index d3ebc4904a..a337723e3b 100644 --- a/panda/src/particlesystem/lineParticleRenderer.I +++ b/panda/src/particlesystem/lineParticleRenderer.I @@ -1,6 +1,19 @@ // Filename: lineParticleRenderer.I // Created by: darren (06Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/lineParticleRenderer.cxx b/panda/src/particlesystem/lineParticleRenderer.cxx index caf7ff5cc8..e96bc7db37 100644 --- a/panda/src/particlesystem/lineParticleRenderer.cxx +++ b/panda/src/particlesystem/lineParticleRenderer.cxx @@ -2,6 +2,19 @@ // Created by: darren (06Oct00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "lineParticleRenderer.h" diff --git a/panda/src/particlesystem/lineParticleRenderer.h b/panda/src/particlesystem/lineParticleRenderer.h index 6d42a703a9..a26bc13eed 100644 --- a/panda/src/particlesystem/lineParticleRenderer.h +++ b/panda/src/particlesystem/lineParticleRenderer.h @@ -1,6 +1,19 @@ // Filename: lineParticleRenderer.h // Created by: darren (06Oct00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEPARTICLERENDERER_H diff --git a/panda/src/particlesystem/orientedParticle.I b/panda/src/particlesystem/orientedParticle.I index 04e06690c5..c5dfdfc2d5 100644 --- a/panda/src/particlesystem/orientedParticle.I +++ b/panda/src/particlesystem/orientedParticle.I @@ -1,6 +1,19 @@ // Filename: orientedParticle.I // Created by: charles (04Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/orientedParticle.cxx b/panda/src/particlesystem/orientedParticle.cxx index b78ef801ef..81867e3267 100644 --- a/panda/src/particlesystem/orientedParticle.cxx +++ b/panda/src/particlesystem/orientedParticle.cxx @@ -2,6 +2,19 @@ // Created by: charles (19Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "orientedParticle.h" diff --git a/panda/src/particlesystem/orientedParticle.h b/panda/src/particlesystem/orientedParticle.h index a8bd104879..51b74406f5 100644 --- a/panda/src/particlesystem/orientedParticle.h +++ b/panda/src/particlesystem/orientedParticle.h @@ -1,6 +1,19 @@ // Filename: orientedParticle.h // Created by: charles (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ORIENTEDPARTICLE_H diff --git a/panda/src/particlesystem/orientedParticleFactory.I b/panda/src/particlesystem/orientedParticleFactory.I index a73d3973d6..d65a54e880 100644 --- a/panda/src/particlesystem/orientedParticleFactory.I +++ b/panda/src/particlesystem/orientedParticleFactory.I @@ -1,6 +1,19 @@ // Filename: orientedParticleFactory.I // Created by: charles (16Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/orientedParticleFactory.cxx b/panda/src/particlesystem/orientedParticleFactory.cxx index fbc74620fe..aa7b6ce84d 100644 --- a/panda/src/particlesystem/orientedParticleFactory.cxx +++ b/panda/src/particlesystem/orientedParticleFactory.cxx @@ -2,6 +2,19 @@ // Created by: charles (05Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "orientedParticleFactory.h" #include "orientedParticle.h" diff --git a/panda/src/particlesystem/orientedParticleFactory.h b/panda/src/particlesystem/orientedParticleFactory.h index ea6c9747bb..949d1cc418 100644 --- a/panda/src/particlesystem/orientedParticleFactory.h +++ b/panda/src/particlesystem/orientedParticleFactory.h @@ -1,6 +1,19 @@ // Filename: orientedParticleFactory.h // Created by: charles (05Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ORIENTEDPARTICLEFACTORY_H @@ -26,7 +39,7 @@ private: PUBLISHED: OrientedParticleFactory(void); OrientedParticleFactory(const OrientedParticleFactory ©); - virtual ~OrientedParticleFactory(void); + virtual ~OrientedParticleFactory(void); INLINE void set_initial_orientation(const LOrientationf &o); INLINE void set_final_orientation(const LOrientationf &o); diff --git a/panda/src/particlesystem/particleCommonFuncs.h b/panda/src/particlesystem/particleCommonFuncs.h index f7092eeb72..285d15f08a 100644 --- a/panda/src/particlesystem/particleCommonFuncs.h +++ b/panda/src/particlesystem/particleCommonFuncs.h @@ -2,6 +2,19 @@ // Created by: darren (02Oct00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PARTICLECOMMONFUNCS_H #define PARTICLECOMMONFUNCS_H diff --git a/panda/src/particlesystem/particleSystem.I b/panda/src/particlesystem/particleSystem.I index cac98b00e3..9f273d98a8 100644 --- a/panda/src/particlesystem/particleSystem.I +++ b/panda/src/particlesystem/particleSystem.I @@ -2,6 +2,19 @@ // Created by: charles (14Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function : render diff --git a/panda/src/particlesystem/particleSystem.cxx b/panda/src/particlesystem/particleSystem.cxx index f897945927..4db4d82dc7 100644 --- a/panda/src/particlesystem/particleSystem.cxx +++ b/panda/src/particlesystem/particleSystem.cxx @@ -2,6 +2,19 @@ // Created by: charles (14Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/particlesystem/particleSystem.h b/panda/src/particlesystem/particleSystem.h index 5a434f8769..f4c3894cb1 100644 --- a/panda/src/particlesystem/particleSystem.h +++ b/panda/src/particlesystem/particleSystem.h @@ -2,6 +2,19 @@ // Created by: charles (14Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NDEBUG //#define PSDEBUG diff --git a/panda/src/particlesystem/particleSystemManager.I b/panda/src/particlesystem/particleSystemManager.I index 28e8aee689..3429cb59b6 100644 --- a/panda/src/particlesystem/particleSystemManager.I +++ b/panda/src/particlesystem/particleSystemManager.I @@ -1,6 +1,19 @@ // Filename: particleSystemManager.I // Created by: charles (28Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/particleSystemManager.cxx b/panda/src/particlesystem/particleSystemManager.cxx index 6cfda58159..a18b66f83e 100644 --- a/panda/src/particlesystem/particleSystemManager.cxx +++ b/panda/src/particlesystem/particleSystemManager.cxx @@ -2,6 +2,19 @@ // Created by: charles (28Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "particleSystemManager.h" #include "particleSystem.h" diff --git a/panda/src/particlesystem/particleSystemManager.h b/panda/src/particlesystem/particleSystemManager.h index 13b89ea923..59129ede00 100644 --- a/panda/src/particlesystem/particleSystemManager.h +++ b/panda/src/particlesystem/particleSystemManager.h @@ -2,6 +2,19 @@ // Created by: charles (28Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PARTICLESYSTEMMANAGER_H #define PARTICLESYSTEMMANAGER_H diff --git a/panda/src/particlesystem/particlefactories.h b/panda/src/particlesystem/particlefactories.h index a062ca2462..a0ceae4db5 100644 --- a/panda/src/particlesystem/particlefactories.h +++ b/panda/src/particlesystem/particlefactories.h @@ -1,6 +1,19 @@ // Filename: particlefactories.h // Created by: charles (05Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARTICLEFACTORIES_H diff --git a/panda/src/particlesystem/particles.h b/panda/src/particlesystem/particles.h index 4bf53b6640..598514aa31 100644 --- a/panda/src/particlesystem/particles.h +++ b/panda/src/particlesystem/particles.h @@ -1,6 +1,19 @@ // Filename: particles.h // Created by: charles (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PARTICLES_H diff --git a/panda/src/particlesystem/pointEmitter.I b/panda/src/particlesystem/pointEmitter.I index ef5719f7ff..34d34e33bc 100644 --- a/panda/src/particlesystem/pointEmitter.I +++ b/panda/src/particlesystem/pointEmitter.I @@ -1,6 +1,19 @@ // Filename: pointEmitter.I // Created by: charles (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -9,8 +22,8 @@ // Description : point setting //////////////////////////////////////////////////////////////////// INLINE void PointEmitter:: -set_location(const LPoint3f& p) { - _location = p; +set_location(const LPoint3f& p) { + _location = p; } INLINE LPoint3f PointEmitter:: diff --git a/panda/src/particlesystem/pointEmitter.cxx b/panda/src/particlesystem/pointEmitter.cxx index 52ba63aa90..264a68eb37 100644 --- a/panda/src/particlesystem/pointEmitter.cxx +++ b/panda/src/particlesystem/pointEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "pointEmitter.h" diff --git a/panda/src/particlesystem/pointEmitter.h b/panda/src/particlesystem/pointEmitter.h index 3adfac5f09..399d741f19 100644 --- a/panda/src/particlesystem/pointEmitter.h +++ b/panda/src/particlesystem/pointEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef POINTEMITTER_H #define POINTEMITTER_H diff --git a/panda/src/particlesystem/pointParticle.cxx b/panda/src/particlesystem/pointParticle.cxx index 694e6bc52d..42e0043ea9 100644 --- a/panda/src/particlesystem/pointParticle.cxx +++ b/panda/src/particlesystem/pointParticle.cxx @@ -2,6 +2,19 @@ // Created by: charles (19Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "pointParticle.h" diff --git a/panda/src/particlesystem/pointParticle.h b/panda/src/particlesystem/pointParticle.h index ebdc1a98b1..59e00b2c3b 100644 --- a/panda/src/particlesystem/pointParticle.h +++ b/panda/src/particlesystem/pointParticle.h @@ -1,6 +1,19 @@ // Filename: pointParticle.h // Created by: charles (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTPARTICLE_H diff --git a/panda/src/particlesystem/pointParticleFactory.cxx b/panda/src/particlesystem/pointParticleFactory.cxx index 184f976e93..4ed84f54c7 100644 --- a/panda/src/particlesystem/pointParticleFactory.cxx +++ b/panda/src/particlesystem/pointParticleFactory.cxx @@ -2,6 +2,19 @@ // Created by: charles (05Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "pointParticleFactory.h" #include "pointParticle.h" diff --git a/panda/src/particlesystem/pointParticleFactory.h b/panda/src/particlesystem/pointParticleFactory.h index 7ce124adb3..988aa6f1b3 100644 --- a/panda/src/particlesystem/pointParticleFactory.h +++ b/panda/src/particlesystem/pointParticleFactory.h @@ -1,6 +1,19 @@ // Filename: pointParticleFactory.h // Created by: charles (05Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTPARTICLEFACTORY_H diff --git a/panda/src/particlesystem/pointParticleRenderer.I b/panda/src/particlesystem/pointParticleRenderer.I index b5a42f808f..09f0739ffb 100644 --- a/panda/src/particlesystem/pointParticleRenderer.I +++ b/panda/src/particlesystem/pointParticleRenderer.I @@ -1,6 +1,19 @@ // Filename: pointParticleRenderer.I // Created by: charles (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/pointParticleRenderer.cxx b/panda/src/particlesystem/pointParticleRenderer.cxx index f887330428..b9cdb2cd9e 100644 --- a/panda/src/particlesystem/pointParticleRenderer.cxx +++ b/panda/src/particlesystem/pointParticleRenderer.cxx @@ -2,6 +2,19 @@ // Created by: charles (20Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include "pointParticleRenderer.h" diff --git a/panda/src/particlesystem/pointParticleRenderer.h b/panda/src/particlesystem/pointParticleRenderer.h index eadaf2986d..53d8fb835a 100644 --- a/panda/src/particlesystem/pointParticleRenderer.h +++ b/panda/src/particlesystem/pointParticleRenderer.h @@ -1,6 +1,19 @@ // Filename: pointParticleRenderer.h // Created by: charles (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTPARTICLERENDERER_H @@ -75,7 +88,7 @@ private: virtual void birth_particle(int index); virtual void kill_particle(int index); virtual void init_geoms(void); - virtual void render(vector< PT(PhysicsObject) >& po_vector, + virtual void render(vector< PT(PhysicsObject) >& po_vector, int ttl_particles); virtual void resize_pool(int new_size); }; diff --git a/panda/src/particlesystem/rectangleEmitter.I b/panda/src/particlesystem/rectangleEmitter.I index 7bd0849998..cbe2a6ada3 100644 --- a/panda/src/particlesystem/rectangleEmitter.I +++ b/panda/src/particlesystem/rectangleEmitter.I @@ -1,6 +1,19 @@ // Filename: rectangleEmitter.I // Created by: charles (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/rectangleEmitter.cxx b/panda/src/particlesystem/rectangleEmitter.cxx index 90356894ac..5d1eec62bc 100644 --- a/panda/src/particlesystem/rectangleEmitter.cxx +++ b/panda/src/particlesystem/rectangleEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "rectangleEmitter.h" diff --git a/panda/src/particlesystem/rectangleEmitter.h b/panda/src/particlesystem/rectangleEmitter.h index 1db5692d9e..846e291f61 100644 --- a/panda/src/particlesystem/rectangleEmitter.h +++ b/panda/src/particlesystem/rectangleEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RECTANGLEEMITTER_H #define RECTANGLEEMITTER_H diff --git a/panda/src/particlesystem/ringEmitter.I b/panda/src/particlesystem/ringEmitter.I index 1fc2e14344..6120819fd4 100644 --- a/panda/src/particlesystem/ringEmitter.I +++ b/panda/src/particlesystem/ringEmitter.I @@ -2,6 +2,19 @@ // Created by: charles (26Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function : set_radius diff --git a/panda/src/particlesystem/ringEmitter.cxx b/panda/src/particlesystem/ringEmitter.cxx index 94095ca6fa..b2d0bb563c 100644 --- a/panda/src/particlesystem/ringEmitter.cxx +++ b/panda/src/particlesystem/ringEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "ringEmitter.h" diff --git a/panda/src/particlesystem/ringEmitter.h b/panda/src/particlesystem/ringEmitter.h index 6c0cc2cba7..eab33eb83d 100644 --- a/panda/src/particlesystem/ringEmitter.h +++ b/panda/src/particlesystem/ringEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RINGEMITTER_H #define RINGEMITTER_H diff --git a/panda/src/particlesystem/sparkleParticleRenderer.I b/panda/src/particlesystem/sparkleParticleRenderer.I index e62bcf74b2..9e4a924ef9 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.I +++ b/panda/src/particlesystem/sparkleParticleRenderer.I @@ -1,6 +1,19 @@ // Filename: sparkleParticleRenderer.I // Created by: charles (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/sparkleParticleRenderer.cxx b/panda/src/particlesystem/sparkleParticleRenderer.cxx index b2f71c831a..6f61da10f4 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.cxx +++ b/panda/src/particlesystem/sparkleParticleRenderer.cxx @@ -2,6 +2,19 @@ // Created by: charles (27Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "sparkleParticleRenderer.h" diff --git a/panda/src/particlesystem/sparkleParticleRenderer.h b/panda/src/particlesystem/sparkleParticleRenderer.h index 1314cf98a5..cb6af069d8 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.h +++ b/panda/src/particlesystem/sparkleParticleRenderer.h @@ -1,6 +1,19 @@ // Filename: sparkleParticleRenderer.h // Created by: charles (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SPARKLEPARTICLERENDERER_H diff --git a/panda/src/particlesystem/sphereSurfaceEmitter.I b/panda/src/particlesystem/sphereSurfaceEmitter.I index d961a51b90..d0da2a1dc5 100644 --- a/panda/src/particlesystem/sphereSurfaceEmitter.I +++ b/panda/src/particlesystem/sphereSurfaceEmitter.I @@ -1,6 +1,19 @@ // Filename: sphereSurfaceEmitter.I // Created by: charles (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_particlesystem.h" @@ -12,8 +25,8 @@ //////////////////////////////////////////////////////////////////// INLINE void SphereSurfaceEmitter:: -set_radius(float r) { - _radius = r; +set_radius(float r) { + _radius = r; } //////////////////////////////////////////////////////////////////// @@ -23,6 +36,6 @@ set_radius(float r) { //////////////////////////////////////////////////////////////////// INLINE float SphereSurfaceEmitter:: -get_radius(void) const { - return _radius; +get_radius(void) const { + return _radius; } diff --git a/panda/src/particlesystem/sphereSurfaceEmitter.cxx b/panda/src/particlesystem/sphereSurfaceEmitter.cxx index fba7b620f5..2c73cd0bc0 100644 --- a/panda/src/particlesystem/sphereSurfaceEmitter.cxx +++ b/panda/src/particlesystem/sphereSurfaceEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "sphereSurfaceEmitter.h" diff --git a/panda/src/particlesystem/sphereSurfaceEmitter.h b/panda/src/particlesystem/sphereSurfaceEmitter.h index 12b71827ff..dbb845423b 100644 --- a/panda/src/particlesystem/sphereSurfaceEmitter.h +++ b/panda/src/particlesystem/sphereSurfaceEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPHERESURFACEEMITTER_H #define SPHERESURFACEEMITTER_H diff --git a/panda/src/particlesystem/sphereVolumeEmitter.I b/panda/src/particlesystem/sphereVolumeEmitter.I index f5c97d3f02..e56a747aa9 100644 --- a/panda/src/particlesystem/sphereVolumeEmitter.I +++ b/panda/src/particlesystem/sphereVolumeEmitter.I @@ -1,6 +1,19 @@ // Filename: sphereVolumeEmitter.I // Created by: charles (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_particlesystem.h" @@ -12,8 +25,8 @@ //////////////////////////////////////////////////////////////////// INLINE void SphereVolumeEmitter:: -set_radius(float r) { - _radius = r; +set_radius(float r) { + _radius = r; } //////////////////////////////////////////////////////////////////// @@ -23,6 +36,6 @@ set_radius(float r) { //////////////////////////////////////////////////////////////////// INLINE float SphereVolumeEmitter:: -get_radius(void) const { - return _radius; +get_radius(void) const { + return _radius; } diff --git a/panda/src/particlesystem/sphereVolumeEmitter.cxx b/panda/src/particlesystem/sphereVolumeEmitter.cxx index b29c7d9bce..8791091f2b 100644 --- a/panda/src/particlesystem/sphereVolumeEmitter.cxx +++ b/panda/src/particlesystem/sphereVolumeEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "sphereVolumeEmitter.h" diff --git a/panda/src/particlesystem/sphereVolumeEmitter.h b/panda/src/particlesystem/sphereVolumeEmitter.h index 45bdfbd315..05601519d3 100644 --- a/panda/src/particlesystem/sphereVolumeEmitter.h +++ b/panda/src/particlesystem/sphereVolumeEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (22Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPHEREVOLUMEEMITTER_H #define SPHEREVOLUMEEMITTER_H diff --git a/panda/src/particlesystem/spriteParticleRenderer.I b/panda/src/particlesystem/spriteParticleRenderer.I index bf0871746e..b633e6ecbe 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.I +++ b/panda/src/particlesystem/spriteParticleRenderer.I @@ -1,6 +1,19 @@ // Filename: spriteParticleRenderer.I // Created by: charles (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/spriteParticleRenderer.cxx b/panda/src/particlesystem/spriteParticleRenderer.cxx index 598a014150..c60cbb9561 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.cxx +++ b/panda/src/particlesystem/spriteParticleRenderer.cxx @@ -2,6 +2,19 @@ // Created by: charles (13Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include diff --git a/panda/src/particlesystem/spriteParticleRenderer.h b/panda/src/particlesystem/spriteParticleRenderer.h index 60dc2c6ecf..79d1bd6d17 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.h +++ b/panda/src/particlesystem/spriteParticleRenderer.h @@ -2,6 +2,19 @@ // Created by: charles (13Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPRITEPARTICLERENDERER_H #define SPRITEPARTICLERENDERER_H diff --git a/panda/src/particlesystem/tangentRingEmitter.I b/panda/src/particlesystem/tangentRingEmitter.I index 78c972dc76..aec2aab5f8 100644 --- a/panda/src/particlesystem/tangentRingEmitter.I +++ b/panda/src/particlesystem/tangentRingEmitter.I @@ -1,6 +1,19 @@ // Filename: tangentRingEmitter.I // Created by: charles (25Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/tangentRingEmitter.cxx b/panda/src/particlesystem/tangentRingEmitter.cxx index a8bee6fd95..2c440d17f0 100644 --- a/panda/src/particlesystem/tangentRingEmitter.cxx +++ b/panda/src/particlesystem/tangentRingEmitter.cxx @@ -2,6 +2,19 @@ // Created by: charles (25Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "tangentRingEmitter.h" diff --git a/panda/src/particlesystem/tangentRingEmitter.h b/panda/src/particlesystem/tangentRingEmitter.h index 288b1c6bec..0dce745fd6 100644 --- a/panda/src/particlesystem/tangentRingEmitter.h +++ b/panda/src/particlesystem/tangentRingEmitter.h @@ -2,6 +2,19 @@ // Created by: charles (25Jul00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TANGENTRINGEMITTER_H #define TANGENTRINGEMITTER_H diff --git a/panda/src/particlesystem/zSpinParticle.I b/panda/src/particlesystem/zSpinParticle.I index 8994a1fbe4..77c72bb46d 100644 --- a/panda/src/particlesystem/zSpinParticle.I +++ b/panda/src/particlesystem/zSpinParticle.I @@ -2,6 +2,19 @@ // Created by: charles (16Aug00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function : set_initial_angle diff --git a/panda/src/particlesystem/zSpinParticle.cxx b/panda/src/particlesystem/zSpinParticle.cxx index c298627e06..b06e952c18 100644 --- a/panda/src/particlesystem/zSpinParticle.cxx +++ b/panda/src/particlesystem/zSpinParticle.cxx @@ -2,6 +2,19 @@ // Created by: charles (16Aug00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "zSpinParticle.h" diff --git a/panda/src/particlesystem/zSpinParticle.h b/panda/src/particlesystem/zSpinParticle.h index 632295b386..414c34a68b 100644 --- a/panda/src/particlesystem/zSpinParticle.h +++ b/panda/src/particlesystem/zSpinParticle.h @@ -2,6 +2,19 @@ // Created by: charles (16Aug00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ZSPINPARTICLE_H #define ZSPINPARTICLE_H diff --git a/panda/src/particlesystem/zSpinParticleFactory.I b/panda/src/particlesystem/zSpinParticleFactory.I index 3cdc024a8b..ef415553ba 100644 --- a/panda/src/particlesystem/zSpinParticleFactory.I +++ b/panda/src/particlesystem/zSpinParticleFactory.I @@ -2,6 +2,19 @@ // Created by: charles (16Aug00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/zSpinParticleFactory.cxx b/panda/src/particlesystem/zSpinParticleFactory.cxx index ea05af68a1..d6de0aaa23 100644 --- a/panda/src/particlesystem/zSpinParticleFactory.cxx +++ b/panda/src/particlesystem/zSpinParticleFactory.cxx @@ -2,6 +2,19 @@ // Created by: charles (16Aug00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "zSpinParticleFactory.h" #include "zSpinParticle.h" diff --git a/panda/src/particlesystem/zSpinParticleFactory.h b/panda/src/particlesystem/zSpinParticleFactory.h index 823f40ba91..73b4cb660f 100644 --- a/panda/src/particlesystem/zSpinParticleFactory.h +++ b/panda/src/particlesystem/zSpinParticleFactory.h @@ -2,6 +2,19 @@ // Created by: charles (16Aug00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ZSPINPARTICLEFACTORY_H #define ZSPINPARTICLEFACTORY_H diff --git a/panda/src/physics/actorNode.I b/panda/src/physics/actorNode.I index 73829e35d2..aea9ee1933 100644 --- a/panda/src/physics/actorNode.I +++ b/panda/src/physics/actorNode.I @@ -1,6 +1,19 @@ // Filename: actorNode.I // Created by: charles (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/actorNode.cxx b/panda/src/physics/actorNode.cxx index fa91dea975..a6e611d9a9 100644 --- a/panda/src/physics/actorNode.cxx +++ b/panda/src/physics/actorNode.cxx @@ -1,6 +1,19 @@ // Filename: actorNode.cxx // Created by: charles (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "actorNode.h" @@ -51,7 +64,7 @@ ActorNode:: //////////////////////////////////////////////////////////////////// // Function : update_arc // Access : public -// Description : this populates the parent arc with the transform +// Description : this populates the parent arc with the transform // generated by the contained Physical, moving the // node and subsequent geometry. //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/actorNode.h b/panda/src/physics/actorNode.h index a4c4cdc31e..a8008c9c73 100644 --- a/panda/src/physics/actorNode.h +++ b/panda/src/physics/actorNode.h @@ -1,6 +1,19 @@ // Filename: actorNode.h // Created by: charles (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ACTORNODE_H diff --git a/panda/src/physics/angularEulerIntegrator.cxx b/panda/src/physics/angularEulerIntegrator.cxx index b7bf9b760a..7804069740 100644 --- a/panda/src/physics/angularEulerIntegrator.cxx +++ b/panda/src/physics/angularEulerIntegrator.cxx @@ -1,6 +1,19 @@ -// Filename: angularEulerIntergator.cxx +// Filename: angularEulerIntegrator.cxx // Created by: charles (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "angularEulerIntegrator.h" @@ -31,13 +44,13 @@ AngularEulerIntegrator:: //////////////////////////////////////////////////////////////////// // Function : Integrate // Access : Public -// Description : Integrate a step of motion (based on dt) by -// applying every force in force_vec to every object +// Description : Integrate a step of motion (based on dt) by +// applying every force in force_vec to every object // in obj_vec. //////////////////////////////////////////////////////////////////// void AngularEulerIntegrator:: -child_integrate(Physical *physical, - vector< PT(AngularForce) >& forces, +child_integrate(Physical *physical, + vector< PT(AngularForce) >& forces, float dt) { // perform the precomputation. Note that the vector returned by // get_precomputed_matrices() has the matrices loaded in order of force @@ -57,7 +70,7 @@ child_integrate(Physical *physical, vector< PT(PhysicsObject) >::const_iterator current_object_iter; current_object_iter = physical->get_object_vector().begin(); - for (; current_object_iter != physical->get_object_vector().end(); + for (; current_object_iter != physical->get_object_vector().end(); current_object_iter++) { PhysicsObject *current_object = *current_object_iter; @@ -68,7 +81,7 @@ child_integrate(Physical *physical, continue; if (current_object->get_active() == false) - continue; + continue; LVector3f accum_vec(0, 0, 0); diff --git a/panda/src/physics/angularEulerIntegrator.h b/panda/src/physics/angularEulerIntegrator.h index 7a677150c5..315586a24e 100644 --- a/panda/src/physics/angularEulerIntegrator.h +++ b/panda/src/physics/angularEulerIntegrator.h @@ -1,6 +1,19 @@ -// Filename: angularEulerIntergator.h +// Filename: angularEulerIntegrator.h // Created by: charles (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ANGULAREULERINTEGRATOR_H diff --git a/panda/src/physics/angularForce.cxx b/panda/src/physics/angularForce.cxx index 0d5ea4e72c..845e578a8e 100644 --- a/panda/src/physics/angularForce.cxx +++ b/panda/src/physics/angularForce.cxx @@ -1,6 +1,19 @@ // Filename: angularForce.cxx // Created by: charles (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "angularForce.h" @@ -48,7 +61,7 @@ get_vector(const PhysicsObject *po) { } //////////////////////////////////////////////////////////////////// -// Function : is_linear +// Function : is_linear // Access : public // Description : access query //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/angularForce.h b/panda/src/physics/angularForce.h index c1a507c66f..7a43c65a89 100644 --- a/panda/src/physics/angularForce.h +++ b/panda/src/physics/angularForce.h @@ -1,6 +1,19 @@ // Filename: angularForce.h // Created by: charles (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ANGULARFORCE_H diff --git a/panda/src/physics/angularIntegrator.cxx b/panda/src/physics/angularIntegrator.cxx index 8833f10441..7a7540e55d 100644 --- a/panda/src/physics/angularIntegrator.cxx +++ b/panda/src/physics/angularIntegrator.cxx @@ -1,6 +1,19 @@ -// Filename: AngularIntegrator.cxx +// Filename: angularIntegrator.cxx // Created by: charles (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "angularIntegrator.h" diff --git a/panda/src/physics/angularIntegrator.h b/panda/src/physics/angularIntegrator.h index bdd3fb68aa..8065bb0d2f 100644 --- a/panda/src/physics/angularIntegrator.h +++ b/panda/src/physics/angularIntegrator.h @@ -1,6 +1,19 @@ -// Filename: AngularIntegrator.h +// Filename: angularIntegrator.h // Created by: charles (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ANGULARINTEGRATOR_H diff --git a/panda/src/physics/angularVectorForce.I b/panda/src/physics/angularVectorForce.I index 3577dfd84d..68b52d7fd3 100644 --- a/panda/src/physics/angularVectorForce.I +++ b/panda/src/physics/angularVectorForce.I @@ -1,6 +1,19 @@ // Filename: angularVectorForce.I // Created by: charles (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/angularVectorForce.cxx b/panda/src/physics/angularVectorForce.cxx index e91ea87105..27d6a6d73c 100644 --- a/panda/src/physics/angularVectorForce.cxx +++ b/panda/src/physics/angularVectorForce.cxx @@ -1,6 +1,19 @@ // Filename: angularVectorForce.cxx // Created by: charles (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "angularVectorForce.h" diff --git a/panda/src/physics/angularVectorForce.h b/panda/src/physics/angularVectorForce.h index ab369ba8ae..2260e4c2a1 100644 --- a/panda/src/physics/angularVectorForce.h +++ b/panda/src/physics/angularVectorForce.h @@ -1,6 +1,19 @@ // Filename: angularVectorForce.h // Created by: charles (09Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ANGULARVECTORFORCE_H diff --git a/panda/src/physics/baseForce.I b/panda/src/physics/baseForce.I index 53a5c96799..9d97954141 100644 --- a/panda/src/physics/baseForce.I +++ b/panda/src/physics/baseForce.I @@ -1,6 +1,19 @@ // Filename: baseForce.I // Created by: charles (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/baseForce.cxx b/panda/src/physics/baseForce.cxx index 8a04c01171..5bba4756ff 100644 --- a/panda/src/physics/baseForce.cxx +++ b/panda/src/physics/baseForce.cxx @@ -1,6 +1,19 @@ // Filename: baseForce.cxx // Created by: charles (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "baseForce.h" diff --git a/panda/src/physics/baseForce.h b/panda/src/physics/baseForce.h index b48454f49b..f452866eca 100644 --- a/panda/src/physics/baseForce.h +++ b/panda/src/physics/baseForce.h @@ -1,6 +1,19 @@ // Filename: baseForce.h // Created by: charles (08Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BASEFORCE_H diff --git a/panda/src/physics/baseIntegrator.I b/panda/src/physics/baseIntegrator.I index 4151a7a4bd..a32c1f3bbe 100644 --- a/panda/src/physics/baseIntegrator.I +++ b/panda/src/physics/baseIntegrator.I @@ -1,6 +1,19 @@ // Filename: baseIntegrator.I // Created by: charles (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/baseIntegrator.cxx b/panda/src/physics/baseIntegrator.cxx index e6b01744b6..9c1c21ba95 100644 --- a/panda/src/physics/baseIntegrator.cxx +++ b/panda/src/physics/baseIntegrator.cxx @@ -1,6 +1,19 @@ // Filename: baseIntegrator.cxx // Created by: charles (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "baseIntegrator.h" @@ -36,7 +49,7 @@ BaseIntegrator:: // Physical doesn't have to wrt. //////////////////////////////////////////////////////////////////// void BaseIntegrator:: -precompute_linear_matrices(Physical *physical, +precompute_linear_matrices(Physical *physical, const vector< PT(LinearForce) > &forces) { // make sure the physical's in the scene graph, somewhere. PhysicalNode *physical_node = physical->get_physical_node(); @@ -65,7 +78,7 @@ precompute_linear_matrices(Physical *physical, _precomputed_linear_matrices[index++] = current_xform; } - const vector< PT(LinearForce) > &force_vector = + const vector< PT(LinearForce) > &force_vector = physical->get_linear_forces(); // tally the local xforms @@ -87,7 +100,7 @@ precompute_linear_matrices(Physical *physical, // Physical doesn't have to wrt. //////////////////////////////////////////////////////////////////// void BaseIntegrator:: -precompute_angular_matrices(Physical *physical, +precompute_angular_matrices(Physical *physical, const vector< PT(AngularForce) > &forces) { // make sure the physical's in the scene graph, somewhere. PhysicalNode *physical_node = physical->get_physical_node(); @@ -116,7 +129,7 @@ precompute_angular_matrices(Physical *physical, _precomputed_angular_matrices[index++] = current_xform; } - const vector< PT(AngularForce) > &force_vector = + const vector< PT(AngularForce) > &force_vector = physical->get_angular_forces(); // tally the local xforms diff --git a/panda/src/physics/baseIntegrator.h b/panda/src/physics/baseIntegrator.h index dfcc9c9c7c..21d78d863c 100644 --- a/panda/src/physics/baseIntegrator.h +++ b/panda/src/physics/baseIntegrator.h @@ -1,6 +1,19 @@ // Filename: baseIntegrator.h // Created by: charles (11Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BASEINTEGRATOR_H diff --git a/panda/src/physics/config_physics.cxx b/panda/src/physics/config_physics.cxx index f47b641ebe..25174f1ccc 100644 --- a/panda/src/physics/config_physics.cxx +++ b/panda/src/physics/config_physics.cxx @@ -1,6 +1,19 @@ // Filename: config_physics.cxx // Created by: charles (17Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_physics.h" @@ -19,16 +32,16 @@ ConfigureFn(config_physics) { init_libphysics(); } -const float LinearIntegrator::_max_linear_dt = +const float LinearIntegrator::_max_linear_dt = config_physics.GetFloat("default_max_linear_dt", 1.0f / 30.0f); const float AngularIntegrator::_max_angular_dt = config_physics.GetFloat("default_max_angular_dt", 1.0f / 30.0f); -int LinearNoiseForce::_random_seed = +int LinearNoiseForce::_random_seed = config_physics.GetInt("default_noise_force_seed", 665); -const float PhysicsObject::_default_terminal_velocity = +const float PhysicsObject::_default_terminal_velocity = config_physics.GetFloat("default_terminal_velocity", 400.0f); //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/config_physics.h b/panda/src/physics/config_physics.h index 8154435654..446286dbf3 100644 --- a/panda/src/physics/config_physics.h +++ b/panda/src/physics/config_physics.h @@ -1,6 +1,19 @@ // Filename: config_physics.h // Created by: charles (17Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_PHYSICS_H diff --git a/panda/src/physics/forceNode.I b/panda/src/physics/forceNode.I index 52aa319e34..e3fcb9bf7c 100644 --- a/panda/src/physics/forceNode.I +++ b/panda/src/physics/forceNode.I @@ -1,6 +1,19 @@ // Filename: forceNode.I // Created by: charles (02Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/forceNode.cxx b/panda/src/physics/forceNode.cxx index 182498c5a5..e6d69d8aed 100644 --- a/panda/src/physics/forceNode.cxx +++ b/panda/src/physics/forceNode.cxx @@ -1,6 +1,19 @@ // Filename: forceNode.cxx // Created by: charles (02Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "forceNode.h" @@ -68,7 +81,7 @@ void ForceNode:: add_forces_from(const ForceNode &other) { vector< PT(BaseForce) >::iterator last = _forces.end() - 1; - _forces.insert(_forces.end(), + _forces.insert(_forces.end(), other._forces.begin(), other._forces.end()); for (; last != _forces.end(); last++) diff --git a/panda/src/physics/forceNode.h b/panda/src/physics/forceNode.h index b7ab201590..e43b86f896 100644 --- a/panda/src/physics/forceNode.h +++ b/panda/src/physics/forceNode.h @@ -1,6 +1,19 @@ // Filename: forceNode.h // Created by: charles (02Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FORCENODE_H diff --git a/panda/src/physics/forces.h b/panda/src/physics/forces.h index d6f82c3860..6fb5bddb13 100644 --- a/panda/src/physics/forces.h +++ b/panda/src/physics/forces.h @@ -1,6 +1,19 @@ // Filename: forces.h // Created by: charles (20Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FORCES_H diff --git a/panda/src/physics/linearCylinderVortexForce.I b/panda/src/physics/linearCylinderVortexForce.I index 0526811ca5..f616b6e60e 100644 --- a/panda/src/physics/linearCylinderVortexForce.I +++ b/panda/src/physics/linearCylinderVortexForce.I @@ -1,6 +1,19 @@ -// Filename: LinearCylinderVortexForce.I +// Filename: linearCylinderVortexForce.I // Created by: charles (24Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/linearCylinderVortexForce.cxx b/panda/src/physics/linearCylinderVortexForce.cxx index 0abed31b5e..7d9014394f 100644 --- a/panda/src/physics/linearCylinderVortexForce.cxx +++ b/panda/src/physics/linearCylinderVortexForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearCylinderVortexForce.cxx +// Filename: linearCylinderVortexForce.cxx // Created by: charles (24Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_physics.h" @@ -14,7 +27,7 @@ TypeHandle LinearCylinderVortexForce::_type_handle; // Description : Simple Constructor //////////////////////////////////////////////////////////////////// LinearCylinderVortexForce:: -LinearCylinderVortexForce(float radius, float length, float coef, +LinearCylinderVortexForce(float radius, float length, float coef, float a, bool md) : LinearForce(a, md), _radius(radius), _length(length), _coef(coef) diff --git a/panda/src/physics/linearCylinderVortexForce.h b/panda/src/physics/linearCylinderVortexForce.h index c513875dd3..d47dcf7d01 100644 --- a/panda/src/physics/linearCylinderVortexForce.h +++ b/panda/src/physics/linearCylinderVortexForce.h @@ -1,6 +1,19 @@ -// Filename: LinearCylinderVortexForce.h +// Filename: linearCylinderVortexForce.h // Created by: charles (24Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARCYLINDERVORTEXFORCE_H @@ -11,9 +24,9 @@ //////////////////////////////////////////////////////////////////// // Class : LinearCylinderVortexForce // Description : Defines a cylinder inside of which all forces are -// tangential to the theta of the particle wrt the +// tangential to the theta of the particle wrt the // z-axis in local coord. space. This happens by -// assigning the force a node by which the cylinder is +// assigning the force a node by which the cylinder is // transformed. Be warned- this will suck anything // that it can reach directly into orbit and will NOT // let go. diff --git a/panda/src/physics/linearDistanceForce.I b/panda/src/physics/linearDistanceForce.I index 6986ed7c7d..908632cc8b 100644 --- a/panda/src/physics/linearDistanceForce.I +++ b/panda/src/physics/linearDistanceForce.I @@ -1,7 +1,20 @@ -// Filename: LinearDistanceForce.I +// Filename: linearDistanceForce.I // Created by: charles (21Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function : set_falloff_type diff --git a/panda/src/physics/linearDistanceForce.cxx b/panda/src/physics/linearDistanceForce.cxx index 3c8d4d9bd6..88b2f506d8 100644 --- a/panda/src/physics/linearDistanceForce.cxx +++ b/panda/src/physics/linearDistanceForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearDistanceForce.cxx +// Filename: linearDistanceForce.cxx // Created by: charles (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linearDistanceForce.h" diff --git a/panda/src/physics/linearDistanceForce.h b/panda/src/physics/linearDistanceForce.h index 1e63c71227..0dffdae523 100644 --- a/panda/src/physics/linearDistanceForce.h +++ b/panda/src/physics/linearDistanceForce.h @@ -1,6 +1,19 @@ -// Filename: LinearDistanceForce.h +// Filename: linearDistanceForce.h // Created by: charles (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARDISTANCEFORCE_H @@ -42,7 +55,7 @@ private: virtual LVector3f get_child_vector(const PhysicsObject *po) = 0; protected: - LinearDistanceForce(const LPoint3f& p, FalloffType ft, float r, float a, + LinearDistanceForce(const LPoint3f& p, FalloffType ft, float r, float a, bool m); LinearDistanceForce(const LinearDistanceForce ©); virtual ~LinearDistanceForce(void); diff --git a/panda/src/physics/linearEulerIntegrator.cxx b/panda/src/physics/linearEulerIntegrator.cxx index 94455c9753..513024baa2 100644 --- a/panda/src/physics/linearEulerIntegrator.cxx +++ b/panda/src/physics/linearEulerIntegrator.cxx @@ -1,7 +1,20 @@ -// Filename: LinearEulerIntegrator.cxx +// Filename: linearEulerIntegrator.cxx // Created by: charles (13Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "linearEulerIntegrator.h" #include "forceNode.h" diff --git a/panda/src/physics/linearEulerIntegrator.h b/panda/src/physics/linearEulerIntegrator.h index f86478610e..b863d650a4 100644 --- a/panda/src/physics/linearEulerIntegrator.h +++ b/panda/src/physics/linearEulerIntegrator.h @@ -1,6 +1,19 @@ -// Filename: lineareulerintegrator.h +// Filename: linearEulerIntegrator.h // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEAREULERINTEGRATOR_H diff --git a/panda/src/physics/linearForce.I b/panda/src/physics/linearForce.I index 810b35f072..0fa288ca9a 100644 --- a/panda/src/physics/linearForce.I +++ b/panda/src/physics/linearForce.I @@ -1,6 +1,19 @@ // Filename: linearForce.I // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/linearForce.cxx b/panda/src/physics/linearForce.cxx index 9a00095d4d..2ec79143b8 100644 --- a/panda/src/physics/linearForce.cxx +++ b/panda/src/physics/linearForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearForce.cxx +// Filename: linearForce.cxx // Created by: charles (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -69,7 +82,7 @@ get_vector(const PhysicsObject *po) { } //////////////////////////////////////////////////////////////////// -// Function : is_linear +// Function : is_linear // Access : Public //////////////////////////////////////////////////////////////////// bool LinearForce:: diff --git a/panda/src/physics/linearForce.h b/panda/src/physics/linearForce.h index 63e4a85ec9..213b75af6b 100644 --- a/panda/src/physics/linearForce.h +++ b/panda/src/physics/linearForce.h @@ -1,6 +1,19 @@ -// Filename: LinearForce.h +// Filename: linearForce.h // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARFORCE_H @@ -10,7 +23,7 @@ /////////////////////////////////////////////////////////////////// // Class : LinearForce -// Description : A force that acts on a PhysicsObject by way of an +// Description : A force that acts on a PhysicsObject by way of an // Integrator. This is a pure virtual base class. /////////////////////////////////////////////////////////////////// class EXPCL_PANDAPHYSICS LinearForce : public BaseForce { diff --git a/panda/src/physics/linearFrictionForce.I b/panda/src/physics/linearFrictionForce.I index 8822d694fd..8cf8b49f53 100644 --- a/panda/src/physics/linearFrictionForce.I +++ b/panda/src/physics/linearFrictionForce.I @@ -1,6 +1,19 @@ -// Filename: LinearFrictionForce.I +// Filename: linearFrictionForce.I // Created by: charles (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/linearFrictionForce.cxx b/panda/src/physics/linearFrictionForce.cxx index 287709a074..5affe6924a 100644 --- a/panda/src/physics/linearFrictionForce.cxx +++ b/panda/src/physics/linearFrictionForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearFrictionForce.cxx +// Filename: linearFrictionForce.cxx // Created by: charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linearFrictionForce.h" diff --git a/panda/src/physics/linearFrictionForce.h b/panda/src/physics/linearFrictionForce.h index 1715808b85..9b3ed598de 100644 --- a/panda/src/physics/linearFrictionForce.h +++ b/panda/src/physics/linearFrictionForce.h @@ -1,6 +1,19 @@ -// Filename: LinearFrictionForce.h +// Filename: linearFrictionForce.h // Created by: charles (23Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARFRICTIONFORCE_H diff --git a/panda/src/physics/linearIntegrator.cxx b/panda/src/physics/linearIntegrator.cxx index bf5756c73c..9539f5559e 100644 --- a/panda/src/physics/linearIntegrator.cxx +++ b/panda/src/physics/linearIntegrator.cxx @@ -1,7 +1,20 @@ -// Filename: LinearIntegrator.C +// Filename: linearIntegrator.cxx // Created by: charles (02Aug00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/physics/linearIntegrator.h b/panda/src/physics/linearIntegrator.h index e26ab5f071..3f0d3153c8 100644 --- a/panda/src/physics/linearIntegrator.h +++ b/panda/src/physics/linearIntegrator.h @@ -1,6 +1,19 @@ -// Filename: LinearIntegrator.h +// Filename: linearIntegrator.h // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARINTEGRATOR_H diff --git a/panda/src/physics/linearJitterForce.cxx b/panda/src/physics/linearJitterForce.cxx index 5cddca7f35..d5149cacfe 100644 --- a/panda/src/physics/linearJitterForce.cxx +++ b/panda/src/physics/linearJitterForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearJitterForce.cxx +// Filename: linearJitterForce.cxx // Created by: charles (16Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linearJitterForce.h" diff --git a/panda/src/physics/linearJitterForce.h b/panda/src/physics/linearJitterForce.h index 21bf36f920..40979eba1d 100644 --- a/panda/src/physics/linearJitterForce.h +++ b/panda/src/physics/linearJitterForce.h @@ -1,6 +1,19 @@ -// Filename: LinearJitterForce.h +// Filename: linearJitterForce.h // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARJITTERFORCE_H diff --git a/panda/src/physics/linearNoiseForce.I b/panda/src/physics/linearNoiseForce.I index efec0a5b22..3aaa7ae8c4 100644 --- a/panda/src/physics/linearNoiseForce.I +++ b/panda/src/physics/linearNoiseForce.I @@ -1,6 +1,19 @@ -// Filename: LinearNoiseForce.I +// Filename: linearNoiseForce.I // Created by: charles (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/linearNoiseForce.cxx b/panda/src/physics/linearNoiseForce.cxx index d2be8273ea..7fb6e1397a 100644 --- a/panda/src/physics/linearNoiseForce.cxx +++ b/panda/src/physics/linearNoiseForce.cxx @@ -1,6 +1,19 @@ // Filename: linearNoiseForce.cxx // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -117,7 +130,7 @@ get_child_vector(const PhysicsObject *po) { LVector3f temp0, temp1, temp2, temp3; // x direction - temp0 = vlerp(cubic_x, get_lattice_entry(p), + temp0 = vlerp(cubic_x, get_lattice_entry(p), get_lattice_entry(p[0] + 1.0f, p[1], p[2])); temp1 = vlerp(cubic_x, get_lattice_entry(p[0], p[1], p[2] + 1.0f), diff --git a/panda/src/physics/linearNoiseForce.h b/panda/src/physics/linearNoiseForce.h index e0382d4b86..6f879b9713 100644 --- a/panda/src/physics/linearNoiseForce.h +++ b/panda/src/physics/linearNoiseForce.h @@ -1,6 +1,19 @@ -// Filename: LinearNoiseForce.h +// Filename: linearNoiseForce.h // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARNOISEFORCE_H diff --git a/panda/src/physics/linearRandomForce.I b/panda/src/physics/linearRandomForce.I index de5a986a94..7c3d384b25 100644 --- a/panda/src/physics/linearRandomForce.I +++ b/panda/src/physics/linearRandomForce.I @@ -1,6 +1,19 @@ -// Filename: LinearRandomForce.I +// Filename: linearRandomForce.I // Created by: charles (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/linearRandomForce.cxx b/panda/src/physics/linearRandomForce.cxx index 6643304319..85157e8066 100644 --- a/panda/src/physics/linearRandomForce.cxx +++ b/panda/src/physics/linearRandomForce.cxx @@ -1,7 +1,20 @@ -// Filename: LinearRandomForce.cxx +// Filename: linearRandomForce.cxx // Created by: charles (19Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "linearRandomForce.h" diff --git a/panda/src/physics/linearRandomForce.h b/panda/src/physics/linearRandomForce.h index bc562b713a..d19da9b997 100644 --- a/panda/src/physics/linearRandomForce.h +++ b/panda/src/physics/linearRandomForce.h @@ -1,6 +1,19 @@ -// Filename: LinearRandomForce.h +// Filename: linearRandomForce.h // Created by: charles (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARRANDOMFORCE_H diff --git a/panda/src/physics/linearSinkForce.cxx b/panda/src/physics/linearSinkForce.cxx index 736f50adc3..299e832510 100644 --- a/panda/src/physics/linearSinkForce.cxx +++ b/panda/src/physics/linearSinkForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearSinkForce.cxx +// Filename: linearSinkForce.cxx // Created by: charles (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linearSinkForce.h" @@ -13,7 +26,7 @@ TypeHandle LinearSinkForce::_type_handle; // Description : Simple constructor //////////////////////////////////////////////////////////////////// LinearSinkForce:: -LinearSinkForce(const LPoint3f& p, FalloffType f, float r, float a, +LinearSinkForce(const LPoint3f& p, FalloffType f, float r, float a, bool mass) : LinearDistanceForce(p, f, r, a, mass) { } @@ -25,7 +38,7 @@ LinearSinkForce(const LPoint3f& p, FalloffType f, float r, float a, //////////////////////////////////////////////////////////////////// LinearSinkForce:: LinearSinkForce(void) : - LinearDistanceForce(LPoint3f(0.0f, 0.0f, 0.0f), FT_ONE_OVER_R_SQUARED, + LinearDistanceForce(LPoint3f(0.0f, 0.0f, 0.0f), FT_ONE_OVER_R_SQUARED, 1.0f, 1.0f, true) { } diff --git a/panda/src/physics/linearSinkForce.h b/panda/src/physics/linearSinkForce.h index 71edcbb83b..1709ac1fff 100644 --- a/panda/src/physics/linearSinkForce.h +++ b/panda/src/physics/linearSinkForce.h @@ -1,6 +1,19 @@ -// Filename: LinearSinkForce.h +// Filename: linearSinkForce.h // Created by: charles (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARSINKFORCE_H @@ -18,7 +31,7 @@ private: virtual LinearForce *make_copy(void); PUBLISHED: - LinearSinkForce(const LPoint3f& p, FalloffType f, float r, float a = 1.0f, + LinearSinkForce(const LPoint3f& p, FalloffType f, float r, float a = 1.0f, bool m = true); LinearSinkForce(void); LinearSinkForce(const LinearSinkForce ©); diff --git a/panda/src/physics/linearSourceForce.cxx b/panda/src/physics/linearSourceForce.cxx index 60c2bb8613..0e30284e94 100644 --- a/panda/src/physics/linearSourceForce.cxx +++ b/panda/src/physics/linearSourceForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearSourceForce.cxx +// Filename: linearSourceForce.cxx // Created by: charles (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linearSourceForce.h" @@ -13,7 +26,7 @@ TypeHandle LinearSourceForce::_type_handle; // Description : Simple constructor //////////////////////////////////////////////////////////////////// LinearSourceForce:: -LinearSourceForce(const LPoint3f& p, FalloffType f, float r, float a, +LinearSourceForce(const LPoint3f& p, FalloffType f, float r, float a, bool mass) : LinearDistanceForce(p, f, r, a, mass) { } @@ -25,7 +38,7 @@ LinearSourceForce(const LPoint3f& p, FalloffType f, float r, float a, //////////////////////////////////////////////////////////////////// LinearSourceForce:: LinearSourceForce(void) : - LinearDistanceForce(LPoint3f(0.0f, 0.0f, 0.0f), FT_ONE_OVER_R_SQUARED, + LinearDistanceForce(LPoint3f(0.0f, 0.0f, 0.0f), FT_ONE_OVER_R_SQUARED, 1.0f, 1.0f, true) { } diff --git a/panda/src/physics/linearSourceForce.h b/panda/src/physics/linearSourceForce.h index adf09c206f..afbd75bd01 100644 --- a/panda/src/physics/linearSourceForce.h +++ b/panda/src/physics/linearSourceForce.h @@ -1,6 +1,19 @@ -// Filename: LinearSourceForce.h +// Filename: linearSourceForce.h // Created by: charles (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARSOURCEFORCE_H @@ -18,7 +31,7 @@ private: virtual LinearForce *make_copy(void); PUBLISHED: - LinearSourceForce(const LPoint3f& p, FalloffType f, float r, float a = 1.0f, + LinearSourceForce(const LPoint3f& p, FalloffType f, float r, float a = 1.0f, bool mass = true); LinearSourceForce(void); LinearSourceForce(const LinearSourceForce ©); diff --git a/panda/src/physics/linearUserDefinedForce.I b/panda/src/physics/linearUserDefinedForce.I index 12db53abae..2719292632 100644 --- a/panda/src/physics/linearUserDefinedForce.I +++ b/panda/src/physics/linearUserDefinedForce.I @@ -1,6 +1,19 @@ -// Filename: LinearUserDefinedForce.I +// Filename: linearUserDefinedForce.I // Created by: charles (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/linearUserDefinedForce.cxx b/panda/src/physics/linearUserDefinedForce.cxx index f8c97709c6..e1407c812e 100644 --- a/panda/src/physics/linearUserDefinedForce.cxx +++ b/panda/src/physics/linearUserDefinedForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearUserDefinedForce.cxx +// Filename: linearUserDefinedForce.cxx // Created by: charles (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linearUserDefinedForce.h" @@ -15,8 +28,8 @@ TypeHandle LinearUserDefinedForce::_type_handle; LinearUserDefinedForce:: LinearUserDefinedForce(LVector3f (*proc)(const PhysicsObject *), float a, bool md) : - LinearForce(a, md), - _proc(proc) + LinearForce(a, md), + _proc(proc) { } diff --git a/panda/src/physics/linearUserDefinedForce.h b/panda/src/physics/linearUserDefinedForce.h index 13332d65dc..945f0197f0 100644 --- a/panda/src/physics/linearUserDefinedForce.h +++ b/panda/src/physics/linearUserDefinedForce.h @@ -1,6 +1,19 @@ -// Filename: LinearUserDefinedForce.h +// Filename: linearUserDefinedForce.h // Created by: charles (31Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARUSERDEFINEDFORCE_H diff --git a/panda/src/physics/linearVectorForce.I b/panda/src/physics/linearVectorForce.I index 9976a556ff..15bf9c94ce 100644 --- a/panda/src/physics/linearVectorForce.I +++ b/panda/src/physics/linearVectorForce.I @@ -1,6 +1,19 @@ -// Filename: LinearVectorForce.I +// Filename: linearVectorForce.I // Created by: charles (21Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/linearVectorForce.cxx b/panda/src/physics/linearVectorForce.cxx index ad04ba6fc3..c516926523 100644 --- a/panda/src/physics/linearVectorForce.cxx +++ b/panda/src/physics/linearVectorForce.cxx @@ -1,6 +1,19 @@ -// Filename: LinearVectorForce.cxx +// Filename: linearVectorForce.cxx // Created by: charles (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -13,14 +26,14 @@ TypeHandle LinearVectorForce::_type_handle; //////////////////////////////////////////////////////////////////// -// Function : LinearVectorForce +// Function : LinearVectorForce // Access : Public // Description : Vector Constructor //////////////////////////////////////////////////////////////////// LinearVectorForce:: -LinearVectorForce(const LVector3f& vec, float a, bool mass) : +LinearVectorForce(const LVector3f& vec, float a, bool mass) : LinearForce(a, mass), - _fvec(vec) + _fvec(vec) { } diff --git a/panda/src/physics/linearVectorForce.h b/panda/src/physics/linearVectorForce.h index 3f1c468f5a..8b0ca740de 100644 --- a/panda/src/physics/linearVectorForce.h +++ b/panda/src/physics/linearVectorForce.h @@ -1,6 +1,19 @@ // Filename: linearVectorForce.h // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINEARVECTORFORCE_H @@ -23,7 +36,7 @@ private: PUBLISHED: LinearVectorForce(const LVector3f& vec, float a = 1.0f, bool mass = false); LinearVectorForce(const LinearVectorForce ©); - LinearVectorForce(float x = 0.0f, float y = 0.0f, float z = 0.0f, + LinearVectorForce(float x = 0.0f, float y = 0.0f, float z = 0.0f, float a = 1.0f, bool mass = false); virtual ~LinearVectorForce(void); diff --git a/panda/src/physics/physical.I b/panda/src/physics/physical.I index bd49b923dd..26fed9e9ae 100644 --- a/panda/src/physics/physical.I +++ b/panda/src/physics/physical.I @@ -1,6 +1,19 @@ // Filename: physical.I // Created by: charles (16Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/physics/physical.cxx b/panda/src/physics/physical.cxx index 68c3cea71a..0d416c3532 100644 --- a/panda/src/physics/physical.cxx +++ b/panda/src/physics/physical.cxx @@ -1,6 +1,19 @@ // Filename: physical.cxx // Created by: charles (16Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -12,7 +25,7 @@ TypeHandle Physical::_type_handle; // the idea here is that most physicals will NOT be collections of // sets (i.e. particle systems and whatever else). Because of this, -// the default constructor, unless otherwise specified, will +// the default constructor, unless otherwise specified, will // automatically allocate and initialize one PhysicalObject. // this makes it easier for high-level work. diff --git a/panda/src/physics/physical.h b/panda/src/physics/physical.h index 7c98580257..f8b377c7cc 100644 --- a/panda/src/physics/physical.h +++ b/panda/src/physics/physical.h @@ -1,6 +1,19 @@ // Filename: physical.h // Created by: charles (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PHYSICAL_H diff --git a/panda/src/physics/physicalNode.I b/panda/src/physics/physicalNode.I index 98e04a2810..94eda6ab5b 100644 --- a/panda/src/physics/physicalNode.I +++ b/panda/src/physics/physicalNode.I @@ -1,6 +1,19 @@ // Filename: physicalNode.I // Created by: charles (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/physicalNode.cxx b/panda/src/physics/physicalNode.cxx index 4a9ca4b3a1..eb22d7ff77 100644 --- a/panda/src/physics/physicalNode.cxx +++ b/panda/src/physics/physicalNode.cxx @@ -1,6 +1,19 @@ // Filename: physicalNode.cxx // Created by: charles (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "physicalNode.h" @@ -68,7 +81,7 @@ void PhysicalNode:: add_physicals_from(const PhysicalNode &other) { vector< PT(Physical) >::iterator last = _physicals.end() - 1; - _physicals.insert(_physicals.end(), + _physicals.insert(_physicals.end(), other._physicals.begin(), other._physicals.end()); for (; last != _physicals.end(); last++) diff --git a/panda/src/physics/physicalNode.h b/panda/src/physics/physicalNode.h index 82d4c0b0fd..5c91570b6d 100644 --- a/panda/src/physics/physicalNode.h +++ b/panda/src/physics/physicalNode.h @@ -1,6 +1,19 @@ // Filename: physicalNode.h // Created by: charles (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PHYSICALNODE_H diff --git a/panda/src/physics/physicsManager.I b/panda/src/physics/physicsManager.I index 03d777dc4c..a0b35541fd 100644 --- a/panda/src/physics/physicsManager.I +++ b/panda/src/physics/physicsManager.I @@ -1,6 +1,19 @@ -// Filename: physics_manager.I +// Filename: physicsManager.I // Created by: charles (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/physicsManager.cxx b/panda/src/physics/physicsManager.cxx index bba1c5df96..3dd8768e66 100644 --- a/panda/src/physics/physicsManager.cxx +++ b/panda/src/physics/physicsManager.cxx @@ -1,6 +1,19 @@ -// Filename: physics_manager.cxx +// Filename: physicsManager.cxx // Created by: charles (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "physicsManager.h" diff --git a/panda/src/physics/physicsManager.h b/panda/src/physics/physicsManager.h index f80057f106..a422863466 100644 --- a/panda/src/physics/physicsManager.h +++ b/panda/src/physics/physicsManager.h @@ -1,6 +1,19 @@ // Filename: physicsManager.h // Created by: charles (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PHYSICSMANAGER_H diff --git a/panda/src/physics/physicsObject.I b/panda/src/physics/physicsObject.I index a449eff245..db5f3add7b 100644 --- a/panda/src/physics/physicsObject.I +++ b/panda/src/physics/physicsObject.I @@ -1,6 +1,19 @@ -// Filename: physics_object.I +// Filename: physicsObject.I // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -159,7 +172,7 @@ get_terminal_velocity(void) const { //////////////////////////////////////////////////////////////////// // Function : set_orientation // Access : Public -// Description : +// Description : //////////////////////////////////////////////////////////////////// INLINE void PhysicsObject:: set_orientation(const LOrientationf &orientation) { @@ -169,7 +182,7 @@ set_orientation(const LOrientationf &orientation) { //////////////////////////////////////////////////////////////////// // Function : set_rotation // Access : Public -// Description : +// Description : //////////////////////////////////////////////////////////////////// INLINE void PhysicsObject:: set_rotation(const LVector3f &rotation) { @@ -179,7 +192,7 @@ set_rotation(const LVector3f &rotation) { //////////////////////////////////////////////////////////////////// // Function : get_orientation // Access : Public -// Description : +// Description : //////////////////////////////////////////////////////////////////// INLINE LOrientationf PhysicsObject:: get_orientation(void) const { @@ -189,7 +202,7 @@ get_orientation(void) const { //////////////////////////////////////////////////////////////////// // Function : get_rotation // Access : Public -// Description : +// Description : //////////////////////////////////////////////////////////////////// INLINE LVector3f PhysicsObject:: get_rotation(void) const { @@ -199,7 +212,7 @@ get_rotation(void) const { //////////////////////////////////////////////////////////////////// // Function : set_oriented // Access : Public -// Description : +// Description : //////////////////////////////////////////////////////////////////// INLINE void PhysicsObject:: set_oriented(bool flag) { @@ -209,7 +222,7 @@ set_oriented(bool flag) { //////////////////////////////////////////////////////////////////// // Function : get_oriented // Access : Public -// Description : +// Description : //////////////////////////////////////////////////////////////////// INLINE bool PhysicsObject:: get_oriented(void) const { diff --git a/panda/src/physics/physicsObject.cxx b/panda/src/physics/physicsObject.cxx index b41a0ee96d..ab30fd4e32 100644 --- a/panda/src/physics/physicsObject.cxx +++ b/panda/src/physics/physicsObject.cxx @@ -1,6 +1,19 @@ -// Filename: physics_object.C +// Filename: physicsObject.cxx // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "physicsObject.h" @@ -48,7 +61,7 @@ PhysicsObject:: //////////////////////////////////////////////////////////////////// // Function : Assignment operator // Access : Public -// Description : +// Description : //////////////////////////////////////////////////////////////////// const PhysicsObject &PhysicsObject:: operator =(const PhysicsObject &other) { diff --git a/panda/src/physics/physicsObject.h b/panda/src/physics/physicsObject.h index 44ce1308dc..af2cc3648f 100644 --- a/panda/src/physics/physicsObject.h +++ b/panda/src/physics/physicsObject.h @@ -1,7 +1,20 @@ -// Filename: physics_object.h +// Filename: physicsObject.h // Created by: charles (13Jun00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PHYSICS_OBJECT_H #define PHYSICS_OBJECT_H diff --git a/panda/src/physics/test_physics.cxx b/panda/src/physics/test_physics.cxx index 0587632fae..732b9a87db 100644 --- a/panda/src/physics/test_physics.cxx +++ b/panda/src/physics/test_physics.cxx @@ -1,6 +1,19 @@ // Filename: test_physics.cxx // Created by: charles (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/pnmimage/config_pnmimage.cxx b/panda/src/pnmimage/config_pnmimage.cxx index dde7300fa3..e2871dd2e2 100644 --- a/panda/src/pnmimage/config_pnmimage.cxx +++ b/panda/src/pnmimage/config_pnmimage.cxx @@ -1,6 +1,19 @@ // Filename: config_pnmimage.cxx // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_pnmimage.h" diff --git a/panda/src/pnmimage/config_pnmimage.h b/panda/src/pnmimage/config_pnmimage.h index ace60dfc4f..ca00f70bb5 100644 --- a/panda/src/pnmimage/config_pnmimage.h +++ b/panda/src/pnmimage/config_pnmimage.h @@ -1,6 +1,19 @@ // Filename: config_pnmimage.h // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_PNMIMAGE_H diff --git a/panda/src/pnmimage/pnm-image-filter-core.cxx b/panda/src/pnmimage/pnm-image-filter-core.cxx index 407061a7e3..861597bb47 100644 --- a/panda/src/pnmimage/pnm-image-filter-core.cxx +++ b/panda/src/pnmimage/pnm-image-filter-core.cxx @@ -1,7 +1,20 @@ -// This file is actually a poor man's template function. This is #included -// several times into pnm-image-filter.cc, with certain macros redefined each -// time to declare several copies of this function that operate on the -// different channels of the image. +// Filename: pnm-image-filter-core.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// // We map X and Y to A and B, because we might change our minds about which // is dominant, and we map get/set functions for the channel in question to @@ -9,7 +22,7 @@ static void -FUNCTION_NAME(PNMImage &dest, const PNMImage &source, +FUNCTION_NAME(PNMImage &dest, const PNMImage &source, double width, FilterFunction *make_filter) { if (!dest.is_valid() || !source.is_valid()) { return; diff --git a/panda/src/pnmimage/pnm-image-filter.cxx b/panda/src/pnmimage/pnm-image-filter.cxx index a5d0c21353..c419348c7e 100644 --- a/panda/src/pnmimage/pnm-image-filter.cxx +++ b/panda/src/pnmimage/pnm-image-filter.cxx @@ -1,8 +1,22 @@ +// Filename: pnm-image-filter.cxx +// Created by: // -// pnm-image-filter.cc +//////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// -// The functions in this module support spatial filtering of an image by +// The functions in this module support spatial filtering of an image by // convolution with an (almost) arbitrary kernel. There are a broad class of // image filters to which this principle applies, including box filtering, // Bartlett, and Gaussian. @@ -47,7 +61,7 @@ // The biggest reason to use integer arithmetic is space. A table of // StoreTypes must be allocated to match the size of the image. On an SGI, -// sizeof(float) is 4, while sizeof(short) is 2 and sizeof(char) is, of +// sizeof(float) is 4, while sizeof(short) is 2 and sizeof(char) is, of // course, 1. Since the source precision is probably 8 bits anyway (there // are usually 8 bits per channel), it doesn't cost any precision at all to // use shorts, and not very much to use chars. @@ -94,20 +108,20 @@ static const WorkType filter_max = 255; // the radius of interest of the filter function. The array may need to be // larger (by a factor of scale), to adequately cover all the values. -static void -filter_row(StoreType dest[], int dest_len, +static void +filter_row(StoreType dest[], int dest_len, const StoreType source[], int source_len, double scale, // == dest_len / source_len const WorkType filter[], double filter_width) { - // If we are expanding the row (scale>1.0), we need to look at a fractional + // If we are expanding the row (scale>1.0), we need to look at a fractional // granularity. Hence, we scale our filter index by scale. If we are // compressing (scale<1.0), we don't need to fiddle with the filter index, so // we leave it at one. double iscale = max(scale, 1.0); // Similarly, if we are expanding the row, we want to start the new row at - // the far left edge of the original pixel, not in the center. So we will + // the far left edge of the original pixel, not in the center. So we will // have a non-zero offset. int offset = (int)floor(iscale/2.0); @@ -159,7 +173,7 @@ filter_row(StoreType dest[], int dest_len, // by the user, they must build an array of filter values (described above) // and also set the radius of interest of the filter function. -// The values of the elements of filter must completely cover the range +// The values of the elements of filter must completely cover the range // 0..filter_max; the array must have enough elements to include all indices // corresponding to values in the range -filter_width to filter_width. @@ -382,7 +396,7 @@ gaussian_filter_impl(double scale, double width, // filter_image pulls everything together, and filters one image into // another. Both images can be the same with no ill effects. static void -filter_image(PNMImage &dest, const PNMImage &source, +filter_image(PNMImage &dest, const PNMImage &source, double width, FilterFunction *make_filter) { // We want to scale by the smallest destination axis first, for a @@ -396,7 +410,7 @@ filter_image(PNMImage &dest, const PNMImage &source, filter_green_xy(dest, source, width, make_filter); filter_blue_xy(dest, source, width, make_filter); } - + if (dest.has_alpha() && source.has_alpha()) { filter_alpha_xy(dest, source, width, make_filter); } @@ -409,7 +423,7 @@ filter_image(PNMImage &dest, const PNMImage &source, filter_green_yx(dest, source, width, make_filter); filter_blue_yx(dest, source, width, make_filter); } - + if (dest.has_alpha() && source.has_alpha()) { filter_alpha_yx(dest, source, width, make_filter); } @@ -454,7 +468,7 @@ gaussian_filter_from(double width, const PNMImage ©) { INLINE void box_filter_xel(const PNMImage &image, int x, int y, double x_contrib, double y_contrib, - double &red, double &grn, double &blu, double &alpha, + double &red, double &grn, double &blu, double &alpha, double &pixel_count) { double contrib = x_contrib * y_contrib; red += image.get_red_val(x, y) * contrib; @@ -466,12 +480,12 @@ box_filter_xel(const PNMImage &image, pixel_count += contrib; } - + INLINE void box_filter_line(const PNMImage &image, double x0, int y, double x1, double y_contrib, - double &red, double &grn, double &blu, double &alpha, + double &red, double &grn, double &blu, double &alpha, double &pixel_count) { int x = (int)floor(x0); // Get the first (partial) xel @@ -495,11 +509,11 @@ box_filter_line(const PNMImage &image, red, grn, blu, alpha, pixel_count); } } -} +} static void -box_filter_region(const PNMImage &image, - double x0, double y0, double x1, double y1, +box_filter_region(const PNMImage &image, + double x0, double y0, double x1, double y1, xel &result, xelval &alpha_result) { double red = 0.0, grn = 0.0, blu = 0.0, alpha = 0.0; double pixel_count = 0.0; @@ -565,17 +579,17 @@ quick_filter_from(const PNMImage &from, int xborder, int yborder) { double y_scale = (double)from_ys / (double)to_ys; from_y0 = max(0, -to_yoff) * y_scale; - for (to_y = max(0, -to_yoff); - to_y < min(to_ys, get_y_size()-to_yoff); + for (to_y = max(0, -to_yoff); + to_y < min(to_ys, get_y_size()-to_yoff); to_y++) { from_y1 = (to_y+1) * y_scale; - + from_x0 = max(0, -to_xoff) * x_scale; - for (to_x = max(0, -to_xoff); - to_x < min(to_xs, get_x_size()-to_xoff); + for (to_x = max(0, -to_xoff); + to_x < min(to_xs, get_x_size()-to_xoff); to_x++) { from_x1 = (to_x+1) * x_scale; - + // Now the box from (from_x0, from_y0) - (from_x1, from_y1) // but not including (from_x1, from_y1) maps to the pixel (to_x, to_y). xelval alpha_result; @@ -586,7 +600,7 @@ quick_filter_from(const PNMImage &from, int xborder, int yborder) { if (has_alpha()) { set_alpha_val(to_xoff+to_x, to_yoff+to_y, alpha_result); } - + from_x0 = from_x1; } from_y0 = from_y1; diff --git a/panda/src/pnmimage/pnmFileType.cxx b/panda/src/pnmimage/pnmFileType.cxx index ab5820857c..9fd7eed518 100644 --- a/panda/src/pnmimage/pnmFileType.cxx +++ b/panda/src/pnmimage/pnmFileType.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileType.cxx // Created by: drose (15Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileType.h" @@ -16,7 +29,7 @@ TypeHandle PNMFileType::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileType::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileType:: PNMFileType() { @@ -25,7 +38,7 @@ PNMFileType() { //////////////////////////////////////////////////////////////////// // Function: PNMFileType::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileType:: ~PNMFileType() { diff --git a/panda/src/pnmimage/pnmFileType.h b/panda/src/pnmimage/pnmFileType.h index 937b472bc9..0c951caad0 100644 --- a/panda/src/pnmimage/pnmFileType.h +++ b/panda/src/pnmimage/pnmFileType.h @@ -1,6 +1,19 @@ // Filename: pnmFileType.h // Created by: drose (15Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPE_H @@ -52,7 +65,7 @@ private: // The TypedWritable interface follows. public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter *writer, Datagram &datagram); + virtual void write_datagram(BamWriter *writer, Datagram &datagram); protected: static TypedWritable *make_PNMFileType(const FactoryParams ¶ms); @@ -70,7 +83,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/pnmimage/pnmFileTypeRegistry.cxx b/panda/src/pnmimage/pnmFileTypeRegistry.cxx index e30b40d0cf..3285acdbd8 100644 --- a/panda/src/pnmimage/pnmFileTypeRegistry.cxx +++ b/panda/src/pnmimage/pnmFileTypeRegistry.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeRegistry.cxx // Created by: drose (15Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeRegistry.h" @@ -17,7 +30,7 @@ PNMFileTypeRegistry *PNMFileTypeRegistry::_global_ptr; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeRegistry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeRegistry:: PNMFileTypeRegistry() { @@ -27,7 +40,7 @@ PNMFileTypeRegistry() { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeRegistry::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeRegistry:: ~PNMFileTypeRegistry() { @@ -139,7 +152,7 @@ get_type_from_magic_number(const string &magic_number) const { return type; } } - + return NULL; } @@ -205,7 +218,7 @@ register_type(PNMFileType *type) { Handles::iterator hi = _handles.find(type->get_type()); if (hi != _handles.end()) { pnmimage_cat.warning() - << "Attempt to register PNMFileType " << type->get_name() + << "Attempt to register PNMFileType " << type->get_name() << " (" << type->get_type() << ") more than once.\n"; return; } @@ -218,7 +231,7 @@ register_type(PNMFileType *type) { int num_extensions = type->get_num_extensions(); for (int i = 0; i < num_extensions; i++) { string extension = downcase(type->get_extension(i)); - + if (!unique_extensions.insert(extension).second) { pnmimage_cat.warning() << "PNMFileType " << type->get_name() diff --git a/panda/src/pnmimage/pnmFileTypeRegistry.h b/panda/src/pnmimage/pnmFileTypeRegistry.h index 1ce1cbfc4f..d8398b47aa 100644 --- a/panda/src/pnmimage/pnmFileTypeRegistry.h +++ b/panda/src/pnmimage/pnmFileTypeRegistry.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeRegistry.h // Created by: drose (15Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPEREGISTRY_H diff --git a/panda/src/pnmimage/pnmImage.I b/panda/src/pnmimage/pnmImage.I index 0d57c37479..35a34efa6d 100644 --- a/panda/src/pnmimage/pnmImage.I +++ b/panda/src/pnmimage/pnmImage.I @@ -1,12 +1,25 @@ // Filename: pnmImage.I // Created by: drose (15Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PNMImage::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImage:: PNMImage() { @@ -17,7 +30,7 @@ PNMImage() { //////////////////////////////////////////////////////////////////// // Function: PNMImage::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImage:: PNMImage(const Filename &filename, PNMFileType *type) { @@ -30,7 +43,7 @@ PNMImage(const Filename &filename, PNMFileType *type) { //////////////////////////////////////////////////////////////////// // Function: PNMImage::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImage:: PNMImage(int x_size, int y_size, int num_channels, xelval maxval, @@ -40,11 +53,11 @@ PNMImage(int x_size, int y_size, int num_channels, xelval maxval, clear(x_size, y_size, num_channels, maxval, type); } - + //////////////////////////////////////////////////////////////////// // Function: PNMImage::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImage:: PNMImage(const PNMImage ©) { @@ -55,11 +68,11 @@ PNMImage(const PNMImage ©) { copy_from(copy); } - + //////////////////////////////////////////////////////////////////// // Function: PNMImage::Copy Assigment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PNMImage:: operator = (const PNMImage ©) { @@ -69,7 +82,7 @@ operator = (const PNMImage ©) { //////////////////////////////////////////////////////////////////// // Function: PNMImage::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImage:: ~PNMImage() { @@ -630,8 +643,8 @@ get_bright(int x, int y) const { //////////////////////////////////////////////////////////////////// INLINE double PNMImage:: get_bright(int x, int y, double rc, double gc, double bc) const { - return from_val(rc * get_red_val(x, y) + - gc * get_green_val(x, y) + + return from_val(rc * get_red_val(x, y) + + gc * get_green_val(x, y) + bc * get_blue_val(x, y)); } @@ -645,8 +658,8 @@ get_bright(int x, int y, double rc, double gc, double bc) const { //////////////////////////////////////////////////////////////////// INLINE double PNMImage:: get_bright(int x, int y, double rc, double gc, double bc, double ac) const { - return from_val(rc * get_red_val(x, y) + - gc * get_green_val(x, y) + + return from_val(rc * get_red_val(x, y) + + gc * get_green_val(x, y) + bc * get_blue_val(x, y) + ac * get_alpha_val(x, y)); } @@ -672,8 +685,8 @@ blend(int x, int y, const RGBColord &val, double alpha) { // xels. //////////////////////////////////////////////////////////////////// INLINE xel *PNMImage:: -operator [] (int y) { - return row(y); +operator [] (int y) { + return row(y); } //////////////////////////////////////////////////////////////////// @@ -683,8 +696,8 @@ operator [] (int y) { // xels. //////////////////////////////////////////////////////////////////// INLINE const xel *PNMImage:: -operator [] (int y) const { - return row(y); +operator [] (int y) const { + return row(y); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pnmimage/pnmImage.cxx b/panda/src/pnmimage/pnmImage.cxx index 3f1b809e13..2671c1a150 100644 --- a/panda/src/pnmimage/pnmImage.cxx +++ b/panda/src/pnmimage/pnmImage.cxx @@ -1,6 +1,19 @@ // Filename: pnmImage.cxx // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmImage.h" @@ -17,7 +30,7 @@ extern "C" { #include "../pnm/libpgm.h" #include "../pnm/libpbm.h" } - + //////////////////////////////////////////////////////////////////// // Function: PNMImage::clear // Access: Public @@ -48,7 +61,7 @@ clear() { // empty (black) image with the given dimensions. //////////////////////////////////////////////////////////////////// void PNMImage:: -clear(int x_size, int y_size, int num_channels, +clear(int x_size, int y_size, int num_channels, xelval maxval, PNMFileType *type) { clear(); @@ -104,7 +117,7 @@ copy_header_from(const PNMImageHeader &header) { if (has_alpha()) { allocate_alpha(); } - + allocate_array(); setup_rc(); } @@ -183,7 +196,7 @@ read(PNMReader *reader) { if (reader == NULL) { return false; - } + } if (!reader->is_valid()) { delete reader; @@ -332,7 +345,7 @@ make_grayscale(double rc, double gc, double bc) { _num_channels = has_alpha() ? 2 : 1; setup_rc(); } - + //////////////////////////////////////////////////////////////////// // Function: PNMImage::set_maxval // Access: Public @@ -364,7 +377,7 @@ set_maxval(xelval maxval) { if (has_alpha()) { for (int y = 0; y < get_y_size(); y++) { for (int x = 0; x < get_x_size(); x++) { - set_alpha_val(x, y, + set_alpha_val(x, y, (xelval)((long)get_alpha_val(x, y) * ratio)); } } @@ -502,7 +515,7 @@ blend(int x, int y, double r, double g, double b, double alpha) { // will fit. //////////////////////////////////////////////////////////////////// void PNMImage:: -copy_sub_image(const PNMImage ©, int xto, int yto, +copy_sub_image(const PNMImage ©, int xto, int yto, int xfrom, int yfrom, int x_size, int y_size) { if (xfrom < 0) { xto += -xfrom; @@ -513,10 +526,10 @@ copy_sub_image(const PNMImage ©, int xto, int yto, yfrom = 0; } - x_size = (x_size < 0) ? - copy.get_x_size() : + x_size = (x_size < 0) ? + copy.get_x_size() : min(x_size, copy.get_x_size() - xfrom); - y_size = (y_size < 0) ? + y_size = (y_size < 0) ? copy.get_y_size() : min(y_size, copy.get_y_size() - yfrom); diff --git a/panda/src/pnmimage/pnmImage.h b/panda/src/pnmimage/pnmImage.h index 0c71993e17..31e5d1197c 100644 --- a/panda/src/pnmimage/pnmImage.h +++ b/panda/src/pnmimage/pnmImage.h @@ -1,6 +1,19 @@ // Filename: pnmImage.h // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMIMAGE_H @@ -136,9 +149,9 @@ public: INLINE void set_channel(int x, int y, int channel, double value); INLINE double get_bright(int x, int y) const; - INLINE double get_bright(int x, int y, double rc, double gc, + INLINE double get_bright(int x, int y, double rc, double gc, double bc) const; - INLINE double get_bright(int x, int y, double rc, double gc, + INLINE double get_bright(int x, int y, double rc, double gc, double bc, double ac) const; INLINE void blend(int x, int y, const RGBColord &val, double alpha); @@ -151,20 +164,20 @@ public: INLINE xel *operator [] (int y); INLINE const xel *operator [] (int y) const; - + void copy_sub_image(const PNMImage ©, int xto, int yto, int xfrom = 0, int yfrom = 0, int x_size = -1, int y_size = -1); // The bodies for the non-inline *_filter() functions can be found // in the file pnm-image-filter.cxx. - + INLINE void box_filter(double radius = 1.0); INLINE void gaussian_filter(double radius = 1.0); void box_filter_from(double radius, const PNMImage ©); void gaussian_filter_from(double radius, const PNMImage ©); - void quick_filter_from(const PNMImage ©, + void quick_filter_from(const PNMImage ©, int xborder = 0, int yborder = 0); private: diff --git a/panda/src/pnmimage/pnmImageHeader.I b/panda/src/pnmimage/pnmImageHeader.I index a92ee9bb7d..94479b873f 100644 --- a/panda/src/pnmimage/pnmImageHeader.I +++ b/panda/src/pnmimage/pnmImageHeader.I @@ -1,12 +1,25 @@ // Filename: pnmImageHeader.I // Created by: drose (15Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PNMImageHeader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImageHeader:: PNMImageHeader() { @@ -20,7 +33,7 @@ PNMImageHeader() { //////////////////////////////////////////////////////////////////// // Function: PNMImageHeader::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImageHeader:: PNMImageHeader(const PNMImageHeader ©) : @@ -35,7 +48,7 @@ PNMImageHeader(const PNMImageHeader ©) : //////////////////////////////////////////////////////////////////// // Function: PNMImageHeader::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PNMImageHeader:: operator = (const PNMImageHeader ©) { @@ -49,7 +62,7 @@ operator = (const PNMImageHeader ©) { //////////////////////////////////////////////////////////////////// // Function: PNMImageHeader::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMImageHeader:: ~PNMImageHeader() { diff --git a/panda/src/pnmimage/pnmImageHeader.cxx b/panda/src/pnmimage/pnmImageHeader.cxx index aaec548bf1..4bd8972709 100644 --- a/panda/src/pnmimage/pnmImageHeader.cxx +++ b/panda/src/pnmimage/pnmImageHeader.cxx @@ -1,8 +1,21 @@ // Filename: pnmImageHeader.cxx // Created by: drose (14Jun00) -// +// //////////////////////////////////////////////////////////////////// - +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include "pnmImageHeader.h" #include "pnmFileTypeRegistry.h" #include "pnmFileType.h" @@ -72,7 +85,7 @@ make_reader(const Filename &filename, PNMFileType *type) const { // The file doesn't exist. Don't pass it through libpnm, which // will abort. return NULL; - } + } owns_file = true; file = pm_openr((char *)actual_name.to_os_specific().c_str()); } @@ -147,7 +160,7 @@ make_reader(FILE *file, bool owns_file, const Filename &filename, << "Unable to determine image file type from magic number.\n"; } } - } + } if (type == (PNMFileType *)NULL && !filename.empty()) { // We still don't know the type; attempt to guess it from the @@ -352,10 +365,10 @@ read_magic_number(FILE *file, string &magic_number, int num_bytes) { //////////////////////////////////////////////////////////////////// // Function: PNMImageHeader::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void PNMImageHeader:: output(ostream &out) const { - out << "image: " << _x_size << " by " << _y_size << " pixels, " + out << "image: " << _x_size << " by " << _y_size << " pixels, " << _num_channels << " channels, " << _maxval << " maxval."; } diff --git a/panda/src/pnmimage/pnmImageHeader.h b/panda/src/pnmimage/pnmImageHeader.h index bf03d7f21f..e323b6e11a 100644 --- a/panda/src/pnmimage/pnmImageHeader.h +++ b/panda/src/pnmimage/pnmImageHeader.h @@ -1,6 +1,19 @@ // Filename: pnmImageHeader.h // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMIMAGEHEADER_H @@ -72,13 +85,13 @@ public: string magic_number = string(), PNMFileType *type = NULL) const; - PNMWriter *make_writer(const Filename &filename, + PNMWriter *make_writer(const Filename &filename, PNMFileType *type = NULL) const; PNMWriter *make_writer(FILE *file, bool owns_file = true, const Filename &filename = Filename(), PNMFileType *type = NULL) const; - static bool read_magic_number(FILE *file, string &magic_number, + static bool read_magic_number(FILE *file, string &magic_number, int num_bytes); void output(ostream &out) const; diff --git a/panda/src/pnmimage/pnmReader.I b/panda/src/pnmimage/pnmReader.I index 5c60a106bb..d9a31b332b 100644 --- a/panda/src/pnmimage/pnmReader.I +++ b/panda/src/pnmimage/pnmReader.I @@ -1,12 +1,25 @@ // Filename: pnmReader.I // Created by: drose (16Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PNMReader::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMReader:: PNMReader(PNMFileType *type, FILE *file, bool owns_file) : diff --git a/panda/src/pnmimage/pnmReader.cxx b/panda/src/pnmimage/pnmReader.cxx index 1a24360968..a5b46e13a9 100644 --- a/panda/src/pnmimage/pnmReader.cxx +++ b/panda/src/pnmimage/pnmReader.cxx @@ -1,6 +1,19 @@ // Filename: pnmReader.cxx // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmReader.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: PNMReader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMReader:: ~PNMReader() { diff --git a/panda/src/pnmimage/pnmReader.h b/panda/src/pnmimage/pnmReader.h index 60882c4ef9..b6848d4d39 100644 --- a/panda/src/pnmimage/pnmReader.h +++ b/panda/src/pnmimage/pnmReader.h @@ -1,6 +1,19 @@ // Filename: pnmReader.h // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMREADER_H diff --git a/panda/src/pnmimage/pnmReaderTypes.h b/panda/src/pnmimage/pnmReaderTypes.h index 2c94db05ab..9ab9d2d991 100644 --- a/panda/src/pnmimage/pnmReaderTypes.h +++ b/panda/src/pnmimage/pnmReaderTypes.h @@ -1,6 +1,19 @@ // Filename: pnmReaderTypes.h // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMREADERTYPES_H @@ -38,7 +51,7 @@ public: long start; /* offset in file */ long length; /* length of compressed scanline */ } TabEntry; - + TabEntry *table; long table_start; int current_row; @@ -142,9 +155,9 @@ public: } unsigned long pos; - + unsigned long offBits; - + unsigned short cBitCount; int indexed; int classv; diff --git a/panda/src/pnmimage/pnmWriter.I b/panda/src/pnmimage/pnmWriter.I index 90aa99f628..a8cabc36d6 100644 --- a/panda/src/pnmimage/pnmWriter.I +++ b/panda/src/pnmimage/pnmWriter.I @@ -1,13 +1,26 @@ // Filename: pnmWriter.I // Created by: drose (16Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PNMWriter::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PNMWriter:: PNMWriter(PNMFileType *type, FILE *file, bool owns_file) : @@ -31,7 +44,7 @@ get_type() const { //////////////////////////////////////////////////////////////////// // Function: PNMWriter::set_color_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PNMWriter:: set_color_type(ColorType type) { @@ -41,7 +54,7 @@ set_color_type(ColorType type) { //////////////////////////////////////////////////////////////////// // Function: PNMWriter::set_num_channels // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PNMWriter:: set_num_channels(int num_channels) { @@ -52,7 +65,7 @@ set_num_channels(int num_channels) { //////////////////////////////////////////////////////////////////// // Function: PNMWriter::set_maxval // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PNMWriter:: set_maxval(xelval maxval) { @@ -62,7 +75,7 @@ set_maxval(xelval maxval) { //////////////////////////////////////////////////////////////////// // Function: PNMWriter::set_x_size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PNMWriter:: set_x_size(int x_size) { @@ -73,7 +86,7 @@ set_x_size(int x_size) { //////////////////////////////////////////////////////////////////// // Function: PNMWriter::set_y_size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PNMWriter:: set_y_size(int y_size) { diff --git a/panda/src/pnmimage/pnmWriter.cxx b/panda/src/pnmimage/pnmWriter.cxx index 8f4c7fd895..46b792be4f 100644 --- a/panda/src/pnmimage/pnmWriter.cxx +++ b/panda/src/pnmimage/pnmWriter.cxx @@ -1,6 +1,19 @@ // Filename: pnmWriter.cxx // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmWriter.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: PNMWriter::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMWriter:: ~PNMWriter() { diff --git a/panda/src/pnmimage/pnmWriter.h b/panda/src/pnmimage/pnmWriter.h index de3ca68d0a..670fb6e0f4 100644 --- a/panda/src/pnmimage/pnmWriter.h +++ b/panda/src/pnmimage/pnmWriter.h @@ -1,6 +1,19 @@ // Filename: pnmWriter.h // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMWRITER_H diff --git a/panda/src/pnmimage/pnmWriterTypes.h b/panda/src/pnmimage/pnmWriterTypes.h index 61bb6f7651..e3a52c10db 100644 --- a/panda/src/pnmimage/pnmWriterTypes.h +++ b/panda/src/pnmimage/pnmWriterTypes.h @@ -1,6 +1,19 @@ // Filename: pnmWriterTypes.h // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMWRITERTYPES_H @@ -60,7 +73,7 @@ protected: void BuildScanline(ScanLine output[], xel *row_data, xelval *alpha_data); ScanElem *Compress(ScanElem *temp, ScanLine &output); int RLECompress(ScanElem *inbuf, int size); - + TabEntry *table; long table_start; int current_row; diff --git a/panda/src/pnmimage/pnmimage_base.h b/panda/src/pnmimage/pnmimage_base.h index f7ca11a4e4..754717a603 100644 --- a/panda/src/pnmimage/pnmimage_base.h +++ b/panda/src/pnmimage/pnmimage_base.h @@ -1,6 +1,19 @@ // Filename: pnmimage_base.h // Created by: drose (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMIMAGE_BASE_H diff --git a/panda/src/pnmimage/pnmminmax.h b/panda/src/pnmimage/pnmminmax.h index ca12fc47df..42b40bcb63 100644 --- a/panda/src/pnmimage/pnmminmax.h +++ b/panda/src/pnmimage/pnmminmax.h @@ -1,9 +1,18 @@ -// Filename: minmax.h -- -// Description: +// Filename: pnmminmax.h // Created by: drose (23Aug96) // -// Revision Overview: +//////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . // //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pnmimagetypes/bmp.h b/panda/src/pnmimagetypes/bmp.h index 80c03b1a63..4cf4aab810 100644 --- a/panda/src/pnmimagetypes/bmp.h +++ b/panda/src/pnmimagetypes/bmp.h @@ -1,39 +1,20 @@ -/*\ - * $Id$ +/* Filename: bmp.h + * Created by: * - * bmp.h - routines to calculate sizes of parts of BMP files + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Some fields in BMP files contain offsets to other parts - * of the file. These routines allow us to calculate these - * offsets, so that we can read and write BMP files without - * the need to fseek(). + * PANDA 3D SOFTWARE + * Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved * - * Copyright (C) 1992 by David W. Sanderson. + * 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://www.panda3d.org/license.txt . * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. This software is provided "as is" - * without express or implied warranty. + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . * - * $Log$ - * Revision 1.2 2001/05/25 15:59:19 drose - * remove tab characters - * - * Revision 1.1.1.1 2000/10/04 01:14:42 drose - * - * - * Revision 1.3 1992/11/24 19:39:56 dws - * Added copyright. - * - * Revision 1.2 1992/11/17 02:13:37 dws - * Adjusted a string's name. - * - * Revision 1.1 1992/11/16 19:54:44 dws - * Initial revision - * -\*/ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _BMP_H_ #define _BMP_H_ diff --git a/panda/src/pnmimagetypes/color.c b/panda/src/pnmimagetypes/color.c index cb79ff155f..138046fd3b 100644 --- a/panda/src/pnmimagetypes/color.c +++ b/panda/src/pnmimagetypes/color.c @@ -1,4 +1,20 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Filename: color.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * color.c - routines for color calculations. diff --git a/panda/src/pnmimagetypes/color.h b/panda/src/pnmimagetypes/color.h index 5677bf9f21..868f0a7bcc 100644 --- a/panda/src/pnmimagetypes/color.h +++ b/panda/src/pnmimagetypes/color.h @@ -1,4 +1,20 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Filename: color.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* SCCSid "@(#)color.h 2.9 9/2/94 LBL" */ diff --git a/panda/src/pnmimagetypes/colrops.c b/panda/src/pnmimagetypes/colrops.c index ae3397e028..df01f31b4e 100644 --- a/panda/src/pnmimagetypes/colrops.c +++ b/panda/src/pnmimagetypes/colrops.c @@ -1,4 +1,20 @@ -/* Copyright (c) 1992 Regents of the University of California */ +/* Filename: colrops.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Integer operations on COLR scanlines @@ -99,7 +115,7 @@ int colrs_gambs(register COLR *scan, int len) scan[0][BLU] = 0; } else { i = (-MAXGSHIFT-1) - expo; - scan[0][RED] = + scan[0][RED] = g_bval[MAXGSHIFT][((scan[0][RED]>>i)+1)>>1]; scan[0][GRN] = g_bval[MAXGSHIFT][((scan[0][GRN]>>i)+1)>>1]; diff --git a/panda/src/pnmimagetypes/config_pnmimagetypes.cxx b/panda/src/pnmimagetypes/config_pnmimagetypes.cxx index 86f4af87db..c301603ba9 100644 --- a/panda/src/pnmimagetypes/config_pnmimagetypes.cxx +++ b/panda/src/pnmimagetypes/config_pnmimagetypes.cxx @@ -1,6 +1,19 @@ // Filename: config_pnmimagetypes.cxx // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_pnmimagetypes.h" @@ -116,7 +129,7 @@ init_libpnmimagetypes() { PNMFileTypeJPG::init_type(); #endif - string sgi_storage_type_str = + string sgi_storage_type_str = config_pnmimagetypes.GetString("sgi-storage-type", "rle"); if (cmp_nocase(sgi_storage_type_str, "rle") == 0) { sgi_storage_type = STORAGE_RLE; @@ -125,7 +138,7 @@ init_libpnmimagetypes() { } else { pnmimage_sgi_cat->error() << "Invalid sgi-storage-type: " << sgi_storage_type_str << "\n"; - } + } string img_header_type_str = config_pnmimagetypes.GetString("img-header-type", "long"); diff --git a/panda/src/pnmimagetypes/config_pnmimagetypes.h b/panda/src/pnmimagetypes/config_pnmimagetypes.h index bae342e1f4..5564fa3ef7 100644 --- a/panda/src/pnmimagetypes/config_pnmimagetypes.h +++ b/panda/src/pnmimagetypes/config_pnmimagetypes.h @@ -1,6 +1,19 @@ // Filename: config_pnmimagetypes.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_PNMIMAGETYPES_H diff --git a/panda/src/pnmimagetypes/header.c b/panda/src/pnmimagetypes/header.c index 283a6cbeaa..f31b6c2df9 100644 --- a/panda/src/pnmimagetypes/header.c +++ b/panda/src/pnmimagetypes/header.c @@ -1,4 +1,20 @@ -/* Copyright (c) 1994 Regents of the University of California */ +/* Filename: header.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * header.c - routines for reading and writing information headers. @@ -38,7 +54,7 @@ newheader(char *s, register FILE *fp) /* identifying line of informati } -int +int headidval(register char *r, register char *s) /* get header id (return true if is id) */ { register char *cp = HDRSTR; diff --git a/panda/src/pnmimagetypes/pnmFileTypeAlias.cxx b/panda/src/pnmimagetypes/pnmFileTypeAlias.cxx index e94e72c309..9354acee50 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeAlias.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeAlias.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeAlias.cxx // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeAlias.h" @@ -24,7 +37,7 @@ TypeHandle PNMFileTypeAlias::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeAlias::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeAlias:: PNMFileTypeAlias() { @@ -104,7 +117,7 @@ make_writer(FILE *file, bool owns_file) { -inline unsigned short +inline unsigned short read_ushort(FILE *file) { unsigned short x; return pm_readbigshort(file, (short *)&x)==0 ? x : 0; @@ -130,10 +143,10 @@ write_uchar(FILE *file, unsigned char x) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeAlias::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeAlias::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { if (!read_magic_number(_file, magic_number, 4)) { @@ -148,10 +161,10 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : return; } - _x_size = + _x_size = ((unsigned char)magic_number[0] << 8) | ((unsigned char)magic_number[1]); - _y_size = + _y_size = ((unsigned char)magic_number[2] << 8) | ((unsigned char)magic_number[3]); @@ -232,7 +245,7 @@ read_row(xel *row_data, xelval *) { return false; } blu = read_uchar(_file); - + if (get_color_type() == PNMImageHeader::CT_color) { grn = read_uchar(_file); red = read_uchar(_file); @@ -267,8 +280,8 @@ flush_color(FILE *file) { } } -static void -write_color(FILE *file, +static void +write_color(FILE *file, unsigned char red, unsigned char blu, unsigned char grn) { if (red==last_red && blu==last_blu && grn==last_grn && num_count<0377) { num_count++; @@ -285,7 +298,7 @@ write_color(FILE *file, //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeAlias::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeAlias::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -367,11 +380,11 @@ write_row(xel *row_data, xelval *) { grn = (unsigned char)(255*PPM_GETG(row_data[x]) / _maxval); blu = (unsigned char)(255*PPM_GETB(row_data[x]) / _maxval); } - + write_color(_file, red, blu, grn); } flush_color(_file); - + return true; } diff --git a/panda/src/pnmimagetypes/pnmFileTypeAlias.h b/panda/src/pnmimagetypes/pnmFileTypeAlias.h index b6d94bc054..4936672513 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeAlias.h +++ b/panda/src/pnmimagetypes/pnmFileTypeAlias.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeAlias.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPEALIAS_H @@ -69,11 +82,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeBMP.cxx b/panda/src/pnmimagetypes/pnmFileTypeBMP.cxx index 4bb9b99031..e05623511c 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeBMP.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeBMP.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeBMP.cxx // Created by: drose (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeBMP.h" @@ -19,7 +32,7 @@ TypeHandle PNMFileTypeBMP::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeBMP::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeBMP:: PNMFileTypeBMP() { diff --git a/panda/src/pnmimagetypes/pnmFileTypeBMP.h b/panda/src/pnmimagetypes/pnmFileTypeBMP.h index 4dacc2f08a..ccfc79f56a 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeBMP.h +++ b/panda/src/pnmimagetypes/pnmFileTypeBMP.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeBMP.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPEBMP_H @@ -42,13 +55,13 @@ public: private: unsigned long pos; - + unsigned long offBits; - + unsigned short cBitCount; int indexed; int classv; - + pixval R[256]; /* reds */ pixval G[256]; /* greens */ pixval B[256]; /* blues */ @@ -82,11 +95,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeBMPReader.cxx b/panda/src/pnmimagetypes/pnmFileTypeBMPReader.cxx index 609a54ddae..a47eb169c4 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeBMPReader.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeBMPReader.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeBMPReader.cxx // Created by: drose (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeBMP.h" @@ -14,23 +27,26 @@ extern "C" { // Much code in this file is borrowed from Netpbm, specifically bmptoppm.c. /*\ * $Id$ - * + * * bmptoppm.c - Converts from a Microsoft Windows or OS/2 .BMP file to a * PPM file. - * + * * The current implementation is probably not complete, but it works for * all the BMP files I have. I welcome feedback. - * + * * Copyright (C) 1992 by David W. Sanderson. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. This software is provided "as is" * without express or implied warranty. - * + * * $Log$ + * Revision 1.4 2001/05/25 21:30:42 drose + * Update copyright header + * * Revision 1.3 2001/05/25 15:59:19 drose * remove tab characters * @@ -456,10 +472,10 @@ BMPreadbits(xel *array, //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeBMP::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeBMP::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { if (!read_magic_number(_file, magic_number, 2)) { @@ -485,13 +501,13 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : unsigned long cy; pos = 0; - + BMPreadfileheader(file, &pos, &offBits); BMPreadinfoheader(file, &pos, &cx, &cy, &cBitCount, &classv); - + if (offBits != BMPoffbits(classv, cBitCount)) { pnmimage_bmp_cat.warning() - << "offBits is " << offBits << ", expected " + << "offBits is " << offBits << ", expected " << BMPoffbits(classv, cBitCount) << "\n"; } @@ -500,7 +516,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : if (cBitCount <= 8) { indexed = true; rc = BMPreadrgbtable(file, &pos, cBitCount, classv, R, G, B); - + if (rc != (int)BMPlenrgbtable(classv, cBitCount)) { pnmimage_bmp_cat.warning() << rc << "-byte RGB table, expected " diff --git a/panda/src/pnmimagetypes/pnmFileTypeBMPWriter.cxx b/panda/src/pnmimagetypes/pnmFileTypeBMPWriter.cxx index ce3f896762..4c1773ae8f 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeBMPWriter.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeBMPWriter.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeBMPWriter.cxx // Created by: drose (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeBMP.h" @@ -35,6 +48,9 @@ extern "C" { * without express or implied warranty. * * $Log$ + * Revision 1.4 2001/05/25 21:30:42 drose + * Update copyright header + * * Revision 1.3 2001/05/25 15:59:19 drose * remove tab characters * @@ -497,7 +513,7 @@ BMPEncode24( { unsigned long nbyte = 0; int bpp = 24; - + pm_message("Using %d bits per pixel", bpp); nbyte += BMPwritefileheader(fp, classv, bpp, x, y); @@ -520,7 +536,7 @@ BMPEncode24( //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeBMP::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeBMP::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -565,7 +581,7 @@ write_data(xel *array, xelval *) { pixval Red[MAXCOLORS]; pixval Green[MAXCOLORS]; pixval Blue[MAXCOLORS]; - + pixel** pixels; colorhash_table cht; @@ -605,9 +621,9 @@ write_data(xel *array, xelval *) { } else { pnmimage_bmp_cat.debug() << colors << " colors found\n"; - + /* - * Now turn the ppm colormap into the appropriate BMP colormap. + * Now turn the ppm colormap into the appropriate BMP colormap. */ if (_maxval > 255) { pnmimage_bmp_cat.debug() @@ -625,14 +641,14 @@ write_data(xel *array, xelval *) { Blue[i] = (pixval) PPM_GETB(chv[i].color) * 255 / _maxval; } } - + /* And make a hash table for fast lookup. */ cht = ppm_colorhisttocolorhash(chv, colors); ppm_freecolorhist(chv); - + BMPEncode(_file, classv, _x_size, _y_size, pixels, colors, cht, Red, Green, Blue); } - + return _y_size; } diff --git a/panda/src/pnmimagetypes/pnmFileTypeIMG.cxx b/panda/src/pnmimagetypes/pnmFileTypeIMG.cxx index 5b205a8d96..c82fe6dbd1 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeIMG.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeIMG.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeIMG.cxx // Created by: drose (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeIMG.h" @@ -24,7 +37,7 @@ TypeHandle PNMFileTypeIMG::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeIMG::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeIMG:: PNMFileTypeIMG() { @@ -103,13 +116,13 @@ make_writer(FILE *file, bool owns_file) { } -inline unsigned long +inline unsigned long read_ulong(FILE *file) { unsigned long x; return pm_readbiglong(file, (long *)&x)==0 ? x : 0; } -inline unsigned short +inline unsigned short read_ushort(FILE *file) { unsigned short x; return pm_readbigshort(file, (short *)&x)==0 ? x : 0; @@ -140,10 +153,10 @@ write_uchar(FILE *file, unsigned char x) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeIMG::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeIMG::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { if (img_header_type == IHT_long) { @@ -158,14 +171,14 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : _is_valid = false; return; } - - _x_size = + + _x_size = ((unsigned char)magic_number[0] << 24) | ((unsigned char)magic_number[1] << 16) | ((unsigned char)magic_number[2] << 8) | ((unsigned char)magic_number[3]); - - _y_size = + + _y_size = ((unsigned char)magic_number[4] << 24) | ((unsigned char)magic_number[5] << 16) | ((unsigned char)magic_number[6] << 8) | @@ -180,12 +193,12 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : _is_valid = false; return; } - - _x_size = + + _x_size = ((unsigned char)magic_number[0] << 8) | ((unsigned char)magic_number[1]); - - _y_size = + + _y_size = ((unsigned char)magic_number[2] << 8) | ((unsigned char)magic_number[3]); @@ -248,7 +261,7 @@ read_row(xel *row_data, xelval *) { red = read_uchar(_file); grn = read_uchar(_file); blu = read_uchar(_file); - + PPM_ASSIGN(row_data[x], red, grn, blu); } @@ -258,7 +271,7 @@ read_row(xel *row_data, xelval *) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeIMG::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeIMG::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -330,7 +343,7 @@ write_row(xel *row_data, xelval *) { write_uchar(_file, (unsigned char)(255*PPM_GETG(row_data[x])/_maxval)); write_uchar(_file, (unsigned char)(255*PPM_GETB(row_data[x])/_maxval)); } - + return true; } diff --git a/panda/src/pnmimagetypes/pnmFileTypeIMG.h b/panda/src/pnmimagetypes/pnmFileTypeIMG.h index 1b56bf2fa4..922cb77f24 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeIMG.h +++ b/panda/src/pnmimagetypes/pnmFileTypeIMG.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeIMG.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPEIMG_H @@ -69,11 +82,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeJPG.cxx b/panda/src/pnmimagetypes/pnmFileTypeJPG.cxx index f811256a1c..de76091b98 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeJPG.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeJPG.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeJPG.cxx // Created by: mike (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeJPG.h" @@ -19,7 +32,7 @@ TypeHandle PNMFileTypeJPG::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeJPG::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeJPG:: PNMFileTypeJPG() { @@ -92,7 +105,7 @@ has_magic_number() const { bool PNMFileTypeJPG:: matches_magic_number(const string &magic_number) const { nassertr(magic_number.size() >= 2, false); - return ((char)magic_number[0] == (char)0xff && + return ((char)magic_number[0] == (char)0xff && (char)magic_number[1] == (char)0xd8); } diff --git a/panda/src/pnmimagetypes/pnmFileTypeJPG.h b/panda/src/pnmimagetypes/pnmFileTypeJPG.h index 3596ea2a42..4e0820adc9 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeJPG.h +++ b/panda/src/pnmimagetypes/pnmFileTypeJPG.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeJPG.h // Created by: mike (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPEJPG_H @@ -55,13 +68,13 @@ public: typedef struct my_error_mgr *_my_error_ptr; struct my_error_mgr _jerr; unsigned long pos; - + unsigned long offBits; - + unsigned short cBitCount; int indexed; int classv; - + pixval R[256]; /* reds */ pixval G[256]; /* greens */ pixval B[256]; /* blues */ @@ -95,11 +108,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeJPGReader.cxx b/panda/src/pnmimagetypes/pnmFileTypeJPGReader.cxx index 7d99da76b8..94454b0d73 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeJPGReader.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeJPGReader.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeJPGReader.cxx // Created by: mike (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeJPG.h" @@ -10,10 +23,10 @@ //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeJPG::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeJPG::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { // Put the magic number bytes back into the file @@ -60,12 +73,12 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeJPG::Reader::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeJPG::Reader:: ~Reader(void) { jpeg_destroy_decompress(&_cinfo); -} +} //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeJPG::Reader::read_data @@ -92,7 +105,7 @@ read_data(xel *array, xelval *) { * output image dimensions available, as well as the output colormap * if we asked for color quantization. * In this example, we need to make an output work buffer of the right size. - */ + */ /* JSAMPLEs per row in output buffer */ row_stride = _cinfo.output_width * _cinfo.output_components; /* Make a one-row-high sample array that will go away when done with image */ @@ -130,7 +143,7 @@ read_data(xel *array, xelval *) { PPM_ASSIGN(array[x], red, grn, blu); } x++; - } + } } /* Step 7: Finish decompression */ diff --git a/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx b/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx index ccf34f1e67..e6fb087848 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeJPGWriter.cxx // Created by: mike (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeJPG.h" @@ -16,7 +29,7 @@ extern "C" { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeJPG::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeJPG::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : diff --git a/panda/src/pnmimagetypes/pnmFileTypePNM.cxx b/panda/src/pnmimagetypes/pnmFileTypePNM.cxx index 61d160f579..7f1f978c1a 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePNM.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypePNM.cxx @@ -1,6 +1,19 @@ -// Filename: pnm-rw-pnm.cxx +// Filename: pnmFileTypePNM.cxx // Created by: drose (04Apr98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypePNM.h" @@ -29,7 +42,7 @@ TypeHandle PNMFileTypePNM::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypePNM::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypePNM:: PNMFileTypePNM() { @@ -102,7 +115,7 @@ has_magic_number() const { bool PNMFileTypePNM:: matches_magic_number(const string &magic_number) const { return (magic_number.size() >= 2) && - magic_number[0] == 'P' && + magic_number[0] == 'P' && (magic_number[1] >= '1' && magic_number[1] <= '6'); } @@ -136,10 +149,10 @@ make_writer(FILE *file, bool owns_file) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypePNM::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypePNM::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { if (!read_magic_number(_file, magic_number, 2)) { @@ -154,8 +167,8 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : // pnm_pbmmaxval = PNM_MAXMAXVAL; /* use larger value for better results */ - _ftype = - ((unsigned char)magic_number[0] << 8) | + _ftype = + ((unsigned char)magic_number[0] << 8) | (unsigned char)magic_number[1]; switch ( PNM_FORMAT_TYPE(_ftype) ) { @@ -163,18 +176,18 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : ppm_readppminitrest( file, &_x_size, &_y_size, &_maxval ); _num_channels = 3; break; - + case PGM_TYPE: pgm_readpgminitrest( file, &_x_size, &_y_size, &_maxval ); _num_channels = 1; break; - + case PBM_TYPE: pbm_readpbminitrest( file, &_x_size, &_y_size ); _num_channels = 1; _maxval = pnm_pbmmaxval; break; - + default: _is_valid = false; } @@ -240,7 +253,7 @@ read_row(xel *row_data, xelval *) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypePNM::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypePNM::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -284,7 +297,7 @@ write_header() { case PNMImageHeader::CT_two_channel: _pnm_format = PGM_TYPE; break; - + case PNMImageHeader::CT_color: case PNMImageHeader::CT_four_channel: _pnm_format = PPM_TYPE; diff --git a/panda/src/pnmimagetypes/pnmFileTypePNM.h b/panda/src/pnmimagetypes/pnmFileTypePNM.h index 49baba9775..fc5571c891 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePNM.h +++ b/panda/src/pnmimagetypes/pnmFileTypePNM.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypePNM.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPEPNM_H @@ -79,11 +92,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeRadiance.cxx b/panda/src/pnmimagetypes/pnmFileTypeRadiance.cxx index a3d3b57f00..ad0d686b5a 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeRadiance.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeRadiance.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeRadiance.cxx // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeRadiance.h" @@ -39,7 +52,7 @@ static const int COLR_MAX = 255; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeRadiance::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeRadiance:: PNMFileTypeRadiance() { @@ -146,10 +159,10 @@ make_writer(FILE *file, bool owns_file) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeRadiance::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeRadiance::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { setcolrgam(radiance_gamma_correction); @@ -175,7 +188,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : if (pnmimage_radiance_cat.is_debug()) { pnmimage_radiance_cat.debug() - << "Reading Radiance image: " << _x_size << " by " << _y_size + << "Reading Radiance image: " << _x_size << " by " << _y_size << " pixels.\n" << "gamma correction is " << radiance_gamma_correction << ", brightness adjustment is " << radiance_brightness_adjustment @@ -221,13 +234,13 @@ read_row(xel *row_data, xelval *) { if (freadcolrs(scanin, _x_size, _file) < 0) { return false; } - + if (radiance_brightness_adjustment) { shiftcolrs(scanin, _x_size, radiance_brightness_adjustment); } - + colrs_gambs(scanin, _x_size); /* gamma correction */ - + for (x = 0; x < _x_size; x++) { PPM_ASSIGN(row_data[x], scanin[x][RED], scanin[x][GRN], scanin[x][BLU]); } @@ -239,7 +252,7 @@ read_row(xel *row_data, xelval *) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeRadiance::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeRadiance::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : diff --git a/panda/src/pnmimagetypes/pnmFileTypeRadiance.h b/panda/src/pnmimagetypes/pnmFileTypeRadiance.h index 09cdd2b30f..d05fb949ed 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeRadiance.h +++ b/panda/src/pnmimagetypes/pnmFileTypeRadiance.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeRadiance.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPERADIANCE_H @@ -72,11 +85,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeSGI.cxx b/panda/src/pnmimagetypes/pnmFileTypeSGI.cxx index 7e3c0d1fd2..4ca7b9b795 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSGI.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeSGI.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeSGI.cxx // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeSGI.h" @@ -20,7 +33,7 @@ TypeHandle PNMFileTypeSGI::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSGI::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSGI:: PNMFileTypeSGI() { diff --git a/panda/src/pnmimagetypes/pnmFileTypeSGI.h b/panda/src/pnmimagetypes/pnmFileTypeSGI.h index 0efcd85086..59d87e2245 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSGI.h +++ b/panda/src/pnmimagetypes/pnmFileTypeSGI.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeSGI.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPESGI_H @@ -46,7 +59,7 @@ public: long start; /* offset in file */ long length; /* length of compressed scanline */ } TabEntry; - + private: TabEntry *table; long table_start; @@ -67,13 +80,13 @@ public: long start; /* offset in file */ long length; /* length of compressed scanline */ } TabEntry; - + typedef short ScanElem; typedef struct { ScanElem * data; long length; } ScanLine; - + private: TabEntry &Table(int chan) { return table[chan * _y_size + current_row]; @@ -92,7 +105,7 @@ public: int bpc; int dimensions; int new_maxval; - + ScanElem *rletemp; }; @@ -117,11 +130,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeSGIReader.cxx b/panda/src/pnmimagetypes/pnmFileTypeSGIReader.cxx index b64fb85a2b..74195e865a 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSGIReader.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeSGIReader.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeSGIReader.cxx // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeSGI.h" @@ -50,7 +63,7 @@ static char * compression_name (char compr); static void read_bytes (FILE *ifp, int n, char *buf); static bool read_header(FILE *ifp, Header *head, const string &magic_number); static TabEntry * read_table (FILE *ifp, int tablen); -static void read_channel (FILE *ifp, int xsize, int ysize, +static void read_channel (FILE *ifp, int xsize, int ysize, int zsize, int bpc, TabEntry *table, ScanElem *channel_data, long table_start, int channel, int row); @@ -70,10 +83,10 @@ static bool eof_err = false; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSGI::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSGI::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { eof_err = false; @@ -121,9 +134,9 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : head.name[79] = '\0'; /* just to be safe */ pnmimage_sgi_cat.debug() << "Read RGB image:\n" - << " raster size " << head.xsize << " x " << head.ysize + << " raster size " << head.xsize << " x " << head.ysize << ", " << head.zsize << " channels\n" - << " compression: " << (int)head.storage << " = " + << " compression: " << (int)head.storage << " = " << compression_name(head.storage) << "\n" << " image name: " << head.name << "\n" << " bpc: " << (int)head.bpc << " dimension: " << head.dimension << "\n" @@ -135,7 +148,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSGI::Reader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSGI::Reader:: ~Reader() { @@ -180,18 +193,18 @@ read_row(xel *row_data, xelval *alpha_data) { ScanElem *blu = (ScanElem *)alloca(_x_size * sizeof(ScanElem)); ScanElem *alpha = (ScanElem *)alloca(_x_size * sizeof(ScanElem)); - read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, red, + read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, red, table_start, 0, current_row); if (!is_grayscale()) { - read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, grn, + read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, grn, table_start, 1, current_row); - read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, blu, + read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, blu, table_start, 2, current_row); } if (has_alpha()) { - read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, alpha, + read_channel(_file, _x_size, _y_size, _num_channels, bpc, table, alpha, table_start, _num_channels - 1, current_row); } @@ -205,7 +218,7 @@ read_row(xel *row_data, xelval *alpha_data) { b = (xelval)blu[x]; PPM_ASSIGN(row_data[x], r, g, b); } - + if (has_alpha()) { alpha_data[x] = (xelval)alpha[x]; } @@ -219,7 +232,7 @@ read_row(xel *row_data, xelval *alpha_data) { static bool read_header(FILE *ifp, Header *head, const string &magic_number) { nassertr(magic_number.size() == 4, false); - head->magic = + head->magic = ((unsigned char)magic_number[0] << 8) | ((unsigned char)magic_number[1]); head->storage = (unsigned char)magic_number[2]; @@ -294,7 +307,7 @@ read_header(FILE *ifp, Header *head, const string &magic_number) { break; default: pnmimage_sgi_cat.error() - << "Illegal dimension value " << head->dimension + << "Illegal dimension value " << head->dimension << " (only 1-3 allowed)\n"; return false; } @@ -352,7 +365,7 @@ read_channel(FILE *ifp, nassertv(length <= WORSTCOMPR(xsize)); for( i = 0; i < length; i++ ) temp[i] = (*func)(ifp); - + rle_decompress(temp, length, channel_data, xsize); } else { diff --git a/panda/src/pnmimagetypes/pnmFileTypeSGIWriter.cxx b/panda/src/pnmimagetypes/pnmFileTypeSGIWriter.cxx index 49b2f2831e..6d6e4f5931 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSGIWriter.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeSGIWriter.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeSGIWriter.cxx // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeSGI.h" @@ -39,7 +52,7 @@ #define MAXVAL_BYTE 255 #define MAXVAL_WORD 65535 -inline void +inline void put_byte(FILE *out_file, unsigned char b) { putc(b, out_file); } @@ -67,7 +80,7 @@ put_short_as_byte(FILE *out_file, short s) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSGI::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSGI::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -78,7 +91,7 @@ Writer(PNMFileType *type, FILE *file, bool owns_file) : //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSGI::Writer::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSGI::Writer:: ~Writer() { @@ -149,7 +162,7 @@ write_header() { } else { return false; } - + if( sgi_storage_type != STORAGE_VERBATIM ) { table = new TabEntry[_num_channels * _y_size]; memset(table, 0, _num_channels * _y_size * sizeof(TabEntry)); @@ -195,7 +208,7 @@ write_row(xel *row_data, xelval *alpha_data) { write_channels(channel, put_short_as_byte); else write_channels(channel, put_big_short); - + for (int i = 0; i < _num_channels; i++) { delete[] channel[i].data; } @@ -246,7 +259,7 @@ write_table() { void PNMFileTypeSGI::Writer:: write_channels(ScanLine channel[], void (*put)(FILE *, short)) { int i, col; - + for( i = 0; i < _num_channels; i++ ) { Table(i).start = ftell(_file); Table(i).length = channel[i].length * bpc; @@ -262,12 +275,12 @@ void PNMFileTypeSGI::Writer:: build_scanline(ScanLine output[], xel *row_data, xelval *alpha_data) { int col; ScanElem *temp; - + if( sgi_storage_type != STORAGE_VERBATIM ) { rletemp = (ScanElem *)alloca(WORSTCOMPR(_x_size) * sizeof(ScanElem)); } temp = new ScanElem[_x_size]; - + if( _num_channels <= 2 ) { for( col = 0; col < _x_size; col++ ) temp[col] = (ScanElem) diff --git a/panda/src/pnmimagetypes/pnmFileTypeSoftImage.cxx b/panda/src/pnmimagetypes/pnmFileTypeSoftImage.cxx index 2992703219..1b24dd28ea 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSoftImage.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeSoftImage.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeSoftImage.cxx // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeSoftImage.h" @@ -44,7 +57,7 @@ read_float(FILE *file) { } } -inline unsigned short +inline unsigned short read_ushort(FILE *file) { unsigned short x; return pm_readbigshort(file, (short *)&x)==0 ? x : 0; @@ -73,7 +86,7 @@ write_float(FILE *file, float x) { } static int -read_channel_pkt(FILE *file, +read_channel_pkt(FILE *file, int &chained, int &size, int &type, int &channel) { chained = read_uchar(file); size = read_uchar(file); @@ -133,7 +146,7 @@ read_rgba(xel *row_data, xelval *alpha_data, FILE *file, int x, int repeat) { repeat--; } } - + static int read_scanline(xel *row_data, xelval *alpha_data, int cols, FILE *file, @@ -192,7 +205,7 @@ read_scanline(xel *row_data, xelval *alpha_data, int cols, FILE *file, //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSoftImage::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSoftImage:: PNMFileTypeSoftImage() { @@ -301,10 +314,10 @@ make_writer(FILE *file, bool owns_file) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSoftImage::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSoftImage::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { if (!read_magic_number(_file, magic_number, 4)) { @@ -328,7 +341,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : _is_valid = false; return; } - + // skip version number read_float(_file); @@ -368,13 +381,13 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : } else if (channel == RGB_CHANNEL) { // Three components in the first part: RGB. soft_color = rgb; - + if (chained) { if (!read_channel_pkt(_file, chained, size, alpha_ctype, channel)) { _is_valid = false; return; } - + if (channel == ALPHA_CHANNEL) { // Alpha component in the second part: RGBA. soft_color = rgb_a; @@ -386,7 +399,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : case rgb: _num_channels = 3; break; - + case rgba: case rgb_a: _num_channels = 4; @@ -451,14 +464,14 @@ read_row(xel *row_data, xelval *alpha_data) { return false; } break; - + case rgba: if (!read_scanline(row_data, alpha_data, _x_size, _file, read_rgba, rgb_ctype)) { return false; } break; - + case rgb_a: if (!read_scanline(row_data, alpha_data, _x_size, _file, read_rgb, rgb_ctype)) { @@ -479,7 +492,7 @@ read_row(xel *row_data, xelval *alpha_data) { static void -write_channel_pkt(FILE *file, +write_channel_pkt(FILE *file, int chained, int size, int type, int channel) { write_uchar(file, chained); write_uchar(file, size); @@ -528,7 +541,7 @@ write_diff(xel *row_data, xelval *alpha_data, FILE *file, int tox, int length) { if (length>0) { nassertv(length<=128); - + write_uchar(file, length-1); while (length>0) { length--; @@ -544,18 +557,18 @@ write_same(xel *row_data, xelval *alpha_data, FILE *file, int tox, int length) { if (length==1) { write_diff(row_data, alpha_data, file, write_data, tox, length); - + } else if (length>0) { if (length<128) { write_uchar(file, length+127); } else { write_uchar(file, 128); write_ushort(file, length); - } + } write_data(row_data, alpha_data, file, tox); } } - + static void write_scanline(xel *row_data, xelval *alpha_data, int cols, FILE *file, @@ -609,7 +622,7 @@ write_scanline(xel *row_data, xelval *alpha_data, int cols, FILE *file, int excess = run_length - 128; write_diff(row_data, alpha_data, file, write_data, x-excess-1, 128); run_length = excess; - + } else if (run_length > 2 && compare_data(row_data, alpha_data, x, x-1) && compare_data(row_data, alpha_data, x, x-2)) { @@ -650,7 +663,7 @@ write_scanline(xel *row_data, xelval *alpha_data, int cols, FILE *file, //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeSoftImage::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeSoftImage::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -735,15 +748,15 @@ bool PNMFileTypeSoftImage::Writer:: write_row(xel *row_data, xelval *alpha_data) { if (is_grayscale()) { write_scanline(row_data, alpha_data, _x_size, _file, compare_gray, write_gray); - + } else { write_scanline(row_data, alpha_data, _x_size, _file, compare_rgb, write_rgb); } - + if (has_alpha()) { write_scanline(row_data, alpha_data, _x_size, _file, compare_alpha, write_alpha); } - + return !ferror(_file); } diff --git a/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h b/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h index eb76da6d2a..36c7194797 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h +++ b/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeSoftImage.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPESOFTIMAGE_H @@ -76,11 +89,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeTGA.cxx b/panda/src/pnmimagetypes/pnmFileTypeTGA.cxx index af7619694d..4a52fa80f2 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeTGA.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeTGA.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeTGA.cxx // Created by: drose (27Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -49,7 +62,7 @@ static const int num_extensions = sizeof(extensions) / sizeof(const char *); TypeHandle PNMFileTypeTGA::_type_handle; - + /* Header definition. */ struct ImageHeader { unsigned char IDLength; /* length of Identifier String */ @@ -90,7 +103,7 @@ typedef char ImageIDField[256]; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTGA::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTGA:: PNMFileTypeTGA() { @@ -172,10 +185,10 @@ make_writer(FILE *file, bool owns_file) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTGA::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTGA::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { tga_head = new ImageHeader; @@ -234,7 +247,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : tga_head->ImgType == TGA_CompMap4 ) { /* Color-mapped image */ if ( tga_head->CoMapType != 1 ) - pm_error( + pm_error( "mapped image (type %d) with color map type != 1", tga_head->ImgType ); mapped = 1; @@ -252,23 +265,23 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : _num_channels = 1; _maxval = 255; break; - + case 24: _num_channels = 3; _maxval = 255; break; - + case 32: _num_channels = 4; _maxval = 255; break; - + case 15: case 16: _num_channels = 3; _maxval = 31; break; - + default: pm_error("unknown pixel size - %d", size ); } @@ -297,13 +310,13 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : _x_size = cols; _y_size = rows; _num_channels = 3; - + } //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTGA::Reader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTGA::Reader:: ~Reader() { @@ -334,7 +347,7 @@ read_data(xel *array, xelval *alpha) { realrow = rows - realrow - 1; for ( int col = 0; col < cols; ++col ) - get_pixel( _file, &(array[realrow * cols + col]), + get_pixel( _file, &(array[realrow * cols + col]), (int) tga_head->PixelSize, &(alpha[realrow * cols + col]) ); if ( tga_head->IntrLve == TGA_IL_Four ) @@ -353,7 +366,7 @@ read_data(xel *array, xelval *alpha) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTGA::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTGA::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -368,7 +381,7 @@ Writer(PNMFileType *type, FILE *file, bool owns_file) : //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTGA::Writer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTGA::Writer:: ~Writer() { @@ -466,7 +479,7 @@ write_data(xel *array, xelval *) { } runlength = (int*) pm_allocrow( cols, sizeof(int) ); } - + tgaHeader->IDLength = 0; tgaHeader->Index_lo = 0; tgaHeader->Index_hi = 0; @@ -660,7 +673,7 @@ get_map_entry( FILE *ifp, pixel *Value, int Size, gray *Alpha ) { r = getbyte( ifp ); if ( Size == 32 ) a = getbyte( ifp ); - else + else a = 0; break; @@ -793,13 +806,13 @@ writetga( struct ImageHeader *tgaP, char *id ) if ( tgaP->IDLength ) fwrite( id, 1, (int) tgaP->IDLength, _file ); } - + void PNMFileTypeTGA::Writer:: put_map_entry( pixel* valueP, int size, pixval maxval ) { int j; pixel p; - + switch ( size ) { case 8: /* Grey scale. */ @@ -833,7 +846,7 @@ compute_runlengths( int cols, pixel *pixelrow, int *runlength ) /* Initialize all run lengths to 0. (This is just an error check.) */ for ( col = 0; col < cols; ++col ) runlength[col] = 0; - + /* Find runs of identical pixels. */ for ( col = 0; col < cols; ) { @@ -846,7 +859,7 @@ compute_runlengths( int cols, pixel *pixelrow, int *runlength ) PPM_EQUAL( pixelrow[col], pixelrow[start] ) ); runlength[start] = col - start; } - + /* Now look for runs of length-1 runs, and turn them into negative runs. */ for ( col = 0; col < cols; ) { diff --git a/panda/src/pnmimagetypes/pnmFileTypeTGA.h b/panda/src/pnmimagetypes/pnmFileTypeTGA.h index 1df86eaf7e..8e48baf757 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeTGA.h +++ b/panda/src/pnmimagetypes/pnmFileTypeTGA.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeTGA.h // Created by: drose (27Apr01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPETGA_H @@ -54,7 +67,7 @@ public: gray* Alpha); void get_pixel ( FILE* ifp, pixel* dest, int Size, gray* alpha_p); unsigned char getbyte ( FILE* ifp ); - + int rows, cols, rlencoded, mapped; struct ImageHeader *tga_head; pixel ColorMap[TGA_MAXCOLORS]; @@ -108,11 +121,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx b/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx index 05bfb2e24c..a6946d6278 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeTIFF.cxx // Created by: drose (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pnmFileTypeTIFF.h" @@ -118,7 +131,7 @@ TypeHandle PNMFileTypeTIFF::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTIFF::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTIFF:: PNMFileTypeTIFF() { @@ -227,10 +240,10 @@ make_writer(FILE *file, bool owns_file) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTIFF::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTIFF::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { bool grayscale; @@ -250,7 +263,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : tif = TIFFClientOpen("TIFF file", "r", (thandle_t) _file, StdioReadProc, StdioWriteProc, - (TIFFSeekProc)StdioSeekProc, + (TIFFSeekProc)StdioSeekProc, StdioCloseProc, StdioSizeProc, StdioMapProc, StdioUnmapProc); @@ -280,7 +293,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : _is_valid = false; } } - + if (_is_valid) { (void) TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &_x_size ); (void) TIFFGetField( tif, TIFFTAG_IMAGELENGTH, &_y_size ); @@ -329,7 +342,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : numcolors = _maxval + 1; if ( numcolors > TIFF_COLORMAP_MAXCOLORS ) { pnmimage_tiff_cat.error() - << "Cannot read TIFF file with " << numcolors + << "Cannot read TIFF file with " << numcolors << " in colormap; max supported is " << TIFF_COLORMAP_MAXCOLORS << "\n"; _is_valid = false; } else { @@ -397,7 +410,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTIFF::Reader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTIFF::Reader:: ~Reader() { @@ -470,7 +483,7 @@ read_row(xel *row_data, xelval *alpha_data) { } } break; - + case PHOTOMETRIC_MINISWHITE: for ( col = 0; col < _x_size; ++col ) { @@ -483,7 +496,7 @@ read_row(xel *row_data, xelval *alpha_data) { } } break; - + case PHOTOMETRIC_PALETTE: for ( col = 0; col < _x_size; ++col ) { @@ -495,11 +508,11 @@ read_row(xel *row_data, xelval *alpha_data) { } } break; - + case PHOTOMETRIC_RGB: for ( col = 0; col < _x_size; ++col ) { xelval r, g, b; - + NEXTSAMPLE; r = sample; NEXTSAMPLE; @@ -510,16 +523,16 @@ read_row(xel *row_data, xelval *alpha_data) { if ( spp == 4 ) { NEXTSAMPLE; // Alpha channel alpha_data[col] = sample; - } + } } break; - + default: pnmimage_tiff_cat.error() << "Internal error: unsupported photometric " << photomet << "\n"; return false; } - + current_row++; return true; } @@ -528,7 +541,7 @@ read_row(xel *row_data, xelval *alpha_data) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeTIFF::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeTIFF::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -563,8 +576,8 @@ write_data(xel *array, xelval *alpha) { colorhist_vector chv; colorhash_table cht; unsigned short - red[TIFF_COLORMAP_MAXCOLORS], - grn[TIFF_COLORMAP_MAXCOLORS], + red[TIFF_COLORMAP_MAXCOLORS], + grn[TIFF_COLORMAP_MAXCOLORS], blu[TIFF_COLORMAP_MAXCOLORS]; int row, colors, i; register int col; @@ -626,13 +639,13 @@ write_data(xel *array, xelval *alpha) { tif = TIFFClientOpen("TIFF file", "w", (thandle_t) _file, StdioReadProc, StdioWriteProc, - (TIFFSeekProc)StdioSeekProc, + (TIFFSeekProc)StdioSeekProc, StdioCloseProc, StdioSizeProc, StdioMapProc, StdioUnmapProc); if ( tif == NULL ) { return false; } - + /* Figure out TIFF parameters. */ switch ( get_color_type() ) { case CT_color: @@ -690,13 +703,13 @@ write_data(xel *array, xelval *alpha) { TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, photometric ); TIFFSetField( tif, TIFFTAG_FILLORDER, tiff_fillorder ); //TIFFSetField( tif, TIFFTAG_DOCUMENTNAME, "TIFF Image File"); - TIFFSetField( tif, TIFFTAG_IMAGEDESCRIPTION, + TIFFSetField( tif, TIFFTAG_IMAGEDESCRIPTION, "Generated via pnmimage.\n" ); TIFFSetField( tif, TIFFTAG_SAMPLESPERPIXEL, samplesperpixel ); TIFFSetField( tif, TIFFTAG_ROWSPERSTRIP, tiff_rowsperstrip ); /* TIFFSetField( tif, TIFFTAG_STRIPBYTECOUNTS, _y_size / tiff_rowsperstrip ); */ TIFFSetField( tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG ); - + if ( chv == (colorhist_vector) 0 ) { cht = (colorhash_table) 0; } else { @@ -707,7 +720,7 @@ write_data(xel *array, xelval *alpha) { blu[i] = (unsigned short) (PPM_GETB( chv[i].color ) * 65535L / _maxval); } TIFFSetField( tif, TIFFTAG_COLORMAP, red, grn, blu ); - + /* Convert color vector to color hash table, for fast lookup. */ cht = ppm_colorhisttocolorhash( chv, colors ); ppm_freecolorhist( chv ); @@ -752,7 +765,7 @@ write_data(xel *array, xelval *alpha) { register int bitshift; register unsigned char byte; register xelval s; - + bigger_maxval = pm_bitstomaxval( bitspersample ); bitshift = 8 - bitspersample; byte = 0; diff --git a/panda/src/pnmimagetypes/pnmFileTypeTIFF.h b/panda/src/pnmimagetypes/pnmFileTypeTIFF.h index f44d465420..0b3cf255f2 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeTIFF.h +++ b/panda/src/pnmimagetypes/pnmFileTypeTIFF.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeTIFF.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPETIFF_H @@ -48,7 +61,7 @@ public: unsigned short photomet; unsigned short bps, spp; xel colormap[TIFF_COLORMAP_MAXCOLORS]; - + int current_row; struct tiff *tif; }; @@ -81,11 +94,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/pnmFileTypeYUV.cxx b/panda/src/pnmimagetypes/pnmFileTypeYUV.cxx index 56c6148d3c..b302a41512 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeYUV.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeYUV.cxx @@ -1,6 +1,19 @@ // Filename: pnmFileTypeYUV.cxx // Created by: drose (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -11,7 +24,7 @@ ** ** by Marc Boucher ** Internet: marc@PostImage.cxxOM -** +** ** Based on Example Conversion Program, A60/A64 Digital Video Interface ** Manual, page 69 ** @@ -33,7 +46,7 @@ ** ** by Marc Boucher ** Internet: marc@PostImage.cxxOM -** +** ** Based on Example Conversion Program, A60/A64 Digital Video Interface ** Manual, page 69. ** @@ -67,7 +80,7 @@ TypeHandle PNMFileTypeYUV::_type_handle; //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeYUV::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeYUV:: PNMFileTypeYUV() { @@ -149,10 +162,10 @@ make_writer(FILE *file, bool owns_file) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeYUV::Reader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeYUV::Reader:: -Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : +Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : PNMReader(type, file, owns_file) { yuvbuf = NULL; @@ -188,7 +201,7 @@ Reader(PNMFileType *type, FILE *file, bool owns_file, string magic_number) : //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeYUV::Reader::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeYUV::Reader:: ~Reader() { @@ -243,13 +256,13 @@ read_row(xel *row_data, xelval *) { v = (int)yuvptr[2] - 128; y1 = (int)yuvptr[3] - 16; if (y1 < 0) y1 = 0; - + r = 104635 * v; g = -25690 * u + -53294 * v; b = 132278 * u; - + y*=76310; y1*=76310; - + PPM_ASSIGN(row_data[col], limit(r+y), limit(g+y), limit(b+y)); PPM_ASSIGN(row_data[col+1], limit(r+y1), limit(g+y1), limit(b+y1)); @@ -261,7 +274,7 @@ read_row(xel *row_data, xelval *) { //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeYUV::Writer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeYUV::Writer:: Writer(PNMFileType *type, FILE *file, bool owns_file) : @@ -273,7 +286,7 @@ Writer(PNMFileType *type, FILE *file, bool owns_file) : //////////////////////////////////////////////////////////////////// // Function: PNMFileTypeYUV::Writer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMFileTypeYUV::Writer:: ~Writer() { @@ -344,35 +357,35 @@ write_row(xel *row_data, xelval *) { static const int max_byte = 255; unsigned char *yuvptr; - + for (col = 0, yuvptr=yuvbuf; col < _x_size; col += 2) { pixval r, g, b; - + /* first pixel gives Y and 0.5 of chroma */ r = (pixval)(max_byte * PPM_GETR(row_data[col])/_maxval); g = (pixval)(max_byte * PPM_GETG(row_data[col])/_maxval); b = (pixval)(max_byte * PPM_GETB(row_data[col])/_maxval); - + y1 = 16829 * r + 33039 * g + 6416 * b + (0xffff & y2); u1 = -4853 * r - 9530 * g + 14383 * b; v1 = 14386 * r - 12046 * g - 2340 * b; - + /* second pixel just yields a Y and 0.25 U, 0.25 V */ r = (pixval)(max_byte * PPM_GETR(row_data[col])/_maxval); g = (pixval)(max_byte * PPM_GETG(row_data[col])/_maxval); b = (pixval)(max_byte * PPM_GETB(row_data[col])/_maxval); - + y2 = 16829 * r + 33039 * g + 6416 * b + (0xffff & y1); u2 = -2426 * r - 4765 * g + 7191 * b; v2 = 7193 * r - 6023 * g - 1170 * b; - + /* filter the chroma */ u = u0 + u1 + u2 + (0xffff & u); v = v0 + v1 + v2 + (0xffff & v); - + u0 = u2; v0 = v2; - + *yuvptr++ = (unsigned char)((u >> 16) + 128); *yuvptr++ = (unsigned char)((y1 >> 16) + 16); *yuvptr++ = (unsigned char)((v >> 16) + 128); diff --git a/panda/src/pnmimagetypes/pnmFileTypeYUV.h b/panda/src/pnmimagetypes/pnmFileTypeYUV.h index f4353504f1..67b0bd0652 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeYUV.h +++ b/panda/src/pnmimagetypes/pnmFileTypeYUV.h @@ -1,6 +1,19 @@ // Filename: pnmFileTypeYUV.h // Created by: drose (17Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PNMFILETYPEYUV_H @@ -77,11 +90,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; #endif - + diff --git a/panda/src/pnmimagetypes/resolu.c b/panda/src/pnmimagetypes/resolu.c index f918e9b5be..12137d2b32 100644 --- a/panda/src/pnmimagetypes/resolu.c +++ b/panda/src/pnmimagetypes/resolu.c @@ -1,4 +1,20 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Filename: resolu.c + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Read and write image resolutions. diff --git a/panda/src/pnmimagetypes/resolu.h b/panda/src/pnmimagetypes/resolu.h index 2af5c2278b..1321f3e11d 100644 --- a/panda/src/pnmimagetypes/resolu.h +++ b/panda/src/pnmimagetypes/resolu.h @@ -1,4 +1,20 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Filename: resolu.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* SCCSid "@(#)resolu.h 2.2 6/4/93 LBL" */ diff --git a/panda/src/pnmimagetypes/sgi.h b/panda/src/pnmimagetypes/sgi.h index 6ba09d8483..9fddf33c73 100644 --- a/panda/src/pnmimagetypes/sgi.h +++ b/panda/src/pnmimagetypes/sgi.h @@ -1,4 +1,20 @@ -/* sgi.h - header file for sgitopnm.c and pnmtosgi.c */ +/* Filename: sgi.h + * Created by: + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * PANDA 3D SOFTWARE + * Copyright (c) 2001, 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://www.panda3d.org/license.txt . + * + * To contact the maintainers of this program write to + * panda3d@yahoogroups.com . + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ typedef struct { short magic; diff --git a/panda/src/ps2display/config_ps2display.cxx b/panda/src/ps2display/config_ps2display.cxx index f5e6b64b90..480e740690 100644 --- a/panda/src/ps2display/config_ps2display.cxx +++ b/panda/src/ps2display/config_ps2display.cxx @@ -1,4 +1,17 @@ // Filename: config_ps2display.cxx // Created by: charles (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/ps2display/ps2GraphicsPipe.cxx b/panda/src/ps2display/ps2GraphicsPipe.cxx index 7d0d3fe083..d4801bd5a1 100644 --- a/panda/src/ps2display/ps2GraphicsPipe.cxx +++ b/panda/src/ps2display/ps2GraphicsPipe.cxx @@ -1,4 +1,17 @@ // Filename: ps2GraphicsPipe.cxx // Created by: charles (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/ps2display/ps2GraphicsWindow.cxx b/panda/src/ps2display/ps2GraphicsWindow.cxx index 215436f89f..164e51ba00 100644 --- a/panda/src/ps2display/ps2GraphicsWindow.cxx +++ b/panda/src/ps2display/ps2GraphicsWindow.cxx @@ -1,4 +1,17 @@ // Filename: ps2GraphicsWindow.cxx // Created by: charles (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/ps2gsg/config_ps2gsg.cxx b/panda/src/ps2gsg/config_ps2gsg.cxx index a9f8429974..8af37fab39 100644 --- a/panda/src/ps2gsg/config_ps2gsg.cxx +++ b/panda/src/ps2gsg/config_ps2gsg.cxx @@ -1,4 +1,17 @@ // Filename: config_ps2gsg.cxx // Created by: charles (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/ps2gsg/ps2GraphicsStateGuardian.cxx b/panda/src/ps2gsg/ps2GraphicsStateGuardian.cxx index 780f0ef84d..1e145243f3 100644 --- a/panda/src/ps2gsg/ps2GraphicsStateGuardian.cxx +++ b/panda/src/ps2gsg/ps2GraphicsStateGuardian.cxx @@ -1,4 +1,17 @@ // Filename: ps2GraphicsStateGuardian.cxx // Created by: charles (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/ps2gsg/ps2SavedFrameBuffer.cxx b/panda/src/ps2gsg/ps2SavedFrameBuffer.cxx index 4d28d2e26f..f4bb2a9b68 100644 --- a/panda/src/ps2gsg/ps2SavedFrameBuffer.cxx +++ b/panda/src/ps2gsg/ps2SavedFrameBuffer.cxx @@ -1,4 +1,17 @@ // Filename: ps2SavedFrameBuffer.cxx // Created by: charles (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/ps2gsg/ps2TextureContext.cxx b/panda/src/ps2gsg/ps2TextureContext.cxx index 52fa2eec46..bf6b3f8fa3 100644 --- a/panda/src/ps2gsg/ps2TextureContext.cxx +++ b/panda/src/ps2gsg/ps2TextureContext.cxx @@ -1,4 +1,17 @@ // Filename: ps2TextureContext.cxx // Created by: charles (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pstatclient/config_pstats.cxx b/panda/src/pstatclient/config_pstats.cxx index a0c54e1779..606954c67a 100644 --- a/panda/src/pstatclient/config_pstats.cxx +++ b/panda/src/pstatclient/config_pstats.cxx @@ -1,6 +1,19 @@ // Filename: config_pstats.cxx // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_pstats.h" diff --git a/panda/src/pstatclient/config_pstats.h b/panda/src/pstatclient/config_pstats.h index 84b60c77ab..6c4866e9f7 100644 --- a/panda/src/pstatclient/config_pstats.h +++ b/panda/src/pstatclient/config_pstats.h @@ -1,6 +1,19 @@ // Filename: config_pstats.h // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_PSTATS_H @@ -18,7 +31,7 @@ NotifyCategoryDecl(pstats, EXPCL_PANDA, EXPTP_PANDA); extern EXPCL_PANDA string get_pstats_name(); extern EXPCL_PANDA float get_pstats_max_rate(); -extern EXPCL_PANDA const string pstats_host; +extern EXPCL_PANDA const string pstats_host; extern EXPCL_PANDA const int pstats_port; extern EXPCL_PANDA const float pstats_target_frame_rate; diff --git a/panda/src/pstatclient/pStatClient.I b/panda/src/pstatclient/pStatClient.I index 7fc86e5b03..40c313329a 100644 --- a/panda/src/pstatclient/pStatClient.I +++ b/panda/src/pstatclient/pStatClient.I @@ -1,6 +1,19 @@ // Filename: pStatClient.I // Created by: drose (16Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pstatclient/pStatClient.cxx b/panda/src/pstatclient/pStatClient.cxx index ca24580b9c..fede193914 100644 --- a/panda/src/pstatclient/pStatClient.cxx +++ b/panda/src/pstatclient/pStatClient.cxx @@ -1,11 +1,24 @@ // Filename: pStatClient.cxx // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pStatClient.h" -#ifdef DO_PSTATS +#ifdef DO_PSTATS // This file only defines anything interesting if DO_PSTATS is // defined. @@ -29,7 +42,7 @@ PStatClient *PStatClient::_global_pstats = NULL; //////////////////////////////////////////////////////////////////// // Function: PStatClient::PerThreadData::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatClient::PerThreadData:: PerThreadData() { @@ -41,7 +54,7 @@ PerThreadData() { //////////////////////////////////////////////////////////////////// // Function: PStatClient::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatClient:: PStatClient() : @@ -72,7 +85,7 @@ PStatClient() : //////////////////////////////////////////////////////////////////// // Function: PStatClient::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatClient:: ~PStatClient() { @@ -230,13 +243,13 @@ make_collector_with_relname(int parent_index, string relname) { while (start < relname.size() && relname[start] == ':') { start++; } - + // If the name contains a colon (after the initial colon), it means // we are making a nested collector. size_t colon = relname.find(':', start); while (colon != string::npos) { string parent_name = relname.substr(start, colon - start); - PStatCollector parent_collector = + PStatCollector parent_collector = make_collector_with_name(parent_index, parent_name); parent_index = parent_collector._index; relname = relname.substr(colon + 1); @@ -308,7 +321,7 @@ make_collector_with_name(int parent_index, const string &name) { //////////////////////////////////////////////////////////////////// PStatThread PStatClient:: make_thread(const string &name) { - ThingsByName::const_iterator ni = + ThingsByName::const_iterator ni = _threads_by_name.find(name); if (ni != _threads_by_name.end()) { @@ -394,7 +407,7 @@ client_connect(string hostname, int port) { if (_tcp_connection.is_null()) { pstats_cat.error() - << "Couldn't connect to PStatServer at " << hostname << ":" + << "Couldn't connect to PStatServer at " << hostname << ":" << port << "\n"; return false; } @@ -438,12 +451,12 @@ client_disconnect() { (*ti)._next_packet = 0.0; (*ti)._frame_data.clear(); } - + Collectors::iterator ci; for (ci = _collectors.begin(); ci != _collectors.end(); ++ci) { PerThread::iterator ii; - for (ii = (*ci)._per_thread.begin(); - ii != (*ci)._per_thread.end(); + for (ii = (*ci)._per_thread.begin(); + ii != (*ci)._per_thread.end(); ++ii) { (*ii)._nested_count = 0; } @@ -524,9 +537,9 @@ stop(int collector_index, int thread_index, float as_of) { << "!\n"; return; } - + _collectors[collector_index]._per_thread[thread_index]._nested_count--; - + if (_collectors[collector_index]._per_thread[thread_index]._nested_count == 0) { // This collector has now been completely stopped; record a new // data point. @@ -667,7 +680,7 @@ transmit_frame_data(int thread_index) { // We don't want to send more than _max_rate UDP-size packets // per second, per thread. float packet_delay = 1.0 / _max_rate; - + // Send new data. NetDatagram datagram; // We always start with a zero byte, to differentiate it from a @@ -686,7 +699,7 @@ transmit_frame_data(int thread_index) { _writer.send(datagram, _tcp_connection); // If our packets are so large that we must ship them via TCP, // then artificially slow down the packet rate even further. - int packet_ratio = + int packet_ratio = (datagram.get_length() + maximum_udp_datagram - 1) / maximum_udp_datagram; packet_delay *= (float)packet_ratio; @@ -720,7 +733,7 @@ transmit_control_data() { } } } - + if (_is_connected) { report_new_collectors(); report_new_threads(); @@ -827,7 +840,7 @@ handle_server_control_message(const PStatServerControlMessage &message) { switch (message._type) { case PStatServerControlMessage::T_hello: pstats_cat.info() - << "Connected to " << message._server_progname << " on " + << "Connected to " << message._server_progname << " on " << message._server_hostname << "\n"; _server.set_port(message._udp_port); diff --git a/panda/src/pstatclient/pStatClient.h b/panda/src/pstatclient/pStatClient.h index 470fbcb457..6b981641af 100644 --- a/panda/src/pstatclient/pStatClient.h +++ b/panda/src/pstatclient/pStatClient.h @@ -1,6 +1,19 @@ // Filename: pStatClient.h // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATCLIENT_H @@ -101,7 +114,7 @@ private: // Stats collecting stuff ClockObject _clock; - + typedef map ThingsByName; ThingsByName _threads_by_name; diff --git a/panda/src/pstatclient/pStatClientControlMessage.cxx b/panda/src/pstatclient/pStatClientControlMessage.cxx index 13151d2a47..e57d0357e6 100644 --- a/panda/src/pstatclient/pStatClientControlMessage.cxx +++ b/panda/src/pstatclient/pStatClientControlMessage.cxx @@ -1,6 +1,19 @@ // Filename: pStatClientControlMessage.cxx // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_pstats.h" @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// // Function: PStatClientControlMessage::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatClientControlMessage:: PStatClientControlMessage() { @@ -72,7 +85,7 @@ bool PStatClientControlMessage:: decode(const Datagram &datagram, PStatClientVersion *version) { DatagramIterator source(datagram); _type = (Type)source.get_uint8(); - + switch (_type) { case T_hello: _client_hostname = source.get_string(); diff --git a/panda/src/pstatclient/pStatClientControlMessage.h b/panda/src/pstatclient/pStatClientControlMessage.h index 273f9f979d..09dd7d0ce0 100644 --- a/panda/src/pstatclient/pStatClientControlMessage.h +++ b/panda/src/pstatclient/pStatClientControlMessage.h @@ -1,6 +1,19 @@ // Filename: pStatClientControlMessage.h // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATCLIENTCONTROLMESSAGE_H diff --git a/panda/src/pstatclient/pStatClientVersion.I b/panda/src/pstatclient/pStatClientVersion.I index d52801523b..b0a9b866a5 100644 --- a/panda/src/pstatclient/pStatClientVersion.I +++ b/panda/src/pstatclient/pStatClientVersion.I @@ -1,13 +1,26 @@ // Filename: pStatClientVersion.I // Created by: drose (21May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PStatClientVersion::get_major_version // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PStatClientVersion:: get_major_version() const { @@ -17,7 +30,7 @@ get_major_version() const { //////////////////////////////////////////////////////////////////// // Function: PStatClientVersion::get_minor_version // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PStatClientVersion:: get_minor_version() const { @@ -27,7 +40,7 @@ get_minor_version() const { //////////////////////////////////////////////////////////////////// // Function: PStatClientVersion::set_version // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PStatClientVersion:: set_version(int major, int minor) { diff --git a/panda/src/pstatclient/pStatClientVersion.cxx b/panda/src/pstatclient/pStatClientVersion.cxx index 855896bbb3..b22dfe8784 100644 --- a/panda/src/pstatclient/pStatClientVersion.cxx +++ b/panda/src/pstatclient/pStatClientVersion.cxx @@ -1,6 +1,19 @@ // Filename: pStatClientVersion.cxx // Created by: drose (21May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pStatClientVersion.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: PStatClientVersion::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatClientVersion:: PStatClientVersion() { diff --git a/panda/src/pstatclient/pStatClientVersion.h b/panda/src/pstatclient/pStatClientVersion.h index 1743750447..65146c6116 100644 --- a/panda/src/pstatclient/pStatClientVersion.h +++ b/panda/src/pstatclient/pStatClientVersion.h @@ -1,6 +1,19 @@ // Filename: pStatClientVersion.h // Created by: drose (21May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATCLIENTVERSION_H diff --git a/panda/src/pstatclient/pStatCollector.I b/panda/src/pstatclient/pStatCollector.I index 06c01fd165..ca2fcb3b61 100644 --- a/panda/src/pstatclient/pStatCollector.I +++ b/panda/src/pstatclient/pStatCollector.I @@ -1,6 +1,19 @@ // Filename: pStatCollector.I // Created by: drose (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -85,14 +98,14 @@ PStatCollector(const string &name, PStatClient *client) { INLINE PStatCollector:: PStatCollector(const PStatCollector &parent, const string &name) { nassertv(parent._client != (PStatClient *)NULL); - (*this) = + (*this) = parent._client->make_collector_with_relname(parent._index, name); } //////////////////////////////////////////////////////////////////// // Function: PStatCollector::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PStatCollector:: PStatCollector(const PStatCollector ©) : @@ -104,7 +117,7 @@ PStatCollector(const PStatCollector ©) : //////////////////////////////////////////////////////////////////// // Function: PStatCollector::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PStatCollector:: operator = (const PStatCollector ©) { diff --git a/panda/src/pstatclient/pStatCollector.h b/panda/src/pstatclient/pStatCollector.h index 84f8efe03a..59b928ce40 100644 --- a/panda/src/pstatclient/pStatCollector.h +++ b/panda/src/pstatclient/pStatCollector.h @@ -1,6 +1,19 @@ // Filename: pStatCollector.h // Created by: drose (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATCOLLECTOR_H @@ -19,7 +32,7 @@ // that may be timed and/or counted via stats. // // Collectors can be used to measure two different kinds -// of values: elapsed time, and "other". +// of values: elapsed time, and "other". // // To measure elapsed time, call start() and stop() as // appropriate to bracket the section of code you want @@ -45,7 +58,7 @@ private: INLINE PStatCollector(PStatClient *client, int index); public: - INLINE PStatCollector(const string &name, + INLINE PStatCollector(const string &name, PStatClient *client = NULL); INLINE PStatCollector(const PStatCollector &parent, const string &name); @@ -81,7 +94,7 @@ friend class PStatClient; #else // DO_PSTATS public: - INLINE PStatCollector(const string &, + INLINE PStatCollector(const string &, const RGBColorf & = RGBColorf::zero(), int = -1, PStatClient * = NULL) { } diff --git a/panda/src/pstatclient/pStatCollectorDef.cxx b/panda/src/pstatclient/pStatCollectorDef.cxx index f75f8f7bb0..f93288e51a 100644 --- a/panda/src/pstatclient/pStatCollectorDef.cxx +++ b/panda/src/pstatclient/pStatCollectorDef.cxx @@ -1,6 +1,19 @@ // Filename: pStatCollectorDef.cxx // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pStatCollectorDef.h" @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: PStatCollectorDef::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatCollectorDef:: PStatCollectorDef() { @@ -29,10 +42,10 @@ PStatCollectorDef() { //////////////////////////////////////////////////////////////////// // Function: PStatCollectorDef::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatCollectorDef:: -PStatCollectorDef(int index, const string &name) : +PStatCollectorDef(int index, const string &name) : _index(index), _name(name) { diff --git a/panda/src/pstatclient/pStatCollectorDef.h b/panda/src/pstatclient/pStatCollectorDef.h index d28fdff078..9d90a9f544 100644 --- a/panda/src/pstatclient/pStatCollectorDef.h +++ b/panda/src/pstatclient/pStatCollectorDef.h @@ -1,6 +1,19 @@ // Filename: pStatCollectorDef.h // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATCOLLECTORDEF_H diff --git a/panda/src/pstatclient/pStatFrameData.I b/panda/src/pstatclient/pStatFrameData.I index dbf8ce46ef..81789ba821 100644 --- a/panda/src/pstatclient/pStatFrameData.I +++ b/panda/src/pstatclient/pStatFrameData.I @@ -1,6 +1,19 @@ // Filename: pStatFrameData.I // Created by: drose (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pstatclient/pStatFrameData.cxx b/panda/src/pstatclient/pStatFrameData.cxx index 79a60039d5..baa1ba221c 100644 --- a/panda/src/pstatclient/pStatFrameData.cxx +++ b/panda/src/pstatclient/pStatFrameData.cxx @@ -1,6 +1,19 @@ // Filename: pStatFrameData.cxx // Created by: drose (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pStatFrameData.h" diff --git a/panda/src/pstatclient/pStatFrameData.h b/panda/src/pstatclient/pStatFrameData.h index b3dd94e290..aef09f8554 100644 --- a/panda/src/pstatclient/pStatFrameData.h +++ b/panda/src/pstatclient/pStatFrameData.h @@ -1,6 +1,19 @@ // Filename: pStatFrameData.h // Created by: drose (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATFRAMEDATA_H @@ -50,7 +63,7 @@ public: void write_datagram(Datagram &destination) const; void read_datagram(DatagramIterator &source, PStatClientVersion *version); -private: +private: class DataPoint { public: int _index; diff --git a/panda/src/pstatclient/pStatProperties.cxx b/panda/src/pstatclient/pStatProperties.cxx index eec56db1a7..850aa7b6ed 100644 --- a/panda/src/pstatclient/pStatProperties.cxx +++ b/panda/src/pstatclient/pStatProperties.cxx @@ -1,6 +1,19 @@ // Filename: pStatProperties.cxx // Created by: drose (17May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pStatProperties.h" @@ -137,7 +150,7 @@ static LevelCollectorProperties level_properties[] = { { 0, NULL } }; - + //////////////////////////////////////////////////////////////////// // Function: initialize_collector_def_from_table // Description: Looks up the collector in the compiled-in table @@ -149,7 +162,7 @@ initialize_collector_def_from_table(const string &fullname, PStatCollectorDef *d int i; for (i = 0; - time_properties[i].name != (const char *)NULL; + time_properties[i].name != (const char *)NULL; i++) { const TimeCollectorProperties &tp = time_properties[i]; if (fullname == tp.name) { @@ -166,7 +179,7 @@ initialize_collector_def_from_table(const string &fullname, PStatCollectorDef *d } for (i = 0; - level_properties[i].name != (const char *)NULL; + level_properties[i].name != (const char *)NULL; i++) { const LevelCollectorProperties &lp = level_properties[i]; if (fullname == lp.name) { @@ -189,7 +202,7 @@ initialize_collector_def_from_table(const string &fullname, PStatCollectorDef *d } } - + //////////////////////////////////////////////////////////////////// // Function: initialize_collector_def // Description: This is the only accessor function into this table. @@ -257,7 +270,7 @@ initialize_collector_def(PStatClient *client, PStatCollectorDef *def) { // Get and decode the color string. We allow any three // floating-point numbers, with any kind of non-digit characters // between them. - string color_str = + string color_str = config_pstats.GetString("pstats-color-" + config_name, ""); if (!color_str.empty()) { const char *cstr = color_str.c_str(); diff --git a/panda/src/pstatclient/pStatProperties.h b/panda/src/pstatclient/pStatProperties.h index a6724f0dd2..47e59080cf 100644 --- a/panda/src/pstatclient/pStatProperties.h +++ b/panda/src/pstatclient/pStatProperties.h @@ -1,6 +1,19 @@ // Filename: pStatProperties.h // Created by: drose (17May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATPROPERTIES_H diff --git a/panda/src/pstatclient/pStatServerControlMessage.cxx b/panda/src/pstatclient/pStatServerControlMessage.cxx index bc7be69e54..877876d63a 100644 --- a/panda/src/pstatclient/pStatServerControlMessage.cxx +++ b/panda/src/pstatclient/pStatServerControlMessage.cxx @@ -1,6 +1,19 @@ // Filename: pStatServerControlMessage.cxx // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_pstats.h" @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: PStatServerControlMessage::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PStatServerControlMessage:: PStatServerControlMessage() { @@ -51,7 +64,7 @@ bool PStatServerControlMessage:: decode(const Datagram &datagram) { DatagramIterator source(datagram); _type = (Type)source.get_uint8(); - + switch (_type) { case T_hello: _server_hostname = source.get_string(); diff --git a/panda/src/pstatclient/pStatServerControlMessage.h b/panda/src/pstatclient/pStatServerControlMessage.h index 0c8aae2fc0..1e011e3e2e 100644 --- a/panda/src/pstatclient/pStatServerControlMessage.h +++ b/panda/src/pstatclient/pStatServerControlMessage.h @@ -1,6 +1,19 @@ // Filename: pStatServerControlMessage.h // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATSERVERCONTROLMESSAGE_H diff --git a/panda/src/pstatclient/pStatThread.I b/panda/src/pstatclient/pStatThread.I index 45c72ed472..5d0118cb5f 100644 --- a/panda/src/pstatclient/pStatThread.I +++ b/panda/src/pstatclient/pStatThread.I @@ -1,6 +1,19 @@ // Filename: pStatThread.I // Created by: drose (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -55,7 +68,7 @@ PStatThread(const string &name, PStatClient *client) { //////////////////////////////////////////////////////////////////// // Function: PStatThread::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PStatThread:: PStatThread(const PStatThread ©) : @@ -67,7 +80,7 @@ PStatThread(const PStatThread ©) : //////////////////////////////////////////////////////////////////// // Function: PStatThread::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PStatThread:: operator = (const PStatThread ©) { diff --git a/panda/src/pstatclient/pStatThread.h b/panda/src/pstatclient/pStatThread.h index 8e050e7906..95c203fcf3 100644 --- a/panda/src/pstatclient/pStatThread.h +++ b/panda/src/pstatclient/pStatThread.h @@ -1,6 +1,19 @@ // Filename: pStatThread.h // Created by: drose (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATTHREAD_H diff --git a/panda/src/pstatclient/pStatTimer.I b/panda/src/pstatclient/pStatTimer.I index 2509ea8b08..824a5a719e 100644 --- a/panda/src/pstatclient/pStatTimer.I +++ b/panda/src/pstatclient/pStatTimer.I @@ -1,6 +1,19 @@ // Filename: pStatTimer.I // Created by: drose (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -9,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: PStatTimer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PStatTimer:: PStatTimer(PStatCollector &collector) : @@ -21,7 +34,7 @@ PStatTimer(PStatCollector &collector) : //////////////////////////////////////////////////////////////////// // Function: PStatTimer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PStatTimer:: ~PStatTimer() { diff --git a/panda/src/pstatclient/pStatTimer.h b/panda/src/pstatclient/pStatTimer.h index 61a815b913..76a8efd869 100644 --- a/panda/src/pstatclient/pStatTimer.h +++ b/panda/src/pstatclient/pStatTimer.h @@ -1,6 +1,19 @@ // Filename: pStatTimer.h // Created by: drose (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PSTATTIMER_H diff --git a/panda/src/pstatclient/test_client.cxx b/panda/src/pstatclient/test_client.cxx index c9ac434bf2..0295dc88e4 100644 --- a/panda/src/pstatclient/test_client.cxx +++ b/panda/src/pstatclient/test_client.cxx @@ -1,6 +1,19 @@ // Filename: test_client.cxx // Created by: drose (09Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_pstats.h" @@ -69,7 +82,7 @@ public: float _time; int _index; bool _start; - + bool operator < (const WaitRequest &other) const { return _time < other._time; } @@ -104,7 +117,7 @@ main(int argc, char *argv[]) { nout << "Couldn't connect.\n"; exit(1); } - + srand(time(NULL)); int ds_index; @@ -131,7 +144,7 @@ main(int argc, char *argv[]) { } i++; } - + while (!user_interrupted && client->is_connected()) { client->get_main_thread().new_frame(); @@ -151,23 +164,23 @@ main(int argc, char *argv[]) { } else { // A bit of random jitter so the collectors might overlap some. float jitter_ms = (5.0 * rand() / (RAND_MAX + 1.0)); - + WaitRequest wr; wr._time = now + jitter_ms / 1000.0; wr._index = i; wr._start = true; wait.push_back(wr); - + float ms_range = ds[i].max_ms - ds[i].min_ms; - float ms = (float)ds[i].min_ms + + float ms = (float)ds[i].min_ms + (ms_range * rand() / (RAND_MAX + 1.0)); now += ms / 1000.0; total_ms += ms; - + wr._time = now + jitter_ms / 1000.0; wr._start = false; wait.push_back(wr); - } + } } // Put the wait requests in order, to allow for the jitter, and @@ -185,7 +198,7 @@ main(int argc, char *argv[]) { // Now actually wait some approximation of the time we said we // did. - PRIntervalTime sleep_timeout = + PRIntervalTime sleep_timeout = PR_MillisecondsToInterval((int)total_ms + 5); PR_Sleep(sleep_timeout); } diff --git a/panda/src/putil/bam.h b/panda/src/putil/bam.h index 2b0d096e74..41b945b2fa 100644 --- a/panda/src/putil/bam.h +++ b/panda/src/putil/bam.h @@ -1,6 +1,19 @@ // Filename: bam.h // Created by: jason (27Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //This file just holds the Magic Number, Major and Minor version diff --git a/panda/src/putil/bamReader.I b/panda/src/putil/bamReader.I index 27918226c1..2ce277f4a3 100644 --- a/panda/src/putil/bamReader.I +++ b/panda/src/putil/bamReader.I @@ -1,6 +1,20 @@ // Filename: bamReader.I // Created by: jason (12Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -94,7 +108,7 @@ create_factory() { // into any TypedWritable's make function, and parses // out the datagram that contatins the data it needs to // construct itself, and parses out the pointer to the -// managing BamReader object +// managing BamReader object //////////////////////////////////////////////////////////////////// INLINE void parse_params(const FactoryParams ¶ms, diff --git a/panda/src/putil/bamReader.cxx b/panda/src/putil/bamReader.cxx index 702e2b6ce2..217eb56614 100644 --- a/panda/src/putil/bamReader.cxx +++ b/panda/src/putil/bamReader.cxx @@ -1,6 +1,20 @@ // Filename: bamReader.cxx // Created by: jason (12Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include @@ -21,10 +35,10 @@ const int BamReader::_cur_minor = _bam_minor_ver; //////////////////////////////////////////////////////////////////// // Function: BamReader::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BamReader:: -BamReader(DatagramGenerator *generator) +BamReader(DatagramGenerator *generator) : _source(generator) { _num_extra_objects = 0; @@ -35,7 +49,7 @@ BamReader(DatagramGenerator *generator) //////////////////////////////////////////////////////////////////// // Function: BamReader::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BamReader:: ~BamReader() { @@ -79,20 +93,20 @@ init() { if (_bam_minor_ver == 0) { bam_cat.error() - << "This program can only load version " + << "This program can only load version " << _bam_major_ver << ".0 bams.\n"; } else { bam_cat.error() - << "This program can only load version " - << _bam_major_ver << ".0 through " + << "This program can only load version " + << _bam_major_ver << ".0 through " << _bam_major_ver << "." << _bam_minor_ver << " bams.\n"; } - + return false; } if (bam_cat.is_debug()) { - bam_cat.debug() + bam_cat.debug() << "Bam file is version " << _file_major << "." << _file_minor << ".\n"; if (_file_minor != _bam_minor_ver) { @@ -156,9 +170,9 @@ read_object() { } CreatedObjs::iterator oi = _created_objs.find(object_id); - + if (oi == _created_objs.end()) { - bam_cat.error() + bam_cat.error() << "Undefined object encountered!\n"; return (TypedWritable *)NULL; @@ -171,7 +185,7 @@ read_object() { << "Returning object of type " << object->get_type() << "\n"; } } - + return object; } } @@ -200,7 +214,7 @@ resolve() { // Walk through all the objects that still have outstanding pointers. Requests::iterator ri; - ri = _deferred_pointers.begin(); + ri = _deferred_pointers.begin(); while (ri != _deferred_pointers.end()) { TypedWritable *whom = (*ri).first; const vector_ushort &pointers = (*ri).second; @@ -283,7 +297,7 @@ read_handle(DatagramIterator &scan) { // Here's the index number. int id = scan.get_uint16(); - + if (id == 0) { // Index number 0 is always, by convention, TypeHandle::none(). return TypeHandle::none(); @@ -327,12 +341,12 @@ read_handle(DatagramIterator &scan) { } else { if (type.get_parent_towards(parent_type) != parent_type) { bam_cat.warning() - << "Bam file indicates a derivation of " << type + << "Bam file indicates a derivation of " << type << " from " << parent_type << " which is no longer true.\n"; } } } - + bool inserted = _index_map.insert(IndexMap::value_type(id, type)).second; nassertr(inserted, type); @@ -444,7 +458,7 @@ register_finalize(TypedWritable *whom) { void BamReader:: finalize_now(TypedWritable *whom) { nassertv(whom != (TypedWritable *)NULL); - + Finalize::iterator fi = _finalize_list.find(whom); if (fi != _finalize_list.end()) { _finalize_list.erase(fi); @@ -584,11 +598,11 @@ p_read_object() { // that in case this function is called recursively during the // object's factory constructor, we will have some definition for // the object. It doesn't matter yet what the pointer is. - CreatedObjs::iterator oi = + CreatedObjs::iterator oi = _created_objs.insert(CreatedObjs::value_type(object_id, NULL)).first; // Now we can call the factory to create the object. - TypedWritable *object = + TypedWritable *object = _factory->make_instance_more_general(type, fparams); // And now we can store the new object pointer in the map. @@ -596,7 +610,7 @@ p_read_object() { //Just some sanity checks if (object == (TypedWritable *)NULL) { - bam_cat.error() + bam_cat.error() << "Unable to create an object of type " << type << endl; } else if (object->get_type() != type) { diff --git a/panda/src/putil/bamReader.h b/panda/src/putil/bamReader.h index ae55b78c1c..efdd276acf 100644 --- a/panda/src/putil/bamReader.h +++ b/panda/src/putil/bamReader.h @@ -1,6 +1,20 @@ // Filename: bamReader.h // Created by: jason (12Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __BAM_READER_ #define __BAM_READER_ @@ -104,7 +118,7 @@ public: void register_pta(void *ptr); TypeHandle read_handle(DatagramIterator &scan); - + public: INLINE static WritableFactory *get_factory(); diff --git a/panda/src/putil/bamReaderParam.I b/panda/src/putil/bamReaderParam.I index 5d76f8fe2a..e60378ba0c 100644 --- a/panda/src/putil/bamReaderParam.I +++ b/panda/src/putil/bamReaderParam.I @@ -1,6 +1,19 @@ // Filename: bamReaderParam.I // Created by: jason (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: BamReaderParam::get_iterator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const DatagramIterator &BamReaderParam:: get_iterator() { @@ -18,7 +31,7 @@ get_iterator() { //////////////////////////////////////////////////////////////////// // Function: BamReaderParam::get_manager // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BamReader *BamReaderParam:: get_manager() { @@ -29,7 +42,7 @@ get_manager() { //////////////////////////////////////////////////////////////////// // Function: BamReaderParam::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BamReaderParam:: BamReaderParam(const DatagramIterator &dgi, BamReader *manager) : @@ -41,7 +54,7 @@ BamReaderParam(const DatagramIterator &dgi, BamReader *manager) : //////////////////////////////////////////////////////////////////// // Function: BamReaderParam::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BamReaderParam:: ~BamReaderParam() { diff --git a/panda/src/putil/bamReaderParam.cxx b/panda/src/putil/bamReaderParam.cxx index e123d2d8b8..1d132f8cc3 100644 --- a/panda/src/putil/bamReaderParam.cxx +++ b/panda/src/putil/bamReaderParam.cxx @@ -1,6 +1,19 @@ // Filename: bamReaderParam.cxx // Created by: jason (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "bamReaderParam.h" diff --git a/panda/src/putil/bamReaderParam.h b/panda/src/putil/bamReaderParam.h index c7bd0db483..7a6ad2925f 100644 --- a/panda/src/putil/bamReaderParam.h +++ b/panda/src/putil/bamReaderParam.h @@ -1,6 +1,19 @@ // Filename: bamReaderParam.h // Created by: jason (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BAMREADERPARAM_H diff --git a/panda/src/putil/bamWriter.I b/panda/src/putil/bamWriter.I index bfa1110328..b8ea8830d3 100644 --- a/panda/src/putil/bamWriter.I +++ b/panda/src/putil/bamWriter.I @@ -1,3 +1,17 @@ // Filename: bamWriter.I // Created by: jason (08Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/bamWriter.cxx b/panda/src/putil/bamWriter.cxx index 800885cb60..2db9f11e1b 100644 --- a/panda/src/putil/bamWriter.cxx +++ b/panda/src/putil/bamWriter.cxx @@ -1,6 +1,20 @@ // Filename: bamWriter.cxx // Created by: jason (08Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include @@ -12,10 +26,10 @@ //////////////////////////////////////////////////////////////////// // Function: BamWriter::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BamWriter:: -BamWriter(DatagramSink *sink) : +BamWriter(DatagramSink *sink) : _target(sink) { } @@ -23,7 +37,7 @@ BamWriter(DatagramSink *sink) : //////////////////////////////////////////////////////////////////// // Function: BamWriter::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// BamWriter:: ~BamWriter() { @@ -132,7 +146,7 @@ write_object(TypedWritable *object) { } if (!_target->put_datagram(dg)) { - util_cat.error() + util_cat.error() << "Unable to write datagram to file.\n"; return false; } @@ -212,32 +226,32 @@ register_pta(Datagram &packet, void *ptr) { // PointerToArray, this will generally be simply a zero element // count. return false; - } + } PTAMap::iterator pi = _pta_map.find(ptr); if (pi == _pta_map.end()) { // We have not encountered this pointer before. int pta_id = _next_pta_id; _next_pta_id++; - + // Make sure our PTA ID will fit within the PN_uint16 we have // allocated for it. nassertr(pta_id <= 65535, 0); - + bool inserted = _pta_map.insert(PTAMap::value_type(ptr, pta_id)).second; nassertr(inserted, false); - + packet.add_uint16(pta_id); - + // Return false to indicate the caller must now write out the // array definition. return false; - + } else { // We have encountered this pointer before. int pta_id = (*pi).second; packet.add_uint16(pta_id); - + // Return true to indicate the caller need do nothing further. return true; } @@ -275,7 +289,7 @@ write_handle(Datagram &packet, TypeHandle type) { // This is the first time this TypeHandle has been written, so // also write out its definition. packet.add_string(type.get_name()); - + // We also need to write the derivation of the TypeHandle, in case // the program reading this file later has never heard of this // type before. @@ -293,7 +307,7 @@ write_handle(Datagram &packet, TypeHandle type) { // Function: BamWriter::enqueue_object // Access: Private // Description: Assigns an object ID to the object and queues it up -// for later writing to the Bam file. +// for later writing to the Bam file. // // The return value is the object ID, or 0 if there is // an error. @@ -320,12 +334,12 @@ enqueue_object(TypedWritable *object) { // arbitrarily. object_id = _next_object_id; already_written = false; - + // Make sure our object ID will fit within the PN_uint16 we have // allocated for it. nassertr(object_id <= 65535, 0); - bool inserted = + bool inserted = _state_map.insert(StateMap::value_type(object, StoreState(_next_object_id))).second; nassertr(inserted, false); _next_object_id++; diff --git a/panda/src/putil/bamWriter.h b/panda/src/putil/bamWriter.h index e8da72eef6..b7fcdb4574 100644 --- a/panda/src/putil/bamWriter.h +++ b/panda/src/putil/bamWriter.h @@ -1,6 +1,20 @@ // Filename: bamWriter.h // Created by: jason (08Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __BAM_WRITER_ #define __BAM_WRITER_ @@ -61,7 +75,7 @@ public: ~BamWriter(); // The primary interface for a caller. - + bool init(); bool write_object(TypedWritable *obj); @@ -86,7 +100,7 @@ private: public: int _object_id; bool _written; - + StoreState(int object_id) : _object_id(object_id), _written(false) {} }; typedef map StateMap; diff --git a/panda/src/putil/bitMask.I b/panda/src/putil/bitMask.I index 1308da3c38..9af2dbe96e 100644 --- a/panda/src/putil/bitMask.I +++ b/panda/src/putil/bitMask.I @@ -1,6 +1,19 @@ // Filename: bitMask.I // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// template @@ -9,7 +22,7 @@ TypeHandle BitMask::_type_handle; //////////////////////////////////////////////////////////////////// // Function: BitMask::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask:: @@ -21,7 +34,7 @@ BitMask() : //////////////////////////////////////////////////////////////////// // Function: BitMask::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask:: @@ -33,7 +46,7 @@ BitMask(WordType init_value) : //////////////////////////////////////////////////////////////////// // Function: BitMask::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask:: @@ -45,7 +58,7 @@ BitMask(const BitMask ©) : //////////////////////////////////////////////////////////////////// // Function: BitMask::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void BitMask:: @@ -113,7 +126,7 @@ bit(int index) { //////////////////////////////////////////////////////////////////// // Function: BitMask::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask:: @@ -212,7 +225,7 @@ extract(int low_bit, int size) const { template INLINE void BitMask:: store(WordType value, int low_bit, int size) { - WordType mask = + WordType mask = BitMask::lower_on(size)._word << low_bit; _word = (_word & ~mask) | ((value << low_bit) & mask); } @@ -334,7 +347,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator == // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool BitMask:: @@ -345,7 +358,7 @@ operator == (const BitMask &other) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator != // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool BitMask:: @@ -393,7 +406,7 @@ compare_to(const BitMask &other) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator & // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask BitMask:: @@ -406,7 +419,7 @@ operator & (const BitMask &other) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator | // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask BitMask:: @@ -419,7 +432,7 @@ operator | (const BitMask &other) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator ^ // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask BitMask:: @@ -432,7 +445,7 @@ operator ^ (const BitMask &other) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator ~ // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask BitMask:: @@ -445,7 +458,7 @@ operator ~ () const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator << // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask BitMask:: @@ -458,7 +471,7 @@ operator << (int shift) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator >> // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE BitMask BitMask:: @@ -471,7 +484,7 @@ operator >> (int shift) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator &= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void BitMask:: @@ -482,7 +495,7 @@ operator &= (const BitMask &other) { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator |= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void BitMask:: @@ -493,7 +506,7 @@ operator |= (const BitMask &other) { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator ^= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void BitMask:: @@ -504,7 +517,7 @@ operator ^= (const BitMask &other) { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator <<= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void BitMask:: @@ -515,7 +528,7 @@ operator <<= (int shift) { //////////////////////////////////////////////////////////////////// // Function: BitMask::operator >>= // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void BitMask:: @@ -537,7 +550,7 @@ generate_hash(ChecksumHashGenerator &hash) const { //////////////////////////////////////////////////////////////////// // Function: BitMask::init_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template void BitMask:: diff --git a/panda/src/putil/bitMask.cxx b/panda/src/putil/bitMask.cxx index 749ec616d8..a63036cfeb 100644 --- a/panda/src/putil/bitMask.cxx +++ b/panda/src/putil/bitMask.cxx @@ -1,6 +1,19 @@ // Filename: bitMask.cxx // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "bitMask.h" diff --git a/panda/src/putil/bitMask.h b/panda/src/putil/bitMask.h index 0b8c2b3976..dc50c3aa60 100644 --- a/panda/src/putil/bitMask.h +++ b/panda/src/putil/bitMask.h @@ -1,6 +1,19 @@ // Filename: bitMask.h // Created by: drose (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BITMASK_H @@ -60,22 +73,22 @@ PUBLISHED: INLINE bool operator < (const BitMask &other) const; INLINE int compare_to(const BitMask &other) const; - INLINE BitMask + INLINE BitMask operator & (const BitMask &other) const; - INLINE BitMask + INLINE BitMask operator | (const BitMask &other) const; - INLINE BitMask + INLINE BitMask operator ^ (const BitMask &other) const; - INLINE BitMask + INLINE BitMask operator ~ () const; - INLINE BitMask + INLINE BitMask operator << (int shift) const; - INLINE BitMask + INLINE BitMask operator >> (int shift) const; INLINE void operator &= (const BitMask &other); diff --git a/panda/src/putil/buttonEvent.I b/panda/src/putil/buttonEvent.I index 8b5423bceb..09ba6edc40 100644 --- a/panda/src/putil/buttonEvent.I +++ b/panda/src/putil/buttonEvent.I @@ -1,13 +1,26 @@ // Filename: buttonEvent.I // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::Default Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEvent:: ButtonEvent() : @@ -19,7 +32,7 @@ ButtonEvent() : //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEvent:: ButtonEvent(ButtonHandle button, bool down) : @@ -31,7 +44,7 @@ ButtonEvent(ButtonHandle button, bool down) : //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonEvent:: ButtonEvent(const ButtonEvent ©) : @@ -43,7 +56,7 @@ ButtonEvent(const ButtonEvent ©) : //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ButtonEvent:: operator = (const ButtonEvent ©) { @@ -54,7 +67,7 @@ operator = (const ButtonEvent ©) { //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ButtonEvent:: operator == (const ButtonEvent &other) const { @@ -65,7 +78,7 @@ operator == (const ButtonEvent &other) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ButtonEvent:: operator != (const ButtonEvent &other) const { @@ -75,7 +88,7 @@ operator != (const ButtonEvent &other) const { //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ButtonEvent:: operator < (const ButtonEvent &other) const { diff --git a/panda/src/putil/buttonEvent.cxx b/panda/src/putil/buttonEvent.cxx index 3d7342e8f0..d5dc184607 100644 --- a/panda/src/putil/buttonEvent.cxx +++ b/panda/src/putil/buttonEvent.cxx @@ -1,6 +1,19 @@ // Filename: buttonEvent.cxx // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "buttonEvent.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: ButtonEvent::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ButtonEvent:: output(ostream &out) const { diff --git a/panda/src/putil/buttonEvent.h b/panda/src/putil/buttonEvent.h index 59a070d7b1..1476489ced 100644 --- a/panda/src/putil/buttonEvent.h +++ b/panda/src/putil/buttonEvent.h @@ -1,6 +1,19 @@ // Filename: buttonEvent.h // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BUTTONEVENT_H diff --git a/panda/src/putil/buttonHandle.I b/panda/src/putil/buttonHandle.I index b6c29ae567..a59e75ba38 100644 --- a/panda/src/putil/buttonHandle.I +++ b/panda/src/putil/buttonHandle.I @@ -1,6 +1,19 @@ // Filename: buttonHandle.I // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -14,22 +27,22 @@ // previously by another static initializer! //////////////////////////////////////////////////////////////////// INLINE ButtonHandle:: -ButtonHandle() { +ButtonHandle() { } //////////////////////////////////////////////////////////////////// // Function: ButtonHandle::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonHandle:: -ButtonHandle(const ButtonHandle ©) : _index(copy._index) { +ButtonHandle(const ButtonHandle ©) : _index(copy._index) { } - + //////////////////////////////////////////////////////////////////// // Function: ButtonHandle::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ButtonHandle:: operator == (const ButtonHandle &other) const { @@ -39,7 +52,7 @@ operator == (const ButtonHandle &other) const { //////////////////////////////////////////////////////////////////// // Function: ButtonHandle::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ButtonHandle:: operator != (const ButtonHandle &other) const { @@ -49,7 +62,7 @@ operator != (const ButtonHandle &other) const { //////////////////////////////////////////////////////////////////// // Function: ButtonHandle::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ButtonHandle:: operator < (const ButtonHandle &other) const { diff --git a/panda/src/putil/buttonHandle.cxx b/panda/src/putil/buttonHandle.cxx index a5d1cac1d5..1246dc0f88 100644 --- a/panda/src/putil/buttonHandle.cxx +++ b/panda/src/putil/buttonHandle.cxx @@ -1,6 +1,19 @@ // Filename: buttonHandle.cxx // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "buttonHandle.h" diff --git a/panda/src/putil/buttonHandle.h b/panda/src/putil/buttonHandle.h index 6da876ec50..c45f7c35a6 100644 --- a/panda/src/putil/buttonHandle.h +++ b/panda/src/putil/buttonHandle.h @@ -1,6 +1,19 @@ // Filename: buttonHandle.h // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BUTTONHANDLE_H @@ -20,7 +33,7 @@ PUBLISHED: public: INLINE ButtonHandle(const ButtonHandle ©); - + INLINE bool operator == (const ButtonHandle &other) const; INLINE bool operator != (const ButtonHandle &other) const; INLINE bool operator < (const ButtonHandle &other) const; diff --git a/panda/src/putil/buttonRegistry.I b/panda/src/putil/buttonRegistry.I index 1ff6b16a1f..c937ed1d11 100644 --- a/panda/src/putil/buttonRegistry.I +++ b/panda/src/putil/buttonRegistry.I @@ -1,6 +1,19 @@ // Filename: buttonRegistry.I // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,11 +21,11 @@ //////////////////////////////////////////////////////////////////// // Function: ButtonRegistry::RegistryNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ButtonRegistry::RegistryNode:: RegistryNode(ButtonHandle handle, const string &name) : - _handle(handle), _name(name) { + _handle(handle), _name(name) { } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/buttonRegistry.cxx b/panda/src/putil/buttonRegistry.cxx index 9bf8514d80..e8528e59f3 100644 --- a/panda/src/putil/buttonRegistry.cxx +++ b/panda/src/putil/buttonRegistry.cxx @@ -1,6 +1,19 @@ // Filename: buttonRegistry.cxx // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "buttonRegistry.h" @@ -31,7 +44,7 @@ ButtonRegistry *ButtonRegistry::_global_pointer = NULL; //////////////////////////////////////////////////////////////////// bool ButtonRegistry:: register_button(ButtonHandle &button_handle, const string &name, - char ascii_equivalent) { + char ascii_equivalent) { NameRegistry::iterator ri; ri = _name_registry.find(name); @@ -49,7 +62,7 @@ register_button(ButtonHandle &button_handle, const string &name, << ascii_equivalent << "\n"; } } - + #ifdef NOTIFY_DEBUG // This code runs at static init time, so cannot use the // util_cat.is_spam() syntax. @@ -58,13 +71,13 @@ register_button(ButtonHandle &button_handle, const string &name, << "Registering button " << name << "\n"; } #endif - + if (index == -1) { // It's not an ASCII equivalent; make up a new number. index = _handle_registry.size(); _handle_registry.push_back(NULL); } - + ButtonHandle new_handle; new_handle._index = index; @@ -78,7 +91,7 @@ register_button(ButtonHandle &button_handle, const string &name, RegistryNode *rnode = (*ri).second; nassertr(rnode->_name == (*ri).first, false); - nassertr(rnode->_handle._index >= 0 && + nassertr(rnode->_handle._index >= 0 && rnode->_handle._index < (int)_handle_registry.size(), false); nassertr(_handle_registry[rnode->_handle._index] == rnode, false); nassertr(rnode->_handle._index != 0, false); @@ -133,7 +146,7 @@ find_ascii_button(char ascii_equivalent) const { //////////////////////////////////////////////////////////////////// // Function: ButtonRegistry::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ButtonRegistry:: write(ostream &out) const { @@ -160,7 +173,7 @@ write(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: ButtonRegistry::Constructor // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// ButtonRegistry:: ButtonRegistry() { @@ -190,7 +203,7 @@ init_global_pointer() { //////////////////////////////////////////////////////////////////// // Function: ButtonRegistry::look_up // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// ButtonRegistry::RegistryNode *ButtonRegistry:: look_up(ButtonHandle handle) const { @@ -199,7 +212,7 @@ look_up(ButtonHandle handle) const { if (handle._index < 0 || handle._index >= (int)_handle_registry.size()) { util_cat->fatal() - << "Invalid ButtonHandle index " << handle._index + << "Invalid ButtonHandle index " << handle._index << "! Is memory corrupt?\n"; return (RegistryNode *)NULL; } diff --git a/panda/src/putil/buttonRegistry.h b/panda/src/putil/buttonRegistry.h index b793201aee..310ff7a6c4 100644 --- a/panda/src/putil/buttonRegistry.h +++ b/panda/src/putil/buttonRegistry.h @@ -1,6 +1,19 @@ // Filename: buttonRegistry.h // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef BUTTONREGISTRY_H diff --git a/panda/src/putil/collideMask.h b/panda/src/putil/collideMask.h index 11a6a9685d..3bd8561ab4 100644 --- a/panda/src/putil/collideMask.h +++ b/panda/src/putil/collideMask.h @@ -1,6 +1,19 @@ // Filename: collideMask.h // Created by: drose (03Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLLIDEMASK_H diff --git a/panda/src/putil/config_util.cxx b/panda/src/putil/config_util.cxx index a51fdd8e9e..80c2275add 100644 --- a/panda/src/putil/config_util.cxx +++ b/panda/src/putil/config_util.cxx @@ -1,6 +1,19 @@ // Filename: config_util.cxx // Created by: cary (04Jan00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_util.h" diff --git a/panda/src/putil/config_util.h b/panda/src/putil/config_util.h index c3b6ec9d01..9a76aeb499 100644 --- a/panda/src/putil/config_util.h +++ b/panda/src/putil/config_util.h @@ -2,6 +2,19 @@ // Created by: cary (04Jan00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CONFIG_UTIL_H__ #define __CONFIG_UTIL_H__ diff --git a/panda/src/putil/configurable.cxx b/panda/src/putil/configurable.cxx index 3effc4d1de..d05d2f0af0 100644 --- a/panda/src/putil/configurable.cxx +++ b/panda/src/putil/configurable.cxx @@ -1,6 +1,19 @@ // Filename: configurable.cxx // Created by: drose (15Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "configurable.h" diff --git a/panda/src/putil/configurable.h b/panda/src/putil/configurable.h index db98d277b0..99dcbf69cb 100644 --- a/panda/src/putil/configurable.h +++ b/panda/src/putil/configurable.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIGURABLE_H #define CONFIGURABLE_H // diff --git a/panda/src/putil/factory.I b/panda/src/putil/factory.I index 81232072e1..22a162f2d1 100644 --- a/panda/src/putil/factory.I +++ b/panda/src/putil/factory.I @@ -1,6 +1,19 @@ // Filename: factory.I // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -65,7 +78,7 @@ make_instance_more_general(TypeHandle handle, const FactoryParams ¶ms) { //////////////////////////////////////////////////////////////////// template INLINE Type *Factory:: -make_instance_more_general(const string &type_name, +make_instance_more_general(const string &type_name, const FactoryParams ¶ms) { return (Type *)FactoryBase::make_instance_more_general(type_name, params); } diff --git a/panda/src/putil/factory.h b/panda/src/putil/factory.h index a5ada22113..073025d3c6 100644 --- a/panda/src/putil/factory.h +++ b/panda/src/putil/factory.h @@ -1,6 +1,19 @@ // Filename: factory.h // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FACTORY_H @@ -33,14 +46,14 @@ class Factory : public FactoryBase { public: typedef Type *CreateFunc(const FactoryParams ¶ms); - INLINE Type *make_instance(TypeHandle handle, + INLINE Type *make_instance(TypeHandle handle, const FactoryParams ¶ms = FactoryParams()); INLINE Type *make_instance(const string &type_name, const FactoryParams ¶ms = FactoryParams()); INLINE Type * - make_instance_more_general(TypeHandle handle, + make_instance_more_general(TypeHandle handle, const FactoryParams ¶ms = FactoryParams()); INLINE Type * diff --git a/panda/src/putil/factoryBase.I b/panda/src/putil/factoryBase.I index 260fa44d3e..8293020c05 100644 --- a/panda/src/putil/factoryBase.I +++ b/panda/src/putil/factoryBase.I @@ -1,6 +1,19 @@ -// Filename: factory.I +// Filename: factoryBase.I // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -39,7 +52,7 @@ make_instance(const string &type_name, const FactoryParams ¶ms) { // be the name of some already-registered type. //////////////////////////////////////////////////////////////////// INLINE TypedObject *FactoryBase:: -make_instance_more_general(const string &type_name, +make_instance_more_general(const string &type_name, const FactoryParams ¶ms) { TypeHandle handle = TypeRegistry::ptr()->find_type(type_name); nassertr(handle != TypeHandle::none(), NULL); diff --git a/panda/src/putil/factoryBase.cxx b/panda/src/putil/factoryBase.cxx index dce6dc795c..bdcc412b63 100644 --- a/panda/src/putil/factoryBase.cxx +++ b/panda/src/putil/factoryBase.cxx @@ -1,6 +1,19 @@ -// Filename: factory.cxx +// Filename: factoryBase.cxx // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "factoryBase.h" @@ -10,16 +23,16 @@ //////////////////////////////////////////////////////////////////// // Function: FactoryBase::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// FactoryBase:: -FactoryBase() { +FactoryBase() { } //////////////////////////////////////////////////////////////////// // Function: FactoryBase::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// FactoryBase:: ~FactoryBase() { @@ -280,7 +293,7 @@ make_instance_more_specific(TypeHandle handle, const FactoryParams ¶ms) { if (object != (TypedObject *)NULL) { return object; } - } + } } return NULL; diff --git a/panda/src/putil/factoryBase.h b/panda/src/putil/factoryBase.h index 5e09a10eeb..730c57f461 100644 --- a/panda/src/putil/factoryBase.h +++ b/panda/src/putil/factoryBase.h @@ -1,7 +1,20 @@ -// Filename: factory.h +// Filename: factoryBase.h // Created by: cary (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FACTORYBASE_H #define FACTORYBASE_H @@ -38,7 +51,7 @@ public: FactoryBase(); ~FactoryBase(); - TypedObject *make_instance(TypeHandle handle, + TypedObject *make_instance(TypeHandle handle, const FactoryParams ¶ms); INLINE TypedObject *make_instance(const string &type_name, @@ -68,7 +81,7 @@ private: void operator = (const FactoryBase ©); // internal utility functions - TypedObject *make_instance_exact(TypeHandle handle, + TypedObject *make_instance_exact(TypeHandle handle, const FactoryParams ¶ms); TypedObject *make_instance_more_specific(TypeHandle handle, const FactoryParams ¶ms); diff --git a/panda/src/putil/factoryParam.I b/panda/src/putil/factoryParam.I index 707cc67aaf..f584f852a3 100644 --- a/panda/src/putil/factoryParam.I +++ b/panda/src/putil/factoryParam.I @@ -1,12 +1,25 @@ // Filename: factoryParam.I // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: FactoryParams::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FactoryParam:: FactoryParam() { @@ -15,7 +28,7 @@ FactoryParam() { //////////////////////////////////////////////////////////////////// // Function: FactoryParams::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FactoryParam:: FactoryParam(const FactoryParam &) { @@ -24,7 +37,7 @@ FactoryParam(const FactoryParam &) { //////////////////////////////////////////////////////////////////// // Function: FactoryParams::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void FactoryParam:: operator = (const FactoryParam &) { @@ -33,7 +46,7 @@ operator = (const FactoryParam &) { //////////////////////////////////////////////////////////////////// // Function: FactoryParams::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FactoryParam:: ~FactoryParam() { diff --git a/panda/src/putil/factoryParam.cxx b/panda/src/putil/factoryParam.cxx index c2995c91bc..e46b717743 100644 --- a/panda/src/putil/factoryParam.cxx +++ b/panda/src/putil/factoryParam.cxx @@ -1,6 +1,19 @@ // Filename: factoryParam.cxx // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "factoryParam.h" diff --git a/panda/src/putil/factoryParam.h b/panda/src/putil/factoryParam.h index 5c854416a2..2d2ccb25d3 100644 --- a/panda/src/putil/factoryParam.h +++ b/panda/src/putil/factoryParam.h @@ -1,6 +1,19 @@ // Filename: factoryParam.h // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FACTORYPARAM_H diff --git a/panda/src/putil/factoryParams.I b/panda/src/putil/factoryParams.I index 3d5da43022..0951cc1488 100644 --- a/panda/src/putil/factoryParams.I +++ b/panda/src/putil/factoryParams.I @@ -1,6 +1,19 @@ // Filename: factoryParams.I // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -16,7 +29,7 @@ //////////////////////////////////////////////////////////////////// template bool get_param_into(ParamType *&pointer, const FactoryParams ¶ms) { - FactoryParam *param = + FactoryParam *param = params.get_param_of_type(ParamType::get_class_type()); if (param == (FactoryParam *)NULL) { pointer = NULL; diff --git a/panda/src/putil/factoryParams.cxx b/panda/src/putil/factoryParams.cxx index 4bde41438a..199f190893 100644 --- a/panda/src/putil/factoryParams.cxx +++ b/panda/src/putil/factoryParams.cxx @@ -1,6 +1,19 @@ // Filename: factoryParams.cxx // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "factoryParams.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: FactoryParams::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// FactoryParams:: FactoryParams() { @@ -17,7 +30,7 @@ FactoryParams() { //////////////////////////////////////////////////////////////////// // Function: FactoryParams::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// FactoryParams:: ~FactoryParams() { @@ -26,7 +39,7 @@ FactoryParams:: //////////////////////////////////////////////////////////////////// // Function: FactoryParams::add_param // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FactoryParams:: add_param(FactoryParam *param) { diff --git a/panda/src/putil/factoryParams.h b/panda/src/putil/factoryParams.h index c4a8136589..1568eaab28 100644 --- a/panda/src/putil/factoryParams.h +++ b/panda/src/putil/factoryParams.h @@ -1,6 +1,19 @@ // Filename: factoryParams.h // Created by: drose (08May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FACTORYPARAMS_H diff --git a/panda/src/putil/globPattern.I b/panda/src/putil/globPattern.I index 4969c6da54..2f4db8126c 100644 --- a/panda/src/putil/globPattern.I +++ b/panda/src/putil/globPattern.I @@ -1,13 +1,26 @@ // Filename: globPattern.I // Created by: drose (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GlobPattern::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GlobPattern:: GlobPattern(const string &pattern) : _pattern(pattern) { @@ -16,7 +29,7 @@ GlobPattern(const string &pattern) : _pattern(pattern) { //////////////////////////////////////////////////////////////////// // Function: GlobPattern::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GlobPattern:: GlobPattern(const GlobPattern ©) : _pattern(copy._pattern) { @@ -25,7 +38,7 @@ GlobPattern(const GlobPattern ©) : _pattern(copy._pattern) { //////////////////////////////////////////////////////////////////// // Function: GlobPattern::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GlobPattern:: operator = (const GlobPattern ©) { @@ -69,7 +82,7 @@ matches(const string &candidate) const { //////////////////////////////////////////////////////////////////// // Function: GlobPattern::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void GlobPattern:: output(ostream &out) const { diff --git a/panda/src/putil/globPattern.cxx b/panda/src/putil/globPattern.cxx index f7c499c020..27bf2c8c13 100644 --- a/panda/src/putil/globPattern.cxx +++ b/panda/src/putil/globPattern.cxx @@ -1,6 +1,19 @@ // Filename: globPattern.cxx // Created by: drose (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "globPattern.h" @@ -29,7 +42,7 @@ matches_substr(string::const_iterator pi, string::const_iterator pend, } switch (*pi) { - + case '*': // A '*' in the pattern string means to match any sequence of zero // or more characters in the candidate string. This means we have @@ -63,7 +76,7 @@ matches_substr(string::const_iterator pi, string::const_iterator pend, return false; } return matches_substr(pi + 1, pend, ci + 1, cend); - + case '\\': // A backslash escapes the next special character. ++pi; @@ -145,4 +158,4 @@ matches_set(string::const_iterator &pi, string::const_iterator pend, } - + diff --git a/panda/src/putil/globPattern.h b/panda/src/putil/globPattern.h index 14fd180050..44ef452303 100644 --- a/panda/src/putil/globPattern.h +++ b/panda/src/putil/globPattern.h @@ -1,6 +1,19 @@ // Filename: globPattern.h // Created by: drose (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GLOBPATTERN_H @@ -33,7 +46,7 @@ public: INLINE const string &get_pattern() const; INLINE bool matches(const string &candidate) const; - + INLINE void output(ostream &out) const; private: @@ -42,7 +55,7 @@ private: string::const_iterator ci, string::const_iterator cend) const; - bool matches_set(string::const_iterator &pi, + bool matches_set(string::const_iterator &pi, string::const_iterator pend, char ch) const; diff --git a/panda/src/putil/globalPointerRegistry.I b/panda/src/putil/globalPointerRegistry.I index 170e826616..27fbfa4169 100644 --- a/panda/src/putil/globalPointerRegistry.I +++ b/panda/src/putil/globalPointerRegistry.I @@ -1,6 +1,19 @@ // Filename: globalPointerRegistry.I // Created by: drose (03Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/globalPointerRegistry.cxx b/panda/src/putil/globalPointerRegistry.cxx index dbc79e1e02..5ba8c61889 100644 --- a/panda/src/putil/globalPointerRegistry.cxx +++ b/panda/src/putil/globalPointerRegistry.cxx @@ -1,6 +1,19 @@ // Filename: globalPointerRegistry.cxx // Created by: drose (03Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "globalPointerRegistry.h" @@ -56,7 +69,7 @@ ns_store_pointer(TypeHandle type, void *ptr) { clear_pointer(type); return; } - pair result = + pair result = _pointers.insert(Pointers::value_type(type, ptr)); if (!result.second) { diff --git a/panda/src/putil/globalPointerRegistry.h b/panda/src/putil/globalPointerRegistry.h index fe35d1e746..97dcfa12d7 100644 --- a/panda/src/putil/globalPointerRegistry.h +++ b/panda/src/putil/globalPointerRegistry.h @@ -2,6 +2,19 @@ // Created by: drose (03Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GLOBALPOINTERREGISTRY_H #define GLOBALPOINTERREGISTRY_H diff --git a/panda/src/putil/indirectCompareNames.I b/panda/src/putil/indirectCompareNames.I index 730741341e..003528ad98 100644 --- a/panda/src/putil/indirectCompareNames.I +++ b/panda/src/putil/indirectCompareNames.I @@ -1,6 +1,19 @@ // Filename: indirectCompareNames.I // Created by: drose (23Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/indirectCompareNames.h b/panda/src/putil/indirectCompareNames.h index 2458727a10..4d93b5c6b7 100644 --- a/panda/src/putil/indirectCompareNames.h +++ b/panda/src/putil/indirectCompareNames.h @@ -1,6 +1,19 @@ // Filename: indirectCompareNames.h // Created by: drose (23Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INDIRECTCOMPARENAMES_H diff --git a/panda/src/putil/indirectCompareTo.I b/panda/src/putil/indirectCompareTo.I index 40f8f2d236..4390017f26 100644 --- a/panda/src/putil/indirectCompareTo.I +++ b/panda/src/putil/indirectCompareTo.I @@ -1,6 +1,19 @@ // Filename: indirectCompareTo.I // Created by: drose (04Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/indirectCompareTo.h b/panda/src/putil/indirectCompareTo.h index 151f718dbe..7e2daa4209 100644 --- a/panda/src/putil/indirectCompareTo.h +++ b/panda/src/putil/indirectCompareTo.h @@ -1,6 +1,19 @@ // Filename: indirectCompareTo.h // Created by: drose (04Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef INDIRECTCOMPARETO_H diff --git a/panda/src/putil/ioPtaDatagramFloat.cxx b/panda/src/putil/ioPtaDatagramFloat.cxx index d4bdce1d50..6de9304bb1 100644 --- a/panda/src/putil/ioPtaDatagramFloat.cxx +++ b/panda/src/putil/ioPtaDatagramFloat.cxx @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramFloat.cxx // Created by: charles (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagramFloat::write_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void IoPtaDatagramFloat:: write_datagram(Datagram &dest, CPTA_float array) @@ -26,7 +39,7 @@ write_datagram(Datagram &dest, CPTA_float array) //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagramFloat::read_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// PTA_float IoPtaDatagramFloat:: read_datagram(DatagramIterator &source) diff --git a/panda/src/putil/ioPtaDatagramFloat.h b/panda/src/putil/ioPtaDatagramFloat.h index b7a6b945b3..08ebadec8d 100644 --- a/panda/src/putil/ioPtaDatagramFloat.h +++ b/panda/src/putil/ioPtaDatagramFloat.h @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramFloat.h // Created by: charles (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef _IO_PTA_DATAGRAM_FLOAT diff --git a/panda/src/putil/ioPtaDatagramInt.cxx b/panda/src/putil/ioPtaDatagramInt.cxx index 5eff295344..720283e015 100644 --- a/panda/src/putil/ioPtaDatagramInt.cxx +++ b/panda/src/putil/ioPtaDatagramInt.cxx @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramInt.cxx // Created by: jason (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagramInt::write_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void IoPtaDatagramInt:: write_datagram(Datagram &dest, CPTA_int array) @@ -27,7 +40,7 @@ write_datagram(Datagram &dest, CPTA_int array) //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagramInt::read_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// PTA_int IoPtaDatagramInt:: read_datagram(DatagramIterator &source) diff --git a/panda/src/putil/ioPtaDatagramInt.h b/panda/src/putil/ioPtaDatagramInt.h index 5fa549f895..caa7f58671 100644 --- a/panda/src/putil/ioPtaDatagramInt.h +++ b/panda/src/putil/ioPtaDatagramInt.h @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramInt.h // Created by: jason (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef _IO_PTA_DATAGRAM_INT diff --git a/panda/src/putil/ioPtaDatagramShort.cxx b/panda/src/putil/ioPtaDatagramShort.cxx index 91b1fa6266..8b65d84421 100644 --- a/panda/src/putil/ioPtaDatagramShort.cxx +++ b/panda/src/putil/ioPtaDatagramShort.cxx @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramShort.cxx // Created by: jason (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -12,7 +25,7 @@ //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagramShort::write_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// void IoPtaDatagramShort:: write_datagram(Datagram &dest, CPTA_ushort array) @@ -27,7 +40,7 @@ write_datagram(Datagram &dest, CPTA_ushort array) //////////////////////////////////////////////////////////////////// // Function: IoPtaDatagramShort::read_datagram // Access: Public, Static -// Description: +// Description: //////////////////////////////////////////////////////////////////// PTA_ushort IoPtaDatagramShort:: read_datagram(DatagramIterator &source) diff --git a/panda/src/putil/ioPtaDatagramShort.h b/panda/src/putil/ioPtaDatagramShort.h index b0264b078e..eecba87ffb 100644 --- a/panda/src/putil/ioPtaDatagramShort.h +++ b/panda/src/putil/ioPtaDatagramShort.h @@ -1,6 +1,19 @@ // Filename: ioPtaDatagramShort.h // Created by: jason (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef _IO_PTA_DATAGRAM_SHORT diff --git a/panda/src/putil/iterator_types.h b/panda/src/putil/iterator_types.h index 9e3da77e3d..a10e241b50 100644 --- a/panda/src/putil/iterator_types.h +++ b/panda/src/putil/iterator_types.h @@ -2,6 +2,19 @@ // Created by: drose (10Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ITERATOR_TYPES_H #define ITERATOR_TYPES_H diff --git a/panda/src/putil/keyboardButton.cxx b/panda/src/putil/keyboardButton.cxx index 0202c56453..ad6c4aca47 100644 --- a/panda/src/putil/keyboardButton.cxx +++ b/panda/src/putil/keyboardButton.cxx @@ -1,6 +1,19 @@ // Filename: keyboardButton.cxx // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "keyboardButton.h" @@ -235,7 +248,7 @@ ButtonHandle KeyboardButton:: shift_lock() { return _shift_lock; } - + //////////////////////////////////////////////////////////////////// // Function: KeyboardButton::init_keyboard_buttons // Access: Public, Static @@ -263,7 +276,7 @@ init_keyboard_buttons() { ButtonRegistry::ptr()->register_button(_f10, "f10"); ButtonRegistry::ptr()->register_button(_f11, "f11"); ButtonRegistry::ptr()->register_button(_f12, "f12"); - + ButtonRegistry::ptr()->register_button(_left, "left"); ButtonRegistry::ptr()->register_button(_right, "right"); ButtonRegistry::ptr()->register_button(_up, "up"); diff --git a/panda/src/putil/keyboardButton.h b/panda/src/putil/keyboardButton.h index 9e8c28474e..c9d0b04dcf 100644 --- a/panda/src/putil/keyboardButton.h +++ b/panda/src/putil/keyboardButton.h @@ -1,6 +1,19 @@ // Filename: keyboardButton.h // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef KEYBOARDBUTTON_H diff --git a/panda/src/putil/lineStream.I b/panda/src/putil/lineStream.I index 2ec93e8542..d14524ea01 100644 --- a/panda/src/putil/lineStream.I +++ b/panda/src/putil/lineStream.I @@ -1,15 +1,28 @@ // Filename: lineStream.I // Created by: drose (26Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LineStream::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LineStream:: -LineStream() : ostream(&_lsb) { +LineStream() : ostream(&_lsb) { } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/lineStream.cxx b/panda/src/putil/lineStream.cxx index c01acdd2b0..4f355ce0f2 100644 --- a/panda/src/putil/lineStream.cxx +++ b/panda/src/putil/lineStream.cxx @@ -1,6 +1,19 @@ // Filename: lineStream.cxx // Created by: drose (26Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lineStream.h" diff --git a/panda/src/putil/lineStream.h b/panda/src/putil/lineStream.h index e2038c1f6e..c3efeb3091 100644 --- a/panda/src/putil/lineStream.h +++ b/panda/src/putil/lineStream.h @@ -1,6 +1,19 @@ // Filename: lineStream.h // Created by: drose (26Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINESTREAM_H diff --git a/panda/src/putil/lineStreamBuf.I b/panda/src/putil/lineStreamBuf.I index 6289bf9933..69eb8a69c6 100644 --- a/panda/src/putil/lineStreamBuf.I +++ b/panda/src/putil/lineStreamBuf.I @@ -1,13 +1,26 @@ // Filename: lineStreamBuf.I // Created by: drose (26Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LineStreamBuf::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LineStreamBuf:: LineStreamBuf() { @@ -17,7 +30,7 @@ LineStreamBuf() { //////////////////////////////////////////////////////////////////// // Function: LineStreamBuf::is_text_available // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool LineStreamBuf:: is_text_available() const { @@ -27,7 +40,7 @@ is_text_available() const { //////////////////////////////////////////////////////////////////// // Function: LineStreamBuf::has_newline // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool LineStreamBuf:: has_newline() const { diff --git a/panda/src/putil/lineStreamBuf.cxx b/panda/src/putil/lineStreamBuf.cxx index 20f7a4c065..7fc3d313c6 100644 --- a/panda/src/putil/lineStreamBuf.cxx +++ b/panda/src/putil/lineStreamBuf.cxx @@ -1,6 +1,19 @@ // Filename: lineStreamBuf.cxx // Created by: drose (26Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lineStreamBuf.h" @@ -13,7 +26,7 @@ typedef int streamsize; //////////////////////////////////////////////////////////////////// // Function: LineStreamBuf::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// LineStreamBuf:: ~LineStreamBuf() { @@ -55,7 +68,7 @@ get_line() { // destruction). //////////////////////////////////////////////////////////////////// int LineStreamBuf:: -sync() { +sync() { streamsize n = pptr() - pbase(); write_chars(pbase(), n); pbump(-n); // Reset pptr(). @@ -69,7 +82,7 @@ sync() { // internal buffer is filled, plus one character. //////////////////////////////////////////////////////////////////// int LineStreamBuf:: -overflow(int ch) { +overflow(int ch) { streamsize n = pptr() - pbase(); if (n != 0 && sync() != 0) { diff --git a/panda/src/putil/lineStreamBuf.h b/panda/src/putil/lineStreamBuf.h index b01d8fbe9c..f023895939 100644 --- a/panda/src/putil/lineStreamBuf.h +++ b/panda/src/putil/lineStreamBuf.h @@ -1,6 +1,19 @@ // Filename: lineStreamBuf.h // Created by: drose (26Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINESTREAMBUF_H diff --git a/panda/src/putil/modifierButtons.I b/panda/src/putil/modifierButtons.I index 22168b9b2b..4e6676e103 100644 --- a/panda/src/putil/modifierButtons.I +++ b/panda/src/putil/modifierButtons.I @@ -1,13 +1,26 @@ // Filename: modifierButtons.I // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ModifierButtons::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ModifierButtons:: operator = (const ModifierButtons ©) { @@ -18,7 +31,7 @@ operator = (const ModifierButtons ©) { //////////////////////////////////////////////////////////////////// // Function: ModifierButtons::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ModifierButtons:: operator == (const ModifierButtons &other) const { @@ -29,7 +42,7 @@ operator == (const ModifierButtons &other) const { //////////////////////////////////////////////////////////////////// // Function: ModifierButtons::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ModifierButtons:: operator != (const ModifierButtons &other) const { @@ -39,7 +52,7 @@ operator != (const ModifierButtons &other) const { //////////////////////////////////////////////////////////////////// // Function: ModifierButtons::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ModifierButtons:: operator < (const ModifierButtons &other) const { diff --git a/panda/src/putil/modifierButtons.cxx b/panda/src/putil/modifierButtons.cxx index 26b595dedc..78cf77d2a0 100644 --- a/panda/src/putil/modifierButtons.cxx +++ b/panda/src/putil/modifierButtons.cxx @@ -1,6 +1,19 @@ // Filename: modifierButtons.cxx // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "modifierButtons.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: ModifierButtons::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ModifierButtons:: ModifierButtons() : @@ -22,19 +35,19 @@ ModifierButtons() : //////////////////////////////////////////////////////////////////// // Function: ModifierButtons::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ModifierButtons:: ModifierButtons(const ModifierButtons ©) : _button_list(copy._button_list), - _state(copy._state) + _state(copy._state) { } //////////////////////////////////////////////////////////////////// // Function: ModifierButtons::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ModifierButtons:: ~ModifierButtons() { diff --git a/panda/src/putil/modifierButtons.h b/panda/src/putil/modifierButtons.h index 26e67a7ad7..ffe1dcf98a 100644 --- a/panda/src/putil/modifierButtons.h +++ b/panda/src/putil/modifierButtons.h @@ -1,6 +1,19 @@ // Filename: modifierButtons.h // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MODIFIERBUTTONS_H diff --git a/panda/src/putil/mouseButton.cxx b/panda/src/putil/mouseButton.cxx index d179954a82..cd8d7e2180 100644 --- a/panda/src/putil/mouseButton.cxx +++ b/panda/src/putil/mouseButton.cxx @@ -1,6 +1,19 @@ // Filename: mouseButton.cxx // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "mouseButton.h" @@ -61,7 +74,7 @@ ButtonHandle MouseButton:: three() { return _buttons[2]; } - + //////////////////////////////////////////////////////////////////// // Function: MouseButton::init_mouse_buttons // Access: Public, Static diff --git a/panda/src/putil/mouseButton.h b/panda/src/putil/mouseButton.h index e26a1a34da..fc29c8d123 100644 --- a/panda/src/putil/mouseButton.h +++ b/panda/src/putil/mouseButton.h @@ -1,6 +1,19 @@ // Filename: mouseButton.h // Created by: drose (01Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MOUSEBUTTON_H diff --git a/panda/src/putil/mouseData.cxx b/panda/src/putil/mouseData.cxx index 31f4046b65..58a99f0e21 100644 --- a/panda/src/putil/mouseData.cxx +++ b/panda/src/putil/mouseData.cxx @@ -1,6 +1,19 @@ // Filename: mouseData.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "mouseData.h" diff --git a/panda/src/putil/mouseData.h b/panda/src/putil/mouseData.h index c77c588346..815b964fba 100644 --- a/panda/src/putil/mouseData.h +++ b/panda/src/putil/mouseData.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MOUSEDATA_H #define MOUSEDATA_H diff --git a/panda/src/putil/nameUniquifier.I b/panda/src/putil/nameUniquifier.I index 167d836e37..15e82f1788 100644 --- a/panda/src/putil/nameUniquifier.I +++ b/panda/src/putil/nameUniquifier.I @@ -1,6 +1,19 @@ // Filename: nameUniquifier.I // Created by: drose (16Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/nameUniquifier.cxx b/panda/src/putil/nameUniquifier.cxx index f299001cb0..7cdcf31a98 100644 --- a/panda/src/putil/nameUniquifier.cxx +++ b/panda/src/putil/nameUniquifier.cxx @@ -1,6 +1,19 @@ // Filename: nameUniquifier.cxx // Created by: drose (16Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nameUniquifier.h" @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// // Function: NameUniquifier::Constructor // Access: Public -// Description: Creates a new NameUniquifier. +// Description: Creates a new NameUniquifier. // // The separator string is used to separate the original // name (or supplied prefix) and the generated number @@ -38,7 +51,7 @@ NameUniquifier(const string &separator, //////////////////////////////////////////////////////////////////// // Function: NameUniquifier::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// NameUniquifier:: ~NameUniquifier() { diff --git a/panda/src/putil/nameUniquifier.h b/panda/src/putil/nameUniquifier.h index 2ccd6bcd77..7c0532eb71 100644 --- a/panda/src/putil/nameUniquifier.h +++ b/panda/src/putil/nameUniquifier.h @@ -2,6 +2,19 @@ // Created by: drose (16Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef NAMEUNIQUIFIER_H #define NAMEUNIQUIFIER_H diff --git a/panda/src/putil/pointerToArray.I b/panda/src/putil/pointerToArray.I index 4711bbeb34..aa133758d3 100644 --- a/panda/src/putil/pointerToArray.I +++ b/panda/src/putil/pointerToArray.I @@ -1,6 +1,19 @@ // Filename: pointerToArray.I // Created by: drose (07Jan00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// template @@ -12,23 +25,23 @@ vector ConstPointerToArray::_empty_array; //////////////////////////////////////////////////////////////////// // Function: PointerToArray::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray:: -PointerToArray() : - PointerToBase > >((RefCountObj > *)NULL) +PointerToArray() : + PointerToBase > >((RefCountObj > *)NULL) { } //////////////////////////////////////////////////////////////////// // Function: PointerToArray::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray:: -PointerToArray(size_type n) : +PointerToArray(size_type n) : PointerToBase > >(new RefCountObj >) { _ptr->reserve(n); insert(begin(), n, Element()); @@ -37,11 +50,11 @@ PointerToArray(size_type n) : //////////////////////////////////////////////////////////////////// // Function: PointerToArray::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray:: -PointerToArray(size_type n, const Element &value) : +PointerToArray(size_type n, const Element &value) : PointerToBase > >(new RefCountObj >) { _ptr->reserve(n); insert(begin(), n, value); @@ -50,19 +63,19 @@ PointerToArray(size_type n, const Element &value) : //////////////////////////////////////////////////////////////////// // Function: PointerToArray::Copy Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray:: -PointerToArray(const PointerToArray ©) : - PointerToBase > >(copy) +PointerToArray(const PointerToArray ©) : + PointerToBase > >(copy) { } //////////////////////////////////////////////////////////////////// // Function: PointerToArray::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::iterator PointerToArray:: @@ -76,7 +89,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::iterator PointerToArray:: @@ -90,7 +103,7 @@ end() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::rbegin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::reverse_iterator PointerToArray:: @@ -104,7 +117,7 @@ rbegin() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::rend // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::reverse_iterator PointerToArray:: @@ -118,18 +131,18 @@ rend() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::size // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::size_type PointerToArray:: size() const { return (_ptr == NULL) ? 0 : _ptr->size(); } - + //////////////////////////////////////////////////////////////////// // Function: PointerToArray::max_size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::size_type PointerToArray:: @@ -143,7 +156,7 @@ max_size() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool PointerToArray:: @@ -154,7 +167,7 @@ empty() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::reserve // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerToArray:: @@ -168,7 +181,7 @@ reserve(PointerToArray::size_type n) { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::capacity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::size_type PointerToArray:: @@ -180,7 +193,7 @@ capacity() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::front // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::reference PointerToArray:: @@ -197,7 +210,7 @@ front() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::back // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::reference PointerToArray:: @@ -214,7 +227,7 @@ back() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::insert // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::iterator PointerToArray:: @@ -228,7 +241,7 @@ insert(iterator position, const Element &x) const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::insert // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerToArray:: @@ -242,7 +255,7 @@ insert(iterator position, size_type n, const Element &x) const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::erase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerToArray:: @@ -258,7 +271,7 @@ erase(iterator position) const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::erase // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerToArray:: @@ -275,7 +288,7 @@ erase(iterator first, iterator last) const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::Indexing operator // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray::reference PointerToArray:: @@ -294,7 +307,7 @@ operator [](size_type n) const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::push_back // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerToArray:: @@ -308,7 +321,7 @@ push_back(const Element &x) { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::pop_back // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE void PointerToArray:: @@ -418,7 +431,7 @@ get_ref_count() const { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray &PointerToArray:: @@ -430,7 +443,7 @@ operator = (RefCountObj > *ptr) { //////////////////////////////////////////////////////////////////// // Function: PointerToArray::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE PointerToArray &PointerToArray:: @@ -457,43 +470,43 @@ clear() { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray:: -ConstPointerToArray() : - PointerToBase > >((RefCountObj > *)NULL) +ConstPointerToArray() : + PointerToBase > >((RefCountObj > *)NULL) { } //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray:: -ConstPointerToArray(const PointerToArray ©) : - PointerToBase > >(copy) +ConstPointerToArray(const PointerToArray ©) : + PointerToBase > >(copy) { } //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray:: -ConstPointerToArray(const ConstPointerToArray ©) : - PointerToBase > >(copy) +ConstPointerToArray(const ConstPointerToArray ©) : + PointerToBase > >(copy) { } //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::iterator ConstPointerToArray:: @@ -507,7 +520,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::iterator ConstPointerToArray:: @@ -521,7 +534,7 @@ end() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::rbegin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::reverse_iterator ConstPointerToArray:: @@ -535,7 +548,7 @@ rbegin() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::rend // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::reverse_iterator ConstPointerToArray:: @@ -549,18 +562,18 @@ rend() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::size_type ConstPointerToArray:: size() const { return (_ptr == NULL) ? 0 : _ptr->size(); } - + //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::max_size // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::size_type ConstPointerToArray:: @@ -574,7 +587,7 @@ max_size() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE bool ConstPointerToArray:: @@ -585,7 +598,7 @@ empty() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::capacity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::size_type ConstPointerToArray:: @@ -600,7 +613,7 @@ capacity() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::Indexing operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::reference ConstPointerToArray:: @@ -619,7 +632,7 @@ operator[](size_type n) const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::front // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::reference ConstPointerToArray:: @@ -636,7 +649,7 @@ front() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::back // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray::reference ConstPointerToArray:: @@ -707,7 +720,7 @@ get_ref_count() const { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray &ConstPointerToArray:: @@ -719,7 +732,7 @@ operator = (RefCountObj > *ptr) { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray &ConstPointerToArray:: @@ -731,7 +744,7 @@ operator = (const PointerToArray ©) { //////////////////////////////////////////////////////////////////// // Function: ConstPointerToArray::Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template INLINE ConstPointerToArray &ConstPointerToArray:: diff --git a/panda/src/putil/pointerToArray.h b/panda/src/putil/pointerToArray.h index b75ee62a57..193d12fde3 100644 --- a/panda/src/putil/pointerToArray.h +++ b/panda/src/putil/pointerToArray.h @@ -2,6 +2,19 @@ // Created by: drose (14Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef POINTERTOARRAY_H #define POINTERTOARRAY_H diff --git a/panda/src/putil/pta_double.cxx b/panda/src/putil/pta_double.cxx index d624793ef7..18bc481676 100644 --- a/panda/src/putil/pta_double.cxx +++ b/panda/src/putil/pta_double.cxx @@ -1,6 +1,19 @@ // Filename: pta_double.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_double.h" diff --git a/panda/src/putil/pta_double.h b/panda/src/putil/pta_double.h index 49ce69006d..f3b0e852e3 100644 --- a/panda/src/putil/pta_double.h +++ b/panda/src/putil/pta_double.h @@ -1,6 +1,19 @@ // Filename: pta_double.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_DOUBLE_H diff --git a/panda/src/putil/pta_float.cxx b/panda/src/putil/pta_float.cxx index 80ced8a711..8fb40f3d62 100644 --- a/panda/src/putil/pta_float.cxx +++ b/panda/src/putil/pta_float.cxx @@ -1,6 +1,19 @@ // Filename: pta_float.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_float.h" diff --git a/panda/src/putil/pta_float.h b/panda/src/putil/pta_float.h index 0d10440ac3..9110947d3c 100644 --- a/panda/src/putil/pta_float.h +++ b/panda/src/putil/pta_float.h @@ -1,6 +1,19 @@ // Filename: pta_float.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_FLOAT_H diff --git a/panda/src/putil/pta_int.cxx b/panda/src/putil/pta_int.cxx index c8032ed79e..bbff92f348 100644 --- a/panda/src/putil/pta_int.cxx +++ b/panda/src/putil/pta_int.cxx @@ -1,6 +1,19 @@ // Filename: pta_int.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_int.h" diff --git a/panda/src/putil/pta_int.h b/panda/src/putil/pta_int.h index 99f882bf26..940b52a6bb 100644 --- a/panda/src/putil/pta_int.h +++ b/panda/src/putil/pta_int.h @@ -1,6 +1,19 @@ // Filename: pta_int.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_INT_H diff --git a/panda/src/putil/pta_uchar.cxx b/panda/src/putil/pta_uchar.cxx index bcc2e86f3a..cb752831a6 100644 --- a/panda/src/putil/pta_uchar.cxx +++ b/panda/src/putil/pta_uchar.cxx @@ -1,6 +1,19 @@ // Filename: pta_uchar.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_uchar.h" diff --git a/panda/src/putil/pta_uchar.h b/panda/src/putil/pta_uchar.h index 5934042f3d..ebcac81a25 100644 --- a/panda/src/putil/pta_uchar.h +++ b/panda/src/putil/pta_uchar.h @@ -1,6 +1,19 @@ // Filename: pta_uchar.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_UCHAR_H diff --git a/panda/src/putil/pta_ushort.cxx b/panda/src/putil/pta_ushort.cxx index 2b71c1f8e6..3198fd58a2 100644 --- a/panda/src/putil/pta_ushort.cxx +++ b/panda/src/putil/pta_ushort.cxx @@ -1,6 +1,19 @@ // Filename: pta_ushort.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pta_ushort.h" diff --git a/panda/src/putil/pta_ushort.h b/panda/src/putil/pta_ushort.h index 199d71e74c..e5916ea7b1 100644 --- a/panda/src/putil/pta_ushort.h +++ b/panda/src/putil/pta_ushort.h @@ -1,6 +1,19 @@ // Filename: pta_ushort.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PTA_USHORT_H diff --git a/panda/src/putil/string_utils.I b/panda/src/putil/string_utils.I index e8abcca96f..edc507de6d 100644 --- a/panda/src/putil/string_utils.I +++ b/panda/src/putil/string_utils.I @@ -1,6 +1,19 @@ // Filename: string_utils.I // Created by: drose (14Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/putil/string_utils.cxx b/panda/src/putil/string_utils.cxx index 2a392956d5..59a25110ca 100644 --- a/panda/src/putil/string_utils.cxx +++ b/panda/src/putil/string_utils.cxx @@ -1,6 +1,19 @@ // Filename: string_utils.cxx // Created by: drose (18Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "string_utils.h" @@ -21,12 +34,12 @@ cmp_nocase(const string &s, const string &s2) { ++p; ++p2; } - + return (s2.size() == s.size()) ? 0 : (s.size() < s2.size()) ? -1 : 1; // size is unsigned } -INLINE int +INLINE int toupper_uh(int ch) { return (ch == '_') ? '-' : toupper(ch); } @@ -44,7 +57,7 @@ cmp_nocase_uh(const string &s, const string &s2) { ++p; ++p2; } - + return (s2.size() == s.size()) ? 0 : (s.size() < s2.size()) ? -1 : 1; // size is unsigned } @@ -148,7 +161,7 @@ tokenize(const string &str, vector_string &words, const string &delimiters) { // Description: Returns a new string representing the contents of the // given string with the leading whitespace removed. //////////////////////////////////////////////////////////////////// -string +string trim_left(const string &str) { size_t begin = 0; while (begin < str.size() && isspace(str[begin])) { @@ -163,7 +176,7 @@ trim_left(const string &str) { // Description: Returns a new string representing the contents of the // given string with the trailing whitespace removed. //////////////////////////////////////////////////////////////////// -string +string trim_right(const string &str) { size_t begin = 0; size_t end = str.size(); diff --git a/panda/src/putil/string_utils.h b/panda/src/putil/string_utils.h index 7435010b85..3d541b9635 100644 --- a/panda/src/putil/string_utils.h +++ b/panda/src/putil/string_utils.h @@ -2,6 +2,19 @@ // Created by: drose (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef STRING_UTILS_H #define STRING_UTILS_H diff --git a/panda/src/putil/test_bam.cxx b/panda/src/putil/test_bam.cxx index d7ea58b49f..81d24ff39d 100644 --- a/panda/src/putil/test_bam.cxx +++ b/panda/src/putil/test_bam.cxx @@ -1,6 +1,20 @@ // Filename: test_bam.cxx // Created by: jason (13Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include diff --git a/panda/src/putil/test_bam.h b/panda/src/putil/test_bam.h index 0cd3620565..aa989f2bc2 100644 --- a/panda/src/putil/test_bam.h +++ b/panda/src/putil/test_bam.h @@ -1,6 +1,20 @@ // Filename: test_bam.h // Created by: jason (12Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include @@ -24,13 +38,13 @@ public: void write_datagram(BamWriter*, Datagram&); static TypedWritable *make_person(const FactoryParams ¶ms); - virtual int complete_pointers(vector_typedWritable &plist, + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); protected: void fillin(Person*,DatagramIterator&,BamReader*); public: enum sex { - MALE, + MALE, FEMALE }; @@ -47,7 +61,7 @@ private: public: Person(void) {} - Person(const string &name, const sex Gender) : + Person(const string &name, const sex Gender) : _name(name), myGender(Gender), _bro((Person*)NULL), _sis((Person*)NULL) { } @@ -79,7 +93,7 @@ public: void write_datagram(BamWriter*, Datagram&); static TypedWritable *make_parent(const FactoryParams ¶ms); - virtual int complete_pointers(vector_typedWritable &plist, + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); protected: void fillin(Parent*,DatagramIterator&,BamReader*); @@ -125,7 +139,7 @@ public: void write_datagram(BamWriter*, Datagram&); static TypedWritable *make_child(const FactoryParams ¶ms); - virtual int complete_pointers(vector_typedWritable &plist, + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); protected: void fillin(Child*,DatagramIterator&,BamReader*); diff --git a/panda/src/putil/test_bamRead.cxx b/panda/src/putil/test_bamRead.cxx index 6ee0280ff1..d4070625db 100644 --- a/panda/src/putil/test_bamRead.cxx +++ b/panda/src/putil/test_bamRead.cxx @@ -1,6 +1,20 @@ // Filename: test_bamRead.cxx // Created by: jason (13Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include @@ -18,7 +32,7 @@ int main(int argc, char* argv[]) BamReader manager(&stream); manager.init(); - + PointerTo dad = DCAST(Parent, manager.read_object()); PointerTo mom = DCAST(Parent, manager.read_object()); PointerTo bro = DCAST(Child, manager.read_object()); diff --git a/panda/src/putil/test_bamWrite.cxx b/panda/src/putil/test_bamWrite.cxx index e8ae32a84c..cbc231cc3d 100644 --- a/panda/src/putil/test_bamWrite.cxx +++ b/panda/src/putil/test_bamWrite.cxx @@ -1,6 +1,20 @@ // Filename: test_bamWrite.cxx // Created by: jason (09Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include @@ -12,7 +26,7 @@ int main(int argc, char* argv[]) string test_file("bamTest.out"); datagram_file stream(test_file); - BamWriter manager(&stream); + BamWriter manager(&stream); stream.open(file::FILE_WRITE); // This initialization would normally be done by a ConfigureFn @@ -39,7 +53,7 @@ int main(int argc, char* argv[]) sis->setBrother(bro.p()); manager.init(); - + manager.write_object(dad.p()); manager.write_object(mom.p()); manager.write_object(bro.p()); diff --git a/panda/src/putil/test_filename.cxx b/panda/src/putil/test_filename.cxx index 00bd246aa9..8d5200b3c9 100644 --- a/panda/src/putil/test_filename.cxx +++ b/panda/src/putil/test_filename.cxx @@ -1,6 +1,19 @@ // Filename: test_filename.cxx // Created by: drose (18Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "filename.h" @@ -12,15 +25,15 @@ void show_filename(const Filename &f) { - nout + nout << "get_fullpath = " << f.get_fullpath() << "\n" /* - << " _dirname_end = " << f._dirname_end + << " _dirname_end = " << f._dirname_end << " _basename_start = " << f._basename_start << "\n" << " _basename_end = " << f._basename_end << " _extension_start = " << f._extension_start << "\n" */ - + << "get_dirname = " << f.get_dirname() << "\n" << "get_basename = " << f.get_basename() << "\n" << "get_fullpath_wo_extension = " << f.get_fullpath_wo_extension() << "\n" @@ -46,13 +59,13 @@ main(int argc, char *argv[]) { nout << "f is " << f << " exists = " << f.exists() << "\n" << "t is " << t << " exists = " << t.exists() << "\n"; - nout << "f.compare_timestamps(t, true, true) = " + nout << "f.compare_timestamps(t, true, true) = " << f.compare_timestamps(t, true, true) << "\n" - << "f.compare_timestamps(t, true, false) = " + << "f.compare_timestamps(t, true, false) = " << f.compare_timestamps(t, true, false) << "\n" - << "f.compare_timestamps(t, false, true) = " + << "f.compare_timestamps(t, false, true) = " << f.compare_timestamps(t, false, true) << "\n" - << "f.compare_timestamps(t, false, false) = " + << "f.compare_timestamps(t, false, false) = " << f.compare_timestamps(t, false, false) << "\n"; } /* @@ -74,28 +87,28 @@ main(int argc, char *argv[]) { } */ - /* + /* f.set_extension("new_extension"); show_filename(f); - + f.set_extension(""); show_filename(f); - + f.set_extension("ext"); show_filename(f); - + f.set_dirname("/new/dirname"); show_filename(f); - + f.set_dirname("/"); show_filename(f); - + f.set_dirname(""); show_filename(f); - + f.set_dirname("/dir/name/"); show_filename(f); - + f.set_basename_wo_extension("base_name"); show_filename(f); */ @@ -103,4 +116,4 @@ main(int argc, char *argv[]) { return(0); } - + diff --git a/panda/src/putil/test_glob.cxx b/panda/src/putil/test_glob.cxx index d9a47d4b6f..621b6f05b6 100644 --- a/panda/src/putil/test_glob.cxx +++ b/panda/src/putil/test_glob.cxx @@ -1,6 +1,19 @@ // Filename: test_glob.cxx // Created by: drose (30May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "globPattern.h" @@ -15,7 +28,7 @@ int main(int argc, char *argv[]) { if (argc != 2) { - cerr + cerr << "test_glob \"pattern\"\n\n" << "Attempts to match the pattern against each of the files in the\n" << "current directory. Reports all of the matching files. This is,\n" @@ -65,4 +78,4 @@ main(int argc, char *argv[]) { return (0); } - + diff --git a/panda/src/putil/test_linestream.cxx b/panda/src/putil/test_linestream.cxx index 927ace5bc5..59e685b53d 100644 --- a/panda/src/putil/test_linestream.cxx +++ b/panda/src/putil/test_linestream.cxx @@ -1,6 +1,19 @@ // Filename: test_linestream.cxx // Created by: drose (26Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "lineStream.h" @@ -33,4 +46,4 @@ main(int argc, char *argv[]) { return 0; } - + diff --git a/panda/src/putil/test_types.cxx b/panda/src/putil/test_types.cxx index e503a1bf98..e4ff561646 100644 --- a/panda/src/putil/test_types.cxx +++ b/panda/src/putil/test_types.cxx @@ -1,6 +1,19 @@ // Filename: test_types.cxx // Created by: drose (23Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "typedObject.h" @@ -115,7 +128,7 @@ public: static void init_type() { ThatThingie::init_type(); TheOtherThingie::init_type(); - register_type(_type_handle, "WhatAThingie", + register_type(_type_handle, "WhatAThingie", ThatThingie::get_class_type(), TheOtherThingie::get_class_type()); } @@ -161,31 +174,31 @@ main() { << "\nthing_2 of type " << thing_2->get_type() << "\nthing_3 of type " << thing_3->get_type() - << "\n\nthing_1 is ThisThingie : " + << "\n\nthing_1 is ThisThingie : " << thing_1->is_of_type(ThisThingie::get_class_type()) - << "\nthing_1 is ThatThingie : " + << "\nthing_1 is ThatThingie : " << thing_1->is_of_type(ThatThingie::get_class_type()) - << "\nthing_1 is TheOtherThingie : " + << "\nthing_1 is TheOtherThingie : " << thing_1->is_of_type(TheOtherThingie::get_class_type()) - << "\nthing_1 is WhatAThingie : " + << "\nthing_1 is WhatAThingie : " << thing_1->is_of_type(WhatAThingie::get_class_type()) - << "\n\nthing_2 is ThisThingie : " + << "\n\nthing_2 is ThisThingie : " << thing_2->is_of_type(ThisThingie::get_class_type()) - << "\nthing_2 is ThatThingie : " + << "\nthing_2 is ThatThingie : " << thing_2->is_of_type(ThatThingie::get_class_type()) - << "\nthing_2 is TheOtherThingie : " + << "\nthing_2 is TheOtherThingie : " << thing_2->is_of_type(TheOtherThingie::get_class_type()) - << "\nthing_2 is WhatAThingie : " + << "\nthing_2 is WhatAThingie : " << thing_2->is_of_type(WhatAThingie::get_class_type()) - << "\n\nthing_3 is ThisThingie : " + << "\n\nthing_3 is ThisThingie : " << thing_3->is_of_type(ThisThingie::get_class_type()) - << "\nthing_3 is ThatThingie : " + << "\nthing_3 is ThatThingie : " << thing_3->is_of_type(ThatThingie::get_class_type()) - << "\nthing_3 is TheOtherThingie : " + << "\nthing_3 is TheOtherThingie : " << thing_3->is_of_type(TheOtherThingie::get_class_type()) - << "\nthing_3 is WhatAThingie : " + << "\nthing_3 is WhatAThingie : " << thing_3->is_of_type(WhatAThingie::get_class_type()) << "\n\n"; @@ -231,7 +244,7 @@ main() { ((WhatAThingie *)thing_3.p())->hello(); nout << "\n"; - + // Testing RefCountProxy. RefCountProxy x = 10; diff --git a/panda/src/putil/timedCycle.I b/panda/src/putil/timedCycle.I index 85921e4c6f..74f20bdceb 100644 --- a/panda/src/putil/timedCycle.I +++ b/panda/src/putil/timedCycle.I @@ -1,16 +1,29 @@ // Filename: timedCycle.I // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TimedCycle::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TimedCycle:: TimedCycle() : - _cycle_time(30), + _cycle_time(30), _inv_cycle_time(1./30), _next_switch(-1), _current_child(0), @@ -22,7 +35,7 @@ TimedCycle() : //////////////////////////////////////////////////////////////////// // Function: TimedCycle::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TimedCycle:: TimedCycle(float cycle_time, int element_count) : @@ -78,7 +91,7 @@ INLINE int TimedCycle:: next_element() { double current_time = _global_clock->get_real_time(); - unsigned int increment = (unsigned int) ((current_time - _next_switch) + unsigned int increment = (unsigned int) ((current_time - _next_switch) * _inv_cycle_time); _next_switch += _cycle_time * increment; diff --git a/panda/src/putil/timedCycle.cxx b/panda/src/putil/timedCycle.cxx index 5aae7d9700..2d51338c2f 100644 --- a/panda/src/putil/timedCycle.cxx +++ b/panda/src/putil/timedCycle.cxx @@ -1,6 +1,19 @@ -// Filename: timedCycle.h +// Filename: timedCycle.cxx // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include #include "timedCycle.h" diff --git a/panda/src/putil/timedCycle.h b/panda/src/putil/timedCycle.h index f0d308ba08..c35c027572 100644 --- a/panda/src/putil/timedCycle.h +++ b/panda/src/putil/timedCycle.h @@ -1,6 +1,19 @@ // Filename: timedCycle.h // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TIMED_CYCLE_H diff --git a/panda/src/putil/typedWritable.I b/panda/src/putil/typedWritable.I index 3e241e77f3..a58d5c1f8a 100644 --- a/panda/src/putil/typedWritable.I +++ b/panda/src/putil/typedWritable.I @@ -1,30 +1,44 @@ // Filename: typedWritable.I // Created by: jason (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TypedWritable::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedWritable:: -TypedWritable() { +TypedWritable() { } //////////////////////////////////////////////////////////////////// // Function: TypedWritable::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedWritable:: -TypedWritable(const TypedWritable &) { +TypedWritable(const TypedWritable &) { } //////////////////////////////////////////////////////////////////// // Function: TypedWritable::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TypedWritable:: operator = (const TypedWritable &) { -} +} diff --git a/panda/src/putil/typedWritable.cxx b/panda/src/putil/typedWritable.cxx index c5c1ab16f0..eb4c96824c 100644 --- a/panda/src/putil/typedWritable.cxx +++ b/panda/src/putil/typedWritable.cxx @@ -1,6 +1,20 @@ -// Filename: typeWritable.h +// Filename: typedWritable.cxx // Created by: jason (08Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "typedWritable.h" @@ -10,10 +24,10 @@ TypedWritable* const TypedWritable::Null = (TypedWritable*)0L; //////////////////////////////////////////////////////////////////// // Function: TypedWritable::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// -TypedWritable::~TypedWritable() -{ +TypedWritable::~TypedWritable() +{ } @@ -21,7 +35,7 @@ TypedWritable::~TypedWritable() // Function: TypedWritable::complete_pointers // Access: Public, Virtual // Description: Takes in a vector of pointers to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int TypedWritable:: diff --git a/panda/src/putil/typedWritable.h b/panda/src/putil/typedWritable.h index 5d48bb3020..fd3f06e1ab 100644 --- a/panda/src/putil/typedWritable.h +++ b/panda/src/putil/typedWritable.h @@ -1,6 +1,20 @@ // Filename: typedWritable.h // Created by: jason (08Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __TYPED_WRITABLE_ #define __TYPED_WRITABLE_ @@ -38,7 +52,7 @@ public: //The essential virtual function interface to define //how any writable object, writes itself to a datagram - virtual void write_datagram(BamWriter *, Datagram &) = 0; + virtual void write_datagram(BamWriter *, Datagram &) = 0; //This function is the interface through which BamReader is //able to pass the completed object references into each @@ -50,7 +64,7 @@ public: //Return the number of pointers read. This is useful for when //a parent reads in a variable number of pointers, so the child //knows where to start reading from. - virtual int complete_pointers(vector_typedWritable &plist, + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); @@ -58,7 +72,7 @@ protected: //This interface function is written here, as a suggestion //for a function to write in any class that will have children //that are also TypedWritable. To encourage code re-use - + //virtual void fillin(TypedWritable*, DatagramIterator&, BamReader *); PUBLISHED: @@ -70,7 +84,7 @@ public: static void init_type() { TypedObject::init_type(); Writable::init_type(); - register_type(_type_handle, "TypedWritable", + register_type(_type_handle, "TypedWritable", TypedObject::get_class_type(), Writable::get_class_type()); TypeRegistry::ptr()->record_alternate_name(_type_handle, "TypedWriteable"); diff --git a/panda/src/putil/typedWritableReferenceCount.I b/panda/src/putil/typedWritableReferenceCount.I index bce293bf58..622a8c3663 100644 --- a/panda/src/putil/typedWritableReferenceCount.I +++ b/panda/src/putil/typedWritableReferenceCount.I @@ -1,28 +1,41 @@ // Filename: typedWritableReferenceCount.I // Created by: jason (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TypedWritableReferenceCount::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedWritableReferenceCount:: -TypedWritableReferenceCount() { +TypedWritableReferenceCount() { MemoryUsage::update_type(this, this); } //////////////////////////////////////////////////////////////////// // Function: TypedWritableReferenceCount::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypedWritableReferenceCount:: -TypedWritableReferenceCount(const TypedWritableReferenceCount ©) : - TypedWritable(copy), - ReferenceCount(copy) +TypedWritableReferenceCount(const TypedWritableReferenceCount ©) : + TypedWritable(copy), + ReferenceCount(copy) { MemoryUsage::update_type(this, this); } @@ -30,7 +43,7 @@ TypedWritableReferenceCount(const TypedWritableReferenceCount ©) : //////////////////////////////////////////////////////////////////// // Function: TypedWritableReferenceCount::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TypedWritableReferenceCount:: operator = (const TypedWritableReferenceCount ©) { diff --git a/panda/src/putil/typedWritableReferenceCount.cxx b/panda/src/putil/typedWritableReferenceCount.cxx index ad842adb1a..256e8e3f82 100644 --- a/panda/src/putil/typedWritableReferenceCount.cxx +++ b/panda/src/putil/typedWritableReferenceCount.cxx @@ -1,6 +1,20 @@ // Filename: typedWritableReferenceCount.cxx // Created by: jason (08Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "typedWritableReferenceCount.h" diff --git a/panda/src/putil/typedWritableReferenceCount.h b/panda/src/putil/typedWritableReferenceCount.h index d8ef2a1fb3..0579aad60d 100644 --- a/panda/src/putil/typedWritableReferenceCount.h +++ b/panda/src/putil/typedWritableReferenceCount.h @@ -1,6 +1,20 @@ // Filename: typedWritableReferenceCount.h // Created by: jason (08Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TYPEDWRITABLEREFERENCECOUNT_H #define TYPEDWRITABLEREFERENCECOUNT_H @@ -27,7 +41,7 @@ public: INLINE void operator = (const TypedWritableReferenceCount ©); public: - virtual void write_datagram(BamWriter *, Datagram &) = 0; + virtual void write_datagram(BamWriter *, Datagram &) = 0; public: virtual TypeHandle get_type() const { @@ -47,7 +61,7 @@ public: register_type(_type_handle, "TypedWritableReferenceCount", TypedWritable::get_class_type(), ReferenceCount::get_class_type()); - TypeRegistry::ptr()->record_alternate_name(_type_handle, + TypeRegistry::ptr()->record_alternate_name(_type_handle, "TypedWriteableReferenceCount"); } diff --git a/panda/src/putil/updateSeq.I b/panda/src/putil/updateSeq.I index a758006384..a6a181287a 100644 --- a/panda/src/putil/updateSeq.I +++ b/panda/src/putil/updateSeq.I @@ -1,6 +1,19 @@ // Filename: updateSeq.I // Created by: drose (30Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -51,7 +64,7 @@ fresh() { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE UpdateSeq:: UpdateSeq(const UpdateSeq ©) { @@ -61,7 +74,7 @@ UpdateSeq(const UpdateSeq ©) { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Copy Assignment operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE UpdateSeq &UpdateSeq:: operator = (const UpdateSeq ©) { @@ -133,7 +146,7 @@ is_special() const { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Equality operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool UpdateSeq:: operator == (const UpdateSeq &other) const { @@ -143,7 +156,7 @@ operator == (const UpdateSeq &other) const { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Inequality operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool UpdateSeq:: operator != (const UpdateSeq &other) const { @@ -153,7 +166,7 @@ operator != (const UpdateSeq &other) const { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Comparison operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool UpdateSeq:: operator < (const UpdateSeq &other) const { @@ -170,7 +183,7 @@ operator < (const UpdateSeq &other) const { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Comparison operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool UpdateSeq:: operator <= (const UpdateSeq &other) const { @@ -180,7 +193,7 @@ operator <= (const UpdateSeq &other) const { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Preincrement operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE UpdateSeq UpdateSeq:: operator ++ () { @@ -190,14 +203,14 @@ operator ++ () { // with our special cases. _seq = (unsigned int)SC_old + 1; } - + return *this; } //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::Postincrement operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE UpdateSeq UpdateSeq:: operator ++ (int) { @@ -209,7 +222,7 @@ operator ++ (int) { //////////////////////////////////////////////////////////////////// // Function: UpdateSeq::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void UpdateSeq:: output(ostream &out) const { diff --git a/panda/src/putil/updateSeq.cxx b/panda/src/putil/updateSeq.cxx index 3f164a2812..c455f7fc0e 100644 --- a/panda/src/putil/updateSeq.cxx +++ b/panda/src/putil/updateSeq.cxx @@ -2,5 +2,18 @@ // Created by: mike (30Sep99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// -#include "updateSeq.h" +#include "updateSeq.h" diff --git a/panda/src/putil/updateSeq.h b/panda/src/putil/updateSeq.h index a0e78c227a..62a41b49bd 100644 --- a/panda/src/putil/updateSeq.h +++ b/panda/src/putil/updateSeq.h @@ -2,6 +2,19 @@ // Created by: drose (30Sep99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef UPDATE_SEQ #define UPDATE_SEQ diff --git a/panda/src/putil/vector_double.cxx b/panda/src/putil/vector_double.cxx index 3a8b25e5c7..e2f9ad0c56 100644 --- a/panda/src/putil/vector_double.cxx +++ b/panda/src/putil/vector_double.cxx @@ -1,12 +1,25 @@ // Filename: vector_double.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_double.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE double #define NAME vector_double diff --git a/panda/src/putil/vector_double.h b/panda/src/putil/vector_double.h index 8b0a5b87a8..8329478d28 100644 --- a/panda/src/putil/vector_double.h +++ b/panda/src/putil/vector_double.h @@ -1,6 +1,19 @@ // Filename: vector_double.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_DOUBLE_H @@ -19,8 +32,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE double #define NAME vector_double diff --git a/panda/src/putil/vector_float.cxx b/panda/src/putil/vector_float.cxx index e5abc2b6c4..061a50c20f 100644 --- a/panda/src/putil/vector_float.cxx +++ b/panda/src/putil/vector_float.cxx @@ -1,12 +1,25 @@ // Filename: vector_float.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_float.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE float #define NAME vector_float diff --git a/panda/src/putil/vector_float.h b/panda/src/putil/vector_float.h index 3b69c48dd7..597f34d94e 100644 --- a/panda/src/putil/vector_float.h +++ b/panda/src/putil/vector_float.h @@ -1,6 +1,19 @@ // Filename: vector_float.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_FLOAT_H @@ -19,8 +32,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE float #define NAME vector_float diff --git a/panda/src/putil/vector_typedWritable.cxx b/panda/src/putil/vector_typedWritable.cxx index d6812d41c1..4ab11f7a9e 100644 --- a/panda/src/putil/vector_typedWritable.cxx +++ b/panda/src/putil/vector_typedWritable.cxx @@ -1,12 +1,25 @@ // Filename: vector_typedWritable.cxx // Created by: jason (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_typedWritable.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE TypedWritable * #define NAME vector_typedWritable diff --git a/panda/src/putil/vector_typedWritable.h b/panda/src/putil/vector_typedWritable.h index 0f5e01a5b1..ce33c33a07 100644 --- a/panda/src/putil/vector_typedWritable.h +++ b/panda/src/putil/vector_typedWritable.h @@ -1,6 +1,19 @@ // Filename: vector_typedWritable.h // Created by: jason (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_TYPED_WRITABLE_H @@ -21,8 +34,8 @@ class TypedWritable; // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE TypedWritable * #define NAME vector_typedWritable diff --git a/panda/src/putil/vector_uchar.cxx b/panda/src/putil/vector_uchar.cxx index a4ac5b4643..275c4bd52c 100644 --- a/panda/src/putil/vector_uchar.cxx +++ b/panda/src/putil/vector_uchar.cxx @@ -1,12 +1,25 @@ // Filename: vector_uchar.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_uchar.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE unsigned char #define NAME vector_uchar diff --git a/panda/src/putil/vector_uchar.h b/panda/src/putil/vector_uchar.h index 9eb2a9b734..e05255607a 100644 --- a/panda/src/putil/vector_uchar.h +++ b/panda/src/putil/vector_uchar.h @@ -1,6 +1,19 @@ // Filename: vector_uchar.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_UCHAR_H @@ -19,8 +32,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE unsigned char #define NAME vector_uchar diff --git a/panda/src/putil/vector_ulong.cxx b/panda/src/putil/vector_ulong.cxx index 0ac67f50a3..1fb8dbfe10 100644 --- a/panda/src/putil/vector_ulong.cxx +++ b/panda/src/putil/vector_ulong.cxx @@ -1,12 +1,25 @@ // Filename: vector_ulong.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_ulong.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE unsigned long #define NAME vector_ulong diff --git a/panda/src/putil/vector_ulong.h b/panda/src/putil/vector_ulong.h index ef58f3bf96..a81d9e99b9 100644 --- a/panda/src/putil/vector_ulong.h +++ b/panda/src/putil/vector_ulong.h @@ -1,6 +1,19 @@ // Filename: vector_ulong.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_ULONG_H @@ -19,8 +32,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE unsigned long #define NAME vector_ulong diff --git a/panda/src/putil/vector_ushort.cxx b/panda/src/putil/vector_ushort.cxx index 21ccf0ea2c..17f6783cd3 100644 --- a/panda/src/putil/vector_ushort.cxx +++ b/panda/src/putil/vector_ushort.cxx @@ -1,12 +1,25 @@ // Filename: vector_ushort.cxx // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_ushort.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE unsigned short #define NAME vector_ushort diff --git a/panda/src/putil/vector_ushort.h b/panda/src/putil/vector_ushort.h index f1359e4046..babcb0335e 100644 --- a/panda/src/putil/vector_ushort.h +++ b/panda/src/putil/vector_ushort.h @@ -1,6 +1,19 @@ // Filename: vector_ushort.h // Created by: drose (10May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_USHORT_H @@ -19,8 +32,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE unsigned short #define NAME vector_ushort diff --git a/panda/src/putil/vector_writable.cxx b/panda/src/putil/vector_writable.cxx index 6d4e2267cc..947cdd40ff 100644 --- a/panda/src/putil/vector_writable.cxx +++ b/panda/src/putil/vector_writable.cxx @@ -1,12 +1,25 @@ // Filename: vector_writable.cxx -// Created by: (15Jun00) -// +// Created by: (15Jun00) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vector_writable.h" -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Writable * #define NAME vector_writable diff --git a/panda/src/putil/vector_writable.h b/panda/src/putil/vector_writable.h index 0d09b88d14..c73fe5b852 100644 --- a/panda/src/putil/vector_writable.h +++ b/panda/src/putil/vector_writable.h @@ -1,6 +1,19 @@ // Filename: vector_writable.h // Created by: jason (14Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VECTOR_WRITABLE_H @@ -21,8 +34,8 @@ class Writable; // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA -#define EXPTP EXPTP_PANDA +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA #define TYPE Writable * #define NAME vector_writable diff --git a/panda/src/putil/writable.I b/panda/src/putil/writable.I index d80530fd9e..20c41a7d31 100644 --- a/panda/src/putil/writable.I +++ b/panda/src/putil/writable.I @@ -1,31 +1,44 @@ // Filename: writable.I // Created by: jason (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: Writable::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Writable:: -Writable() { +Writable() { } //////////////////////////////////////////////////////////////////// // Function: Writable::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Writable:: -Writable(const Writable &) { +Writable(const Writable &) { } //////////////////////////////////////////////////////////////////// // Function: Writable::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void Writable:: operator = (const Writable &) { -} +} diff --git a/panda/src/putil/writable.cxx b/panda/src/putil/writable.cxx index 886883e872..d012753c2e 100644 --- a/panda/src/putil/writable.cxx +++ b/panda/src/putil/writable.cxx @@ -1,6 +1,19 @@ // Filename: writable.cxx // Created by: jason (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -12,8 +25,8 @@ Writable* const Writable::Null = (Writable*)0L; //////////////////////////////////////////////////////////////////// // Function: Writable::Destructor // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// -Writable::~Writable() -{ +Writable::~Writable() +{ } diff --git a/panda/src/putil/writable.h b/panda/src/putil/writable.h index 8d3a576141..0e406eea99 100644 --- a/panda/src/putil/writable.h +++ b/panda/src/putil/writable.h @@ -1,6 +1,20 @@ // Filename: writable.h // Created by: jason (08Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __WRITABLE_ #define __WRITABLE_ @@ -32,7 +46,7 @@ public: //The essential virtual function interface to define //how any writable object, writes itself to a datagram - virtual void write_datagram(BamWriter *manager, Datagram &me) = 0; + virtual void write_datagram(BamWriter *manager, Datagram &me) = 0; //This function is the interface through which BamReader is //able to pass the completed object references into each @@ -44,7 +58,7 @@ public: //Return the number of pointers read. This is useful for when //a parent reads in a variable number of pointers, so the child //knows where to start reading from. - //virtual int complete_pointers(vector_typedWritable &plist, + //virtual int complete_pointers(vector_typedWritable &plist, // BamReader *manager) {} @@ -57,7 +71,7 @@ protected: //This interface function is written here, as a suggestion //for a function to write in any class that will have children //that are also Writable. To encourage code re-use - + //virtual void fillin(DatagramIterator& scan, BamReader *manager); public: diff --git a/panda/src/putil/writableConfigurable.cxx b/panda/src/putil/writableConfigurable.cxx index 4fb1612b39..466c7e9457 100644 --- a/panda/src/putil/writableConfigurable.cxx +++ b/panda/src/putil/writableConfigurable.cxx @@ -1,6 +1,20 @@ // Filename: writableConfigurable.cxx // Created by: jason (19Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "writableConfigurable.h" diff --git a/panda/src/putil/writableConfigurable.h b/panda/src/putil/writableConfigurable.h index ada737f301..bd409d532b 100644 --- a/panda/src/putil/writableConfigurable.h +++ b/panda/src/putil/writableConfigurable.h @@ -1,6 +1,20 @@ // Filename: writableConfigurable.h // Created by: jason (19Jun00) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// // #ifndef WRITABLECONFIGURABLE_H @@ -20,15 +34,15 @@ //////////////////////////////////////////////////////////////////// // Class : WritableConfigurable -// Description : Defined as a fix to allow creating Configurable and +// Description : Defined as a fix to allow creating Configurable and // Writable objects. Otherwise the compiler gets -// confused since both TypedWritable and Configurable +// confused since both TypedWritable and Configurable // inherit from TypedObject. // // An object that has data or parameters that are set // less frequently (at least occasionally) than every // frame. We can cache the configuration info by -// by using the "dirty" flag. +// by using the "dirty" flag. //////////////////////////////////////////////////////////////////// class EXPCL_PANDA WritableConfigurable : public TypedWritable { @@ -52,7 +66,7 @@ public: private: bool _dirty; - + public: virtual void write_datagram(BamWriter*, Datagram&) = 0; @@ -66,7 +80,7 @@ public: TypedWritable::init_type(); register_type(_type_handle, "WritableConfigurable", TypedWritable::get_class_type()); - TypeRegistry::ptr()->record_alternate_name(_type_handle, + TypeRegistry::ptr()->record_alternate_name(_type_handle, "WriteableConfigurable"); } virtual TypeHandle get_type() const { diff --git a/panda/src/putil/writableParam.I b/panda/src/putil/writableParam.I index 07f5f73ebb..0f0910382d 100644 --- a/panda/src/putil/writableParam.I +++ b/panda/src/putil/writableParam.I @@ -1,12 +1,25 @@ // Filename: writableParam.I // Created by: jason (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: WritableParam::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE WritableParam:: WritableParam(const Datagram &datagram) : @@ -17,7 +30,7 @@ WritableParam(const Datagram &datagram) : //////////////////////////////////////////////////////////////////// // Function: WritableParam::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE WritableParam:: WritableParam(const WritableParam ©) : @@ -29,7 +42,7 @@ WritableParam(const WritableParam ©) : //////////////////////////////////////////////////////////////////// // Function: WritableParam::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE WritableParam:: ~WritableParam(void) { @@ -38,7 +51,7 @@ INLINE WritableParam:: //////////////////////////////////////////////////////////////////// // Function: WritableParam::Copy Assignment Operator // Access: Private -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void WritableParam:: operator = (const WritableParam &) { @@ -49,7 +62,7 @@ operator = (const WritableParam &) { //////////////////////////////////////////////////////////////////// // Function: WritableParam::get_datagram // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const Datagram& WritableParam:: get_datagram(void) { diff --git a/panda/src/putil/writableParam.cxx b/panda/src/putil/writableParam.cxx index dbee096b10..8363f29035 100644 --- a/panda/src/putil/writableParam.cxx +++ b/panda/src/putil/writableParam.cxx @@ -1,6 +1,19 @@ // Filename: writableParam.cxx // Created by: jason (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "writableParam.h" diff --git a/panda/src/putil/writableParam.h b/panda/src/putil/writableParam.h index bf74e4b781..a8b8b5349f 100644 --- a/panda/src/putil/writableParam.h +++ b/panda/src/putil/writableParam.h @@ -1,6 +1,19 @@ // Filename: writableParam.h // Created by: jason (13Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef WRITABLEPARAM_H @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Class : WritableParam -// Description : The specific derivation of FactoryParam that +// Description : The specific derivation of FactoryParam that // contains the information needed by a TypedWritable // object. Simply contains a Datagram for the object // to construct itself from. diff --git a/panda/src/ribdisplay/config_ribdisplay.cxx b/panda/src/ribdisplay/config_ribdisplay.cxx index 21ab0c9f0a..1f392e1119 100644 --- a/panda/src/ribdisplay/config_ribdisplay.cxx +++ b/panda/src/ribdisplay/config_ribdisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_ribdisplay.cxx // Created by: cary (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_ribdisplay.h" diff --git a/panda/src/ribdisplay/config_ribdisplay.h b/panda/src/ribdisplay/config_ribdisplay.h index 9bac41aa93..3dfd748db9 100644 --- a/panda/src/ribdisplay/config_ribdisplay.h +++ b/panda/src/ribdisplay/config_ribdisplay.h @@ -2,6 +2,19 @@ // Created by: cary (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_RIBDISPLAY_H #define CONFIG_RIBDISPLAY_H diff --git a/panda/src/ribdisplay/ribGraphicsPipe.I b/panda/src/ribdisplay/ribGraphicsPipe.I index ce736bd6c4..e247d30808 100644 --- a/panda/src/ribdisplay/ribGraphicsPipe.I +++ b/panda/src/ribdisplay/ribGraphicsPipe.I @@ -1,13 +1,26 @@ // Filename: ribGraphicsPipe.I // Created by: drose (17Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsPipe::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RIBGraphicsPipe:: RIBGraphicsPipe(const PipeSpecifier& spec) @@ -27,7 +40,7 @@ get_file_name(void) const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsPipe::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RIBGraphicsPipe:: RIBGraphicsPipe(void) { @@ -38,7 +51,7 @@ RIBGraphicsPipe(void) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsPipe::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RIBGraphicsPipe:: RIBGraphicsPipe(const RIBGraphicsPipe&) { diff --git a/panda/src/ribdisplay/ribGraphicsPipe.cxx b/panda/src/ribdisplay/ribGraphicsPipe.cxx index 6337df426b..7ba7f642aa 100644 --- a/panda/src/ribdisplay/ribGraphicsPipe.cxx +++ b/panda/src/ribdisplay/ribGraphicsPipe.cxx @@ -1,6 +1,19 @@ // Filename: ribGraphicsPipe.cxx // Created by: drose (15Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ribGraphicsPipe.h" diff --git a/panda/src/ribdisplay/ribGraphicsPipe.h b/panda/src/ribdisplay/ribGraphicsPipe.h index 8cbd581e9e..b077f0c957 100644 --- a/panda/src/ribdisplay/ribGraphicsPipe.h +++ b/panda/src/ribdisplay/ribGraphicsPipe.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RIBGRAPHICSPIPE_H #define RIBGRAPHICSPIPE_H @@ -34,7 +47,7 @@ public: static void init_type(void); virtual TypeHandle get_type(void) const; virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + public: INLINE std::string get_file_name(void) const; @@ -44,7 +57,7 @@ protected: std::string _filename; private: - + static TypeHandle _type_handle; protected: diff --git a/panda/src/ribdisplay/ribGraphicsWindow.I b/panda/src/ribdisplay/ribGraphicsWindow.I index 9e078826f5..108b3227cc 100644 --- a/panda/src/ribdisplay/ribGraphicsWindow.I +++ b/panda/src/ribdisplay/ribGraphicsWindow.I @@ -1,6 +1,19 @@ // Filename: ribGraphicsWindow.I // Created by: drose (17Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/ribdisplay/ribGraphicsWindow.cxx b/panda/src/ribdisplay/ribGraphicsWindow.cxx index 51db781a45..9952fa8205 100644 --- a/panda/src/ribdisplay/ribGraphicsWindow.cxx +++ b/panda/src/ribdisplay/ribGraphicsWindow.cxx @@ -1,6 +1,19 @@ // Filename: ribGraphicsWindow.cxx // Created by: drose (15Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ribGraphicsWindow.h" @@ -15,7 +28,7 @@ TypeHandle RIBGraphicsWindow::_type_handle; //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsWindow::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// RIBGraphicsWindow:: RIBGraphicsWindow(GraphicsPipe *pipe) : GraphicsWindow(pipe) { @@ -25,12 +38,12 @@ RIBGraphicsWindow(GraphicsPipe *pipe) : GraphicsWindow(pipe) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsWindow::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// RIBGraphicsWindow:: RIBGraphicsWindow(GraphicsPipe *pipe, const GraphicsWindow::Properties &props) : - GraphicsWindow(pipe, props) + GraphicsWindow(pipe, props) { setup_window(pipe); } @@ -39,7 +52,7 @@ RIBGraphicsWindow(GraphicsPipe *pipe, //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsWindow::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// RIBGraphicsWindow:: ~RIBGraphicsWindow(void) { @@ -78,7 +91,7 @@ begin_frame() { if (image_per_frame()) { // If we're writing out an image file for each frame, specify it // here, inside the Frame control group. - _file << " Display \"" << get_image_filename() + _file << " Display \"" << get_image_filename() << "\" \"file\" \"rgba\"\n"; } } @@ -165,7 +178,7 @@ begin_file() { // frames, specify it outside the Frame control group. Maybe the // renderer will be able to generate a multi-frame output file // somehow. - _file << "Display \"" << get_image_filename() + _file << "Display \"" << get_image_filename() << "\" \"file\" \"rgb\"\n"; } @@ -230,7 +243,7 @@ format_name(const string &name_template) const { break; default: - cerr << "Invalid filename template specification: %" + cerr << "Invalid filename template specification: %" << format_spec << *ci << "\n"; } ++ci; @@ -374,7 +387,7 @@ RIBGraphicsWindow::make_RibGraphicsWindow(const FactoryParams ¶ms) { } GraphicsPipe *pipe = pipe_param->get_pipe(); - + GraphicsWindow::WindowProps *props_param; if (!get_param_into(props_param, params)) { return new RIBGraphicsWindow(pipe); diff --git a/panda/src/ribdisplay/ribGraphicsWindow.h b/panda/src/ribdisplay/ribGraphicsWindow.h index 3c1cdb1503..9b16dc05d7 100644 --- a/panda/src/ribdisplay/ribGraphicsWindow.h +++ b/panda/src/ribdisplay/ribGraphicsWindow.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RIBGRAPHICSWINDOW_H #define RIBGRAPHICSWINDOW_H @@ -118,14 +131,14 @@ protected: ofstream _file; public: - + static TypeHandle get_class_type(void); static void init_type(void); virtual TypeHandle get_type(void) const; virtual TypeHandle force_init_type() {init_type(); return get_class_type();} private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/ribgsg/config_ribgsg.cxx b/panda/src/ribgsg/config_ribgsg.cxx index a2802178c3..ceadd6a4ba 100644 --- a/panda/src/ribgsg/config_ribgsg.cxx +++ b/panda/src/ribgsg/config_ribgsg.cxx @@ -1,6 +1,19 @@ // Filename: config_ribgsg.cxx // Created by: cary (08Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_ribgsg.h" diff --git a/panda/src/ribgsg/config_ribgsg.h b/panda/src/ribgsg/config_ribgsg.h index cb8a7bdd47..cb5cd69c32 100644 --- a/panda/src/ribgsg/config_ribgsg.h +++ b/panda/src/ribgsg/config_ribgsg.h @@ -2,6 +2,19 @@ // Created by: cary (08Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_RIBGSG_H #define CONFIG_RIBGSG_H diff --git a/panda/src/ribgsg/ribGraphicsStateGuardian.I b/panda/src/ribgsg/ribGraphicsStateGuardian.I index c85ec5e6f0..9fe6185a00 100644 --- a/panda/src/ribgsg/ribGraphicsStateGuardian.I +++ b/panda/src/ribgsg/ribGraphicsStateGuardian.I @@ -1,4 +1,17 @@ // Filename: ribGraphicsStateGuardian.I // Created by: drose (15Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/ribgsg/ribGraphicsStateGuardian.cxx b/panda/src/ribgsg/ribGraphicsStateGuardian.cxx index f7e0a302eb..8d9ae69115 100644 --- a/panda/src/ribgsg/ribGraphicsStateGuardian.cxx +++ b/panda/src/ribgsg/ribGraphicsStateGuardian.cxx @@ -1,6 +1,19 @@ // Filename: ribGraphicsStateGuardian.cxx // Created by: drose (15Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ribGraphicsStateGuardian.h" @@ -68,7 +81,7 @@ issue_normal_rib(const Geom *geom, Geom::NormalIterator &ni) { static void issue_texcoord_rib(const Geom *geom, Geom::TexCoordIterator &ti) { // We need to reverse the V coordinate for RIB. - static LMatrix3f + static LMatrix3f texmat(1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 1.0); @@ -76,7 +89,7 @@ issue_texcoord_rib(const Geom *geom, Geom::TexCoordIterator &ti) { } static void -issue_color_rib(const Geom *geom, Geom::ColorIterator &ci, +issue_color_rib(const Geom *geom, Geom::ColorIterator &ci, const GraphicsStateGuardianBase *) { // RIB only cares about three-component color, so we have to convert // the four-component color attribute to three-component color here. @@ -86,14 +99,14 @@ issue_color_rib(const Geom *geom, Geom::ColorIterator &ci, //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// RIBGraphicsStateGuardian:: RIBGraphicsStateGuardian(GraphicsWindow *win) : GraphicsStateGuardian(win) { reset(); - + // Create a default RenderTraverser. - _render_traverser = + _render_traverser = new DirectRenderTraverser(this, RenderRelation::get_class_type()); _texture_directory = "maps"; @@ -175,7 +188,7 @@ clear(const RenderBuffer &, const DisplayRegion* ) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::prepare_display_region -// Access: Public +// Access: Public // Description: Prepare a display region for rendering (set up // scissor region and viewport) //////////////////////////////////////////////////////////////////// @@ -212,7 +225,7 @@ render_frame(const AllAttributesWrapper &initial_state) { Camera *cam = dr->get_camera(); // For each display region, render from the camera's view. - if (dr->is_active() && cam != (Camera *)NULL && + if (dr->is_active() && cam != (Camera *)NULL && cam->is_active() && cam->get_scene() != (Node *)NULL) { DisplayRegionStack old_dr = push_display_region(dr); prepare_display_region(); @@ -246,7 +259,7 @@ render_scene(Node *root, ProjectionNode *projnode, const AllAttributesWrapper &initial_state) { _current_root_node = root; - render_subgraph(_render_traverser, root, projnode, + render_subgraph(_render_traverser, root, projnode, initial_state, AllTransitionsWrapper()); } @@ -260,7 +273,7 @@ render_scene(Node *root, ProjectionNode *projnode, // process. //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: -render_subgraph(RenderTraverser *traverser, +render_subgraph(RenderTraverser *traverser, Node *subgraph, ProjectionNode *projnode, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans) { @@ -280,7 +293,7 @@ render_subgraph(RenderTraverser *traverser, const Projection *projection = projnode->get_projection(); if (projection->is_of_type(PerspectiveProjection::get_class_type())) { - const PerspectiveProjection &pp = + const PerspectiveProjection &pp = *DCAST(PerspectiveProjection, projection); const Frustumf &frustum = pp.get_frustum(); @@ -322,7 +335,7 @@ render_subgraph(RenderTraverser *traverser, new_line() << "Format " << width << " " << height << " " << (float)height * frame_aspect / (float)width << "\n"; new_line() << "FrameAspectRatio " << frame_aspect << "\n"; - + new_line() << "Sides 1\n"; new_line() << "Color [ 1 1 1 ]\n"; @@ -360,7 +373,7 @@ render_subgraph(RenderTraverser *traverser, // render process. //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: -render_subgraph(RenderTraverser *traverser, +render_subgraph(RenderTraverser *traverser, Node *subgraph, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans) { @@ -372,7 +385,7 @@ render_subgraph(RenderTraverser *traverser, //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::wants_normals // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool RIBGraphicsStateGuardian:: wants_normals() const { @@ -382,7 +395,7 @@ wants_normals() const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::wants_texcoords // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool RIBGraphicsStateGuardian:: wants_texcoords() const { @@ -392,7 +405,7 @@ wants_texcoords() const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::wants_colors // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool RIBGraphicsStateGuardian:: wants_colors() const { @@ -430,7 +443,7 @@ compute_distance_to(const LPoint3f &point) const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_point // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_point(const GeomPoint *) { @@ -439,7 +452,7 @@ draw_point(const GeomPoint *) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_line // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_line(const GeomLine *) { @@ -448,7 +461,7 @@ draw_line(const GeomLine *) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_sprite // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_sprite(const GeomSprite *) { @@ -457,7 +470,7 @@ draw_sprite(const GeomSprite *) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_polygon // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_polygon(const GeomPolygon *geom) { @@ -467,7 +480,7 @@ draw_polygon(const GeomPolygon *geom) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_tri // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_tri(const GeomTri *geom) { @@ -477,7 +490,7 @@ draw_tri(const GeomTri *geom) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_quad // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_quad(const GeomQuad *geom) { @@ -487,7 +500,7 @@ draw_quad(const GeomQuad *geom) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_tristrip // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_tristrip(const GeomTristrip *geom) { @@ -499,7 +512,7 @@ draw_tristrip(const GeomTristrip *geom) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_trifan // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_trifan(const GeomTrifan *geom) { @@ -511,7 +524,7 @@ draw_trifan(const GeomTrifan *geom) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_sphere // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_sphere(const GeomSphere *) { @@ -521,7 +534,7 @@ draw_sphere(const GeomSphere *) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::prepare_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// TextureContext *RIBGraphicsStateGuardian:: prepare_texture(Texture *tex) { @@ -540,7 +553,7 @@ prepare_texture(Texture *tex) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::apply_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: apply_texture(TextureContext *) { @@ -549,7 +562,7 @@ apply_texture(TextureContext *) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::release_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: release_texture(TextureContext *tc) { @@ -569,7 +582,7 @@ release_texture(TextureContext *tc) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::copy_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: copy_texture(TextureContext *, const DisplayRegion *) { @@ -587,7 +600,7 @@ copy_texture(TextureContext *, const DisplayRegion *, const RenderBuffer &) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_texture(TextureContext *, const DisplayRegion *) { @@ -605,7 +618,7 @@ draw_texture(TextureContext *, const DisplayRegion *, const RenderBuffer &) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::copy_pixel_buffer // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: copy_pixel_buffer(PixelBuffer *, const DisplayRegion *) { @@ -624,7 +637,7 @@ copy_pixel_buffer(PixelBuffer *, const DisplayRegion *, const RenderBuffer &) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::draw_pixel_buffer // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: draw_pixel_buffer(PixelBuffer *, const DisplayRegion *, @@ -644,7 +657,7 @@ draw_pixel_buffer(PixelBuffer *, const DisplayRegion *, const RenderBuffer &, //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::issue_transform // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: issue_transform(const TransformAttribute *attrib) { @@ -655,7 +668,7 @@ issue_transform(const TransformAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::issue_color // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: issue_color(const ColorAttribute *attrib) { @@ -668,13 +681,13 @@ issue_color(const ColorAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::issue_texture // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: issue_texture(const TextureAttribute *attrib) { if (attrib->is_off()) { // If no textures are enabled, we can use the nontextured shader. - new_line() + new_line() << "Surface \"plastic\"\n"; } else { @@ -699,7 +712,7 @@ issue_texture(const TextureAttribute *attrib) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::issue_light // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: issue_light(const LightAttribute *attrib) { @@ -735,11 +748,11 @@ issue_light(const LightAttribute *attrib) { LightIDs::const_iterator ii = _light_ids.find(light); assert(ii != _light_ids.end()); int id = (*ii).second; - + if (!_enabled_lights[id]) { new_line() << "Illuminate " << id << " 1\n"; } - + // We'll temporarily set the enabled flag to false, even // though we've just activated the light. This is so we can // later identify the lights we need to turn off. @@ -854,7 +867,7 @@ set_color(const RGBColorf &color) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::get_rib_stuff -// Access: Protected +// Access: Protected // Description: Traverses the scene graph to identify any textures // or lights, or anything that we need to define up // front in RIB. @@ -869,7 +882,7 @@ get_rib_stuff(Node *root, const AllAttributesWrapper &initial_state) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::define_texture -// Access: Protected +// Access: Protected // Description: Called by the RibStuffTraverser (initiated above), // this defines a single texture object in the RIB file // if it has not already been defined. @@ -886,7 +899,7 @@ define_texture(const Texture *tex) { rib_name = image_filename; rib_name.set_extension("tx"); - + new_line() << "MakeTexture \"" << image_filename << "\"\n"; new_line(12) << "\"" << rib_name << "\""; @@ -908,7 +921,7 @@ define_texture(const Texture *tex) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::define_light -// Access: Protected +// Access: Protected // Description: Called by the RibStuffTraverser (initiated above), // this defines a single light object in the RIB file // if it has not already been defined. @@ -947,7 +960,7 @@ define_light(const Light *light) { write_light_color(slight->get_color()); write_light_from(slight); write_light_to(slight); - (*_output) + (*_output) << " \"coneangle\" " << deg_2_rad(slight->get_cutoff_angle()) << "\n"; @@ -965,7 +978,7 @@ define_light(const Light *light) { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::write_light_color -// Access: Protected +// Access: Protected // Description: Called by define_light() to write out a single // light's color and intensity values. //////////////////////////////////////////////////////////////////// @@ -981,7 +994,7 @@ write_light_color(const Colorf &color) const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::write_light_from -// Access: Protected +// Access: Protected // Description: Called by define_light() to write out a single // light's position. //////////////////////////////////////////////////////////////////// @@ -994,7 +1007,7 @@ write_light_from(const Node *light) const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::write_light_to -// Access: Protected +// Access: Protected // Description: Called by define_light() to write out a single // light's direction. //////////////////////////////////////////////////////////////////// @@ -1009,7 +1022,7 @@ write_light_to(const Node *light) const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::new_line -// Access: Protected +// Access: Protected // Description: Beins a new line of output at the current indenting // level. (Does not actually issue the newline // character, however). @@ -1021,7 +1034,7 @@ new_line(int extra_indent) const { //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::reset_transform -// Access: Protected +// Access: Protected // Description: Outputs an RiTransform command with the given // transformation matrix, which resets the current // transformation to that specified. @@ -1030,17 +1043,17 @@ void RIBGraphicsStateGuardian:: reset_transform(const LMatrix4f &mat) const { new_line() << "Transform [ " << mat(0,0) << " " << mat(0,1) << " " << mat(0,2) << " " << mat(0,3) << "\n"; - new_line(12) << mat(1,0) << " " << mat(1,1) << " " + new_line(12) << mat(1,0) << " " << mat(1,1) << " " << mat(1,2) << " " << mat(1,3) << "\n"; - new_line(12) << mat(2,0) << " " << mat(2,1) << " " + new_line(12) << mat(2,0) << " " << mat(2,1) << " " << mat(2,2) << " " << mat(2,3) << "\n"; - new_line(12) << mat(3,0) << " " << mat(3,1) << " " + new_line(12) << mat(3,0) << " " << mat(3,1) << " " << mat(3,2) << " " << mat(3,3) << " ]\n"; } //////////////////////////////////////////////////////////////////// // Function: RIBGraphicsStateGuardian::concat_transform -// Access: Protected +// Access: Protected // Description: Outputs an RiTransform command with the given // transformation matrix, which composes the specified // matrix with the current transformation. @@ -1049,11 +1062,11 @@ void RIBGraphicsStateGuardian:: concat_transform(const LMatrix4f &mat) const { new_line() << "ConcatTransform [ " << mat(0,0) << " " << mat(0,1) << " " << mat(0,2) << " " << mat(0,3) << "\n"; - new_line(18) << mat(1,0) << " " << mat(1,1) << " " + new_line(18) << mat(1,0) << " " << mat(1,1) << " " << mat(1,2) << " " << mat(1,3) << "\n"; - new_line(18) << mat(2,0) << " " << mat(2,1) << " " + new_line(18) << mat(2,0) << " " << mat(2,1) << " " << mat(2,2) << " " << mat(2,3) << "\n"; - new_line(18) << mat(3,0) << " " << mat(3,1) << " " + new_line(18) << mat(3,0) << " " << mat(3,1) << " " << mat(3,2) << " " << mat(3,3) << " ]\n"; } @@ -1081,7 +1094,7 @@ draw_simple_poly(const Geom *geom) { issue_normal_rib, issue_texcoord_rib, issue_color_rib); - + for (int i = 0; i < nprims; i++) { // First, for each primitive, we build up the various polygon // attributes in our global arrays. @@ -1095,15 +1108,15 @@ draw_simple_poly(const Geom *geom) { if (geom->get_binding(G_NORMAL) == G_OVERALL) { ni = geom->make_normal_iterator(); } - + // Draw overall issuer.issue_color(G_OVERALL, ci); issuer.issue_normal(G_OVERALL, ni); - + // Draw per primitive issuer.issue_color(G_PER_PRIM, ci); issuer.issue_normal(G_PER_PRIM, ni); - + for (int j = 0; j < geom->get_length(i); j++) { // Draw per vertex issuer.issue_color(G_PER_VERTEX, ci); @@ -1124,7 +1137,7 @@ draw_simple_poly(const Geom *geom) { // described by the global rib_* arrays. //////////////////////////////////////////////////////////////////// void RIBGraphicsStateGuardian:: -write_polygon(int num_verts) { +write_polygon(int num_verts) { if (num_verts < 3) { return; } @@ -1169,7 +1182,7 @@ write_polygon(int num_verts) { if (!rib_colors.empty()) { assert(rib_colors.size() == num_verts); - + write_long_list(*_output, _indent_level, rib_colors.rbegin(), rib_colors.rend(), " \"Cs\" ", " ", 72); diff --git a/panda/src/ribgsg/ribGraphicsStateGuardian.h b/panda/src/ribgsg/ribGraphicsStateGuardian.h index ee8747af52..a4bddd293c 100644 --- a/panda/src/ribgsg/ribGraphicsStateGuardian.h +++ b/panda/src/ribgsg/ribGraphicsStateGuardian.h @@ -2,6 +2,19 @@ // Created by: drose (15Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RIBGRAPHICSSTATEGUARDIAN_H #define RIBGRAPHICSSTATEGUARDIAN_H @@ -42,7 +55,7 @@ public: virtual void render_frame(const AllAttributesWrapper &initial_state); virtual void render_scene(Node *root, ProjectionNode *projnode, const AllAttributesWrapper &initial_state); - virtual void render_subgraph(RenderTraverser *traverser, + virtual void render_subgraph(RenderTraverser *traverser, Node *subgraph, ProjectionNode *projnode, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans); @@ -117,27 +130,27 @@ protected: virtual void restore_frame_buffer(SavedFrameBuffer *frame_buffer); void set_color(const RGBColorf &color); - + void get_rib_stuff(Node *root, const AllAttributesWrapper &initial_state); void define_texture(const Texture *tex); void define_light(const Light *light); void write_light_color(const Colorf &color) const; void write_light_from(const Node *light) const; void write_light_to(const Node *light) const; - + ostream &new_line(int extra_indent = 0) const; void reset_transform(const LMatrix4f &mat) const; void concat_transform(const LMatrix4f &mat) const; - + void draw_simple_poly(const Geom *geom); void write_polygon(int num_verts); - + static void get_color_and_intensity(const RGBColorf &input, RGBColorf &output, float &intensity); RGBColorf _current_color; - + string _texture_directory; string _texture_extension; ostream *_output; @@ -148,8 +161,8 @@ protected: LightIDs _light_ids; typedef vector EnabledLights; EnabledLights _enabled_lights; - - + + public: static GraphicsStateGuardian * make_RIBGraphicsStateGuardian(const FactoryParams ¶ms); diff --git a/panda/src/ribgsg/ribStuffTraverser.cxx b/panda/src/ribgsg/ribStuffTraverser.cxx index 2456fc630e..5adff0ee22 100644 --- a/panda/src/ribgsg/ribStuffTraverser.cxx +++ b/panda/src/ribgsg/ribStuffTraverser.cxx @@ -1,6 +1,19 @@ // Filename: ribStuffTraverser.cxx // Created by: drose (16Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "ribStuffTraverser.h" @@ -14,7 +27,7 @@ //////////////////////////////////////////////////////////////////// // Function: RibStuffTraverser::reached_node -// Access: Public +// Access: Public // Description: Called for each node of the scene graph; this does // the work of identifying new things and registering // them in the RIB file. @@ -23,7 +36,7 @@ bool RibStuffTraverser:: reached_node(Node *node, AllAttributesWrapper &state, NullLevelState &) { if (node->is_of_type(GeomNode::get_class_type())) { const TextureAttribute *tex_attrib; - if (!get_attribute_into(tex_attrib, state, + if (!get_attribute_into(tex_attrib, state, TextureTransition::get_class_type())) { if (tex_attrib->is_on()) { _gsg->define_texture(tex_attrib->get_texture()); diff --git a/panda/src/ribgsg/ribStuffTraverser.h b/panda/src/ribgsg/ribStuffTraverser.h index ea27e412c1..4c31ad6b13 100644 --- a/panda/src/ribgsg/ribStuffTraverser.h +++ b/panda/src/ribgsg/ribStuffTraverser.h @@ -2,6 +2,19 @@ // Created by: drose (16Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RIBSTUFFTRAVERSER_H #define RIBSTUFFTRAVERSER_H @@ -20,7 +33,7 @@ class RIBGraphicsStateGuardian; // Class : RibStuffTraverser // Description : //////////////////////////////////////////////////////////////////// -class RibStuffTraverser : +class RibStuffTraverser : public TraverserVisitor { public: RibStuffTraverser(RIBGraphicsStateGuardian *gsg) : _gsg(gsg) { } diff --git a/panda/src/sgattrib/alphaTransformAttribute.I b/panda/src/sgattrib/alphaTransformAttribute.I index 50f94b3d2c..b10d7f33c5 100644 --- a/panda/src/sgattrib/alphaTransformAttribute.I +++ b/panda/src/sgattrib/alphaTransformAttribute.I @@ -1,13 +1,26 @@ // Filename: alphaTransformAttribute.I // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AlphaTransformAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AlphaTransformAttribute:: AlphaTransformAttribute() @@ -17,7 +30,7 @@ AlphaTransformAttribute() //////////////////////////////////////////////////////////////////// // Function: AlphaTransformAttribute::set_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void AlphaTransformAttribute:: set_offset(float offset) { @@ -27,7 +40,7 @@ set_offset(float offset) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformAttribute::get_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float AlphaTransformAttribute:: get_offset() const { @@ -37,7 +50,7 @@ get_offset() const { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformAttribute::set_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void AlphaTransformAttribute:: set_scale(float scale) { @@ -47,7 +60,7 @@ set_scale(float scale) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformAttribute::get_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float AlphaTransformAttribute:: get_scale() const { diff --git a/panda/src/sgattrib/alphaTransformAttribute.cxx b/panda/src/sgattrib/alphaTransformAttribute.cxx index b76b86f47d..dd615482ce 100644 --- a/panda/src/sgattrib/alphaTransformAttribute.cxx +++ b/panda/src/sgattrib/alphaTransformAttribute.cxx @@ -1,6 +1,19 @@ // Filename: alphaTransformAttribute.cxx // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "alphaTransformAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int AlphaTransformAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/alphaTransformAttribute.h b/panda/src/sgattrib/alphaTransformAttribute.h index e98b660c76..436bd66e68 100644 --- a/panda/src/sgattrib/alphaTransformAttribute.h +++ b/panda/src/sgattrib/alphaTransformAttribute.h @@ -1,6 +1,19 @@ // Filename: alphaTransformAttribute.h // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ALPHA_TRANSFORM_TRANSITION_H diff --git a/panda/src/sgattrib/alphaTransformProperty.I b/panda/src/sgattrib/alphaTransformProperty.I index 1cc0a6cc11..52fd6f967e 100644 --- a/panda/src/sgattrib/alphaTransformProperty.I +++ b/panda/src/sgattrib/alphaTransformProperty.I @@ -1,12 +1,25 @@ // Filename: alphaTransformProperty.I // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AlphaTransformProperty:: AlphaTransformProperty() : @@ -17,7 +30,7 @@ AlphaTransformProperty() : //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AlphaTransformProperty:: AlphaTransformProperty(float offset, float scale) : @@ -28,7 +41,7 @@ AlphaTransformProperty(float offset, float scale) : //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::set_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void AlphaTransformProperty:: set_offset(float offset) { @@ -38,7 +51,7 @@ set_offset(float offset) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::get_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float AlphaTransformProperty:: get_offset() const { @@ -48,7 +61,7 @@ get_offset() const { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::set_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void AlphaTransformProperty:: set_scale(float scale) { @@ -58,7 +71,7 @@ set_scale(float scale) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::get_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float AlphaTransformProperty:: get_scale() const { diff --git a/panda/src/sgattrib/alphaTransformProperty.cxx b/panda/src/sgattrib/alphaTransformProperty.cxx index 3a07e8572a..02a9bd0275 100644 --- a/panda/src/sgattrib/alphaTransformProperty.cxx +++ b/panda/src/sgattrib/alphaTransformProperty.cxx @@ -1,6 +1,19 @@ // Filename: alphaTransformProperty.cxx // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "alphaTransformProperty.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// int AlphaTransformProperty:: compare_to(const AlphaTransformProperty &other) const { @@ -26,7 +39,7 @@ compare_to(const AlphaTransformProperty &other) const { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void AlphaTransformProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/alphaTransformProperty.h b/panda/src/sgattrib/alphaTransformProperty.h index cca6689af1..8a6c9e30cb 100644 --- a/panda/src/sgattrib/alphaTransformProperty.h +++ b/panda/src/sgattrib/alphaTransformProperty.h @@ -1,6 +1,19 @@ // Filename: alphaTransformProperty.h // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ALPHA_TRANSFORM_PROPERTY_H diff --git a/panda/src/sgattrib/alphaTransformTransition.I b/panda/src/sgattrib/alphaTransformTransition.I index 02b2948f5d..ce30f2c53b 100644 --- a/panda/src/sgattrib/alphaTransformTransition.I +++ b/panda/src/sgattrib/alphaTransformTransition.I @@ -1,12 +1,25 @@ // Filename: alphaTransformTransition.I // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: AlphaTransformTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE AlphaTransformTransition:: AlphaTransformTransition(float offset, float scale) : @@ -17,7 +30,7 @@ AlphaTransformTransition(float offset, float scale) : //////////////////////////////////////////////////////////////////// // Function: AlphaTransformTransition::set_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void AlphaTransformTransition:: set_offset(float offset) { @@ -27,7 +40,7 @@ set_offset(float offset) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformTransition::get_offset // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float AlphaTransformTransition:: get_offset() const { @@ -37,7 +50,7 @@ get_offset() const { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformTransition::set_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void AlphaTransformTransition:: set_scale(float scale) { @@ -47,7 +60,7 @@ set_scale(float scale) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformTransition::get_scale // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float AlphaTransformTransition:: get_scale() const { diff --git a/panda/src/sgattrib/alphaTransformTransition.cxx b/panda/src/sgattrib/alphaTransformTransition.cxx index 405a6d799e..e5ec2546bf 100644 --- a/panda/src/sgattrib/alphaTransformTransition.cxx +++ b/panda/src/sgattrib/alphaTransformTransition.cxx @@ -1,6 +1,19 @@ // Filename: alphaTransformTransition.cxx // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "alphaTransformTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: AlphaTransformTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int AlphaTransformTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/alphaTransformTransition.h b/panda/src/sgattrib/alphaTransformTransition.h index 80aa2fd9d6..675841962b 100644 --- a/panda/src/sgattrib/alphaTransformTransition.h +++ b/panda/src/sgattrib/alphaTransformTransition.h @@ -1,6 +1,19 @@ // Filename: alphaTransformTransition.h // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef ALPHA_TRANSFORM_TRANSTION_H diff --git a/panda/src/sgattrib/attribTraverser.cxx b/panda/src/sgattrib/attribTraverser.cxx index 045e750bb0..b5caa0f085 100644 --- a/panda/src/sgattrib/attribTraverser.cxx +++ b/panda/src/sgattrib/attribTraverser.cxx @@ -1,6 +1,19 @@ // Filename: attribTraverser.cxx // Created by: mike (16Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "attribTraverser.h" @@ -19,20 +32,20 @@ //////////////////////////////////////////////////////////////////// // Function: AttribTraverser::constructor -// Access: Public -// Description: +// Access: Public +// Description: //////////////////////////////////////////////////////////////////// AttribTraverser:: -AttribTraverser() +AttribTraverser() : _has_attrib(false), _has_transition(false) -{ +{ _attrib_type = TypeHandle::none(); _transition_type = TypeHandle::none(); } //////////////////////////////////////////////////////////////////// // Function: AttribTraverser::reached_node -// Access: Public +// Access: Public // Description: Called for each node of the scene graph //////////////////////////////////////////////////////////////////// bool AttribTraverser:: @@ -44,10 +57,10 @@ reached_node(Node *node, NodeAttributeWrapper &state, NullLevelState &) { return true; } - if (node->is_of_type(GeomNode::get_class_type())) + if (node->is_of_type(GeomNode::get_class_type())) { NodeAttribute *attrib = state.get_attrib(); - if (attrib != (NodeAttribute *)NULL) + if (attrib != (NodeAttribute *)NULL) { nassertr(attrib->is_of_type(_attrib_type), false); @@ -73,7 +86,7 @@ reached_node(Node *node, NodeAttributeWrapper &state, NullLevelState &) { //////////////////////////////////////////////////////////////////// // Function: AttribTraverser::forward_arc -// Access: Public +// Access: Public // Description: Called for each forward arc of the scene graph //////////////////////////////////////////////////////////////////// bool AttribTraverser:: @@ -100,31 +113,31 @@ forward_arc(NodeRelation *, TransitionWrapper &trans, } //////////////////////////////////////////////////////////////////// // Function: AttribTraverser::set_attrib_type -// Access: Public -// Description: +// Access: Public +// Description: //////////////////////////////////////////////////////////////////// void AttribTraverser:: -set_attrib_type(TypeHandle type) +set_attrib_type(TypeHandle type) { _attrib_type = type; } //////////////////////////////////////////////////////////////////// // Function: AttribTraverser::set_transition_type -// Access: Public -// Description: +// Access: Public +// Description: //////////////////////////////////////////////////////////////////// void AttribTraverser:: -set_transition_type(TypeHandle type) +set_transition_type(TypeHandle type) { _transition_type = type; nassertv(_transition_type.is_derived_from(ImmediateTransition::get_class_type())); } //////////////////////////////////////////////////////////////////// -// Function: is_textured +// Function: is_textured // Description: Recursively checks the tree of nodes from root to -// see if any geometry is textured +// see if any geometry is textured //////////////////////////////////////////////////////////////////// bool is_textured(Node* root) { @@ -132,20 +145,20 @@ is_textured(Node* root) { trav.set_attrib_type(TextureAttribute::get_class_type()); - df_traverse(root, trav, - NodeAttributeWrapper(TextureTransition::get_class_type()), + df_traverse(root, trav, + NodeAttributeWrapper(TextureTransition::get_class_type()), NullLevelState(), RenderRelation::get_class_type()); return trav._has_attrib; } //////////////////////////////////////////////////////////////////// -// Function: is_textured +// Function: is_textured // Description: Recursively checks the tree of nodes from root to -// see if any geometry is textured +// see if any geometry is textured //////////////////////////////////////////////////////////////////// bool -is_textured(Node* root, const AllAttributesWrapper &init_state) +is_textured(Node* root, const AllAttributesWrapper &init_state) { AttribTraverser trav; @@ -160,9 +173,9 @@ is_textured(Node* root, const AllAttributesWrapper &init_state) } //////////////////////////////////////////////////////////////////// -// Function: is_shaded +// Function: is_shaded // Description: Recursively checks the tree of nodes from root to -// see if any geometry is shaded +// see if any geometry is shaded //////////////////////////////////////////////////////////////////// bool is_shaded(Node* root) { @@ -175,8 +188,8 @@ is_shaded(Node* root) { //handle of a ShaderTransition trav.set_transition_type(TypeRegistry::ptr()->find_type("ShaderTransition")); - df_traverse(root, trav, - NodeAttributeWrapper(TypeRegistry::ptr()->find_type("ShaderTransition")), + df_traverse(root, trav, + NodeAttributeWrapper(TypeRegistry::ptr()->find_type("ShaderTransition")), NullLevelState(), RenderRelation::get_class_type()); return trav._has_attrib; diff --git a/panda/src/sgattrib/attribTraverser.h b/panda/src/sgattrib/attribTraverser.h index 60d237ea65..4c3112812b 100644 --- a/panda/src/sgattrib/attribTraverser.h +++ b/panda/src/sgattrib/attribTraverser.h @@ -2,6 +2,19 @@ // Created by: mike (16Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef ATTRIBTRAVERSER_H #define ATTRIBTRAVERSER_H @@ -19,7 +32,7 @@ class AllAttributesWrapper; // Class : AttribTraverser // Description : //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA AttribTraverser : +class EXPCL_PANDA AttribTraverser : public TraverserVisitor { public: AttribTraverser(); diff --git a/panda/src/sgattrib/billboardTransition.I b/panda/src/sgattrib/billboardTransition.I index f067076075..e956f979e9 100644 --- a/panda/src/sgattrib/billboardTransition.I +++ b/panda/src/sgattrib/billboardTransition.I @@ -1,15 +1,28 @@ // Filename: billboardTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: BillboardTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE BillboardTransition:: -BillboardTransition() { +BillboardTransition() { _up_vector = LVector3f::up(); _eye_relative = false; _axial_rotate = true; diff --git a/panda/src/sgattrib/billboardTransition.cxx b/panda/src/sgattrib/billboardTransition.cxx index 669eefdc73..3520f9cdf6 100644 --- a/panda/src/sgattrib/billboardTransition.cxx +++ b/panda/src/sgattrib/billboardTransition.cxx @@ -1,6 +1,19 @@ // Filename: billboardTransition.cxx // Created by: mike (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "billboardTransition.h" @@ -34,7 +47,7 @@ make_copy() const { } //////////////////////////////////////////////////////////////////// -// Function: BillboardTransition::sub_render +// Function: BillboardTransition::sub_render // Access: Public, Virtual // Description: //////////////////////////////////////////////////////////////////// @@ -51,7 +64,7 @@ sub_render(NodeRelation *arc, const AllAttributesWrapper &, // And the relative coordinate space. LMatrix4f rel_mat; NodeTransitionWrapper ntw(TransformTransition::get_class_type()); - wrt(camera, node, trav->begin(), trav->end(), + wrt(camera, node, trav->begin(), trav->end(), ntw, RenderRelation::get_class_type()); TransformTransition *tt; if (!get_transition_into(tt, ntw)) { @@ -81,7 +94,7 @@ sub_render(NodeRelation *arc, const AllAttributesWrapper &, camera_pos[0] = -rel_mat(3,0); camera_pos[1] = -rel_mat(3,1); camera_pos[2] = -rel_mat(3,2); - + up = _up_vector; } @@ -110,7 +123,7 @@ sub_render(NodeRelation *arc, const AllAttributesWrapper &, trans.compose_in_place(new_trans); // Continue the render pass - return true; + return true; } //////////////////////////////////////////////////////////////////// @@ -128,7 +141,7 @@ has_sub_render() const { //////////////////////////////////////////////////////////////////// // Function: BillboardTransition::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void BillboardTransition:: output(ostream &out) const { @@ -146,7 +159,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: BillboardTransition::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void BillboardTransition:: write(ostream &out, int indent_level) const { @@ -161,14 +174,14 @@ write(ostream &out, int indent_level) const { } out << " Billboard:\n"; - indent(out, indent_level + 2) + indent(out, indent_level + 2) << "up vector: " << _up_vector << "\n"; } //////////////////////////////////////////////////////////////////// // Function: BillboardTransition::internal_compare_to // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int BillboardTransition:: internal_compare_to(const NodeTransition *other) const { diff --git a/panda/src/sgattrib/billboardTransition.h b/panda/src/sgattrib/billboardTransition.h index 7caee51249..88c1ca238b 100644 --- a/panda/src/sgattrib/billboardTransition.h +++ b/panda/src/sgattrib/billboardTransition.h @@ -2,6 +2,19 @@ // Created by: mike (19Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BILLBOARDTRANSITION_H #define BILLBOARDTRANSITION_H @@ -65,7 +78,7 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_BillboardTransition(const FactoryParams ¶ms); diff --git a/panda/src/sgattrib/clipPlaneAttribute.I b/panda/src/sgattrib/clipPlaneAttribute.I index 7eb3922df5..c520695dda 100644 --- a/panda/src/sgattrib/clipPlaneAttribute.I +++ b/panda/src/sgattrib/clipPlaneAttribute.I @@ -1,12 +1,25 @@ // Filename: clipPlaneAttribute.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClipPlaneAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClipPlaneAttribute:: ClipPlaneAttribute() { @@ -15,7 +28,7 @@ ClipPlaneAttribute() { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneAttribute::set_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ClipPlaneAttribute:: set_on(const PT(PlaneNode) &property) { @@ -25,7 +38,7 @@ set_on(const PT(PlaneNode) &property) { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneAttribute::set_off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ClipPlaneAttribute:: set_off(const PT(PlaneNode) &property) { @@ -35,7 +48,7 @@ set_off(const PT(PlaneNode) &property) { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneAttribute::is_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ClipPlaneAttribute:: is_on(const PT(PlaneNode) &property) const { @@ -45,7 +58,7 @@ is_on(const PT(PlaneNode) &property) const { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneAttribute::is_off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ClipPlaneAttribute:: is_off(const PT(PlaneNode) &property) const { diff --git a/panda/src/sgattrib/clipPlaneAttribute.cxx b/panda/src/sgattrib/clipPlaneAttribute.cxx index 40c0e9506d..1b487e49b7 100644 --- a/panda/src/sgattrib/clipPlaneAttribute.cxx +++ b/panda/src/sgattrib/clipPlaneAttribute.cxx @@ -1,6 +1,19 @@ // Filename: clipPlaneAttribute.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clipPlaneAttribute.h" diff --git a/panda/src/sgattrib/clipPlaneAttribute.h b/panda/src/sgattrib/clipPlaneAttribute.h index 3af0a5a751..d2c2ae9c1d 100644 --- a/panda/src/sgattrib/clipPlaneAttribute.h +++ b/panda/src/sgattrib/clipPlaneAttribute.h @@ -1,6 +1,19 @@ // Filename: clipPlaneAttribute.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CLIPPLANEATTRIBUTE_H diff --git a/panda/src/sgattrib/clipPlaneTransition.I b/panda/src/sgattrib/clipPlaneTransition.I index 8032f846fc..896cc14a20 100644 --- a/panda/src/sgattrib/clipPlaneTransition.I +++ b/panda/src/sgattrib/clipPlaneTransition.I @@ -1,12 +1,25 @@ // Filename: clipPlaneTransition.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ClipPlaneTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ClipPlaneTransition:: ClipPlaneTransition() { @@ -28,7 +41,7 @@ all_off() { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneTransition::set_identity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ClipPlaneTransition:: set_identity(const PT(PlaneNode) &property) { @@ -38,7 +51,7 @@ set_identity(const PT(PlaneNode) &property) { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneTransition::set_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ClipPlaneTransition:: set_on(const PT(PlaneNode) &property) { @@ -48,7 +61,7 @@ set_on(const PT(PlaneNode) &property) { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneTransition::set_off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ClipPlaneTransition:: set_off(const PT(PlaneNode) &property) { @@ -58,7 +71,7 @@ set_off(const PT(PlaneNode) &property) { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneTransition::is_identity // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ClipPlaneTransition:: is_identity(const PT(PlaneNode) &property) const { @@ -68,7 +81,7 @@ is_identity(const PT(PlaneNode) &property) const { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneTransition::is_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ClipPlaneTransition:: is_on(const PT(PlaneNode) &property) const { @@ -78,7 +91,7 @@ is_on(const PT(PlaneNode) &property) const { //////////////////////////////////////////////////////////////////// // Function: ClipPlaneTransition::is_off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool ClipPlaneTransition:: is_off(const PT(PlaneNode) &property) const { diff --git a/panda/src/sgattrib/clipPlaneTransition.cxx b/panda/src/sgattrib/clipPlaneTransition.cxx index 4d551da557..b55a952158 100644 --- a/panda/src/sgattrib/clipPlaneTransition.cxx +++ b/panda/src/sgattrib/clipPlaneTransition.cxx @@ -1,6 +1,19 @@ // Filename: clipPlaneTransition.cxx // Created by: mike (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "clipPlaneTransition.h" diff --git a/panda/src/sgattrib/clipPlaneTransition.h b/panda/src/sgattrib/clipPlaneTransition.h index b6cc0638a7..b75a7e7234 100644 --- a/panda/src/sgattrib/clipPlaneTransition.h +++ b/panda/src/sgattrib/clipPlaneTransition.h @@ -2,6 +2,19 @@ // Created by: mike (19Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CLIPPLANETRANSITION_H #define CLIPPLANETRANSITION_H @@ -30,7 +43,7 @@ public: INLINE bool is_identity(const PT(PlaneNode) &prop) const; INLINE bool is_on(const PT(PlaneNode) &prop) const; INLINE bool is_off(const PT(PlaneNode) &prop) const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; virtual NodeTransition *make_identity() const; diff --git a/panda/src/sgattrib/colorAttribute.I b/panda/src/sgattrib/colorAttribute.I index b8bde44abc..8a02b93faa 100644 --- a/panda/src/sgattrib/colorAttribute.I +++ b/panda/src/sgattrib/colorAttribute.I @@ -1,12 +1,25 @@ // Filename: colorAttribute.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorAttribute:: ColorAttribute() { @@ -44,7 +57,7 @@ INLINE void ColorAttribute:: set_uncolor() { _value = ColorProperty(); } - + //////////////////////////////////////////////////////////////////// // Function: ColorAttribute::is_real // Access: Public diff --git a/panda/src/sgattrib/colorAttribute.cxx b/panda/src/sgattrib/colorAttribute.cxx index 2f69c0db8b..26a8ff22ee 100644 --- a/panda/src/sgattrib/colorAttribute.cxx +++ b/panda/src/sgattrib/colorAttribute.cxx @@ -1,6 +1,19 @@ // Filename: colorAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorAttribute.h" diff --git a/panda/src/sgattrib/colorAttribute.h b/panda/src/sgattrib/colorAttribute.h index 2cf5dc094e..c7c2cfe57e 100644 --- a/panda/src/sgattrib/colorAttribute.h +++ b/panda/src/sgattrib/colorAttribute.h @@ -1,6 +1,19 @@ // Filename: colorAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLORATTRIBUTE_H diff --git a/panda/src/sgattrib/colorBlendAttribute.I b/panda/src/sgattrib/colorBlendAttribute.I index 5d1d358951..f89979f893 100644 --- a/panda/src/sgattrib/colorBlendAttribute.I +++ b/panda/src/sgattrib/colorBlendAttribute.I @@ -1,12 +1,25 @@ // Filename: colorBlendAttribute.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorBlendAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorBlendAttribute:: ColorBlendAttribute() : @@ -17,7 +30,7 @@ ColorBlendAttribute() : //////////////////////////////////////////////////////////////////// // Function: ColorBlendAttribute::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ColorBlendAttribute:: set_mode(ColorBlendProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(ColorBlendProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: ColorBlendAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorBlendProperty::Mode ColorBlendAttribute:: get_mode() const { diff --git a/panda/src/sgattrib/colorBlendAttribute.cxx b/panda/src/sgattrib/colorBlendAttribute.cxx index 1ef0a7928f..202d491ca6 100644 --- a/panda/src/sgattrib/colorBlendAttribute.cxx +++ b/panda/src/sgattrib/colorBlendAttribute.cxx @@ -1,6 +1,19 @@ // Filename: colorBlendAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorBlendAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: ColorBlendAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ColorBlendAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/colorBlendAttribute.h b/panda/src/sgattrib/colorBlendAttribute.h index cf7e106632..5ae7e59c76 100644 --- a/panda/src/sgattrib/colorBlendAttribute.h +++ b/panda/src/sgattrib/colorBlendAttribute.h @@ -1,6 +1,19 @@ // Filename: colorBlendAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLORBLENDATTRIBUTE_H diff --git a/panda/src/sgattrib/colorBlendProperty.I b/panda/src/sgattrib/colorBlendProperty.I index 9cd417c006..05f8fb7002 100644 --- a/panda/src/sgattrib/colorBlendProperty.I +++ b/panda/src/sgattrib/colorBlendProperty.I @@ -1,12 +1,25 @@ // Filename: colorBlendProperty.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorBlendProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorBlendProperty:: ColorBlendProperty(ColorBlendProperty::Mode mode) : @@ -17,7 +30,7 @@ ColorBlendProperty(ColorBlendProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: ColorBlendProperty::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ColorBlendProperty:: set_mode(ColorBlendProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(ColorBlendProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: ColorBlendProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorBlendProperty::Mode ColorBlendProperty:: get_mode() const { @@ -37,7 +50,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: ColorBlendProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int ColorBlendProperty:: compare_to(const ColorBlendProperty &other) const { diff --git a/panda/src/sgattrib/colorBlendProperty.cxx b/panda/src/sgattrib/colorBlendProperty.cxx index 8b291ced68..1a65ea6434 100644 --- a/panda/src/sgattrib/colorBlendProperty.cxx +++ b/panda/src/sgattrib/colorBlendProperty.cxx @@ -1,6 +1,19 @@ // Filename: colorBlendProperty.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorBlendProperty.h" @@ -30,7 +43,7 @@ operator << (ostream &out, ColorBlendProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: ColorBlendProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ColorBlendProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/colorBlendProperty.h b/panda/src/sgattrib/colorBlendProperty.h index 3fbb8a8ae5..98c43fe839 100644 --- a/panda/src/sgattrib/colorBlendProperty.h +++ b/panda/src/sgattrib/colorBlendProperty.h @@ -1,6 +1,19 @@ // Filename: colorBlendProperty.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLORBLENDPROPERTY_H diff --git a/panda/src/sgattrib/colorBlendTransition.I b/panda/src/sgattrib/colorBlendTransition.I index 4896bfe25e..3bb464391a 100644 --- a/panda/src/sgattrib/colorBlendTransition.I +++ b/panda/src/sgattrib/colorBlendTransition.I @@ -1,12 +1,25 @@ // Filename: colorBlendTransition.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorBlendTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorBlendTransition:: ColorBlendTransition(ColorBlendProperty::Mode mode) : @@ -17,7 +30,7 @@ ColorBlendTransition(ColorBlendProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: ColorBlendTransition::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ColorBlendTransition:: set_mode(ColorBlendProperty::Mode mode) { @@ -28,7 +41,7 @@ set_mode(ColorBlendProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: ColorBlendTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorBlendProperty::Mode ColorBlendTransition:: get_mode() const { diff --git a/panda/src/sgattrib/colorBlendTransition.cxx b/panda/src/sgattrib/colorBlendTransition.cxx index 360dca1a6f..5a3fc5da23 100644 --- a/panda/src/sgattrib/colorBlendTransition.cxx +++ b/panda/src/sgattrib/colorBlendTransition.cxx @@ -1,6 +1,19 @@ // Filename: colorBlendTransition.cxx // Created by: mike (28Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorBlendTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: ColorBlendTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ColorBlendTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/colorBlendTransition.h b/panda/src/sgattrib/colorBlendTransition.h index f63e4e625c..93c86c1724 100644 --- a/panda/src/sgattrib/colorBlendTransition.h +++ b/panda/src/sgattrib/colorBlendTransition.h @@ -2,6 +2,19 @@ // Created by: mike (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COLORBLENDTRANSITION_H #define COLORBLENDTRANSITION_H @@ -23,7 +36,7 @@ public: INLINE void set_mode(ColorBlendProperty::Mode mode); INLINE ColorBlendProperty::Mode get_mode() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/colorMaskAttribute.I b/panda/src/sgattrib/colorMaskAttribute.I index 68d5dca8c7..5d981891be 100644 --- a/panda/src/sgattrib/colorMaskAttribute.I +++ b/panda/src/sgattrib/colorMaskAttribute.I @@ -1,12 +1,25 @@ // Filename: colorMaskAttribute.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorMaskAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorMaskAttribute:: ColorMaskAttribute() : @@ -17,7 +30,7 @@ ColorMaskAttribute() : //////////////////////////////////////////////////////////////////// // Function: ColorMaskAttribute::set_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ColorMaskAttribute:: set_mask(int mask) { @@ -27,7 +40,7 @@ set_mask(int mask) { //////////////////////////////////////////////////////////////////// // Function: ColorMaskAttribute::get_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int ColorMaskAttribute:: get_mask() const { diff --git a/panda/src/sgattrib/colorMaskAttribute.cxx b/panda/src/sgattrib/colorMaskAttribute.cxx index 54542cca00..6867757cc5 100644 --- a/panda/src/sgattrib/colorMaskAttribute.cxx +++ b/panda/src/sgattrib/colorMaskAttribute.cxx @@ -1,6 +1,19 @@ // Filename: colorMaskAttribute.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorMaskAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: ColorMaskAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ColorMaskAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/colorMaskAttribute.h b/panda/src/sgattrib/colorMaskAttribute.h index 6247fb6766..838450ec85 100644 --- a/panda/src/sgattrib/colorMaskAttribute.h +++ b/panda/src/sgattrib/colorMaskAttribute.h @@ -1,6 +1,19 @@ // Filename: colorMaskAttribute.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLORMASKATTRIBUTE_H diff --git a/panda/src/sgattrib/colorMaskProperty.I b/panda/src/sgattrib/colorMaskProperty.I index f80780073d..4d9bcd209b 100644 --- a/panda/src/sgattrib/colorMaskProperty.I +++ b/panda/src/sgattrib/colorMaskProperty.I @@ -1,6 +1,19 @@ // Filename: colorMaskProperty.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,11 +21,11 @@ //////////////////////////////////////////////////////////////////// // Function: ColorMaskProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorMaskProperty:: -ColorMaskProperty(int mask) : - _mask(mask) +ColorMaskProperty(int mask) : + _mask(mask) { } @@ -31,7 +44,7 @@ all_on() { //////////////////////////////////////////////////////////////////// // Function: ColorMaskProperty::set_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ColorMaskProperty:: set_mask(int mask) { @@ -41,7 +54,7 @@ set_mask(int mask) { //////////////////////////////////////////////////////////////////// // Function: ColorMaskProperty::get_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int ColorMaskProperty:: get_mask() const { @@ -51,7 +64,7 @@ get_mask() const { //////////////////////////////////////////////////////////////////// // Function: ColorMaskProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int ColorMaskProperty:: compare_to(const ColorMaskProperty &other) const { diff --git a/panda/src/sgattrib/colorMaskProperty.cxx b/panda/src/sgattrib/colorMaskProperty.cxx index d687f5525e..a70c215944 100644 --- a/panda/src/sgattrib/colorMaskProperty.cxx +++ b/panda/src/sgattrib/colorMaskProperty.cxx @@ -1,6 +1,19 @@ // Filename: colorMaskProperty.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorMaskProperty.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: ColorMaskProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ColorMaskProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/colorMaskProperty.h b/panda/src/sgattrib/colorMaskProperty.h index a0b18aaa1b..37f7e3089c 100644 --- a/panda/src/sgattrib/colorMaskProperty.h +++ b/panda/src/sgattrib/colorMaskProperty.h @@ -1,6 +1,19 @@ // Filename: colorMaskProperty.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLORMASKPROPERTY_H diff --git a/panda/src/sgattrib/colorMaskTransition.I b/panda/src/sgattrib/colorMaskTransition.I index e3eafbc33f..8a734ea39a 100644 --- a/panda/src/sgattrib/colorMaskTransition.I +++ b/panda/src/sgattrib/colorMaskTransition.I @@ -1,12 +1,25 @@ // Filename: colorMaskTransition.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorMaskTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorMaskTransition:: ColorMaskTransition(int mask) : @@ -31,7 +44,7 @@ all_on() { //////////////////////////////////////////////////////////////////// // Function: ColorMaskTransition::set_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ColorMaskTransition:: set_mask(int mask) { @@ -42,7 +55,7 @@ set_mask(int mask) { //////////////////////////////////////////////////////////////////// // Function: ColorMaskTransition::get_mask // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int ColorMaskTransition:: get_mask() const { diff --git a/panda/src/sgattrib/colorMaskTransition.cxx b/panda/src/sgattrib/colorMaskTransition.cxx index 35d38dec40..e8785d1735 100644 --- a/panda/src/sgattrib/colorMaskTransition.cxx +++ b/panda/src/sgattrib/colorMaskTransition.cxx @@ -1,6 +1,19 @@ // Filename: colorMaskTransition.cxx // Created by: mike (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorMaskTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: ColorMaskTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int ColorMaskTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/colorMaskTransition.h b/panda/src/sgattrib/colorMaskTransition.h index e9668deaa8..20ccbf64c9 100644 --- a/panda/src/sgattrib/colorMaskTransition.h +++ b/panda/src/sgattrib/colorMaskTransition.h @@ -2,6 +2,19 @@ // Created by: mike (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COLORMASKTRANSITION_H #define COLORMASKTRANSITION_H @@ -29,7 +42,7 @@ public: INLINE void set_mask(int mask); INLINE int get_mask() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/colorMatrixAttribute.I b/panda/src/sgattrib/colorMatrixAttribute.I index b8d2d31ec6..ecd260f830 100644 --- a/panda/src/sgattrib/colorMatrixAttribute.I +++ b/panda/src/sgattrib/colorMatrixAttribute.I @@ -1,12 +1,25 @@ // Filename: colorMatrixAttribute.I // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorMatrixAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorMatrixAttribute:: ColorMatrixAttribute() { diff --git a/panda/src/sgattrib/colorMatrixAttribute.cxx b/panda/src/sgattrib/colorMatrixAttribute.cxx index d4604755ef..096ea6bdce 100644 --- a/panda/src/sgattrib/colorMatrixAttribute.cxx +++ b/panda/src/sgattrib/colorMatrixAttribute.cxx @@ -1,6 +1,19 @@ // Filename: colorMatrixAttribute.cxx // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorMatrixAttribute.h" diff --git a/panda/src/sgattrib/colorMatrixAttribute.h b/panda/src/sgattrib/colorMatrixAttribute.h index 1de250b99f..d1df68e418 100644 --- a/panda/src/sgattrib/colorMatrixAttribute.h +++ b/panda/src/sgattrib/colorMatrixAttribute.h @@ -1,6 +1,19 @@ // Filename: colorMatrixAttribute.h // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLOR_MATRIX_ATTRIBUTE_H diff --git a/panda/src/sgattrib/colorMatrixTransition.I b/panda/src/sgattrib/colorMatrixTransition.I index 86571a9a0c..65c1313764 100644 --- a/panda/src/sgattrib/colorMatrixTransition.I +++ b/panda/src/sgattrib/colorMatrixTransition.I @@ -1,12 +1,25 @@ // Filename: colorMatrixTransition.I // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorMatrixTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorMatrixTransition:: ColorMatrixTransition() { @@ -15,7 +28,7 @@ ColorMatrixTransition() { //////////////////////////////////////////////////////////////////// // Function: ColorMatrixTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorMatrixTransition:: ColorMatrixTransition(const LMatrix4f &matrix) : diff --git a/panda/src/sgattrib/colorMatrixTransition.cxx b/panda/src/sgattrib/colorMatrixTransition.cxx index c1d3ed5918..18f4b30c4c 100644 --- a/panda/src/sgattrib/colorMatrixTransition.cxx +++ b/panda/src/sgattrib/colorMatrixTransition.cxx @@ -1,6 +1,19 @@ // Filename: colorMatrixTransition.cxx // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorMatrixTransition.h" diff --git a/panda/src/sgattrib/colorMatrixTransition.h b/panda/src/sgattrib/colorMatrixTransition.h index f34ca66772..8163d1522f 100644 --- a/panda/src/sgattrib/colorMatrixTransition.h +++ b/panda/src/sgattrib/colorMatrixTransition.h @@ -1,6 +1,19 @@ // Filename: colorMatrixTransition.h // Created by: jason (01Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLOR_MATRIX_TRANSITION_H diff --git a/panda/src/sgattrib/colorProperty.I b/panda/src/sgattrib/colorProperty.I index cf9213ccc3..b3bca899ba 100644 --- a/panda/src/sgattrib/colorProperty.I +++ b/panda/src/sgattrib/colorProperty.I @@ -1,6 +1,19 @@ // Filename: colorProperty.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,23 +21,23 @@ //////////////////////////////////////////////////////////////////// // Function: ColorProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorProperty:: -ColorProperty() : - _real(false) -{ +ColorProperty() : + _real(false) +{ } //////////////////////////////////////////////////////////////////// // Function: ColorProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorProperty:: -ColorProperty(const Colorf &color) : - _color(color), - _real(true) +ColorProperty(const Colorf &color) : + _color(color), + _real(true) { } @@ -54,7 +67,7 @@ get_color() const { //////////////////////////////////////////////////////////////////// // Function: ColorProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int ColorProperty:: compare_to(const ColorProperty &other) const { diff --git a/panda/src/sgattrib/colorProperty.cxx b/panda/src/sgattrib/colorProperty.cxx index dfb4fca5ed..c86f303e82 100644 --- a/panda/src/sgattrib/colorProperty.cxx +++ b/panda/src/sgattrib/colorProperty.cxx @@ -1,6 +1,19 @@ // Filename: colorProperty.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorProperty.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: ColorProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ColorProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/colorProperty.h b/panda/src/sgattrib/colorProperty.h index 7a60649e29..cf93110fa1 100644 --- a/panda/src/sgattrib/colorProperty.h +++ b/panda/src/sgattrib/colorProperty.h @@ -1,6 +1,19 @@ // Filename: colorProperty.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef COLORPROPERTY_H diff --git a/panda/src/sgattrib/colorTransition.I b/panda/src/sgattrib/colorTransition.I index 930e467202..b55eb2a5d2 100644 --- a/panda/src/sgattrib/colorTransition.I +++ b/panda/src/sgattrib/colorTransition.I @@ -1,12 +1,25 @@ // Filename: colorTransition.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ColorTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorTransition:: ColorTransition() { @@ -15,10 +28,10 @@ ColorTransition() { //////////////////////////////////////////////////////////////////// // Function: ColorTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorTransition:: -ColorTransition(const Colorf &color) : +ColorTransition(const Colorf &color) : OnOffTransition(TD_on), _value(color) { @@ -27,7 +40,7 @@ ColorTransition(const Colorf &color) : //////////////////////////////////////////////////////////////////// // Function: ColorTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ColorTransition:: ColorTransition(float r, float g, float b, float a) : diff --git a/panda/src/sgattrib/colorTransition.cxx b/panda/src/sgattrib/colorTransition.cxx index 343e3620ec..fdbf144190 100644 --- a/panda/src/sgattrib/colorTransition.cxx +++ b/panda/src/sgattrib/colorTransition.cxx @@ -1,6 +1,19 @@ // Filename: colorTransition.cxx // Created by: drose (28Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorTransition.h" diff --git a/panda/src/sgattrib/colorTransition.h b/panda/src/sgattrib/colorTransition.h index 70335eae7e..b5169bf72e 100644 --- a/panda/src/sgattrib/colorTransition.h +++ b/panda/src/sgattrib/colorTransition.h @@ -2,6 +2,19 @@ // Created by: drose (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef COLORTRANSITION_H #define COLORTRANSITION_H @@ -37,7 +50,7 @@ PUBLISHED: INLINE bool is_real() const; INLINE Colorf get_color() const; -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -51,7 +64,7 @@ protected: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); protected: static TypedWritable *make_ColorTransition(const FactoryParams ¶ms); diff --git a/panda/src/sgattrib/config_sgattrib.cxx b/panda/src/sgattrib/config_sgattrib.cxx index 50f6202199..16c76671dd 100644 --- a/panda/src/sgattrib/config_sgattrib.cxx +++ b/panda/src/sgattrib/config_sgattrib.cxx @@ -1,6 +1,19 @@ // Filename: config_sgattrib.cxx // Created by: drose (10Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgattrib.h" diff --git a/panda/src/sgattrib/config_sgattrib.h b/panda/src/sgattrib/config_sgattrib.h index 68ceb85550..be22717131 100644 --- a/panda/src/sgattrib/config_sgattrib.h +++ b/panda/src/sgattrib/config_sgattrib.h @@ -1,6 +1,19 @@ // Filename: config_sgattrib.h // Created by: drose (10Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_SGATTRIB_H diff --git a/panda/src/sgattrib/cullFaceAttribute.I b/panda/src/sgattrib/cullFaceAttribute.I index 50c75bf791..d9e35f6f75 100644 --- a/panda/src/sgattrib/cullFaceAttribute.I +++ b/panda/src/sgattrib/cullFaceAttribute.I @@ -1,23 +1,36 @@ // Filename: cullFaceAttribute.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CullFaceAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullFaceAttribute:: CullFaceAttribute() : - _value(CullFaceProperty::M_cull_none) + _value(CullFaceProperty::M_cull_none) { } //////////////////////////////////////////////////////////////////// // Function: CullFaceAttribute::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CullFaceAttribute:: set_mode(CullFaceProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(CullFaceProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: CullFaceAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullFaceProperty::Mode CullFaceAttribute:: get_mode() const { diff --git a/panda/src/sgattrib/cullFaceAttribute.cxx b/panda/src/sgattrib/cullFaceAttribute.cxx index 471ba34012..8b78732a94 100644 --- a/panda/src/sgattrib/cullFaceAttribute.cxx +++ b/panda/src/sgattrib/cullFaceAttribute.cxx @@ -1,6 +1,19 @@ // Filename: cullFaceAttribute.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullFaceAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: CullFaceAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int CullFaceAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/cullFaceAttribute.h b/panda/src/sgattrib/cullFaceAttribute.h index 7595f63577..a71a41fad6 100644 --- a/panda/src/sgattrib/cullFaceAttribute.h +++ b/panda/src/sgattrib/cullFaceAttribute.h @@ -1,6 +1,19 @@ // Filename: cullFaceAttribute.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLFACEATTRIBUTE_H diff --git a/panda/src/sgattrib/cullFaceProperty.I b/panda/src/sgattrib/cullFaceProperty.I index 2dfa1b5a09..e5cec58598 100644 --- a/panda/src/sgattrib/cullFaceProperty.I +++ b/panda/src/sgattrib/cullFaceProperty.I @@ -1,12 +1,25 @@ // Filename: cullFaceProperty.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CullFaceProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullFaceProperty:: CullFaceProperty(Mode mode) : @@ -17,7 +30,7 @@ CullFaceProperty(Mode mode) : //////////////////////////////////////////////////////////////////// // Function: CullFaceProperty::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CullFaceProperty:: set_mode(CullFaceProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(CullFaceProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: CullFaceProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullFaceProperty::Mode CullFaceProperty:: get_mode() const { @@ -37,7 +50,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: CullFaceProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int CullFaceProperty:: compare_to(const CullFaceProperty &other) const { diff --git a/panda/src/sgattrib/cullFaceProperty.cxx b/panda/src/sgattrib/cullFaceProperty.cxx index 3213b43966..6e46b02486 100644 --- a/panda/src/sgattrib/cullFaceProperty.cxx +++ b/panda/src/sgattrib/cullFaceProperty.cxx @@ -1,6 +1,19 @@ // Filename: cullFaceProperty.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullFaceProperty.h" @@ -29,7 +42,7 @@ operator << (ostream &out, CullFaceProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: CullFaceProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void CullFaceProperty:: output(ostream &out) const { @@ -43,7 +56,7 @@ output(ostream &out) const { // this object to a Datagram //////////////////////////////////////////////////////////////////// void CullFaceProperty:: -write_datagram(Datagram &destination) +write_datagram(Datagram &destination) { destination.add_uint8(_mode); } @@ -55,7 +68,7 @@ write_datagram(Datagram &destination) // this object out of a Datagram //////////////////////////////////////////////////////////////////// void CullFaceProperty:: -read_datagram(DatagramIterator &source) +read_datagram(DatagramIterator &source) { _mode = (enum Mode) source.get_uint8(); } diff --git a/panda/src/sgattrib/cullFaceProperty.h b/panda/src/sgattrib/cullFaceProperty.h index 8c2905dca4..b810c6fa01 100644 --- a/panda/src/sgattrib/cullFaceProperty.h +++ b/panda/src/sgattrib/cullFaceProperty.h @@ -1,6 +1,19 @@ // Filename: cullFaceProperty.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLFACEPROPERTY_H diff --git a/panda/src/sgattrib/cullFaceTransition.I b/panda/src/sgattrib/cullFaceTransition.I index 28715322dc..eec9968f00 100644 --- a/panda/src/sgattrib/cullFaceTransition.I +++ b/panda/src/sgattrib/cullFaceTransition.I @@ -1,12 +1,25 @@ // Filename: cullFaceTransition.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: CullFaceTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullFaceTransition:: CullFaceTransition(CullFaceProperty::Mode mode) : @@ -17,7 +30,7 @@ CullFaceTransition(CullFaceProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: CullFaceTransition::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void CullFaceTransition:: set_mode(CullFaceProperty::Mode mode) { @@ -28,7 +41,7 @@ set_mode(CullFaceProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: CullFaceTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CullFaceProperty::Mode CullFaceTransition:: get_mode() const { diff --git a/panda/src/sgattrib/cullFaceTransition.cxx b/panda/src/sgattrib/cullFaceTransition.cxx index 17e3bceeac..36814caa76 100644 --- a/panda/src/sgattrib/cullFaceTransition.cxx +++ b/panda/src/sgattrib/cullFaceTransition.cxx @@ -1,6 +1,19 @@ // Filename: cullFaceTransition.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "cullFaceTransition.h" diff --git a/panda/src/sgattrib/cullFaceTransition.h b/panda/src/sgattrib/cullFaceTransition.h index 4b78a3d4d5..61aa0a2268 100644 --- a/panda/src/sgattrib/cullFaceTransition.h +++ b/panda/src/sgattrib/cullFaceTransition.h @@ -1,6 +1,19 @@ // Filename: cullFaceTransition.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CULLFACETRANSITION_H @@ -25,7 +38,7 @@ public: INLINE void set_mode(CullFaceProperty::Mode mode); INLINE CullFaceProperty::Mode get_mode() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -40,7 +53,7 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_CullFaceTransition(const FactoryParams ¶ms); diff --git a/panda/src/sgattrib/decalAttribute.I b/panda/src/sgattrib/decalAttribute.I index 1737845251..4e3ec5db88 100644 --- a/panda/src/sgattrib/decalAttribute.I +++ b/panda/src/sgattrib/decalAttribute.I @@ -1,12 +1,25 @@ // Filename: decalAttribute.I // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DecalAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DecalAttribute:: DecalAttribute() { diff --git a/panda/src/sgattrib/decalAttribute.cxx b/panda/src/sgattrib/decalAttribute.cxx index 6b55d6c689..4665b2866d 100644 --- a/panda/src/sgattrib/decalAttribute.cxx +++ b/panda/src/sgattrib/decalAttribute.cxx @@ -1,6 +1,19 @@ // Filename: decalAttribute.cxx // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "decalAttribute.h" diff --git a/panda/src/sgattrib/decalAttribute.h b/panda/src/sgattrib/decalAttribute.h index 4e0447dc69..3aaa499c5f 100644 --- a/panda/src/sgattrib/decalAttribute.h +++ b/panda/src/sgattrib/decalAttribute.h @@ -1,6 +1,19 @@ // Filename: decalAttribute.h // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DECALATTRIBUTE_H diff --git a/panda/src/sgattrib/decalTransition.I b/panda/src/sgattrib/decalTransition.I index 9e8a338302..825ece6358 100644 --- a/panda/src/sgattrib/decalTransition.I +++ b/panda/src/sgattrib/decalTransition.I @@ -1,12 +1,25 @@ // Filename: decalTransition.I // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DecalTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DecalTransition:: DecalTransition() { @@ -16,7 +29,7 @@ DecalTransition() { //////////////////////////////////////////////////////////////////// // Function: DecalTransition::off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DecalTransition DecalTransition:: off() { diff --git a/panda/src/sgattrib/decalTransition.cxx b/panda/src/sgattrib/decalTransition.cxx index 8327b7bfb6..0f4482052e 100644 --- a/panda/src/sgattrib/decalTransition.cxx +++ b/panda/src/sgattrib/decalTransition.cxx @@ -1,6 +1,19 @@ // Filename: decalTransition.cxx // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "decalTransition.h" diff --git a/panda/src/sgattrib/decalTransition.h b/panda/src/sgattrib/decalTransition.h index 9f76218dc2..51568f6fbd 100644 --- a/panda/src/sgattrib/decalTransition.h +++ b/panda/src/sgattrib/decalTransition.h @@ -1,6 +1,19 @@ // Filename: decalTransition.h // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DECALTRANSITION_H @@ -32,7 +45,7 @@ PUBLISHED: INLINE DecalTransition(); INLINE static DecalTransition off(); -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/depthTestAttribute.I b/panda/src/sgattrib/depthTestAttribute.I index 4d5746c729..fe096da711 100644 --- a/panda/src/sgattrib/depthTestAttribute.I +++ b/panda/src/sgattrib/depthTestAttribute.I @@ -1,23 +1,36 @@ // Filename: depthTestAttribute.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DepthTestAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthTestAttribute:: DepthTestAttribute() : - _value(DepthTestProperty::M_less) + _value(DepthTestProperty::M_less) { } //////////////////////////////////////////////////////////////////// // Function: DepthTestAttribute::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DepthTestAttribute:: set_mode(DepthTestProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(DepthTestProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: DepthTestAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthTestProperty::Mode DepthTestAttribute:: get_mode() const { diff --git a/panda/src/sgattrib/depthTestAttribute.cxx b/panda/src/sgattrib/depthTestAttribute.cxx index e35a2aafac..fb4555f99b 100644 --- a/panda/src/sgattrib/depthTestAttribute.cxx +++ b/panda/src/sgattrib/depthTestAttribute.cxx @@ -1,6 +1,19 @@ // Filename: depthTestAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "depthTestAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: DepthTestAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int DepthTestAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/depthTestAttribute.h b/panda/src/sgattrib/depthTestAttribute.h index e62a844c3c..786b8ce86c 100644 --- a/panda/src/sgattrib/depthTestAttribute.h +++ b/panda/src/sgattrib/depthTestAttribute.h @@ -1,6 +1,19 @@ // Filename: depthTestAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DEPTHTESTATTRIBUTE_H diff --git a/panda/src/sgattrib/depthTestProperty.I b/panda/src/sgattrib/depthTestProperty.I index 77d8f318bb..fe64b823d4 100644 --- a/panda/src/sgattrib/depthTestProperty.I +++ b/panda/src/sgattrib/depthTestProperty.I @@ -1,12 +1,25 @@ // Filename: depthTestProperty.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DepthTestProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthTestProperty:: DepthTestProperty(DepthTestProperty::Mode mode) : @@ -17,7 +30,7 @@ DepthTestProperty(DepthTestProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: DepthTestProperty::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DepthTestProperty:: set_mode(DepthTestProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(DepthTestProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: DepthTestProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthTestProperty::Mode DepthTestProperty:: get_mode() const { @@ -37,7 +50,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: DepthTestProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int DepthTestProperty:: compare_to(const DepthTestProperty &other) const { diff --git a/panda/src/sgattrib/depthTestProperty.cxx b/panda/src/sgattrib/depthTestProperty.cxx index c45fa7c80b..e973c7c517 100644 --- a/panda/src/sgattrib/depthTestProperty.cxx +++ b/panda/src/sgattrib/depthTestProperty.cxx @@ -1,6 +1,19 @@ // Filename: depthTestProperty.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "depthTestProperty.h" @@ -30,7 +43,7 @@ operator << (ostream &out, DepthTestProperty::Mode mode) { case DepthTestProperty::M_not_equal: return out << "not_equal"; - + case DepthTestProperty::M_greater_equal: return out << "greater_equal"; @@ -66,7 +79,7 @@ read_datagram(DatagramIterator &source) { //////////////////////////////////////////////////////////////////// // Function: DepthTestProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DepthTestProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/depthTestProperty.h b/panda/src/sgattrib/depthTestProperty.h index 43e11bae95..838a9a08e7 100644 --- a/panda/src/sgattrib/depthTestProperty.h +++ b/panda/src/sgattrib/depthTestProperty.h @@ -1,6 +1,19 @@ // Filename: depthTestProperty.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DEPTHTESTPROPERTY_H diff --git a/panda/src/sgattrib/depthTestTransition.I b/panda/src/sgattrib/depthTestTransition.I index bf136f0ee6..4399d680fc 100644 --- a/panda/src/sgattrib/depthTestTransition.I +++ b/panda/src/sgattrib/depthTestTransition.I @@ -1,12 +1,25 @@ // Filename: depthTestTransition.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DepthTestTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthTestTransition:: DepthTestTransition(DepthTestProperty::Mode mode) : @@ -17,7 +30,7 @@ DepthTestTransition(DepthTestProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: DepthTestTransition::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void DepthTestTransition:: set_mode(DepthTestProperty::Mode mode) { @@ -28,7 +41,7 @@ set_mode(DepthTestProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: DepthTestTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthTestProperty::Mode DepthTestTransition:: get_mode() const { diff --git a/panda/src/sgattrib/depthTestTransition.cxx b/panda/src/sgattrib/depthTestTransition.cxx index 52783f811e..47023cd2c1 100644 --- a/panda/src/sgattrib/depthTestTransition.cxx +++ b/panda/src/sgattrib/depthTestTransition.cxx @@ -1,6 +1,19 @@ // Filename: depthTestTransition.cxx // Created by: mike (28Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "depthTestTransition.h" @@ -51,7 +64,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: DepthTestTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int DepthTestTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/depthTestTransition.h b/panda/src/sgattrib/depthTestTransition.h index e5e3e643cf..f96ba46193 100644 --- a/panda/src/sgattrib/depthTestTransition.h +++ b/panda/src/sgattrib/depthTestTransition.h @@ -2,6 +2,19 @@ // Created by: drose (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DEPTHTESTTRANSITION_H #define DEPTHTESTTRANSITION_H @@ -27,7 +40,7 @@ PUBLISHED: INLINE void set_mode(DepthTestProperty::Mode mode); INLINE DepthTestProperty::Mode get_mode() const; -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -42,7 +55,7 @@ protected: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); static TypedWritable *make_DepthTestTransition(const FactoryParams ¶ms); diff --git a/panda/src/sgattrib/depthWriteAttribute.I b/panda/src/sgattrib/depthWriteAttribute.I index 56e52f5090..6afc1faaa9 100644 --- a/panda/src/sgattrib/depthWriteAttribute.I +++ b/panda/src/sgattrib/depthWriteAttribute.I @@ -1,12 +1,25 @@ // Filename: depthWriteAttribute.I // Created by: drose (31Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DepthWriteAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthWriteAttribute:: DepthWriteAttribute() : OnOffAttribute(true) { diff --git a/panda/src/sgattrib/depthWriteAttribute.cxx b/panda/src/sgattrib/depthWriteAttribute.cxx index 80bf3e8ec8..55a73ad0b6 100644 --- a/panda/src/sgattrib/depthWriteAttribute.cxx +++ b/panda/src/sgattrib/depthWriteAttribute.cxx @@ -1,6 +1,19 @@ // Filename: depthWriteAttribute.cxx // Created by: drose (31Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "depthWriteAttribute.h" diff --git a/panda/src/sgattrib/depthWriteAttribute.h b/panda/src/sgattrib/depthWriteAttribute.h index 9719fb4662..db86e11579 100644 --- a/panda/src/sgattrib/depthWriteAttribute.h +++ b/panda/src/sgattrib/depthWriteAttribute.h @@ -1,6 +1,19 @@ // Filename: depthWriteAttribute.h // Created by: drose (31Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DEPTHWRITEATTRIBUTE_H diff --git a/panda/src/sgattrib/depthWriteTransition.I b/panda/src/sgattrib/depthWriteTransition.I index 30f66af90b..76c243b598 100644 --- a/panda/src/sgattrib/depthWriteTransition.I +++ b/panda/src/sgattrib/depthWriteTransition.I @@ -1,12 +1,25 @@ // Filename: depthWriteTransition.I // Created by: drose (31Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: DepthWriteTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthWriteTransition:: DepthWriteTransition() { @@ -16,7 +29,7 @@ DepthWriteTransition() { //////////////////////////////////////////////////////////////////// // Function: DepthWriteTransition::off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE DepthWriteTransition DepthWriteTransition:: off() { diff --git a/panda/src/sgattrib/depthWriteTransition.cxx b/panda/src/sgattrib/depthWriteTransition.cxx index d6617a6efb..efa7bd31b4 100644 --- a/panda/src/sgattrib/depthWriteTransition.cxx +++ b/panda/src/sgattrib/depthWriteTransition.cxx @@ -1,6 +1,19 @@ // Filename: depthWriteTransition.cxx // Created by: drose (31Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "depthWriteTransition.h" diff --git a/panda/src/sgattrib/depthWriteTransition.h b/panda/src/sgattrib/depthWriteTransition.h index 007d4b38b1..2bb6d24f1c 100644 --- a/panda/src/sgattrib/depthWriteTransition.h +++ b/panda/src/sgattrib/depthWriteTransition.h @@ -1,6 +1,19 @@ // Filename: depthWriteTransition.h // Created by: drose (31Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DEPTHWRITETRANSITION_H @@ -20,13 +33,13 @@ PUBLISHED: INLINE DepthWriteTransition(); INLINE static DepthWriteTransition off(); -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_DepthWriteTransition(const FactoryParams ¶ms); diff --git a/panda/src/sgattrib/drawBoundsTransition.I b/panda/src/sgattrib/drawBoundsTransition.I index 979466367a..fad9b112ec 100644 --- a/panda/src/sgattrib/drawBoundsTransition.I +++ b/panda/src/sgattrib/drawBoundsTransition.I @@ -1,5 +1,18 @@ // Filename: drawBoundsTransition.I // Created by: drose (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgattrib/drawBoundsTransition.cxx b/panda/src/sgattrib/drawBoundsTransition.cxx index b36a8b393e..c1175c7acf 100644 --- a/panda/src/sgattrib/drawBoundsTransition.cxx +++ b/panda/src/sgattrib/drawBoundsTransition.cxx @@ -1,6 +1,19 @@ // Filename: drawBoundsTransition.cxx // Created by: drose (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgattrib.h" @@ -28,7 +41,7 @@ TypeHandle DrawBoundsTransition::_type_handle; //////////////////////////////////////////////////////////////////// // Function: DrawBoundsTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// DrawBoundsTransition:: DrawBoundsTransition() { @@ -64,7 +77,7 @@ make_copy() const { } //////////////////////////////////////////////////////////////////// -// Function: DrawBoundsTransition::sub_render +// Function: DrawBoundsTransition::sub_render // Access: Public, Virtual // Description: This is called by the RenderTraverser to tell the // drawBounds to do its thing. diff --git a/panda/src/sgattrib/drawBoundsTransition.h b/panda/src/sgattrib/drawBoundsTransition.h index 4670d7823a..8895cd91c6 100644 --- a/panda/src/sgattrib/drawBoundsTransition.h +++ b/panda/src/sgattrib/drawBoundsTransition.h @@ -1,6 +1,19 @@ // Filename: drawBoundsTransition.h // Created by: drose (26Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DRAWBOUNDSTRANSITION_H @@ -23,7 +36,7 @@ class EXPCL_PANDA DrawBoundsTransition : public ImmediateTransition { public: DrawBoundsTransition(); -public: +public: virtual NodeTransition *make_copy() const; virtual bool sub_render(NodeRelation *arc, diff --git a/panda/src/sgattrib/fogAttribute.I b/panda/src/sgattrib/fogAttribute.I index 864b471f7f..39301c74bb 100644 --- a/panda/src/sgattrib/fogAttribute.I +++ b/panda/src/sgattrib/fogAttribute.I @@ -1,12 +1,25 @@ // Filename: fogAttribute.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: FogAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FogAttribute:: FogAttribute() { @@ -15,7 +28,7 @@ FogAttribute() { //////////////////////////////////////////////////////////////////// // Function: FogAttribute::set_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void FogAttribute:: set_on(Fog *fog) { diff --git a/panda/src/sgattrib/fogAttribute.cxx b/panda/src/sgattrib/fogAttribute.cxx index 409c61d103..1d902dfe78 100644 --- a/panda/src/sgattrib/fogAttribute.cxx +++ b/panda/src/sgattrib/fogAttribute.cxx @@ -1,6 +1,19 @@ // Filename: fogAttribute.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "fogAttribute.h" @@ -74,7 +87,7 @@ set_value_from(const OnOffTransition *other) { //////////////////////////////////////////////////////////////////// // Function: FogAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int FogAttribute:: compare_values(const OnOffAttribute *other) const { diff --git a/panda/src/sgattrib/fogAttribute.h b/panda/src/sgattrib/fogAttribute.h index 113433e58e..f96bd06e04 100644 --- a/panda/src/sgattrib/fogAttribute.h +++ b/panda/src/sgattrib/fogAttribute.h @@ -1,6 +1,19 @@ // Filename: fogAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FOGATTRIBUTE_H diff --git a/panda/src/sgattrib/fogTransition.I b/panda/src/sgattrib/fogTransition.I index c175db9c2a..25361c10a8 100644 --- a/panda/src/sgattrib/fogTransition.I +++ b/panda/src/sgattrib/fogTransition.I @@ -1,12 +1,25 @@ // Filename: fogTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: FogTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FogTransition:: FogTransition() { @@ -15,10 +28,10 @@ FogTransition() { //////////////////////////////////////////////////////////////////// // Function: FogTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FogTransition:: -FogTransition(Fog *fog) : +FogTransition(Fog *fog) : OnOffTransition(TD_on), _value(fog) { diff --git a/panda/src/sgattrib/fogTransition.cxx b/panda/src/sgattrib/fogTransition.cxx index ffb76c1cbc..8a885de3a0 100644 --- a/panda/src/sgattrib/fogTransition.cxx +++ b/panda/src/sgattrib/fogTransition.cxx @@ -1,6 +1,19 @@ // Filename: fogTransition.cxx // Created by: mike (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "fogTransition.h" @@ -48,7 +61,7 @@ set_value_from(const OnOffTransition *other) { //////////////////////////////////////////////////////////////////// // Function: FogTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int FogTransition:: compare_values(const OnOffTransition *other) const { diff --git a/panda/src/sgattrib/fogTransition.h b/panda/src/sgattrib/fogTransition.h index 143e050c59..a8933735aa 100644 --- a/panda/src/sgattrib/fogTransition.h +++ b/panda/src/sgattrib/fogTransition.h @@ -2,6 +2,19 @@ // Created by: mike (19Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FOGTRANSITION_H #define FOGTRANSITION_H @@ -26,7 +39,7 @@ public: INLINE void set_on(Fog *fog); INLINE Fog *get_fog() const; -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/linesmoothAttribute.I b/panda/src/sgattrib/linesmoothAttribute.I index 0334b2d060..d3ac126cde 100644 --- a/panda/src/sgattrib/linesmoothAttribute.I +++ b/panda/src/sgattrib/linesmoothAttribute.I @@ -1,12 +1,25 @@ // Filename: linesmoothAttribute.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LinesmoothAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LinesmoothAttribute:: LinesmoothAttribute() { diff --git a/panda/src/sgattrib/linesmoothAttribute.cxx b/panda/src/sgattrib/linesmoothAttribute.cxx index c5e6ebf7af..228768b9ae 100644 --- a/panda/src/sgattrib/linesmoothAttribute.cxx +++ b/panda/src/sgattrib/linesmoothAttribute.cxx @@ -1,6 +1,19 @@ // Filename: linesmoothAttribute.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linesmoothAttribute.h" diff --git a/panda/src/sgattrib/linesmoothAttribute.h b/panda/src/sgattrib/linesmoothAttribute.h index 41cdcb59d2..03b572d4c3 100644 --- a/panda/src/sgattrib/linesmoothAttribute.h +++ b/panda/src/sgattrib/linesmoothAttribute.h @@ -1,6 +1,19 @@ // Filename: linesmoothAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef LINESMOOTHATTRIBUTE_H diff --git a/panda/src/sgattrib/linesmoothTransition.I b/panda/src/sgattrib/linesmoothTransition.I index 70a878bfd4..def7014f82 100644 --- a/panda/src/sgattrib/linesmoothTransition.I +++ b/panda/src/sgattrib/linesmoothTransition.I @@ -1,12 +1,25 @@ // Filename: linesmoothTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: LinesmoothTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LinesmoothTransition:: LinesmoothTransition() { @@ -16,7 +29,7 @@ LinesmoothTransition() { //////////////////////////////////////////////////////////////////// // Function: LinesmoothTransition::off // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LinesmoothTransition LinesmoothTransition:: off() { diff --git a/panda/src/sgattrib/linesmoothTransition.cxx b/panda/src/sgattrib/linesmoothTransition.cxx index 02bf7deae4..63d23e775d 100644 --- a/panda/src/sgattrib/linesmoothTransition.cxx +++ b/panda/src/sgattrib/linesmoothTransition.cxx @@ -1,6 +1,19 @@ // Filename: linesmoothTransition.cxx // Created by: mike (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "linesmoothTransition.h" diff --git a/panda/src/sgattrib/linesmoothTransition.h b/panda/src/sgattrib/linesmoothTransition.h index abcd78ae53..ecbe75652f 100644 --- a/panda/src/sgattrib/linesmoothTransition.h +++ b/panda/src/sgattrib/linesmoothTransition.h @@ -2,6 +2,19 @@ // Created by: mike (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LINESMOOTHTRANSITION_H #define LINESMOOTHTRANSITION_H @@ -20,7 +33,7 @@ class EXPCL_PANDA LinesmoothTransition : public OnOffTransition { public: INLINE LinesmoothTransition(); INLINE static LinesmoothTransition off(); - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/materialAttribute.I b/panda/src/sgattrib/materialAttribute.I index 9e32b1592b..b2c31db47e 100644 --- a/panda/src/sgattrib/materialAttribute.I +++ b/panda/src/sgattrib/materialAttribute.I @@ -1,12 +1,25 @@ // Filename: materialAttribute.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: MaterialAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MaterialAttribute:: MaterialAttribute() { @@ -15,7 +28,7 @@ MaterialAttribute() { //////////////////////////////////////////////////////////////////// // Function: MaterialAttribute::set_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void MaterialAttribute:: set_on(const Material *material) { diff --git a/panda/src/sgattrib/materialAttribute.cxx b/panda/src/sgattrib/materialAttribute.cxx index cfe6871088..34d19cd31d 100644 --- a/panda/src/sgattrib/materialAttribute.cxx +++ b/panda/src/sgattrib/materialAttribute.cxx @@ -1,6 +1,19 @@ // Filename: materialAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "materialAttribute.h" @@ -74,7 +87,7 @@ set_value_from(const OnOffTransition *other) { //////////////////////////////////////////////////////////////////// // Function: MaterialAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int MaterialAttribute:: compare_values(const OnOffAttribute *other) const { diff --git a/panda/src/sgattrib/materialAttribute.h b/panda/src/sgattrib/materialAttribute.h index 12b8ba9198..9371ed97dd 100644 --- a/panda/src/sgattrib/materialAttribute.h +++ b/panda/src/sgattrib/materialAttribute.h @@ -1,6 +1,19 @@ // Filename: materialAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MATERIALATTRIBUTE_H diff --git a/panda/src/sgattrib/materialTransition.I b/panda/src/sgattrib/materialTransition.I index 7508faa2e0..7fcaa29f32 100644 --- a/panda/src/sgattrib/materialTransition.I +++ b/panda/src/sgattrib/materialTransition.I @@ -1,12 +1,25 @@ // Filename: materialTransition.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: MaterialTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MaterialTransition:: MaterialTransition() { @@ -15,10 +28,10 @@ MaterialTransition() { //////////////////////////////////////////////////////////////////// // Function: MaterialTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MaterialTransition:: -MaterialTransition(const Material *material) : +MaterialTransition(const Material *material) : OnOffTransition(TD_on), _value(material) { @@ -40,7 +53,7 @@ off() { //////////////////////////////////////////////////////////////////// // Function: MaterialTransition::set_on // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void MaterialTransition:: set_on(const Material *material) { diff --git a/panda/src/sgattrib/materialTransition.cxx b/panda/src/sgattrib/materialTransition.cxx index 0afe2f5846..906d3e101d 100644 --- a/panda/src/sgattrib/materialTransition.cxx +++ b/panda/src/sgattrib/materialTransition.cxx @@ -1,6 +1,19 @@ // Filename: materialTransition.cxx // Created by: mike (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "materialTransition.h" @@ -53,7 +66,7 @@ set_value_from(const OnOffTransition *other) { //////////////////////////////////////////////////////////////////// // Function: MaterialTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int MaterialTransition:: compare_values(const OnOffTransition *other) const { @@ -111,7 +124,7 @@ write_datagram(BamWriter *manager, Datagram &me) { // Function: MaterialTransition::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int MaterialTransition:: @@ -119,7 +132,7 @@ complete_pointers(vector_typedWritable &plist, BamReader *) { if (plist[0] == TypedWritable::Null) { if (sgattrib_cat.is_debug()) { sgattrib_cat->debug() - << get_type().get_name() << " received null Material," + << get_type().get_name() << " received null Material," << " turning off" << endl; } _value = (const Material *)NULL; diff --git a/panda/src/sgattrib/materialTransition.h b/panda/src/sgattrib/materialTransition.h index cba2e178cc..1eb7799200 100644 --- a/panda/src/sgattrib/materialTransition.h +++ b/panda/src/sgattrib/materialTransition.h @@ -2,6 +2,19 @@ // Created by: mike (19Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef MATERIALTRANSITION_H #define MATERIALTRANSITION_H @@ -26,7 +39,7 @@ public: INLINE void set_on(const Material *material); INLINE const Material *get_material() const; -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -40,8 +53,8 @@ protected: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); protected: diff --git a/panda/src/sgattrib/pointShapeAttribute.I b/panda/src/sgattrib/pointShapeAttribute.I index 471b9f945a..b047c7da45 100644 --- a/panda/src/sgattrib/pointShapeAttribute.I +++ b/panda/src/sgattrib/pointShapeAttribute.I @@ -1,12 +1,25 @@ // Filename: pointShapeAttribute.I // Created by: charles (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PointShapeAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PointShapeAttribute:: PointShapeAttribute() : @@ -16,7 +29,7 @@ PointShapeAttribute() : //////////////////////////////////////////////////////////////////// // Function: PointShapeAttribute::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PointShapeAttribute:: set_mode(PointShapeProperty::Mode mode) { @@ -26,7 +39,7 @@ set_mode(PointShapeProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: PointShapeAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PointShapeProperty::Mode PointShapeAttribute:: get_mode() const { diff --git a/panda/src/sgattrib/pointShapeAttribute.cxx b/panda/src/sgattrib/pointShapeAttribute.cxx index 2371a638ed..65c9432b61 100644 --- a/panda/src/sgattrib/pointShapeAttribute.cxx +++ b/panda/src/sgattrib/pointShapeAttribute.cxx @@ -1,6 +1,19 @@ // Filename: pointShapeAttribute.cxx // Created by: charles (11Jul00) -// (absurd abuse of cut n' paste from renderModeAttribute.cxx) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pointShapeAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: PointShapeAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int PointShapeAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/pointShapeAttribute.h b/panda/src/sgattrib/pointShapeAttribute.h index f8f837731c..b40147167a 100644 --- a/panda/src/sgattrib/pointShapeAttribute.h +++ b/panda/src/sgattrib/pointShapeAttribute.h @@ -1,6 +1,19 @@ // Filename: pointShapeAttribute.h // Created by: charles (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTSHAPEATTRIBUTE_H diff --git a/panda/src/sgattrib/pointShapeProperty.I b/panda/src/sgattrib/pointShapeProperty.I index 59d58995f9..09c8301465 100644 --- a/panda/src/sgattrib/pointShapeProperty.I +++ b/panda/src/sgattrib/pointShapeProperty.I @@ -1,6 +1,19 @@ // Filename: pointShapeProperty.I // Created by: charles (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgattrib/pointShapeProperty.cxx b/panda/src/sgattrib/pointShapeProperty.cxx index 883546de90..4010ff9f57 100644 --- a/panda/src/sgattrib/pointShapeProperty.cxx +++ b/panda/src/sgattrib/pointShapeProperty.cxx @@ -1,6 +1,19 @@ // Filename: pointShapeProperty.cxx // Created by: charles (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pointShapeProperty.h" diff --git a/panda/src/sgattrib/pointShapeProperty.h b/panda/src/sgattrib/pointShapeProperty.h index 6062288282..85a8baeed5 100644 --- a/panda/src/sgattrib/pointShapeProperty.h +++ b/panda/src/sgattrib/pointShapeProperty.h @@ -1,6 +1,19 @@ // Filename: pointShapeProperty.h // Created by: charles (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTSHAPEPROPERTY_H diff --git a/panda/src/sgattrib/pointShapeTransition.I b/panda/src/sgattrib/pointShapeTransition.I index 3dba8aaca5..785598a6c5 100644 --- a/panda/src/sgattrib/pointShapeTransition.I +++ b/panda/src/sgattrib/pointShapeTransition.I @@ -1,12 +1,25 @@ // Filename: pointShapeTransition.I // Created by: charles (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PointShapeTransition // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PointShapeTransition:: PointShapeTransition(PointShapeProperty::Mode mode) : @@ -16,7 +29,7 @@ PointShapeTransition(PointShapeProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PointShapeTransition:: set_mode(PointShapeProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(PointShapeProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PointShapeProperty::Mode PointShapeTransition:: get_mode(void) const { diff --git a/panda/src/sgattrib/pointShapeTransition.cxx b/panda/src/sgattrib/pointShapeTransition.cxx index a2fda45ab3..55e306f4e5 100644 --- a/panda/src/sgattrib/pointShapeTransition.cxx +++ b/panda/src/sgattrib/pointShapeTransition.cxx @@ -1,6 +1,19 @@ // Filename: pointShapeTransition.cxx // Created by: charles (11Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pointShapeTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: PointShapeTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int PointShapeTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/pointShapeTransition.h b/panda/src/sgattrib/pointShapeTransition.h index 33e9857e39..b173caac40 100644 --- a/panda/src/sgattrib/pointShapeTransition.h +++ b/panda/src/sgattrib/pointShapeTransition.h @@ -1,6 +1,19 @@ // Filename: pointShapeTransition.h // Created by: charles (10Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POINTSHAPETRANSITION_H diff --git a/panda/src/sgattrib/polygonOffsetAttribute.I b/panda/src/sgattrib/polygonOffsetAttribute.I index 1c9dc4e41c..df08dc7d83 100644 --- a/panda/src/sgattrib/polygonOffsetAttribute.I +++ b/panda/src/sgattrib/polygonOffsetAttribute.I @@ -1,12 +1,25 @@ // Filename: polygonOffsetAttribute.I // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PolygonOffsetAttribute:: PolygonOffsetAttribute() @@ -16,7 +29,7 @@ PolygonOffsetAttribute() //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetAttribute::set_units // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PolygonOffsetAttribute:: set_units(int units) { @@ -26,7 +39,7 @@ set_units(int units) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetAttribute::get_units // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PolygonOffsetAttribute:: get_units() const { @@ -36,7 +49,7 @@ get_units() const { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetAttribute::set_factor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PolygonOffsetAttribute:: set_factor(int factor) { @@ -46,7 +59,7 @@ set_factor(int factor) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetAttribute::get_factor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PolygonOffsetAttribute:: get_factor() const { diff --git a/panda/src/sgattrib/polygonOffsetAttribute.cxx b/panda/src/sgattrib/polygonOffsetAttribute.cxx index 110fc6115c..e49faae94b 100644 --- a/panda/src/sgattrib/polygonOffsetAttribute.cxx +++ b/panda/src/sgattrib/polygonOffsetAttribute.cxx @@ -1,6 +1,19 @@ // Filename: polygonOffsetAttribute.cxx // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "polygonOffsetAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int PolygonOffsetAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/polygonOffsetAttribute.h b/panda/src/sgattrib/polygonOffsetAttribute.h index 75b42ea84c..6af106652e 100644 --- a/panda/src/sgattrib/polygonOffsetAttribute.h +++ b/panda/src/sgattrib/polygonOffsetAttribute.h @@ -1,6 +1,19 @@ // Filename: polygonOffsetAttribute.h // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POLYGONOFFSETATTRIBUTE_H diff --git a/panda/src/sgattrib/polygonOffsetProperty.I b/panda/src/sgattrib/polygonOffsetProperty.I index 6dc7387d83..b0ce2763cf 100644 --- a/panda/src/sgattrib/polygonOffsetProperty.I +++ b/panda/src/sgattrib/polygonOffsetProperty.I @@ -1,12 +1,25 @@ // Filename: polygonOffsetProperty.I // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PolygonOffsetProperty:: PolygonOffsetProperty() : @@ -17,7 +30,7 @@ PolygonOffsetProperty() : //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PolygonOffsetProperty:: PolygonOffsetProperty(int units, int factor) : @@ -28,7 +41,7 @@ PolygonOffsetProperty(int units, int factor) : //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::set_units // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PolygonOffsetProperty:: set_units(int units) { @@ -38,7 +51,7 @@ set_units(int units) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::get_units // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PolygonOffsetProperty:: get_units() const { @@ -48,7 +61,7 @@ get_units() const { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::set_factor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PolygonOffsetProperty:: set_factor(int factor) { @@ -58,7 +71,7 @@ set_factor(int factor) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::get_factor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PolygonOffsetProperty:: get_factor() const { @@ -68,7 +81,7 @@ get_factor() const { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PolygonOffsetProperty:: compare_to(const PolygonOffsetProperty &other) const { diff --git a/panda/src/sgattrib/polygonOffsetProperty.cxx b/panda/src/sgattrib/polygonOffsetProperty.cxx index 07107586d4..20d70d0e2d 100644 --- a/panda/src/sgattrib/polygonOffsetProperty.cxx +++ b/panda/src/sgattrib/polygonOffsetProperty.cxx @@ -1,6 +1,19 @@ // Filename: polygonOffsetProperty.cxx // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "polygonOffsetProperty.h" @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void PolygonOffsetProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/polygonOffsetProperty.h b/panda/src/sgattrib/polygonOffsetProperty.h index 7e34edbd71..b24d25d440 100644 --- a/panda/src/sgattrib/polygonOffsetProperty.h +++ b/panda/src/sgattrib/polygonOffsetProperty.h @@ -1,6 +1,19 @@ // Filename: polygonOffsetProperty.h // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POLYGONOFFSETPROPERTY_H diff --git a/panda/src/sgattrib/polygonOffsetTransition.I b/panda/src/sgattrib/polygonOffsetTransition.I index bb038a4633..9a7d044acc 100644 --- a/panda/src/sgattrib/polygonOffsetTransition.I +++ b/panda/src/sgattrib/polygonOffsetTransition.I @@ -1,12 +1,25 @@ // Filename: polygonOffsetTransition.I // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PolygonOffsetTransition:: PolygonOffsetTransition(int units, int factor) : @@ -17,7 +30,7 @@ PolygonOffsetTransition(int units, int factor) : //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetTransition::set_units // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PolygonOffsetTransition:: set_units(int units) { @@ -27,7 +40,7 @@ set_units(int units) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetTransition::get_units // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PolygonOffsetTransition:: get_units() const { @@ -37,7 +50,7 @@ get_units() const { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetTransition::set_factor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PolygonOffsetTransition:: set_factor(int factor) { @@ -47,7 +60,7 @@ set_factor(int factor) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetTransition::get_factor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int PolygonOffsetTransition:: get_factor() const { diff --git a/panda/src/sgattrib/polygonOffsetTransition.cxx b/panda/src/sgattrib/polygonOffsetTransition.cxx index 6b448d023e..014cf4f3af 100644 --- a/panda/src/sgattrib/polygonOffsetTransition.cxx +++ b/panda/src/sgattrib/polygonOffsetTransition.cxx @@ -1,6 +1,19 @@ // Filename: polygonOffsetTransition.cxx // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "polygonOffsetTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: PolygonOffsetTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int PolygonOffsetTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/polygonOffsetTransition.h b/panda/src/sgattrib/polygonOffsetTransition.h index 75c557c904..316b4e1623 100644 --- a/panda/src/sgattrib/polygonOffsetTransition.h +++ b/panda/src/sgattrib/polygonOffsetTransition.h @@ -1,6 +1,19 @@ // Filename: polygonOffsetTransition.h // Created by: jason (12Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef POLYGONOFFSETTRANSITION_H @@ -15,9 +28,9 @@ //////////////////////////////////////////////////////////////////// // Class : PolygonOffsetTransition // Description : This controls the amount of offseting done for depth -// tests. The first value is the units, this is the -// fixed offseting to be used, and the second value -// allows for variable offsetting per polygon based on +// tests. The first value is the units, this is the +// fixed offseting to be used, and the second value +// allows for variable offsetting per polygon based on // the ratio of depth relative to screen area of the polygon //////////////////////////////////////////////////////////////////// class EXPCL_PANDA PolygonOffsetTransition : public OnTransition { diff --git a/panda/src/sgattrib/pruneTransition.I b/panda/src/sgattrib/pruneTransition.I index 581975b143..cd61cd7572 100644 --- a/panda/src/sgattrib/pruneTransition.I +++ b/panda/src/sgattrib/pruneTransition.I @@ -1,12 +1,25 @@ // Filename: pruneTransition.I // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PruneTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PruneTransition:: PruneTransition() { diff --git a/panda/src/sgattrib/pruneTransition.cxx b/panda/src/sgattrib/pruneTransition.cxx index 97edd6cdfb..69b39fc3fe 100644 --- a/panda/src/sgattrib/pruneTransition.cxx +++ b/panda/src/sgattrib/pruneTransition.cxx @@ -1,6 +1,19 @@ // Filename: pruneTransition.cxx // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "pruneTransition.h" @@ -23,14 +36,14 @@ make_copy() const { } //////////////////////////////////////////////////////////////////// -// Function: PruneTransition::sub_render +// Function: PruneTransition::sub_render // Access: Public, Virtual // Description: //////////////////////////////////////////////////////////////////// bool PruneTransition:: sub_render(NodeRelation *, const AllAttributesWrapper &, AllTransitionsWrapper &, RenderTraverser *) { - return false; + return false; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgattrib/pruneTransition.h b/panda/src/sgattrib/pruneTransition.h index 82b4f5c77e..f11c2a0608 100644 --- a/panda/src/sgattrib/pruneTransition.h +++ b/panda/src/sgattrib/pruneTransition.h @@ -1,6 +1,19 @@ // Filename: pruneTransition.h // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef PRUNETRANSITION_H diff --git a/panda/src/sgattrib/renderModeAttribute.I b/panda/src/sgattrib/renderModeAttribute.I index b6d4d88a16..a874566d0d 100644 --- a/panda/src/sgattrib/renderModeAttribute.I +++ b/panda/src/sgattrib/renderModeAttribute.I @@ -1,12 +1,25 @@ // Filename: renderModeAttribute.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: RenderModeAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderModeAttribute:: RenderModeAttribute() : @@ -17,7 +30,7 @@ RenderModeAttribute() : //////////////////////////////////////////////////////////////////// // Function: RenderModeAttribute::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void RenderModeAttribute:: set_mode(RenderModeProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(RenderModeProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: RenderModeAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderModeProperty::Mode RenderModeAttribute:: get_mode() const { @@ -37,7 +50,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: RenderModeAttribute::set_line_width // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void RenderModeAttribute:: set_line_width(double line_width) { @@ -47,7 +60,7 @@ set_line_width(double line_width) { //////////////////////////////////////////////////////////////////// // Function: RenderModeAttribute::get_line_width // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE double RenderModeAttribute:: get_line_width() const { diff --git a/panda/src/sgattrib/renderModeAttribute.cxx b/panda/src/sgattrib/renderModeAttribute.cxx index 9e6ee94104..b371a15ae7 100644 --- a/panda/src/sgattrib/renderModeAttribute.cxx +++ b/panda/src/sgattrib/renderModeAttribute.cxx @@ -1,6 +1,19 @@ // Filename: renderModeAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "renderModeAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: RenderModeAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int RenderModeAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/renderModeAttribute.h b/panda/src/sgattrib/renderModeAttribute.h index 68db4a62d0..9e24b6117f 100644 --- a/panda/src/sgattrib/renderModeAttribute.h +++ b/panda/src/sgattrib/renderModeAttribute.h @@ -1,6 +1,19 @@ // Filename: renderModeAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef RENDERMODEATTRIBUTE_H diff --git a/panda/src/sgattrib/renderModeProperty.I b/panda/src/sgattrib/renderModeProperty.I index f76abd8f89..0dfef38e1c 100644 --- a/panda/src/sgattrib/renderModeProperty.I +++ b/panda/src/sgattrib/renderModeProperty.I @@ -1,24 +1,37 @@ // Filename: renderModeProperty.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: RenderModeProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderModeProperty:: RenderModeProperty(Mode mode, double line_width) : - _mode(mode), - _line_width(line_width) + _mode(mode), + _line_width(line_width) { } //////////////////////////////////////////////////////////////////// // Function: RenderModeProperty::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void RenderModeProperty:: set_mode(RenderModeProperty::Mode mode) { @@ -28,7 +41,7 @@ set_mode(RenderModeProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: RenderModeProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderModeProperty::Mode RenderModeProperty:: get_mode() const { @@ -38,7 +51,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: RenderModeProperty::set_line_width // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void RenderModeProperty:: set_line_width(double line_width) { @@ -48,7 +61,7 @@ set_line_width(double line_width) { //////////////////////////////////////////////////////////////////// // Function: RenderModeProperty::get_line_width // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE double RenderModeProperty:: get_line_width() const { @@ -58,7 +71,7 @@ get_line_width() const { //////////////////////////////////////////////////////////////////// // Function: RenderModeProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int RenderModeProperty:: compare_to(const RenderModeProperty &other) const { diff --git a/panda/src/sgattrib/renderModeProperty.cxx b/panda/src/sgattrib/renderModeProperty.cxx index 7f5a262d19..e1eaa80194 100644 --- a/panda/src/sgattrib/renderModeProperty.cxx +++ b/panda/src/sgattrib/renderModeProperty.cxx @@ -1,6 +1,19 @@ // Filename: renderModeProperty.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "renderModeProperty.h" @@ -21,7 +34,7 @@ operator << (ostream &out, RenderModeProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: RenderModeProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RenderModeProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/renderModeProperty.h b/panda/src/sgattrib/renderModeProperty.h index 2ae653812d..894972039c 100644 --- a/panda/src/sgattrib/renderModeProperty.h +++ b/panda/src/sgattrib/renderModeProperty.h @@ -1,6 +1,19 @@ // Filename: renderModeProperty.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef RENDERMODEPROPERTY_H diff --git a/panda/src/sgattrib/renderModeTransition.I b/panda/src/sgattrib/renderModeTransition.I index 67375ead03..0f5401b78c 100644 --- a/panda/src/sgattrib/renderModeTransition.I +++ b/panda/src/sgattrib/renderModeTransition.I @@ -1,12 +1,25 @@ // Filename: renderModeTransition.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: RenderModeTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderModeTransition:: RenderModeTransition(RenderModeProperty::Mode mode, double line_width) : @@ -17,7 +30,7 @@ RenderModeTransition(RenderModeProperty::Mode mode, double line_width) : //////////////////////////////////////////////////////////////////// // Function: RenderModeTransition::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void RenderModeTransition:: set_mode(RenderModeProperty::Mode mode) { @@ -28,7 +41,7 @@ set_mode(RenderModeProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: RenderModeTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderModeProperty::Mode RenderModeTransition:: get_mode() const { @@ -38,7 +51,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: RenderModeTransition::set_line_width // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void RenderModeTransition:: set_line_width(double line_width) { @@ -49,7 +62,7 @@ set_line_width(double line_width) { //////////////////////////////////////////////////////////////////// // Function: RenderModeTransition::get_line_width // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE double RenderModeTransition:: get_line_width() const { diff --git a/panda/src/sgattrib/renderModeTransition.cxx b/panda/src/sgattrib/renderModeTransition.cxx index 8decd48fee..20f2d8788e 100644 --- a/panda/src/sgattrib/renderModeTransition.cxx +++ b/panda/src/sgattrib/renderModeTransition.cxx @@ -1,6 +1,19 @@ // Filename: renderModeTransition.cxx // Created by: drose (08Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "renderModeTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: RenderModeTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int RenderModeTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/renderModeTransition.h b/panda/src/sgattrib/renderModeTransition.h index 0b23e07c4f..269e6599ef 100644 --- a/panda/src/sgattrib/renderModeTransition.h +++ b/panda/src/sgattrib/renderModeTransition.h @@ -2,6 +2,19 @@ // Created by: drose (08Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RENDERMODETRANSITION_H #define RENDERMODETRANSITION_H @@ -14,11 +27,11 @@ //////////////////////////////////////////////////////////////////// // Class : RenderModeTransition -// Description : +// Description : //////////////////////////////////////////////////////////////////// class EXPCL_PANDA RenderModeTransition : public OnTransition { public: - INLINE RenderModeTransition(RenderModeProperty::Mode mode, + INLINE RenderModeTransition(RenderModeProperty::Mode mode, double line_width = 1.0); INLINE void set_mode(RenderModeProperty::Mode mode); @@ -26,7 +39,7 @@ public: INLINE void set_line_width(double line_width); INLINE double get_line_width() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/renderRelation.I b/panda/src/sgattrib/renderRelation.I index 89485f515c..6529e1baf8 100644 --- a/panda/src/sgattrib/renderRelation.I +++ b/panda/src/sgattrib/renderRelation.I @@ -1,15 +1,29 @@ // Filename: renderRelation.I // Created by: mike (24Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: RenderRelation::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderRelation:: RenderRelation(Node *from, Node *to, int sort) : - NodeRelation(from, to, sort, get_class_type()) + NodeRelation(from, to, sort, get_class_type()) { } diff --git a/panda/src/sgattrib/renderRelation.cxx b/panda/src/sgattrib/renderRelation.cxx index d4f6254de0..f6ecb53c0a 100644 --- a/panda/src/sgattrib/renderRelation.cxx +++ b/panda/src/sgattrib/renderRelation.cxx @@ -1,6 +1,20 @@ // Filename: renderRelation.cxx // Created by: drose (26Oct98) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include "renderRelation.h" #include "transformTransition.h" @@ -14,7 +28,7 @@ TypeHandle RenderRelation::_type_handle; // Access: Public, Virtual // Description: This is called by set_transition() or // clear_transition() whenever a transition is added, -// updated, or removed from the arc. It is just a +// updated, or removed from the arc. It is just a // callback to the arc so it can decide whether // it needs to update any internal data as a response to // this adjustment (for instance, by marking the @@ -134,5 +148,5 @@ get_type() const { TypeHandle RenderRelation:: force_init_type() { init_type(); - return get_class_type(); + return get_class_type(); } diff --git a/panda/src/sgattrib/renderRelation.h b/panda/src/sgattrib/renderRelation.h index 746848c1d1..11fe3b0f45 100644 --- a/panda/src/sgattrib/renderRelation.h +++ b/panda/src/sgattrib/renderRelation.h @@ -1,6 +1,20 @@ // Filename: renderRelation.h // Created by: drose (26Oct98) // +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef RENDERRELATION_H #define RENDERRELATION_H @@ -33,7 +47,7 @@ public: // This is just to be called at initialization time; don't try to // call this directly. INLINE static void register_with_factory(); - + private: static NodeRelation *make_arc(const FactoryParams ¶ms); diff --git a/panda/src/sgattrib/showHideAttribute.I b/panda/src/sgattrib/showHideAttribute.I index 646fc0c515..cbfc449817 100644 --- a/panda/src/sgattrib/showHideAttribute.I +++ b/panda/src/sgattrib/showHideAttribute.I @@ -1,12 +1,25 @@ // Filename: showHideAttribute.I // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ShowHideAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ShowHideAttribute:: ShowHideAttribute() { diff --git a/panda/src/sgattrib/showHideAttribute.cxx b/panda/src/sgattrib/showHideAttribute.cxx index dca7595de8..69f8aff040 100644 --- a/panda/src/sgattrib/showHideAttribute.cxx +++ b/panda/src/sgattrib/showHideAttribute.cxx @@ -1,6 +1,19 @@ // Filename: showHideAttribute.cxx // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "showHideAttribute.h" diff --git a/panda/src/sgattrib/showHideAttribute.h b/panda/src/sgattrib/showHideAttribute.h index e0bb2c19c0..e6bb91603f 100644 --- a/panda/src/sgattrib/showHideAttribute.h +++ b/panda/src/sgattrib/showHideAttribute.h @@ -1,6 +1,19 @@ // Filename: showHideAttribute.h // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SHOWHIDEATTRIBUTE_H diff --git a/panda/src/sgattrib/showHideNameClass.h b/panda/src/sgattrib/showHideNameClass.h index 88e91fbfa7..120021da73 100644 --- a/panda/src/sgattrib/showHideNameClass.h +++ b/panda/src/sgattrib/showHideNameClass.h @@ -1,6 +1,19 @@ // Filename: showHideNameClass.h // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SHOWHIDENAMECLASS_H diff --git a/panda/src/sgattrib/showHideTransition.I b/panda/src/sgattrib/showHideTransition.I index 366ae1bcfc..40b076bc9c 100644 --- a/panda/src/sgattrib/showHideTransition.I +++ b/panda/src/sgattrib/showHideTransition.I @@ -1,12 +1,25 @@ // Filename: showHideTransition.I // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ShowHideTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ShowHideTransition:: ShowHideTransition() { diff --git a/panda/src/sgattrib/showHideTransition.cxx b/panda/src/sgattrib/showHideTransition.cxx index 31d57027a4..9541b81e02 100644 --- a/panda/src/sgattrib/showHideTransition.cxx +++ b/panda/src/sgattrib/showHideTransition.cxx @@ -1,6 +1,19 @@ // Filename: showHideTransition.cxx // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "showHideTransition.h" diff --git a/panda/src/sgattrib/showHideTransition.h b/panda/src/sgattrib/showHideTransition.h index 2709780148..02056e8bb0 100644 --- a/panda/src/sgattrib/showHideTransition.h +++ b/panda/src/sgattrib/showHideTransition.h @@ -1,6 +1,19 @@ // Filename: showHideTransition.h // Created by: drose (26Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SHOWHIDETRANSITION_H @@ -32,7 +45,7 @@ public: INLINE ShowHideTransition(); INLINE static ShowHideTransition all_off(); INLINE static ShowHideTransition all_on(); - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; virtual NodeTransition *make_identity() const; diff --git a/panda/src/sgattrib/stencilAttribute.I b/panda/src/sgattrib/stencilAttribute.I index 27bffc606d..0f7dfc3a8a 100644 --- a/panda/src/sgattrib/stencilAttribute.I +++ b/panda/src/sgattrib/stencilAttribute.I @@ -1,23 +1,36 @@ // Filename: stencilAttribute.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: StencilAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilAttribute:: StencilAttribute() : - _value(StencilProperty::M_none, StencilProperty::A_keep) + _value(StencilProperty::M_none, StencilProperty::A_keep) { } //////////////////////////////////////////////////////////////////// // Function: StencilAttribute::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void StencilAttribute:: set_mode(StencilProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(StencilProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: StencilAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilProperty::Mode StencilAttribute:: get_mode() const { @@ -37,7 +50,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: StencilAttribute::set_action // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void StencilAttribute:: set_action(StencilProperty::Action action) { @@ -47,7 +60,7 @@ set_action(StencilProperty::Action action) { //////////////////////////////////////////////////////////////////// // Function: StencilAttribute::get_action // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilProperty::Action StencilAttribute:: get_action() const { diff --git a/panda/src/sgattrib/stencilAttribute.cxx b/panda/src/sgattrib/stencilAttribute.cxx index 29a0b18896..7c7be863a0 100644 --- a/panda/src/sgattrib/stencilAttribute.cxx +++ b/panda/src/sgattrib/stencilAttribute.cxx @@ -1,6 +1,19 @@ // Filename: stencilAttribute.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "stencilAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: StencilAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int StencilAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/stencilAttribute.h b/panda/src/sgattrib/stencilAttribute.h index 71992831d7..a677612774 100644 --- a/panda/src/sgattrib/stencilAttribute.h +++ b/panda/src/sgattrib/stencilAttribute.h @@ -1,6 +1,19 @@ // Filename: stencilAttribute.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef STENCILATTRIBUTE_H diff --git a/panda/src/sgattrib/stencilProperty.I b/panda/src/sgattrib/stencilProperty.I index a9bf58cf58..e25a384049 100644 --- a/panda/src/sgattrib/stencilProperty.I +++ b/panda/src/sgattrib/stencilProperty.I @@ -1,16 +1,29 @@ // Filename: stencilProperty.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: StencilProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilProperty:: StencilProperty(StencilProperty::Mode mode, StencilProperty::Action action) : - _mode(mode), + _mode(mode), _action(action) { } @@ -18,7 +31,7 @@ StencilProperty(StencilProperty::Mode mode, StencilProperty::Action action) : //////////////////////////////////////////////////////////////////// // Function: StencilProperty::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void StencilProperty:: set_mode(StencilProperty::Mode mode) { @@ -28,7 +41,7 @@ set_mode(StencilProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: StencilProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilProperty::Mode StencilProperty:: get_mode() const { @@ -38,7 +51,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: StencilProperty::set_action // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void StencilProperty:: set_action(StencilProperty::Action action) { @@ -48,7 +61,7 @@ set_action(StencilProperty::Action action) { //////////////////////////////////////////////////////////////////// // Function: StencilProperty::get_action // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilProperty::Action StencilProperty:: get_action() const { @@ -58,7 +71,7 @@ get_action() const { //////////////////////////////////////////////////////////////////// // Function: StencilProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int StencilProperty:: compare_to(const StencilProperty &other) const { diff --git a/panda/src/sgattrib/stencilProperty.cxx b/panda/src/sgattrib/stencilProperty.cxx index 37645d7dc8..0e30ca267d 100644 --- a/panda/src/sgattrib/stencilProperty.cxx +++ b/panda/src/sgattrib/stencilProperty.cxx @@ -1,6 +1,19 @@ // Filename: stencilProperty.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "stencilProperty.h" @@ -28,7 +41,7 @@ operator << (ostream &out, StencilProperty::Mode mode) { case StencilProperty::M_not_equal: return out << "not_equal"; - + case StencilProperty::M_greater_equal: return out << "greater_equal"; @@ -44,19 +57,19 @@ operator << (ostream &out, StencilProperty::Action action) { switch (action) { case StencilProperty::A_keep: return out << "keep"; - + case StencilProperty::A_zero: return out << "zero"; - + case StencilProperty::A_replace: return out << "replace"; - + case StencilProperty::A_increment: return out << "increment"; - + case StencilProperty::A_decrement: return out << "decrement"; - + case StencilProperty::A_invert: return out << "invert"; } @@ -67,7 +80,7 @@ operator << (ostream &out, StencilProperty::Action action) { //////////////////////////////////////////////////////////////////// // Function: StencilProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void StencilProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/stencilProperty.h b/panda/src/sgattrib/stencilProperty.h index 218b0ce2dd..2fcb57076e 100644 --- a/panda/src/sgattrib/stencilProperty.h +++ b/panda/src/sgattrib/stencilProperty.h @@ -1,6 +1,19 @@ // Filename: stencilProperty.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef STENCILPROPERTY_H diff --git a/panda/src/sgattrib/stencilTransition.I b/panda/src/sgattrib/stencilTransition.I index 2d6eaf133d..e277dfb282 100644 --- a/panda/src/sgattrib/stencilTransition.I +++ b/panda/src/sgattrib/stencilTransition.I @@ -1,15 +1,28 @@ // Filename: stencilTransition.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: StencilTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilTransition:: -StencilTransition(StencilProperty::Mode mode, +StencilTransition(StencilProperty::Mode mode, StencilProperty::Action action) : _value(mode, action) { @@ -18,7 +31,7 @@ StencilTransition(StencilProperty::Mode mode, //////////////////////////////////////////////////////////////////// // Function: StencilTransition::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void StencilTransition:: set_mode(StencilProperty::Mode mode) { @@ -29,7 +42,7 @@ set_mode(StencilProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: StencilTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilProperty::Mode StencilTransition:: get_mode() const { @@ -39,7 +52,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: StencilTransition::set_action // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void StencilTransition:: set_action(StencilProperty::Action action) { @@ -50,7 +63,7 @@ set_action(StencilProperty::Action action) { //////////////////////////////////////////////////////////////////// // Function: StencilTransition::get_action // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE StencilProperty::Action StencilTransition:: get_action() const { diff --git a/panda/src/sgattrib/stencilTransition.cxx b/panda/src/sgattrib/stencilTransition.cxx index 96d27aeae8..a282176d38 100644 --- a/panda/src/sgattrib/stencilTransition.cxx +++ b/panda/src/sgattrib/stencilTransition.cxx @@ -1,6 +1,19 @@ // Filename: stencilTransition.cxx // Created by: mike (28Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "stencilTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: StencilTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int StencilTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/stencilTransition.h b/panda/src/sgattrib/stencilTransition.h index 68aef49f74..d50e1ebb49 100644 --- a/panda/src/sgattrib/stencilTransition.h +++ b/panda/src/sgattrib/stencilTransition.h @@ -2,6 +2,19 @@ // Created by: mike (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef STENCILTRANSITION_H #define STENCILTRANSITION_H @@ -32,7 +45,7 @@ public: INLINE void set_action(StencilProperty::Action action); INLINE StencilProperty::Action get_action() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/test_attrib.cxx b/panda/src/sgattrib/test_attrib.cxx index a7befddbc4..8109ba8323 100644 --- a/panda/src/sgattrib/test_attrib.cxx +++ b/panda/src/sgattrib/test_attrib.cxx @@ -1,6 +1,19 @@ // Filename: test_attrib.cxx // Created by: drose (18Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "colorTransition.h" @@ -16,7 +29,7 @@ #include -class PrintNodes : +class PrintNodes : public TraverserVisitor { public: PrintNodes() { @@ -66,7 +79,7 @@ main(int argc, char *argv[]) { new NodeRelation(a, ab, 0, NodeRelation::get_class_type()); NodeRelation *b_ba = new NodeRelation(b, ba, 0, NodeRelation::get_class_type()); - + PT(Texture) alpha = new Texture; alpha->set_name("alpha"); PT(Texture) beta = new Texture; @@ -92,7 +105,7 @@ main(int argc, char *argv[]) { { cerr << "\n"; PrintNodes pn; - df_traverse(r, pn, + df_traverse(r, pn, AllAttributesWrapper(), NullLevelState(), NodeRelation::get_class_type()); diff --git a/panda/src/sgattrib/texGenAttribute.I b/panda/src/sgattrib/texGenAttribute.I index 6c75055d71..d479ccd5eb 100644 --- a/panda/src/sgattrib/texGenAttribute.I +++ b/panda/src/sgattrib/texGenAttribute.I @@ -1,12 +1,25 @@ // Filename: texGenAttribute.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TexGenAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexGenAttribute:: TexGenAttribute() { @@ -48,7 +61,7 @@ set_sphere_map() { //////////////////////////////////////////////////////////////////// // Function: TexGenAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexGenProperty::Mode TexGenAttribute:: get_mode() const { @@ -58,7 +71,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: TexGenAttribute::get_plane // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LMatrix4f TexGenAttribute:: get_plane() const { diff --git a/panda/src/sgattrib/texGenAttribute.cxx b/panda/src/sgattrib/texGenAttribute.cxx index bc567dcc49..919a368b80 100644 --- a/panda/src/sgattrib/texGenAttribute.cxx +++ b/panda/src/sgattrib/texGenAttribute.cxx @@ -1,6 +1,19 @@ // Filename: texGenAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "texGenAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TexGenAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TexGenAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/texGenAttribute.h b/panda/src/sgattrib/texGenAttribute.h index 2dcbd1f785..12a4849d07 100644 --- a/panda/src/sgattrib/texGenAttribute.h +++ b/panda/src/sgattrib/texGenAttribute.h @@ -1,6 +1,19 @@ // Filename: texGenAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXGENATTRIBUTE_H diff --git a/panda/src/sgattrib/texGenProperty.I b/panda/src/sgattrib/texGenProperty.I index 55125e7d22..64f3104960 100644 --- a/panda/src/sgattrib/texGenProperty.I +++ b/panda/src/sgattrib/texGenProperty.I @@ -1,12 +1,25 @@ // Filename: texGenProperty.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TexGenProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexGenProperty:: TexGenProperty() : @@ -45,7 +58,7 @@ sphere_map() { //////////////////////////////////////////////////////////////////// // Function: TexGenProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexGenProperty::Mode TexGenProperty:: get_mode() const { @@ -55,7 +68,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: TexGenProperty::get_plane // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LMatrix4f &TexGenProperty:: get_plane() const { @@ -65,7 +78,7 @@ get_plane() const { //////////////////////////////////////////////////////////////////// // Function: TexGenProperty::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int TexGenProperty:: compare_to(const TexGenProperty &other) const { diff --git a/panda/src/sgattrib/texGenProperty.cxx b/panda/src/sgattrib/texGenProperty.cxx index f8fb9218ce..1eedf1289c 100644 --- a/panda/src/sgattrib/texGenProperty.cxx +++ b/panda/src/sgattrib/texGenProperty.cxx @@ -1,6 +1,19 @@ // Filename: texGenProperty.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "texGenProperty.h" @@ -27,7 +40,7 @@ operator << (ostream &out, TexGenProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TexGenProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void TexGenProperty:: output(ostream &out) const { diff --git a/panda/src/sgattrib/texGenProperty.h b/panda/src/sgattrib/texGenProperty.h index c486f347eb..ecc8a6649d 100644 --- a/panda/src/sgattrib/texGenProperty.h +++ b/panda/src/sgattrib/texGenProperty.h @@ -1,6 +1,19 @@ // Filename: texGenProperty.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXGENPROPERTY_H diff --git a/panda/src/sgattrib/texGenTransition.I b/panda/src/sgattrib/texGenTransition.I index e9cfdc7e50..b57a3cab56 100644 --- a/panda/src/sgattrib/texGenTransition.I +++ b/panda/src/sgattrib/texGenTransition.I @@ -1,12 +1,25 @@ // Filename: texGenTransition.I // Created by: drose (24Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TexGenTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexGenTransition:: TexGenTransition() { @@ -77,7 +90,7 @@ set_sphere_map() { //////////////////////////////////////////////////////////////////// // Function: TexGenTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexGenProperty::Mode TexGenTransition:: get_mode() const { @@ -87,7 +100,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: TexGenTransition::get_plane // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LMatrix4f TexGenTransition:: get_plane() const { diff --git a/panda/src/sgattrib/texGenTransition.cxx b/panda/src/sgattrib/texGenTransition.cxx index 17304671ed..cb24480a39 100644 --- a/panda/src/sgattrib/texGenTransition.cxx +++ b/panda/src/sgattrib/texGenTransition.cxx @@ -1,6 +1,19 @@ // Filename: texGenTransition.cxx // Created by: mike (28Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "texGenTransition.h" @@ -47,7 +60,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TexGenTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TexGenTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/texGenTransition.h b/panda/src/sgattrib/texGenTransition.h index cc9f36fdbf..7d93ec2cad 100644 --- a/panda/src/sgattrib/texGenTransition.h +++ b/panda/src/sgattrib/texGenTransition.h @@ -2,6 +2,19 @@ // Created by: mike (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TEXGENTRANSITION_H #define TEXGENTRANSITION_H @@ -29,7 +42,7 @@ public: INLINE TexGenProperty::Mode get_mode() const; INLINE LMatrix4f get_plane() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; diff --git a/panda/src/sgattrib/texMatrixAttribute.I b/panda/src/sgattrib/texMatrixAttribute.I index 9d01641d32..fda038993f 100644 --- a/panda/src/sgattrib/texMatrixAttribute.I +++ b/panda/src/sgattrib/texMatrixAttribute.I @@ -1,12 +1,25 @@ // Filename: texMatrixAttribute.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TexMatrixAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexMatrixAttribute:: TexMatrixAttribute() { diff --git a/panda/src/sgattrib/texMatrixAttribute.cxx b/panda/src/sgattrib/texMatrixAttribute.cxx index a171f83670..e4b6c3f91d 100644 --- a/panda/src/sgattrib/texMatrixAttribute.cxx +++ b/panda/src/sgattrib/texMatrixAttribute.cxx @@ -1,6 +1,19 @@ // Filename: texMatrixAttribute.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "texMatrixAttribute.h" diff --git a/panda/src/sgattrib/texMatrixAttribute.h b/panda/src/sgattrib/texMatrixAttribute.h index 6430ac14b1..f4c2b63f68 100644 --- a/panda/src/sgattrib/texMatrixAttribute.h +++ b/panda/src/sgattrib/texMatrixAttribute.h @@ -1,6 +1,19 @@ // Filename: texMatrixAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXMATRIXATTRIBUTE_H diff --git a/panda/src/sgattrib/texMatrixTransition.I b/panda/src/sgattrib/texMatrixTransition.I index 16314e9b90..1b5bdd917d 100644 --- a/panda/src/sgattrib/texMatrixTransition.I +++ b/panda/src/sgattrib/texMatrixTransition.I @@ -1,12 +1,25 @@ // Filename: texMatrixTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TexMatrixTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexMatrixTransition:: TexMatrixTransition() { @@ -15,7 +28,7 @@ TexMatrixTransition() { //////////////////////////////////////////////////////////////////// // Function: TexMatrixTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TexMatrixTransition:: TexMatrixTransition(const LMatrix4f &matrix) : diff --git a/panda/src/sgattrib/texMatrixTransition.cxx b/panda/src/sgattrib/texMatrixTransition.cxx index fe1cec3872..d6e3c7aa42 100644 --- a/panda/src/sgattrib/texMatrixTransition.cxx +++ b/panda/src/sgattrib/texMatrixTransition.cxx @@ -1,6 +1,19 @@ // Filename: texMatrixTransition.cxx // Created by: mike (19Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "texMatrixTransition.h" diff --git a/panda/src/sgattrib/texMatrixTransition.h b/panda/src/sgattrib/texMatrixTransition.h index 4b833c4990..0851f5dfa9 100644 --- a/panda/src/sgattrib/texMatrixTransition.h +++ b/panda/src/sgattrib/texMatrixTransition.h @@ -2,6 +2,19 @@ // Created by: mike (19Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TEXMATRIXTRANSITION_H #define TEXMATRIXTRANSITION_H diff --git a/panda/src/sgattrib/textureApplyAttribute.I b/panda/src/sgattrib/textureApplyAttribute.I index 33754b0296..d533405f0f 100644 --- a/panda/src/sgattrib/textureApplyAttribute.I +++ b/panda/src/sgattrib/textureApplyAttribute.I @@ -1,12 +1,25 @@ // Filename: textureApplyAttribute.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TextureApplyAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureApplyAttribute:: TextureApplyAttribute() : @@ -17,7 +30,7 @@ TextureApplyAttribute() : //////////////////////////////////////////////////////////////////// // Function: TextureApplyAttribute::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TextureApplyAttribute:: set_mode(TextureApplyProperty::Mode mode) { @@ -27,7 +40,7 @@ set_mode(TextureApplyProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TextureApplyAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureApplyProperty::Mode TextureApplyAttribute:: get_mode() const { diff --git a/panda/src/sgattrib/textureApplyAttribute.cxx b/panda/src/sgattrib/textureApplyAttribute.cxx index 06f4d36d3a..4c2be26cdc 100644 --- a/panda/src/sgattrib/textureApplyAttribute.cxx +++ b/panda/src/sgattrib/textureApplyAttribute.cxx @@ -1,6 +1,19 @@ // Filename: textureApplyAttribute.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "textureApplyAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TextureApplyAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TextureApplyAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/textureApplyAttribute.h b/panda/src/sgattrib/textureApplyAttribute.h index 1c2665ae9b..7521861fb3 100644 --- a/panda/src/sgattrib/textureApplyAttribute.h +++ b/panda/src/sgattrib/textureApplyAttribute.h @@ -1,6 +1,19 @@ // Filename: textureApplyAttribute.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXTUREAPPLYATTRIBUTE_H diff --git a/panda/src/sgattrib/textureApplyProperty.I b/panda/src/sgattrib/textureApplyProperty.I index c0f4c8d9ec..0db292bfa7 100644 --- a/panda/src/sgattrib/textureApplyProperty.I +++ b/panda/src/sgattrib/textureApplyProperty.I @@ -1,12 +1,25 @@ // Filename: textureApplyProperty.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TextureApplyProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureApplyProperty:: TextureApplyProperty(TextureApplyProperty::Mode mode) : @@ -17,8 +30,8 @@ TextureApplyProperty(TextureApplyProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: TextureApplyProperty::Constructor // Access: Public -// Description: This should only be called in the Protected -// constructor of TextureApplyTransition. It is made +// Description: This should only be called in the Protected +// constructor of TextureApplyTransition. It is made // public, only for that to access, and is necessary // for creating an object in make_TextureApplyTransition // before any information has been read @@ -32,7 +45,7 @@ TextureApplyProperty(void) //////////////////////////////////////////////////////////////////// // Function: TextureApplyProperty::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TextureApplyProperty:: set_mode(TextureApplyProperty::Mode mode) { @@ -42,7 +55,7 @@ set_mode(TextureApplyProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TextureApplyProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureApplyProperty::Mode TextureApplyProperty:: get_mode() const { @@ -52,7 +65,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: TextureApplyProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int TextureApplyProperty:: compare_to(const TextureApplyProperty &other) const { diff --git a/panda/src/sgattrib/textureApplyProperty.cxx b/panda/src/sgattrib/textureApplyProperty.cxx index ca033789c5..616471b0dc 100644 --- a/panda/src/sgattrib/textureApplyProperty.cxx +++ b/panda/src/sgattrib/textureApplyProperty.cxx @@ -1,6 +1,19 @@ // Filename: textureApplyProperty.cxx // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "textureApplyProperty.h" @@ -32,7 +45,7 @@ operator << (ostream &out, TextureApplyProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TextureApplyProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void TextureApplyProperty:: output(ostream &out) const { @@ -46,7 +59,7 @@ output(ostream &out) const { // this object to a Datagram //////////////////////////////////////////////////////////////////// void TextureApplyProperty:: -write_datagram(Datagram &destination) +write_datagram(Datagram &destination) { destination.add_uint8(_mode); } @@ -58,7 +71,7 @@ write_datagram(Datagram &destination) // this object out of a Datagram //////////////////////////////////////////////////////////////////// void TextureApplyProperty:: -read_datagram(DatagramIterator &source) +read_datagram(DatagramIterator &source) { _mode = (enum Mode) source.get_uint8(); } diff --git a/panda/src/sgattrib/textureApplyProperty.h b/panda/src/sgattrib/textureApplyProperty.h index dd3366d9ae..c1cff07f1a 100644 --- a/panda/src/sgattrib/textureApplyProperty.h +++ b/panda/src/sgattrib/textureApplyProperty.h @@ -1,6 +1,19 @@ // Filename: textureApplyProperty.h // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXTUREAPPLYPROPERTY_H diff --git a/panda/src/sgattrib/textureApplyTransition.I b/panda/src/sgattrib/textureApplyTransition.I index 72133033b4..6e0b72ba5f 100644 --- a/panda/src/sgattrib/textureApplyTransition.I +++ b/panda/src/sgattrib/textureApplyTransition.I @@ -1,12 +1,25 @@ // Filename: textureApplyTransition.I // Created by: drose (23Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TextureApplyTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureApplyTransition:: TextureApplyTransition(TextureApplyProperty::Mode mode) : @@ -17,17 +30,17 @@ TextureApplyTransition(TextureApplyProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: TextureApplyTransition::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureApplyTransition:: -TextureApplyTransition(void) +TextureApplyTransition(void) { } //////////////////////////////////////////////////////////////////// // Function: TextureApplyTransition::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TextureApplyTransition:: set_mode(TextureApplyProperty::Mode mode) { @@ -38,7 +51,7 @@ set_mode(TextureApplyProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TextureApplyTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureApplyProperty::Mode TextureApplyTransition:: get_mode() const { diff --git a/panda/src/sgattrib/textureApplyTransition.cxx b/panda/src/sgattrib/textureApplyTransition.cxx index e152f267f7..6475f8e1e2 100644 --- a/panda/src/sgattrib/textureApplyTransition.cxx +++ b/panda/src/sgattrib/textureApplyTransition.cxx @@ -1,6 +1,19 @@ // Filename: textureApplyTransition.cxx // Created by: drose (06Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "textureApplyTransition.h" @@ -51,7 +64,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TextureApplyTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TextureApplyTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/textureApplyTransition.h b/panda/src/sgattrib/textureApplyTransition.h index 790b2c2a0d..0199c52006 100644 --- a/panda/src/sgattrib/textureApplyTransition.h +++ b/panda/src/sgattrib/textureApplyTransition.h @@ -2,6 +2,19 @@ // Created by: drose (06Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TEXTUREAPPLYTRANSITION_H #define TEXTUREAPPLYTRANSITION_H @@ -23,7 +36,7 @@ public: INLINE void set_mode(TextureApplyProperty::Mode mode); INLINE TextureApplyProperty::Mode get_mode() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -38,7 +51,7 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_TextureApplyTransition(const FactoryParams ¶ms); diff --git a/panda/src/sgattrib/textureAttribute.I b/panda/src/sgattrib/textureAttribute.I index 991fcc1e5d..ec6dc145b8 100644 --- a/panda/src/sgattrib/textureAttribute.I +++ b/panda/src/sgattrib/textureAttribute.I @@ -1,12 +1,25 @@ // Filename: textureAttribute.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TextureAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureAttribute:: TextureAttribute() { diff --git a/panda/src/sgattrib/textureAttribute.cxx b/panda/src/sgattrib/textureAttribute.cxx index f06b143d8b..d5b2710947 100644 --- a/panda/src/sgattrib/textureAttribute.cxx +++ b/panda/src/sgattrib/textureAttribute.cxx @@ -1,6 +1,19 @@ // Filename: textureAttribute.cxx // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "textureAttribute.h" @@ -74,7 +87,7 @@ set_value_from(const OnOffTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TextureAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TextureAttribute:: compare_values(const OnOffAttribute *other) const { diff --git a/panda/src/sgattrib/textureAttribute.h b/panda/src/sgattrib/textureAttribute.h index c371aa8216..51643d4107 100644 --- a/panda/src/sgattrib/textureAttribute.h +++ b/panda/src/sgattrib/textureAttribute.h @@ -1,6 +1,19 @@ // Filename: textureAttribute.h // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXTUREATTRIBUTE_H diff --git a/panda/src/sgattrib/textureTransition.I b/panda/src/sgattrib/textureTransition.I index 8c99220f3b..682296ca43 100644 --- a/panda/src/sgattrib/textureTransition.I +++ b/panda/src/sgattrib/textureTransition.I @@ -1,12 +1,25 @@ // Filename: textureTransition.I // Created by: drose (22Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TextureTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureTransition:: TextureTransition() { @@ -15,10 +28,10 @@ TextureTransition() { //////////////////////////////////////////////////////////////////// // Function: TextureTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TextureTransition:: -TextureTransition(Texture *texture) : +TextureTransition(Texture *texture) : OnOffTransition(TD_on), _value(texture) { diff --git a/panda/src/sgattrib/textureTransition.cxx b/panda/src/sgattrib/textureTransition.cxx index 949d25e15c..c3c1308ce6 100644 --- a/panda/src/sgattrib/textureTransition.cxx +++ b/panda/src/sgattrib/textureTransition.cxx @@ -1,6 +1,19 @@ // Filename: textureTransition.cxx // Created by: drose (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgattrib.h" @@ -54,7 +67,7 @@ set_value_from(const OnOffTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TextureTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TextureTransition:: compare_values(const OnOffTransition *other) const { @@ -112,7 +125,7 @@ write_datagram(BamWriter *manager, Datagram &me) { // Function: TextureTransition::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int TextureTransition:: @@ -120,7 +133,7 @@ complete_pointers(vector_typedWritable &plist, BamReader *) { if (plist[0] == TypedWritable::Null) { if (sgattrib_cat.is_debug()) { sgattrib_cat->debug() - << get_type().get_name() << " received null Texture," + << get_type().get_name() << " received null Texture," << " turning off" << endl; } _value = (Texture *)NULL; diff --git a/panda/src/sgattrib/textureTransition.h b/panda/src/sgattrib/textureTransition.h index 0ab8433965..5322a879ac 100644 --- a/panda/src/sgattrib/textureTransition.h +++ b/panda/src/sgattrib/textureTransition.h @@ -2,6 +2,19 @@ // Created by: drose (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TEXTURETRANSITION_H #define TEXTURETRANSITION_H @@ -38,7 +51,7 @@ public: INLINE void set_on(Texture *texture); INLINE PT(Texture) get_texture() const; - + virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -52,8 +65,8 @@ protected: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); protected: diff --git a/panda/src/sgattrib/transformAttribute.I b/panda/src/sgattrib/transformAttribute.I index 6723a37263..920ce51021 100644 --- a/panda/src/sgattrib/transformAttribute.I +++ b/panda/src/sgattrib/transformAttribute.I @@ -1,12 +1,25 @@ // Filename: transformAttribute.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TransformAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransformAttribute:: TransformAttribute() { diff --git a/panda/src/sgattrib/transformAttribute.cxx b/panda/src/sgattrib/transformAttribute.cxx index e367674af1..6b3d29545a 100644 --- a/panda/src/sgattrib/transformAttribute.cxx +++ b/panda/src/sgattrib/transformAttribute.cxx @@ -1,6 +1,19 @@ // Filename: transformAttribute.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "transformAttribute.h" diff --git a/panda/src/sgattrib/transformAttribute.h b/panda/src/sgattrib/transformAttribute.h index b636694e79..7f02aeb780 100644 --- a/panda/src/sgattrib/transformAttribute.h +++ b/panda/src/sgattrib/transformAttribute.h @@ -1,6 +1,19 @@ // Filename: transformAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRANSFORMATTRIBUTE_H diff --git a/panda/src/sgattrib/transformTransition.I b/panda/src/sgattrib/transformTransition.I index 654b8673a8..131d997f1e 100644 --- a/panda/src/sgattrib/transformTransition.I +++ b/panda/src/sgattrib/transformTransition.I @@ -1,12 +1,25 @@ // Filename: transformTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TransformTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransformTransition:: TransformTransition() { @@ -15,7 +28,7 @@ TransformTransition() { //////////////////////////////////////////////////////////////////// // Function: TransformTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransformTransition:: TransformTransition(const LMatrix4f &matrix) : diff --git a/panda/src/sgattrib/transformTransition.cxx b/panda/src/sgattrib/transformTransition.cxx index 30ce85d7a3..6fddb2bd8b 100644 --- a/panda/src/sgattrib/transformTransition.cxx +++ b/panda/src/sgattrib/transformTransition.cxx @@ -1,6 +1,19 @@ // Filename: transformTransition.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "transformTransition.h" diff --git a/panda/src/sgattrib/transformTransition.h b/panda/src/sgattrib/transformTransition.h index ab0829da49..8676f605d1 100644 --- a/panda/src/sgattrib/transformTransition.h +++ b/panda/src/sgattrib/transformTransition.h @@ -1,6 +1,19 @@ // Filename: transformTransition.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRANSFORMTRANSITION_H diff --git a/panda/src/sgattrib/transparencyAttribute.I b/panda/src/sgattrib/transparencyAttribute.I index dbac17cf15..5dcb0e2d32 100644 --- a/panda/src/sgattrib/transparencyAttribute.I +++ b/panda/src/sgattrib/transparencyAttribute.I @@ -1,12 +1,25 @@ // Filename: transparencyAttribute.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TransparencyAttribute::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransparencyAttribute:: TransparencyAttribute() : @@ -17,7 +30,7 @@ TransparencyAttribute() : //////////////////////////////////////////////////////////////////// // Function: TransparencyAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransparencyProperty::Mode TransparencyAttribute:: get_mode() const { @@ -27,7 +40,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: TransparencyAttribute::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TransparencyAttribute:: set_mode(TransparencyProperty::Mode mode) { diff --git a/panda/src/sgattrib/transparencyAttribute.cxx b/panda/src/sgattrib/transparencyAttribute.cxx index d622bb1ea5..b3f155436f 100644 --- a/panda/src/sgattrib/transparencyAttribute.cxx +++ b/panda/src/sgattrib/transparencyAttribute.cxx @@ -1,6 +1,19 @@ // Filename: transparencyAttribute.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "transparencyAttribute.h" @@ -73,7 +86,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TransparencyAttribute::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TransparencyAttribute:: compare_values(const OnAttribute *other) const { diff --git a/panda/src/sgattrib/transparencyAttribute.h b/panda/src/sgattrib/transparencyAttribute.h index ccbf3f3baf..d6cfba42cc 100644 --- a/panda/src/sgattrib/transparencyAttribute.h +++ b/panda/src/sgattrib/transparencyAttribute.h @@ -1,6 +1,19 @@ // Filename: transparencyAttribute.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRANSPARENCYATTRIBUTE_H diff --git a/panda/src/sgattrib/transparencyProperty.I b/panda/src/sgattrib/transparencyProperty.I index 27d13afa76..f818ce6f53 100644 --- a/panda/src/sgattrib/transparencyProperty.I +++ b/panda/src/sgattrib/transparencyProperty.I @@ -1,12 +1,25 @@ // Filename: transparencyProperty.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TransparencyProperty::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransparencyProperty:: TransparencyProperty(TransparencyProperty::Mode mode) : @@ -17,8 +30,8 @@ TransparencyProperty(TransparencyProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: TransparencyProperty::Constructor // Access: Public -// Description: This should only be called in the Protected -// constructor of TransparencyTransition. It is made +// Description: This should only be called in the Protected +// constructor of TransparencyTransition. It is made // public, only for that to access, and is necessary // for creating an object in make_TransparencyTransition // before any information has been read @@ -31,7 +44,7 @@ TransparencyProperty(void) //////////////////////////////////////////////////////////////////// // Function: TransparencyProperty::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TransparencyProperty:: set_mode(TransparencyProperty::Mode mode) { @@ -41,7 +54,7 @@ set_mode(TransparencyProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TransparencyProperty::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransparencyProperty::Mode TransparencyProperty:: get_mode() const { @@ -51,7 +64,7 @@ get_mode() const { //////////////////////////////////////////////////////////////////// // Function: TransparencyProperty::compare_to // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE int TransparencyProperty:: compare_to(const TransparencyProperty &other) const { diff --git a/panda/src/sgattrib/transparencyProperty.cxx b/panda/src/sgattrib/transparencyProperty.cxx index 069f5a9a4b..e06a29e794 100644 --- a/panda/src/sgattrib/transparencyProperty.cxx +++ b/panda/src/sgattrib/transparencyProperty.cxx @@ -1,6 +1,19 @@ // Filename: transparencyProperty.cxx // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "transparencyProperty.h" @@ -35,7 +48,7 @@ operator << (ostream &out, TransparencyProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TransparencyProperty::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void TransparencyProperty:: output(ostream &out) const { @@ -49,7 +62,7 @@ output(ostream &out) const { // this object to a Datagram //////////////////////////////////////////////////////////////////// void TransparencyProperty:: -write_datagram(Datagram &destination) +write_datagram(Datagram &destination) { destination.add_uint8(_mode); } @@ -61,7 +74,7 @@ write_datagram(Datagram &destination) // this object out of a Datagram //////////////////////////////////////////////////////////////////// void TransparencyProperty:: -read_datagram(DatagramIterator &source) +read_datagram(DatagramIterator &source) { _mode = (enum Mode) source.get_uint8(); } diff --git a/panda/src/sgattrib/transparencyProperty.h b/panda/src/sgattrib/transparencyProperty.h index 67b511ddba..ceadc5e81b 100644 --- a/panda/src/sgattrib/transparencyProperty.h +++ b/panda/src/sgattrib/transparencyProperty.h @@ -1,6 +1,19 @@ // Filename: transparencyProperty.h // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TRANSPARENCYPROPERTY_H diff --git a/panda/src/sgattrib/transparencyTransition.I b/panda/src/sgattrib/transparencyTransition.I index 2e0aeec4e5..fb00d569d1 100644 --- a/panda/src/sgattrib/transparencyTransition.I +++ b/panda/src/sgattrib/transparencyTransition.I @@ -1,12 +1,25 @@ // Filename: transparencyTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: TransparencyTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransparencyTransition:: TransparencyTransition(TransparencyProperty::Mode mode) : @@ -17,7 +30,7 @@ TransparencyTransition(TransparencyProperty::Mode mode) : //////////////////////////////////////////////////////////////////// // Function: TransparencyTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransparencyTransition:: TransparencyTransition(void) @@ -27,7 +40,7 @@ TransparencyTransition(void) //////////////////////////////////////////////////////////////////// // Function: TransparencyTransition::set_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TransparencyTransition:: set_mode(TransparencyProperty::Mode mode) { @@ -38,7 +51,7 @@ set_mode(TransparencyProperty::Mode mode) { //////////////////////////////////////////////////////////////////// // Function: TransparencyTransition::get_mode // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TransparencyProperty::Mode TransparencyTransition:: get_mode() const { diff --git a/panda/src/sgattrib/transparencyTransition.cxx b/panda/src/sgattrib/transparencyTransition.cxx index f26873fcc3..3ed8caba12 100644 --- a/panda/src/sgattrib/transparencyTransition.cxx +++ b/panda/src/sgattrib/transparencyTransition.cxx @@ -1,6 +1,19 @@ // Filename: transparencyTransition.cxx // Created by: mike (28Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "transparencyTransition.h" @@ -51,7 +64,7 @@ set_value_from(const OnTransition *other) { //////////////////////////////////////////////////////////////////// // Function: TransparencyTransition::compare_values // Access: Protected, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// int TransparencyTransition:: compare_values(const OnTransition *other) const { diff --git a/panda/src/sgattrib/transparencyTransition.h b/panda/src/sgattrib/transparencyTransition.h index 6cf6ab6d87..ffd86c89b3 100644 --- a/panda/src/sgattrib/transparencyTransition.h +++ b/panda/src/sgattrib/transparencyTransition.h @@ -2,6 +2,19 @@ // Created by: mike (18Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TRANSPARENCYTRANSITION_H #define TRANSPARENCYTRANSITION_H @@ -31,7 +44,7 @@ PUBLISHED: INLINE void set_mode(TransparencyProperty::Mode mode); INLINE TransparencyProperty::Mode get_mode() const; -public: +public: virtual NodeTransition *make_copy() const; virtual NodeAttribute *make_attrib() const; @@ -46,7 +59,7 @@ protected: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual void write_datagram(BamWriter* manager, Datagram &me); static TypedWritable *make_TransparencyTransition(const FactoryParams ¶ms); diff --git a/panda/src/sgidisplay/config_sgidisplay.cxx b/panda/src/sgidisplay/config_sgidisplay.cxx index bb4af9fcd7..d1afd5d0e8 100644 --- a/panda/src/sgidisplay/config_sgidisplay.cxx +++ b/panda/src/sgidisplay/config_sgidisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_sgidisplay.cxx // Created by: cary (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgidisplay.h" diff --git a/panda/src/sgidisplay/config_sgidisplay.h b/panda/src/sgidisplay/config_sgidisplay.h index b7abf07769..dbdf228a87 100644 --- a/panda/src/sgidisplay/config_sgidisplay.h +++ b/panda/src/sgidisplay/config_sgidisplay.h @@ -2,6 +2,19 @@ // Created by: cary (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CONFIG_SGIDISPLAY_H__ #define __CONFIG_SGIDISPLAY_H__ diff --git a/panda/src/sgidisplay/sgiGraphicsPipe.cxx b/panda/src/sgidisplay/sgiGraphicsPipe.cxx index 4fe23deee7..c33cebebce 100644 --- a/panda/src/sgidisplay/sgiGraphicsPipe.cxx +++ b/panda/src/sgidisplay/sgiGraphicsPipe.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "sgiGraphicsPipe.h" #include @@ -37,7 +46,7 @@ int sgiGraphicsPipe::get_num_hw_channels( void ) { Display* display = (Display *)_display; // Is there a better way to get the display??? (I hope so) - display = glXGetCurrentDisplayEXT(); + display = glXGetCurrentDisplayEXT(); // For now, screen is the same as display _screen = DefaultScreen( display ); @@ -46,7 +55,7 @@ int sgiGraphicsPipe::get_num_hw_channels( void ) XSGIvcQueryVideoScreenInfo( display, _screen, &server ); // Not all of these will be active necessarily - _num_channels = server.numChannels; + _num_channels = server.numChannels; } return _num_channels; @@ -64,13 +73,13 @@ get_hw_channel( GraphicsWindow* window, int index ) { if ( index >= _num_channels ) { - cerr << "sgiGraphicsPipe::get_hw_channel() - invalid index: " + cerr << "sgiGraphicsPipe::get_hw_channel() - invalid index: " << index << endl; return NULL; } Channels::iterator i; - i = _hw_chans.find( index ); + i = _hw_chans.find( index ); if (i != _hw_chans.end()) { return (*i).second.p(); } diff --git a/panda/src/sgidisplay/sgiGraphicsPipe.h b/panda/src/sgidisplay/sgiGraphicsPipe.h index eb4f629d07..5973d13120 100644 --- a/panda/src/sgidisplay/sgiGraphicsPipe.h +++ b/panda/src/sgidisplay/sgiGraphicsPipe.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SGIGRAPHICSPIPE_H #define SGIGRAPHICSPIPE_H // diff --git a/panda/src/sgidisplay/sgiHardwareChannel.cxx b/panda/src/sgidisplay/sgiHardwareChannel.cxx index e02ee36a15..6618b0beea 100644 --- a/panda/src/sgidisplay/sgiHardwareChannel.cxx +++ b/panda/src/sgidisplay/sgiHardwareChannel.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "sgiHardwareChannel.h" #include "sgiGraphicsPipe.h" @@ -17,7 +26,7 @@ TypeHandle sgiHardwareChannel::_type_handle; //////////////////////////////////////////////////////////////////// -// Function: Constructor +// Function: Constructor // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -38,10 +47,10 @@ sgiHardwareChannel::sgiHardwareChannel( GraphicsWindow* window, int id ) : XSGIvcChannelInfo* channel_info = (XSGIvcChannelInfo *)_channel_info; - XSGIvcQueryChannelInfo( (Display *)sgipipe->get_display(), + XSGIvcQueryChannelInfo( (Display *)sgipipe->get_display(), sgipipe->get_screen(), _id, &channel_info ); if ( channel_info->active ) { - int screeny = DisplayHeight( (Display *)sgipipe->get_display(), + int screeny = DisplayHeight( (Display *)sgipipe->get_display(), sgipipe->get_screen() ); _xsize = channel_info->source.width; _ysize = channel_info->source.height; diff --git a/panda/src/sgidisplay/sgiHardwareChannel.h b/panda/src/sgidisplay/sgiHardwareChannel.h index 9c78c2421f..d7b3da57b3 100644 --- a/panda/src/sgidisplay/sgiHardwareChannel.h +++ b/panda/src/sgidisplay/sgiHardwareChannel.h @@ -1,8 +1,20 @@ -// Filename: graphicsChannel.h +// Filename: sgiHardwareChannel.h // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SGIHARDWARECHANNEL_H #define SGIHARDWARECHANNEL_H // diff --git a/panda/src/sgiglutdisplay/config_sgiglutdisplay.cxx b/panda/src/sgiglutdisplay/config_sgiglutdisplay.cxx index c10a833c43..0207034547 100644 --- a/panda/src/sgiglutdisplay/config_sgiglutdisplay.cxx +++ b/panda/src/sgiglutdisplay/config_sgiglutdisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_sgiglutdisplay.cxx // Created by: cary (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgiglutdisplay.h" diff --git a/panda/src/sgiglutdisplay/config_sgiglutdisplay.h b/panda/src/sgiglutdisplay/config_sgiglutdisplay.h index b7e049ed99..a78ee5318e 100644 --- a/panda/src/sgiglutdisplay/config_sgiglutdisplay.h +++ b/panda/src/sgiglutdisplay/config_sgiglutdisplay.h @@ -2,6 +2,19 @@ // Created by: cary (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_SGIGLUTDISPLAY_H #define CONFIG_SGIGLUTDISPLAY_H diff --git a/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.cxx b/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.cxx index 8d34ad75c6..ae508a8b2b 100644 --- a/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.cxx +++ b/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "sgiglutGraphicsPipe.h" #include "config_sgiglutdisplay.h" diff --git a/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.h b/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.h index 20bb8935bb..d6a77ebddd 100644 --- a/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.h +++ b/panda/src/sgiglutdisplay/sgiglutGraphicsPipe.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SGIGLUTGRAPHICSPIPE_H #define SGIGLUTGRAPHICSPIPE_H // diff --git a/panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx b/panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx index f0184b0d57..d16eae60d1 100644 --- a/panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx +++ b/panda/src/sgiglxdisplay/config_sgiglxdisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_sgiglxdisplay.cxx // Created by: cary (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgiglxdisplay.h" diff --git a/panda/src/sgiglxdisplay/config_sgiglxdisplay.h b/panda/src/sgiglxdisplay/config_sgiglxdisplay.h index e6551ade2f..5295b17eeb 100644 --- a/panda/src/sgiglxdisplay/config_sgiglxdisplay.h +++ b/panda/src/sgiglxdisplay/config_sgiglxdisplay.h @@ -2,6 +2,19 @@ // Created by: cary (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_SGIGLXDISPLAY_H #define CONFIG_SGIGLXDISPLAY_H diff --git a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx b/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx index ab2be698ca..b7db6443a4 100644 --- a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx +++ b/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.cxx @@ -1,6 +1,19 @@ // Filename: sgiglxGraphicsPipe.cxx // Created by: cary (01Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -15,7 +28,7 @@ TypeHandle SgiGlxGraphicsPipe::_type_handle; SgiGlxGraphicsPipe::SgiGlxGraphicsPipe(const PipeSpecifier& spec) : sgiGraphicsPipe(spec), - glxDisplay(this, spec.get_X_specifier()) + glxDisplay(this, spec.get_X_specifier()) { } diff --git a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h b/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h index 92615b155c..544b749c14 100644 --- a/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h +++ b/panda/src/sgiglxdisplay/sgiglxGraphicsPipe.h @@ -2,6 +2,19 @@ // Created by: cary (01Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __SGIGLXGRAPHICSPIPE_H__ #define __SGIGLXGRAPHICSPIPE_H__ diff --git a/panda/src/sgmanip/config_sgmanip.cxx b/panda/src/sgmanip/config_sgmanip.cxx index 379a9e725a..fb5bfe7855 100644 --- a/panda/src/sgmanip/config_sgmanip.cxx +++ b/panda/src/sgmanip/config_sgmanip.cxx @@ -1,6 +1,19 @@ // Filename: config_sgmanip.cxx // Created by: drose (05Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgmanip.h" diff --git a/panda/src/sgmanip/config_sgmanip.h b/panda/src/sgmanip/config_sgmanip.h index bfaa07827c..ce3cdc724c 100644 --- a/panda/src/sgmanip/config_sgmanip.h +++ b/panda/src/sgmanip/config_sgmanip.h @@ -1,6 +1,19 @@ // Filename: config_sgmanip.h // Created by: drose (05Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_SGMANIP_H diff --git a/panda/src/sgmanip/findApproxLevel.I b/panda/src/sgmanip/findApproxLevel.I index 63254dd78f..827b8ddfb0 100644 --- a/panda/src/sgmanip/findApproxLevel.I +++ b/panda/src/sgmanip/findApproxLevel.I @@ -1,6 +1,19 @@ // Filename: findApproxLevel.I // Created by: drose (18Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,12 +21,12 @@ //////////////////////////////////////////////////////////////////// // Function: FindApproxLevelEntry::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FindApproxLevelEntry:: FindApproxLevelEntry(const NodePath &node_path, FindApproxPath &approx_path) : _node_path(node_path), - _approx_path(approx_path) + _approx_path(approx_path) { _i = 0; } @@ -21,7 +34,7 @@ FindApproxLevelEntry(const NodePath &node_path, FindApproxPath &approx_path) : //////////////////////////////////////////////////////////////////// // Function: FindApproxLevelEntry::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FindApproxLevelEntry:: FindApproxLevelEntry(const FindApproxLevelEntry ©) : @@ -34,7 +47,7 @@ FindApproxLevelEntry(const FindApproxLevelEntry ©) : //////////////////////////////////////////////////////////////////// // Function: FindApproxLevelEntry::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void FindApproxLevelEntry:: operator = (const FindApproxLevelEntry ©) { diff --git a/panda/src/sgmanip/findApproxLevel.cxx b/panda/src/sgmanip/findApproxLevel.cxx index f82b52e257..074f4a1b32 100644 --- a/panda/src/sgmanip/findApproxLevel.cxx +++ b/panda/src/sgmanip/findApproxLevel.cxx @@ -1,6 +1,19 @@ // Filename: findApproxLevel.cxx // Created by: drose (18Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "findApproxLevel.h" @@ -33,17 +46,17 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: FindApproxLevelEntry::consider_node // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FindApproxLevelEntry:: -consider_node(NodePathCollection &result, FindApproxLevel &next_level, +consider_node(NodePathCollection &result, FindApproxLevel &next_level, int max_matches, TypeHandle graph_type) const { nassertv(_i < _approx_path.get_num_components()); if (_approx_path.is_component_match_many(_i)) { // Match any number, zero or more, levels of nodes. This is the // tricky case that requires this whole nutty breadth-first thing. - + // This means we must reconsider our own entry with the next path // entry, before we consider the next entry--this supports // matching zero levels of nodes. @@ -79,7 +92,7 @@ consider_node(NodePathCollection &result, FindApproxLevel &next_level, } } - if (_approx_path.return_stashed() && + if (_approx_path.return_stashed() && next_graph_type != NodeRelation::get_stashed_type()) { // If the approx path allows us to return stashed nodes, and we // didn't just traverse the list of stashed nodes, then traverse @@ -89,7 +102,7 @@ consider_node(NodePathCollection &result, FindApproxLevel &next_level, int num_children = bottom_node->get_num_children(next_graph_type); for (int i = 0; i < num_children; i++) { NodeRelation *child_arc = bottom_node->get_child(next_graph_type, i); - + consider_next_step(result, child_arc, next_level, max_matches, graph_type); if (max_matches > 0 && result.get_num_paths() >= max_matches) { return; @@ -112,9 +125,9 @@ consider_node(NodePathCollection &result, FindApproxLevel &next_level, //////////////////////////////////////////////////////////////////// void FindApproxLevelEntry:: consider_next_step(NodePathCollection &result, - NodeRelation *arc, FindApproxLevel &next_level, + NodeRelation *arc, FindApproxLevel &next_level, int max_matches, TypeHandle graph_type) const { - if (!_approx_path.return_hidden() && + if (!_approx_path.return_hidden() && arc->has_transition(PruneTransition::get_class_type())) { // If the approx path does not allow us to return hidden nodes, // and this arc has indeed been hidden, then stop here. @@ -130,7 +143,7 @@ consider_next_step(NodePathCollection &result, if (_approx_path.is_component_match_many(_i)) { // Match any number, zero or more, levels of nodes. This is the // tricky case that requires this whole nutty breadth-first thing. - + // And now we just add the next entry without incrementing its // path entry. next_level.add_entry(next); diff --git a/panda/src/sgmanip/findApproxLevel.h b/panda/src/sgmanip/findApproxLevel.h index 9c2ff67de8..ca0714d207 100644 --- a/panda/src/sgmanip/findApproxLevel.h +++ b/panda/src/sgmanip/findApproxLevel.h @@ -2,6 +2,19 @@ // Created by: drose (18Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FINDAPPROXLEVEL_H #define FINDAPPROXLEVEL_H @@ -34,10 +47,10 @@ public: INLINE bool next_is_stashed() const; - void consider_node(NodePathCollection &result, FindApproxLevel &next_level, + void consider_node(NodePathCollection &result, FindApproxLevel &next_level, int max_matches, TypeHandle graph_type) const; void consider_next_step(NodePathCollection &result, - NodeRelation *arc, FindApproxLevel &next_level, + NodeRelation *arc, FindApproxLevel &next_level, int max_matches, TypeHandle graph_type) const; INLINE bool is_solution() const; diff --git a/panda/src/sgmanip/findApproxPath.I b/panda/src/sgmanip/findApproxPath.I index c7f4529351..f1745a5338 100644 --- a/panda/src/sgmanip/findApproxPath.I +++ b/panda/src/sgmanip/findApproxPath.I @@ -1,13 +1,26 @@ // Filename: findApproxPath.I // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: FindApproxPath::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE FindApproxPath:: FindApproxPath() { diff --git a/panda/src/sgmanip/findApproxPath.cxx b/panda/src/sgmanip/findApproxPath.cxx index 0bbd2fe0bd..667d540095 100644 --- a/panda/src/sgmanip/findApproxPath.cxx +++ b/panda/src/sgmanip/findApproxPath.cxx @@ -1,6 +1,19 @@ // Filename: findApproxPath.cxx // Created by: drose (18Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "findApproxPath.h" @@ -68,7 +81,7 @@ matches(NodeRelation *arc) const { //////////////////////////////////////////////////////////////////// // Function: FindApproxPath::Component::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FindApproxPath::Component:: output(ostream &out) const { @@ -162,17 +175,17 @@ add_flags(const string &str_flags) { case 'h': _return_hidden = on; break; - + case 's': _return_stashed = on; break; - + default: sgmanip_cat.error() << "Invalid control flag string: " << str_flags << "\n"; return false; } - + ++pi; } @@ -243,7 +256,7 @@ add_component(string str_component) { //////////////////////////////////////////////////////////////////// // Function: FindApproxPath::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void FindApproxPath:: output(ostream &out) const { diff --git a/panda/src/sgmanip/findApproxPath.h b/panda/src/sgmanip/findApproxPath.h index b6d84e2358..3cdae15282 100644 --- a/panda/src/sgmanip/findApproxPath.h +++ b/panda/src/sgmanip/findApproxPath.h @@ -2,6 +2,19 @@ // Created by: drose (18Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef FINDAPPROXPATH_H #define FINDAPPROXPATH_H diff --git a/panda/src/sgmanip/nodePath.I b/panda/src/sgmanip/nodePath.I index cc7ff46bf3..c1132159af 100644 --- a/panda/src/sgmanip/nodePath.I +++ b/panda/src/sgmanip/nodePath.I @@ -1,6 +1,19 @@ // Filename: nodePath.I // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -51,16 +64,16 @@ NodePath(const ArcChain &chain, TypeHandle graph_type) : //////////////////////////////////////////////////////////////////// // Function: NodePath::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE NodePath:: NodePath(const NodePathBase ©) : NodePathBase(copy) { } - + //////////////////////////////////////////////////////////////////// // Function: NodePath::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void NodePath:: operator = (const NodePath ©) { @@ -70,7 +83,7 @@ operator = (const NodePath ©) { //////////////////////////////////////////////////////////////////// // Function: NodePath::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE NodePath:: ~NodePath() { @@ -79,7 +92,7 @@ INLINE NodePath:: //////////////////////////////////////////////////////////////////// // Function: NodePath::Equality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool NodePath:: operator == (const NodePath &other) const { @@ -89,7 +102,7 @@ operator == (const NodePath &other) const { //////////////////////////////////////////////////////////////////// // Function: NodePath::Inequality Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool NodePath:: operator != (const NodePath &other) const { @@ -362,7 +375,7 @@ attach_new_node(const string &name, int sort) const { //////////////////////////////////////////////////////////////////// // Function: NodePath::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void NodePath:: output(ostream &out) const { @@ -614,7 +627,7 @@ get_sa() const { // This is preferable to simply setting the color scale to // identity, as it also removes the overhead associated // with having a color scale at all. -// +// // This method is not strictly accurate as it clears // both a color matrix and alpha transform, and either of // those could have only offset components @@ -632,7 +645,7 @@ clear_color_scale() { // Access: Public // Description: Returns true if a color scale has been applied // to the bottom arc, false otherwise. -// +// // This method is not strictly accurate as it checks // for a color matrix or alpha transform, and either of // those could have only offset components @@ -805,7 +818,7 @@ print_scale() const { //////////////////////////////////////////////////////////////////// INLINE void NodePath:: print_pos_hpr() const { - nout << get_pos() << "\n" + nout << get_pos() << "\n" << get_hpr() << "\n"; } @@ -817,7 +830,7 @@ print_pos_hpr() const { //////////////////////////////////////////////////////////////////// INLINE void NodePath:: print_pos_hpr_scale() const { - nout << get_pos() << "\n" + nout << get_pos() << "\n" << get_hpr() << "\n" << get_scale() << "\n"; } @@ -959,8 +972,8 @@ get_sz(const NodePath &other) const { // transform, relative to the other node. //////////////////////////////////////////////////////////////////// INLINE void NodePath:: -set_pos_hpr(const NodePath &other, - float x, float y, float z, +set_pos_hpr(const NodePath &other, + float x, float y, float z, float h, float p, float r) { set_pos_hpr(other, LVecBase3f(x, y, z), LVecBase3f(h, p, r)); } @@ -1072,7 +1085,7 @@ print_scale(const NodePath &other) const { //////////////////////////////////////////////////////////////////// INLINE void NodePath:: print_pos_hpr(const NodePath &other) const { - nout << get_pos(other) << "\n" + nout << get_pos(other) << "\n" << get_hpr(other) << "\n"; } @@ -1084,7 +1097,7 @@ print_pos_hpr(const NodePath &other) const { //////////////////////////////////////////////////////////////////// INLINE void NodePath:: print_pos_hpr_scale(const NodePath &other) const { - nout << get_pos(other) << "\n" + nout << get_pos(other) << "\n" << get_hpr(other) << "\n" << get_scale(other) << "\n"; } @@ -1115,7 +1128,7 @@ get_distance(const NodePath &other) const { //////////////////////////////////////////////////////////////////// // Function: NodePath::set_color // Access: Public -// Description: Sets the color transition for a render relation +// Description: Sets the color transition for a render relation //////////////////////////////////////////////////////////////////// INLINE void NodePath:: set_color(float r, float g, float b, float a, diff --git a/panda/src/sgmanip/nodePath.cxx b/panda/src/sgmanip/nodePath.cxx index 4f261ff54f..24e7382c50 100644 --- a/panda/src/sgmanip/nodePath.cxx +++ b/panda/src/sgmanip/nodePath.cxx @@ -1,6 +1,19 @@ // Filename: nodePath.cxx // Created by: drose (05Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodePath.h" @@ -71,7 +84,7 @@ bool NodePath:: extend_by(Node *dnode) { nassertr(verify_connectivity(), false); nassertr(dnode != (Node *)NULL, false); - + if (is_empty()) { // Extending an empty NodePath by a single node is the same thing // as creating a new NodePath with just the single node. @@ -117,7 +130,7 @@ extend_by(NodeRelation *darc) { if (darc->get_parent() != node()) { if (sgmanip_cat.is_debug()) { sgmanip_cat.debug() - << "Cannot extend " << *this << " by arc " << *darc + << "Cannot extend " << *this << " by arc " << *darc << "; no connection.\n"; } return false; @@ -127,7 +140,7 @@ extend_by(NodeRelation *darc) { darc->get_type() != NodeRelation::get_stashed_type()) { if (sgmanip_cat.is_debug()) { sgmanip_cat.debug() - << "Cannot extend " << *this << " by arc " << *darc + << "Cannot extend " << *this << " by arc " << *darc << "; wrong graph type.\n"; } return false; @@ -376,7 +389,7 @@ get_siblings() const { nassertr(verify_connectivity(), result); nassertr(has_arcs(), result); NodeRelation *my_arc = arc(); - + NodePath parent = *this; parent.shorten(1); @@ -605,16 +618,16 @@ share_with(const NodePath &other) { Comps::const_iterator ti = this_comps.begin(); // The first components in both chains should be the topnodes. - if (oi != other_comps.end() && - ti != this_comps.end() && + if (oi != other_comps.end() && + ti != this_comps.end() && (*oi)->get_node() == (*ti)->get_node()) { ++oi; ++ti; ++in_common; } // The remaining components are arcs. - while (oi != other_comps.end() && - ti != this_comps.end() && + while (oi != other_comps.end() && + ti != this_comps.end() && (*oi)->get_arc() == (*ti)->get_arc()) { ++oi; ++ti; @@ -635,7 +648,7 @@ share_with(const NodePath &other) { (*ti)->set_next(dest); } } - + return in_common; } @@ -763,7 +776,7 @@ amputate_badness() { bool NodePath:: repair_connectivity(const NodePath &top) { nassertr(top.verify_connectivity(), false); - + NodePath new_path(*this); new_path.amputate_badness(); if (new_path.is_empty()) { @@ -846,7 +859,7 @@ wrt_reparent_to(const NodePath &other, int sort) { // the bottom node of the indicated other NodePath. Any // other parent-child relations of the node are // unchanged; in particular, the node is not removed -// from its existing parent, if any. +// from its existing parent, if any. // // A new arc is created, and its transitions are copied // from the bottom arc of this NodePath, if any. @@ -866,8 +879,8 @@ instance_to(const NodePath &other, int sort) const { nassertr(!other.is_empty(), NodePath()); Node *bottom_node = node(); - NodeRelation *darc = - NodeRelation::create_typed_arc(_graph_type, other.node(), + NodeRelation *darc = + NodeRelation::create_typed_arc(_graph_type, other.node(), bottom_node, sort); nassertr(darc != (NodeRelation *)NULL, NodePath()); nassertr(darc->is_exact_type(_graph_type), NodePath()); @@ -908,8 +921,8 @@ copy_to(const NodePath &other, int sort) const { PT_Node copy_node = source_node->copy_subgraph(_graph_type); nassertr(copy_node != (Node *)NULL, NodePath()); - NodeRelation *darc = - NodeRelation::create_typed_arc(_graph_type, other.node(), + NodeRelation *darc = + NodeRelation::create_typed_arc(_graph_type, other.node(), copy_node, sort); nassertr(darc != (NodeRelation *)NULL, NodePath()); nassertr(darc->is_exact_type(_graph_type), NodePath()); @@ -1200,7 +1213,7 @@ write_bam_file(const string &filename) const { return okflag; } - + //////////////////////////////////////////////////////////////////// // Function: NodePath::set_pos @@ -1306,7 +1319,7 @@ set_r(float r) { // Description: Retrieves the rotation component of the transform. //////////////////////////////////////////////////////////////////// LVecBase3f NodePath:: -get_hpr() const { +get_hpr() const { nassertr(has_arcs(), LVecBase3f(0.0, 0.0, 0.0)); LMatrix4f mat = get_mat(); LVecBase3f scale, hpr, pos; @@ -1382,7 +1395,7 @@ get_scale() const { mat.get_row3(x,0); mat.get_row3(y,1); mat.get_row3(z,2); - + // Now return the lengths of these axes as the scale. return LVecBase3f(length(x), length(y), length(z)); @@ -1591,7 +1604,7 @@ look_at_preserve_scale(const LPoint3f &point, const LVector3f &up) { mat.get_row3(x,0); mat.get_row3(y,1); - mat.get_row3(z,2); + mat.get_row3(z,2); x *= scale_0; y *= scale_1; @@ -1639,7 +1652,7 @@ heads_up_preserve_scale(const LPoint3f &point, const LVector3f &up) { mat.get_row3(x,0); mat.get_row3(y,1); - mat.get_row3(z,2); + mat.get_row3(z,2); x *= scale_0; y *= scale_1; @@ -1819,7 +1832,7 @@ get_scale(const NodePath &other) const { // transform, relative to the other node. //////////////////////////////////////////////////////////////////// void NodePath:: -set_pos_hpr(const NodePath &other, const LVecBase3f &pos, +set_pos_hpr(const NodePath &other, const LVecBase3f &pos, const LVecBase3f &hpr) { nassertv(has_arcs()); LMatrix4f mat = get_mat(other); @@ -1837,7 +1850,7 @@ set_pos_hpr(const NodePath &other, const LVecBase3f &pos, // to the other node. //////////////////////////////////////////////////////////////////// void NodePath:: -set_pos_hpr_scale(const NodePath &other, +set_pos_hpr_scale(const NodePath &other, const LVecBase3f &pos, const LVecBase3f &hpr, const LVecBase3f &scale) { nassertv(has_arcs()); @@ -1920,7 +1933,7 @@ look_at_preserve_scale(const NodePath &other, const LPoint3f &point, float scale_0 = length(x); float scale_1 = length(y); float scale_2 = length(z); - + LPoint3f pos; mat.get_row3(pos,3); @@ -1934,7 +1947,7 @@ look_at_preserve_scale(const NodePath &other, const LPoint3f &point, mat.get_row3(x,0); mat.get_row3(y,1); - mat.get_row3(z,2); + mat.get_row3(z,2); x *= scale_0; y *= scale_1; @@ -1973,7 +1986,7 @@ heads_up_preserve_scale(const NodePath &other, const LPoint3f &point, float scale_0 = length(x); float scale_1 = length(y); float scale_2 = length(z); - + LPoint3f pos; mat.get_row3(pos,3); @@ -1986,7 +1999,7 @@ heads_up_preserve_scale(const NodePath &other, const LPoint3f &point, // Now reapply the scale and position. mat.get_row3(x,0); mat.get_row3(y,1); - mat.get_row3(z,2); + mat.get_row3(z,2); x *= scale_0; y *= scale_1; @@ -2002,7 +2015,7 @@ heads_up_preserve_scale(const NodePath &other, const LPoint3f &point, //////////////////////////////////////////////////////////////////// // Function: NodePath::set_color // Access: Public -// Description: Sets the color transition for a render relation +// Description: Sets the color transition for a render relation //////////////////////////////////////////////////////////////////// void NodePath:: set_color(const Colorf &color, int priority) { @@ -2026,7 +2039,7 @@ void NodePath:: set_color_off(int priority) { nassertv_always(has_arcs()); - ColorTransition *col_trans = + ColorTransition *col_trans = new ColorTransition(ColorTransition::off()); arc()->set_transition(col_trans, priority); } @@ -2050,7 +2063,7 @@ get_color() const { sgmanip_cat.warning() << "get_color() called on " << *this << " which has no color set.\n"; - + return Colorf(0.0f, 0.0f, 0.0f, 0.0f); } @@ -2158,7 +2171,7 @@ void NodePath:: set_texture_off(int priority) { nassertv_always(has_arcs()); - TextureTransition *tex_trans = + TextureTransition *tex_trans = new TextureTransition(TextureTransition::off()); arc()->set_transition(tex_trans, priority); } @@ -2331,7 +2344,7 @@ void NodePath:: set_fog_off(int priority) { nassertv_always(has_arcs()); - FogTransition *fog_trans = + FogTransition *fog_trans = new FogTransition(FogTransition::off()); arc()->set_transition(fog_trans, priority); } @@ -2446,7 +2459,7 @@ set_two_sided(bool two_sided, int priority) { nassertv_always(has_arcs()); CullFaceProperty::Mode mode = - two_sided ? + two_sided ? CullFaceProperty::M_cull_none : CullFaceProperty::M_cull_clockwise; @@ -2592,7 +2605,7 @@ set_transparency(bool transparency, int priority) { nassertv_always(has_arcs()); TransparencyProperty::Mode mode = - transparency ? + transparency ? TransparencyProperty::M_alpha : TransparencyProperty::M_none; @@ -2700,7 +2713,7 @@ prepare_scene(GraphicsStateGuardianBase *gsg) { visitor._gsg = gsg; NodeAttributeWrapper initial(TextureTransition::get_class_type()); - df_traverse(node(), visitor, initial, NullLevelState(), + df_traverse(node(), visitor, initial, NullLevelState(), RenderRelation::get_class_type()); } @@ -2866,7 +2879,7 @@ r_write_transitions(const ArcComponent *comp, // Description: The recursive implementation of get_net_transitions(). //////////////////////////////////////////////////////////////////// void NodePath:: -r_get_net_transitions(const ArcComponent *comp, +r_get_net_transitions(const ArcComponent *comp, AllTransitionsWrapper &trans) const { nassertv(comp != (const ArcComponent *)NULL); nassertv(comp->has_arc()); @@ -2924,7 +2937,7 @@ format_arc_name(NodeRelation *arc) const { if (arc->get_graph_type() == NodeRelation::get_stashed_type()) { result += "@@"; - + } else if (arc->get_graph_type() != _graph_type) { result += "@@(" + arc->get_graph_type().get_name() + ")"; } @@ -2986,7 +2999,7 @@ find_matches(NodePathCollection &result, FindApproxPath &approx_path, //////////////////////////////////////////////////////////////////// void NodePath:: r_find_matches(NodePathCollection &result, - const FindApproxLevel &level, + const FindApproxLevel &level, int max_matches, int num_levels_remaining) const { // Go on to the next level. If we exceeded the requested maximum // depth, stop. diff --git a/panda/src/sgmanip/nodePath.h b/panda/src/sgmanip/nodePath.h index d217630382..949a914119 100644 --- a/panda/src/sgmanip/nodePath.h +++ b/panda/src/sgmanip/nodePath.h @@ -1,7 +1,19 @@ - // Filename: nodePath.h // Created by: drose (05Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODEPATH_H @@ -197,7 +209,7 @@ PUBLISHED: NodePathCollection get_children() const; INLINE int get_num_children() const; INLINE NodePath get_child(int n) const; - + INLINE bool has_parent() const; INLINE NodePath get_parent() const; @@ -252,7 +264,7 @@ PUBLISHED: // according to the arc above the bottom node. In general, it is // valid to call these only if !is_empty() && !is_singleton(). - + // Methods that get and set the matrix transform: pos, hpr, scale, // in the local coordinate system. These affect the transform at // the bottom level only. @@ -288,14 +300,14 @@ PUBLISHED: INLINE float get_sy() const; INLINE float get_sz() const; - INLINE void set_pos_hpr(float x, float y, float z, + INLINE void set_pos_hpr(float x, float y, float z, float h, float p, float r); - void set_pos_hpr(const LVecBase3f &pos, + void set_pos_hpr(const LVecBase3f &pos, const LVecBase3f &hpr); - INLINE void set_pos_hpr_scale(float x, float y, float z, + INLINE void set_pos_hpr_scale(float x, float y, float z, float h, float p, float r, float sx, float sy, float sz); - void set_pos_hpr_scale(const LVecBase3f &pos, + void set_pos_hpr_scale(const LVecBase3f &pos, const LVecBase3f &hpr, const LVecBase3f &scale); @@ -371,43 +383,43 @@ PUBLISHED: INLINE float get_sy(const NodePath &other) const; INLINE float get_sz(const NodePath &other) const; - INLINE void set_pos_hpr(const NodePath &other, - float x, float y, float z, + INLINE void set_pos_hpr(const NodePath &other, + float x, float y, float z, float h, float p, float r); - void set_pos_hpr(const NodePath &other, - const LVecBase3f &pos, + void set_pos_hpr(const NodePath &other, + const LVecBase3f &pos, const LVecBase3f &hpr); - INLINE void set_pos_hpr_scale(const NodePath &other, - float x, float y, float z, + INLINE void set_pos_hpr_scale(const NodePath &other, + float x, float y, float z, float h, float p, float r, float sx, float sy, float sz); - void set_pos_hpr_scale(const NodePath &other, - const LVecBase3f &pos, + void set_pos_hpr_scale(const NodePath &other, + const LVecBase3f &pos, const LVecBase3f &hpr, const LVecBase3f &scale); void set_mat(const NodePath &other, const LMatrix4f &mat); LMatrix4f get_mat(const NodePath &other) const; - INLINE void look_at(const NodePath &other, + INLINE void look_at(const NodePath &other, float x, float y, float z); - void look_at(const NodePath &other, + void look_at(const NodePath &other, const LPoint3f &point = LPoint3f(0.0, 0.0, 0.0), const LVector3f &up = LVector3f::up()); - INLINE void heads_up(const NodePath &other, + INLINE void heads_up(const NodePath &other, float x, float y, float z); - void heads_up(const NodePath &other, + void heads_up(const NodePath &other, const LPoint3f &point = LPoint3f(0.0, 0.0, 0.0), const LVector3f &up = LVector3f::up()); - INLINE void look_at_preserve_scale(const NodePath &other, + INLINE void look_at_preserve_scale(const NodePath &other, float x, float y, float z); - void look_at_preserve_scale(const NodePath &other, + void look_at_preserve_scale(const NodePath &other, const LPoint3f &point = LPoint3f(0.0, 0.0, 0.0), const LVector3f &up = LVector3f::up()); - INLINE void heads_up_preserve_scale(const NodePath &other, + INLINE void heads_up_preserve_scale(const NodePath &other, float x, float y, float z); - void heads_up_preserve_scale(const NodePath &other, + void heads_up_preserve_scale(const NodePath &other, const LPoint3f &point = LPoint3f(0.0, 0.0, 0.0), const LVector3f &up = LVector3f::up()); @@ -420,7 +432,7 @@ PUBLISHED: INLINE float get_distance(const NodePath &other) const; - + // Methods that affect appearance of geometry: color, texture, etc. // These affect the state at the bottom level only. @@ -437,31 +449,31 @@ PUBLISHED: INLINE bool has_bin() const; string get_bin_name() const; int get_bin_draw_order() const; - + void set_texture(Texture *tex, int priority = 0); void set_texture_off(int priority = 0); INLINE void clear_texture(); bool has_texture() const; bool has_texture_off() const; Texture *get_texture() const; - + void set_material(Material *tex, int priority = 0); INLINE void clear_material(); bool has_material() const; PT(Material) get_material() const; - + void set_fog(Fog *fog, int priority = 0); void set_fog_off(int priority = 0); INLINE void clear_fog(); bool has_fog() const; bool has_fog_off() const; Fog *get_fog() const; - + void set_render_mode_wireframe(int priority = 0); void set_render_mode_filled(int priority = 0); INLINE void clear_render_mode(); INLINE bool has_render_mode() const; - + void set_two_sided(bool two_sided, int priority = 0); INLINE void clear_two_sided(); INLINE bool has_two_sided() const; @@ -476,7 +488,7 @@ PUBLISHED: INLINE void clear_billboard(); INLINE bool has_billboard() const; - void set_transparency(bool transparency, int priority = 0); + void set_transparency(bool transparency, int priority = 0); INLINE void clear_transparency(); INLINE bool has_transparency() const; bool get_transparency() const; @@ -505,23 +517,23 @@ PUBLISHED: private: bool r_extend_by(const ArcComponent *other); - int r_as_string(const ArcComponent *comp, string &result, + int r_as_string(const ArcComponent *comp, string &result, int skip_nodes) const; void r_write_transitions(const ArcComponent *comp, ostream &out, int indent_level) const; - void r_get_net_transitions(const ArcComponent *comp, + void r_get_net_transitions(const ArcComponent *comp, AllTransitionsWrapper &trans) const; string format_node_name(Node *dnode) const; string format_arc_name(NodeRelation *arc) const; - void find_matches(NodePathCollection &result, + void find_matches(NodePathCollection &result, const string &approx_path_str, int max_matches) const; - void find_matches(NodePathCollection &result, + void find_matches(NodePathCollection &result, FindApproxPath &approx_path, int max_matches) const; void r_find_matches(NodePathCollection &result, - const FindApproxLevel &level, + const FindApproxLevel &level, int max_matches, int num_levels_remaining) const; void r_list_descendants(ostream &out, int indent_level) const; @@ -541,7 +553,7 @@ public: register_type(_type_handle, "NodePath", NodePathBase::get_class_type()); } - + private: static TypeHandle _type_handle; diff --git a/panda/src/sgmanip/nodePathBase.I b/panda/src/sgmanip/nodePathBase.I index 20a752df0e..9e37972127 100644 --- a/panda/src/sgmanip/nodePathBase.I +++ b/panda/src/sgmanip/nodePathBase.I @@ -1,13 +1,26 @@ // Filename: nodePathBase.I // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NodePathBase::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE NodePathBase:: NodePathBase(TypeHandle graph_type) : @@ -18,7 +31,7 @@ NodePathBase(TypeHandle graph_type) : //////////////////////////////////////////////////////////////////// // Function: NodePathBase::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE NodePathBase:: NodePathBase(Node *top_node, TypeHandle graph_type) : @@ -46,7 +59,7 @@ NodePathBase(const ArcChain &chain, TypeHandle graph_type) : //////////////////////////////////////////////////////////////////// // Function: NodePathBase::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE NodePathBase:: NodePathBase(const NodePathBase ©) : @@ -58,7 +71,7 @@ NodePathBase(const NodePathBase ©) : //////////////////////////////////////////////////////////////////// // Function: NodePathBase::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void NodePathBase:: operator = (const NodePathBase ©) { diff --git a/panda/src/sgmanip/nodePathBase.cxx b/panda/src/sgmanip/nodePathBase.cxx index 3ae7a2d3ef..9337f1f303 100644 --- a/panda/src/sgmanip/nodePathBase.cxx +++ b/panda/src/sgmanip/nodePathBase.cxx @@ -1,6 +1,19 @@ // Filename: nodePathBase.cxx // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodePathBase.h" diff --git a/panda/src/sgmanip/nodePathBase.h b/panda/src/sgmanip/nodePathBase.h index fc9f118a0a..f7be953ae8 100644 --- a/panda/src/sgmanip/nodePathBase.h +++ b/panda/src/sgmanip/nodePathBase.h @@ -1,6 +1,19 @@ // Filename: nodePathBase.h // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODEPATHBASE_H @@ -46,7 +59,7 @@ public: register_type(_type_handle, "NodePathBase", ArcChain::get_class_type()); } - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/sgmanip/nodePathCollection.I b/panda/src/sgmanip/nodePathCollection.I index 818bdff364..9778eabc9f 100644 --- a/panda/src/sgmanip/nodePathCollection.I +++ b/panda/src/sgmanip/nodePathCollection.I @@ -1,13 +1,26 @@ // Filename: nodePathCollection.I // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: NodePathCollection::Destructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE NodePathCollection:: ~NodePathCollection() { diff --git a/panda/src/sgmanip/nodePathCollection.cxx b/panda/src/sgmanip/nodePathCollection.cxx index 7c3d5726c2..4b4068ffbd 100644 --- a/panda/src/sgmanip/nodePathCollection.cxx +++ b/panda/src/sgmanip/nodePathCollection.cxx @@ -1,6 +1,19 @@ // Filename: nodePathCollection.cxx // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodePathCollection.h" @@ -13,7 +26,7 @@ //////////////////////////////////////////////////////////////////// // Function: NodePathCollection::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodePathCollection:: NodePathCollection() { @@ -22,18 +35,18 @@ NodePathCollection() { //////////////////////////////////////////////////////////////////// // Function: NodePathCollection::Copy Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// NodePathCollection:: -NodePathCollection(const NodePathCollection ©) : - _node_paths(copy._node_paths) +NodePathCollection(const NodePathCollection ©) : + _node_paths(copy._node_paths) { } //////////////////////////////////////////////////////////////////// // Function: NodePathCollection::Copy Assignment Operator // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void NodePathCollection:: operator = (const NodePathCollection ©) { @@ -271,7 +284,7 @@ find_all_matches(const string &path) const { FindApproxLevelEntry start(get_path(i), approx_path); level.add_entry(start); } - get_path(0).r_find_matches(result, level, -1, + get_path(0).r_find_matches(result, level, -1, NodePath::get_max_search_depth()); } } diff --git a/panda/src/sgmanip/nodePathCollection.h b/panda/src/sgmanip/nodePathCollection.h index 7b7f011999..fcafecb833 100644 --- a/panda/src/sgmanip/nodePathCollection.h +++ b/panda/src/sgmanip/nodePathCollection.h @@ -1,6 +1,19 @@ // Filename: nodePathCollection.h // Created by: drose (06Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef NODEPATHCOLLECTION_H diff --git a/panda/src/sgmanip/nodePathLerps.cxx b/panda/src/sgmanip/nodePathLerps.cxx index 4c129e9817..bd314f95d1 100644 --- a/panda/src/sgmanip/nodePathLerps.cxx +++ b/panda/src/sgmanip/nodePathLerps.cxx @@ -1,6 +1,19 @@ // Filename: nodePathLerps.cxx // Created by: frang (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "nodePathLerps.h" diff --git a/panda/src/sgmanip/nodePathLerps.h b/panda/src/sgmanip/nodePathLerps.h index 2b0eb99971..a9fc502326 100644 --- a/panda/src/sgmanip/nodePathLerps.h +++ b/panda/src/sgmanip/nodePathLerps.h @@ -1,6 +1,19 @@ // Filename: nodePathLerps.h // Created by: frang (01Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef __NODEPATHLERPS_H__ @@ -182,7 +195,7 @@ private: PUBLISHED: ColorLerpFunctor(NodePath np, LVecBase4f start, LVecBase4f end) : LVecBase4fLerpFunctor(start, end), _node_path(np), _is_wrt(false) {} - ColorLerpFunctor(NodePath np, float sr, float sg, float sb, float sa, + ColorLerpFunctor(NodePath np, float sr, float sg, float sb, float sa, float er, float eg, float eb, float ea) : LVecBase4fLerpFunctor(LVecBase4f(sr, sg, sb, sa), LVecBase4f(er, eg, eb, ea)), _node_path(np), _is_wrt(false) {} ColorLerpFunctor(NodePath np, LVecBase4f start, LVecBase4f end, NodePath wrt) @@ -294,7 +307,7 @@ private: //////////////////////////////////////////////////////////////////// // Class : PosHprScaleLerpFunctor -// Description : Class for Lerping between position, orientation, +// Description : Class for Lerping between position, orientation, // and scale //////////////////////////////////////////////////////////////////// class EXPCL_PANDA PosHprScaleLerpFunctor : public LerpFunctor { @@ -390,7 +403,7 @@ private: PUBLISHED: ColorScaleLerpFunctor(NodePath np, LVecBase4f start, LVecBase4f end) : LVecBase4fLerpFunctor(start, end), _node_path(np), _is_wrt(false) {} - ColorScaleLerpFunctor(NodePath np, float sr, float sg, float sb, float sa, + ColorScaleLerpFunctor(NodePath np, float sr, float sg, float sb, float sa, float er, float eg, float eb, float ea) : LVecBase4fLerpFunctor(LVecBase4f(sr, sg, sb, sa), LVecBase4f(er, eg, eb, ea)), _node_path(np), _is_wrt(false) {} ColorScaleLerpFunctor(NodePath np, LVecBase4f start, LVecBase4f end, NodePath wrt) diff --git a/panda/src/sgmanip/test_sgmanip.cxx b/panda/src/sgmanip/test_sgmanip.cxx index ed8bbe33a3..f3ea239e55 100644 --- a/panda/src/sgmanip/test_sgmanip.cxx +++ b/panda/src/sgmanip/test_sgmanip.cxx @@ -1,6 +1,19 @@ // Filename: test_sgmanip.cxx // Created by: drose (18Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -55,7 +68,7 @@ main() { nout << "oranges_path = " << oranges_path << "\n"; /* - nout << "\ndel_path2.share_with(del_path) = " + nout << "\ndel_path2.share_with(del_path) = " << del_path2.share_with(del_path) << "\n"; nout << "del_path2 = " << del_path2 << "\n"; */ @@ -96,7 +109,7 @@ main() { << "mc_path = " << mc_path << "\n" << "apples_path = " << apples_path << "\n" << "oranges_path = " << oranges_path << "\n"; - + render_path.ls(nout); nout << "\nInstancing del_path back under apples\n"; @@ -111,7 +124,7 @@ main() { render_path.ls(nout); - nout << "\nRepairing del_path2, result is " + nout << "\nRepairing del_path2, result is " << del_path2.repair_connectivity(render_path) << "\n"; nout << "del_path2 = " << del_path2 << "\n\n"; diff --git a/panda/src/sgraph/camera.I b/panda/src/sgraph/camera.I index 9b438d4cbd..1f01231f26 100644 --- a/panda/src/sgraph/camera.I +++ b/panda/src/sgraph/camera.I @@ -1,6 +1,19 @@ // Filename: camera.I // Created by: drose (27Sep99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -11,8 +24,8 @@ // is not active, nothing will be rendered. //////////////////////////////////////////////////////////////////// INLINE void Camera:: -set_active(bool active) { - _active = active; +set_active(bool active) { + _active = active; } //////////////////////////////////////////////////////////////////// @@ -23,7 +36,7 @@ set_active(bool active) { //////////////////////////////////////////////////////////////////// INLINE bool Camera:: is_active() const { - return _active; + return _active; } //////////////////////////////////////////////////////////////////// @@ -35,8 +48,8 @@ is_active() const { // represent the root of any subgraph. //////////////////////////////////////////////////////////////////// INLINE void Camera:: -set_scene(Node *scene) { - _scene = scene; +set_scene(Node *scene) { + _scene = scene; } //////////////////////////////////////////////////////////////////// @@ -47,5 +60,5 @@ set_scene(Node *scene) { //////////////////////////////////////////////////////////////////// INLINE Node *Camera:: get_scene() const { - return _scene; + return _scene; } diff --git a/panda/src/sgraph/camera.cxx b/panda/src/sgraph/camera.cxx index eb8814165e..5e2e611b4f 100644 --- a/panda/src/sgraph/camera.cxx +++ b/panda/src/sgraph/camera.cxx @@ -1,10 +1,19 @@ -// Filename: dCamera.cxx +// Filename: camera.cxx // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include #include "camera.h" @@ -20,32 +29,32 @@ TypeHandle Camera::_type_handle; //////////////////////////////////////////////////////////////////// // Function: Camera::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Camera:: -Camera(const string &name) : - ProjectionNode(name), - _active(true) -{ +Camera(const string &name) : + ProjectionNode(name), + _active(true) +{ } //////////////////////////////////////////////////////////////////// // Function: Camera::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Camera:: -Camera(const Camera ©) : - ProjectionNode(copy), +Camera(const Camera ©) : + ProjectionNode(copy), _active(copy._active), _scene(copy._scene) -{ +{ } //////////////////////////////////////////////////////////////////// // Function: Camera::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Camera:: operator = (const Camera ©) { @@ -93,12 +102,12 @@ bool Camera:: safe_to_transform() const { return false; } - + //////////////////////////////////////////////////////////////////// // Function: Camera::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// Camera:: ~Camera(void) { diff --git a/panda/src/sgraph/camera.h b/panda/src/sgraph/camera.h index 08066d9729..1583406687 100644 --- a/panda/src/sgraph/camera.h +++ b/panda/src/sgraph/camera.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CAMERA_H #define CAMERA_H // @@ -38,7 +50,7 @@ public: virtual Node *make_copy() const; virtual bool safe_to_flatten() const; virtual bool safe_to_transform() const; - + //virtual void output(ostream &out) const; virtual void config() { } diff --git a/panda/src/sgraph/config_sgraph.cxx b/panda/src/sgraph/config_sgraph.cxx index 5dee97d677..76e9b5ef09 100644 --- a/panda/src/sgraph/config_sgraph.cxx +++ b/panda/src/sgraph/config_sgraph.cxx @@ -1,6 +1,19 @@ // Filename: config_sgraph.cxx // Created by: drose (12Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgraph.h" diff --git a/panda/src/sgraph/config_sgraph.h b/panda/src/sgraph/config_sgraph.h index 43f25dd03f..39da04e720 100644 --- a/panda/src/sgraph/config_sgraph.h +++ b/panda/src/sgraph/config_sgraph.h @@ -1,6 +1,19 @@ // Filename: config_sgraph.h // Created by: drose (12Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_SGRAPH_H diff --git a/panda/src/sgraph/geomNode.I b/panda/src/sgraph/geomNode.I index d30a0c1017..13c7a4778b 100644 --- a/panda/src/sgraph/geomNode.I +++ b/panda/src/sgraph/geomNode.I @@ -1,4 +1,17 @@ // Filename: geomNode.I // Created by: drose (16Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgraph/geomNode.cxx b/panda/src/sgraph/geomNode.cxx index 80d6ea88d4..b231650d72 100644 --- a/panda/src/sgraph/geomNode.cxx +++ b/panda/src/sgraph/geomNode.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomNode.h" #include "geomTransformer.h" @@ -34,7 +43,7 @@ GeomNode(const string &name) : NamedNode(name), _num_geoms(0) { // Description: //////////////////////////////////////////////////////////////////// GeomNode:: -GeomNode(const GeomNode ©) : +GeomNode(const GeomNode ©) : NamedNode(copy), _geoms(copy._geoms), _num_geoms(0) @@ -96,7 +105,7 @@ xform(const LMatrix4f &mat) { //////////////////////////////////////////////////////////////////// // Function: GeomNode::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomNode:: write(ostream &out, int indent_level) const { @@ -114,7 +123,7 @@ write(ostream &out, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: GeomNode::write_verbose // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void GeomNode:: write_verbose(ostream &out, int indent_level) const { @@ -130,7 +139,7 @@ write_verbose(ostream &out, int indent_level) const { } //////////////////////////////////////////////////////////////////// -// Function: GeomNode::draw +// Function: GeomNode::draw // Access: Public // Description: Draws all the geometry belonging to the geom node, // in the gsg's current state. @@ -265,7 +274,7 @@ write_datagram(BamWriter *manager, Datagram &me) // Function: GeomNode::complete_pointers // Access: Public // Description: Takes in a vector of pointes to TypedWritable -// objects that correspond to all the requests for +// objects that correspond to all the requests for // pointers that this object made to BamReader. //////////////////////////////////////////////////////////////////// int GeomNode:: diff --git a/panda/src/sgraph/geomNode.h b/panda/src/sgraph/geomNode.h index 68d153f85d..87ae249052 100644 --- a/panda/src/sgraph/geomNode.h +++ b/panda/src/sgraph/geomNode.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GEOMNODE_H #define GEOMNODE_H // @@ -61,8 +73,8 @@ private: public: static void register_with_read_factory(void); - virtual void write_datagram(BamWriter* manager, Datagram &me); - virtual int complete_pointers(vector_typedWritable &plist, + virtual void write_datagram(BamWriter* manager, Datagram &me); + virtual int complete_pointers(vector_typedWritable &plist, BamReader *manager); static TypedWritable *make_GeomNode(const FactoryParams ¶ms); @@ -72,10 +84,10 @@ protected: private: //This value is only used for the process of re-construction - //from a binary source. DO NOT ACCESS. The value is only + //from a binary source. DO NOT ACCESS. The value is only //guaranteed to be accurate during that process int _num_geoms; - + public: static TypeHandle get_class_type(void) { return _type_handle; @@ -89,7 +101,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; friend class GeomTransformer; diff --git a/panda/src/sgraph/geomTransformer.I b/panda/src/sgraph/geomTransformer.I index 217c896faa..c70643a8be 100644 --- a/panda/src/sgraph/geomTransformer.I +++ b/panda/src/sgraph/geomTransformer.I @@ -1,13 +1,26 @@ // Filename: geomTransformer.I // Created by: drose (23May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: GeomTransformer::SourceVertices::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GeomTransformer::SourceVertices:: operator < (const GeomTransformer::SourceVertices &other) const { @@ -20,7 +33,7 @@ operator < (const GeomTransformer::SourceVertices &other) const { //////////////////////////////////////////////////////////////////// // Function: GeomTransformer::SourceNormals::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GeomTransformer::SourceNormals:: operator < (const GeomTransformer::SourceNormals &other) const { @@ -33,7 +46,7 @@ operator < (const GeomTransformer::SourceNormals &other) const { //////////////////////////////////////////////////////////////////// // Function: GeomTransformer::SourceTexCoords::Ordering Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool GeomTransformer::SourceTexCoords:: operator < (const GeomTransformer::SourceTexCoords &other) const { diff --git a/panda/src/sgraph/geomTransformer.cxx b/panda/src/sgraph/geomTransformer.cxx index c50da205c5..770e305a4e 100644 --- a/panda/src/sgraph/geomTransformer.cxx +++ b/panda/src/sgraph/geomTransformer.cxx @@ -1,6 +1,19 @@ // Filename: geomTransformer.cxx // Created by: drose (23May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "geomTransformer.h" @@ -10,7 +23,7 @@ //////////////////////////////////////////////////////////////////// // Function: GeomTransformer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GeomTransformer:: GeomTransformer() { @@ -19,7 +32,7 @@ GeomTransformer() { //////////////////////////////////////////////////////////////////// // Function: GeomTransformer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// GeomTransformer:: ~GeomTransformer() { @@ -50,9 +63,9 @@ transform_vertices(Geom *geom, const LMatrix4f &mat) { SourceVertices sv; sv._mat = mat; sv._coords = coords; - + PTA_Vertexf &new_coords = _vertices[sv]; - + if (new_coords.is_null()) { // We have not transformed the array yet. Do so now. new_coords.reserve(coords.size()); @@ -62,7 +75,7 @@ transform_vertices(Geom *geom, const LMatrix4f &mat) { } nassertr(new_coords.size() == coords.size(), false); } - + geom->set_coords(new_coords, bind, index); transformed = true; } @@ -76,9 +89,9 @@ transform_vertices(Geom *geom, const LMatrix4f &mat) { SourceNormals sn; sn._mat = mat; sn._norms = norms; - + PTA_Normalf &new_norms = _normals[sn]; - + if (new_norms.is_null()) { // We have not transformed the array yet. Do so now. new_norms.reserve(norms.size()); @@ -168,9 +181,9 @@ transform_texcoords(Geom *geom, const LMatrix4f &mat) { SourceTexCoords stc; stc._mat = mat; stc._texcoords = texcoords; - + PTA_TexCoordf &new_texcoords = _texcoords[stc]; - + if (new_texcoords.is_null()) { // We have not transformed the array yet. Do so now. new_texcoords.reserve(texcoords.size()); @@ -183,7 +196,7 @@ transform_texcoords(Geom *geom, const LMatrix4f &mat) { } nassertr(new_texcoords.size() == texcoords.size(), false); } - + geom->set_texcoords(new_texcoords, bind, index); transformed = true; } @@ -249,7 +262,7 @@ set_color(Geom *geom, const Colorf &color) { // We do want to share this one-element array between Geoms, though. PTA_Colorf &new_colors = _colors[color]; - + if (new_colors.is_null()) { // We haven't seen this color before; define a new color array. new_colors.push_back(color); diff --git a/panda/src/sgraph/geomTransformer.h b/panda/src/sgraph/geomTransformer.h index 0ce9ce184e..8b2f2c2371 100644 --- a/panda/src/sgraph/geomTransformer.h +++ b/panda/src/sgraph/geomTransformer.h @@ -1,6 +1,19 @@ // Filename: geomTransformer.h // Created by: drose (23May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef GEOMTRANSFORMER_H diff --git a/panda/src/sgraph/modelNode.I b/panda/src/sgraph/modelNode.I index 6fc63e2b17..82ac8a6efd 100644 --- a/panda/src/sgraph/modelNode.I +++ b/panda/src/sgraph/modelNode.I @@ -1,18 +1,31 @@ // Filename: modelNode.I // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ModelNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ModelNode:: -ModelNode(const string &name) : - NamedNode(name) -{ +ModelNode(const string &name) : + NamedNode(name) +{ _preserve_transform = false; } @@ -44,7 +57,7 @@ get_preserve_transform() const { //////////////////////////////////////////////////////////////////// // Function: ModelNode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ModelNode:: ModelNode(const ModelNode ©) : @@ -56,7 +69,7 @@ ModelNode(const ModelNode ©) : //////////////////////////////////////////////////////////////////// // Function: ModelNode::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ModelNode:: operator = (const ModelNode ©) { diff --git a/panda/src/sgraph/modelNode.cxx b/panda/src/sgraph/modelNode.cxx index 3a95b00d14..0965ce411e 100644 --- a/panda/src/sgraph/modelNode.cxx +++ b/panda/src/sgraph/modelNode.cxx @@ -1,6 +1,19 @@ // Filename: modelNode.cxx // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "modelNode.h" @@ -109,5 +122,5 @@ fillin(DatagramIterator &scan, BamReader *manager) { } else { _preserve_transform = scan.get_bool(); } - + } diff --git a/panda/src/sgraph/modelNode.h b/panda/src/sgraph/modelNode.h index 9e759494e0..1fa2667344 100644 --- a/panda/src/sgraph/modelNode.h +++ b/panda/src/sgraph/modelNode.h @@ -1,6 +1,19 @@ // Filename: modelNode.h // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MODELNODE_H @@ -32,7 +45,7 @@ PUBLISHED: public: INLINE ModelNode(const ModelNode ©); INLINE void operator = (const ModelNode ©); - + virtual Node *make_copy() const; virtual bool safe_to_flatten() const; @@ -42,7 +55,7 @@ public: static void register_with_read_factory(void); protected: - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); void fillin(DatagramIterator &scan, BamReader *manager); static TypedWritable *make_ModelNode(const FactoryParams ¶ms); diff --git a/panda/src/sgraph/modelRoot.I b/panda/src/sgraph/modelRoot.I index e947e8b90e..b24e87b568 100644 --- a/panda/src/sgraph/modelRoot.I +++ b/panda/src/sgraph/modelRoot.I @@ -1,23 +1,36 @@ // Filename: modelRoot.I // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ModelRoot::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ModelRoot:: -ModelRoot(const string &name) : - ModelNode(name) -{ +ModelRoot(const string &name) : + ModelNode(name) +{ } //////////////////////////////////////////////////////////////////// // Function: ModelRoot::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ModelRoot:: ModelRoot(const ModelRoot ©) : @@ -28,7 +41,7 @@ ModelRoot(const ModelRoot ©) : //////////////////////////////////////////////////////////////////// // Function: ModelRoot::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ModelRoot:: operator = (const ModelRoot ©) { diff --git a/panda/src/sgraph/modelRoot.cxx b/panda/src/sgraph/modelRoot.cxx index f0a076c0f5..137fa413c1 100644 --- a/panda/src/sgraph/modelRoot.cxx +++ b/panda/src/sgraph/modelRoot.cxx @@ -1,6 +1,19 @@ // Filename: modelRoot.cxx // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "modelRoot.h" diff --git a/panda/src/sgraph/modelRoot.h b/panda/src/sgraph/modelRoot.h index 605092275d..ca5e0df924 100644 --- a/panda/src/sgraph/modelRoot.h +++ b/panda/src/sgraph/modelRoot.h @@ -1,6 +1,19 @@ // Filename: modelRoot.h // Created by: drose (09Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MODELROOT_H @@ -26,7 +39,7 @@ PUBLISHED: public: INLINE ModelRoot(const ModelRoot ©); INLINE void operator = (const ModelRoot ©); - + virtual Node *make_copy() const; public: diff --git a/panda/src/sgraph/planeNode.I b/panda/src/sgraph/planeNode.I index 4ac74156dc..5edbb37243 100644 --- a/panda/src/sgraph/planeNode.I +++ b/panda/src/sgraph/planeNode.I @@ -1,23 +1,36 @@ // Filename: planeNode.I // Created by: drose (23May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: PlaneNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PlaneNode:: -PlaneNode(const string &name) : - NamedNode(name) -{ +PlaneNode(const string &name) : + NamedNode(name) +{ } //////////////////////////////////////////////////////////////////// // Function: PlaneNode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE PlaneNode:: PlaneNode(const PlaneNode ©) : @@ -29,7 +42,7 @@ PlaneNode(const PlaneNode ©) : //////////////////////////////////////////////////////////////////// // Function: PlaneNode::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void PlaneNode:: operator = (const PlaneNode ©) { diff --git a/panda/src/sgraph/planeNode.cxx b/panda/src/sgraph/planeNode.cxx index b50708f9f7..4d7ba5ee80 100644 --- a/panda/src/sgraph/planeNode.cxx +++ b/panda/src/sgraph/planeNode.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "planeNode.h" @@ -28,7 +37,7 @@ make_copy() const { } //////////////////////////////////////////////////////////////////// -// Function: set_plane +// Function: set_plane // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -38,7 +47,7 @@ void PlaneNode::set_plane(const Planef& plane) } //////////////////////////////////////////////////////////////////// -// Function: get_plane +// Function: get_plane // Access: // Description: //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgraph/planeNode.h b/panda/src/sgraph/planeNode.h index 56146cc445..6d85f08912 100644 --- a/panda/src/sgraph/planeNode.h +++ b/panda/src/sgraph/planeNode.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PLANENODE_H #define PLANENODE_H // @@ -30,7 +42,7 @@ PUBLISHED: public: INLINE PlaneNode(const PlaneNode ©); INLINE void operator = (const PlaneNode ©); - + virtual Node *make_copy() const; PUBLISHED: diff --git a/panda/src/sgraph/projectionNode.I b/panda/src/sgraph/projectionNode.I index 925ce2c213..dc60cb224b 100644 --- a/panda/src/sgraph/projectionNode.I +++ b/panda/src/sgraph/projectionNode.I @@ -1,23 +1,36 @@ // Filename: projectionNode.I // Created by: drose (23May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: ProjectionNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ProjectionNode:: -ProjectionNode(const string &name) : - NamedNode(name) -{ +ProjectionNode(const string &name) : + NamedNode(name) +{ } //////////////////////////////////////////////////////////////////// // Function: ProjectionNode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ProjectionNode:: ProjectionNode(const ProjectionNode ©) : @@ -29,7 +42,7 @@ ProjectionNode(const ProjectionNode ©) : //////////////////////////////////////////////////////////////////// // Function: ProjectionNode::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void ProjectionNode:: operator = (const ProjectionNode ©) { diff --git a/panda/src/sgraph/projectionNode.cxx b/panda/src/sgraph/projectionNode.cxx index 7cda5bb077..ea12782c60 100644 --- a/panda/src/sgraph/projectionNode.cxx +++ b/panda/src/sgraph/projectionNode.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "projectionNode.h" #include @@ -32,7 +41,7 @@ make_copy() const { } //////////////////////////////////////////////////////////////////// -// Function: set_projection +// Function: set_projection // Access: Public // Description: Sets up the ProjectionNode using a copy of the // indicated Projection. If the original Projection is @@ -45,7 +54,7 @@ set_projection(const Projection &projection) { } //////////////////////////////////////////////////////////////////// -// Function: share_projection +// Function: share_projection // Access: Public // Description: This is similar to set_projection(), but the // Projection is assigned by pointer. If the original @@ -58,7 +67,7 @@ share_projection(Projection *projection) { } //////////////////////////////////////////////////////////////////// -// Function: get_projection +// Function: get_projection // Access: Public // Description: Returns a pointer to particular Projection associated // with this ProjectionNode. @@ -99,7 +108,7 @@ is_in_view(const LPoint3f &pos) { // assuming it represents a perspective frustum. //////////////////////////////////////////////////////////////////// void ProjectionNode:: -get_perspective_params(float &yfov, float &aspect, float &cnear, +get_perspective_params(float &yfov, float &aspect, float &cnear, float &cfar) const { if (_projection->get_type() == PerspectiveProjection::get_class_type()) { PerspectiveProjection *proj = DCAST(PerspectiveProjection, _projection); @@ -114,7 +123,7 @@ get_perspective_params(float &yfov, float &aspect, float &cnear, // assuming it represents a perspective frustum. //////////////////////////////////////////////////////////////////// void ProjectionNode:: -get_perspective_params(float &xfov, float &yfov, float &aspect, float &cnear, +get_perspective_params(float &xfov, float &yfov, float &aspect, float &cnear, float &cfar) const { if (_projection->get_type() == PerspectiveProjection::get_class_type()) { PerspectiveProjection *proj = DCAST(PerspectiveProjection, _projection); diff --git a/panda/src/sgraph/projectionNode.h b/panda/src/sgraph/projectionNode.h index d0705304b7..a104297884 100644 --- a/panda/src/sgraph/projectionNode.h +++ b/panda/src/sgraph/projectionNode.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PROJECTIONNODE_H #define PROJECTIONNODE_H // @@ -32,14 +44,14 @@ public: virtual Node *make_copy() const; -PUBLISHED: +PUBLISHED: void set_projection(const Projection &projection); void share_projection(Projection *projection); Projection *get_projection(); bool is_in_view(const LPoint3f &pos); - void get_perspective_params(float &yfov, float &aspect, float &cnear, + void get_perspective_params(float &yfov, float &aspect, float &cnear, float &cfar) const; void get_perspective_params(float &xfov, float &yfov, float &aspect, float &cnear, float &cfar) const; @@ -57,12 +69,12 @@ PUBLISHED: void set_near(float cnear); float get_far(void) const; void set_far(float cfar); - + protected: PT(Projection) _projection; - + public: - + static TypeHandle get_class_type( void ) { return _type_handle; } @@ -75,9 +87,9 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/sgraph/renderTraverser.I b/panda/src/sgraph/renderTraverser.I index d57be08a14..5b7fba0bf5 100644 --- a/panda/src/sgraph/renderTraverser.I +++ b/panda/src/sgraph/renderTraverser.I @@ -1,6 +1,19 @@ // Filename: renderTraverser.I // Created by: drose (12Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -26,7 +39,7 @@ RenderTraverser(GraphicsStateGuardian *gsg, TypeHandle graph_type, //////////////////////////////////////////////////////////////////// // Function: RenderTraverser::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE RenderTraverser:: ~RenderTraverser() { @@ -82,7 +95,7 @@ empty() const { //////////////////////////////////////////////////////////////////// // Function: RenderTraverser::get_gsg // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE GraphicsStateGuardian *RenderTraverser:: get_gsg() const { @@ -92,7 +105,7 @@ get_gsg() const { //////////////////////////////////////////////////////////////////// // Function: RenderTraverser::get_graph_type // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE TypeHandle RenderTraverser:: get_graph_type() const { diff --git a/panda/src/sgraph/renderTraverser.cxx b/panda/src/sgraph/renderTraverser.cxx index 10604bffac..4988d9a766 100644 --- a/panda/src/sgraph/renderTraverser.cxx +++ b/panda/src/sgraph/renderTraverser.cxx @@ -1,6 +1,19 @@ // Filename: renderTraverser.cxx // Created by: drose (12Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "renderTraverser.h" @@ -9,11 +22,11 @@ TypeHandle RenderTraverser::_type_handle; - + //////////////////////////////////////////////////////////////////// // Function: RenderTraverser::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RenderTraverser:: output(ostream &out) const { @@ -23,7 +36,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: RenderTraverser::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void RenderTraverser:: write(ostream &out, int indent_level) const { diff --git a/panda/src/sgraph/renderTraverser.h b/panda/src/sgraph/renderTraverser.h index 371a5383d2..a3282f0604 100644 --- a/panda/src/sgraph/renderTraverser.h +++ b/panda/src/sgraph/renderTraverser.h @@ -1,6 +1,19 @@ // Filename: renderTraverser.h // Created by: drose (12Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef RENDERTRAVERSER_H @@ -29,14 +42,14 @@ class AllTransitionsWrapper; //////////////////////////////////////////////////////////////////// class EXPCL_PANDA RenderTraverser : public TypedReferenceCount { public: - INLINE RenderTraverser(GraphicsStateGuardian *gsg, + INLINE RenderTraverser(GraphicsStateGuardian *gsg, TypeHandle graph_type, const ArcChain &arc_chain); INLINE ~RenderTraverser(); typedef ArcChain::iterator iterator; typedef ArcChain::const_iterator const_iterator; - + INLINE const ArcChain &get_arc_chain() const; INLINE const_iterator begin() const; INLINE const_iterator end() const; @@ -46,8 +59,8 @@ PUBLISHED: INLINE GraphicsStateGuardian *get_gsg() const; INLINE TypeHandle get_graph_type() const; -public: - virtual void traverse(Node *root, +public: + virtual void traverse(Node *root, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans)=0; @@ -55,7 +68,7 @@ PUBLISHED: virtual void output(ostream &out) const; virtual void write(ostream &out, int indent_level = 0) const; -protected: +protected: // These methods are to be called by derived classes as we traverse // each arc. They update the arc list returned by begin()/end(). INLINE void mark_forward_arc(NodeRelation *arc); @@ -79,7 +92,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/sgraph/switchNode.I b/panda/src/sgraph/switchNode.I index 2847c839db..03f32ba85d 100644 --- a/panda/src/sgraph/switchNode.I +++ b/panda/src/sgraph/switchNode.I @@ -1,24 +1,37 @@ // Filename: switchNode.I // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SwitchNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SwitchNode:: -SwitchNode(const string &name) : - NamedNode(name) -{ +SwitchNode(const string &name) : + NamedNode(name) +{ } //////////////////////////////////////////////////////////////////// // Function: SwitchNode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SwitchNode:: SwitchNode(const SwitchNode ©) : @@ -29,7 +42,7 @@ SwitchNode(const SwitchNode ©) : //////////////////////////////////////////////////////////////////// // Function: SwitchNode::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void SwitchNode:: operator = (const SwitchNode ©) { diff --git a/panda/src/sgraph/switchNode.cxx b/panda/src/sgraph/switchNode.cxx index 2adb03ae05..5f50b94494 100644 --- a/panda/src/sgraph/switchNode.cxx +++ b/panda/src/sgraph/switchNode.cxx @@ -1,6 +1,19 @@ // Filename: switchNode.cxx // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "switchNode.h" diff --git a/panda/src/sgraph/switchNode.h b/panda/src/sgraph/switchNode.h index 4e456d2d45..04c953ddfe 100644 --- a/panda/src/sgraph/switchNode.h +++ b/panda/src/sgraph/switchNode.h @@ -1,6 +1,19 @@ // Filename: switchNode.h // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SWITCHNODE_H diff --git a/panda/src/sgraph/test_sgraph.cxx b/panda/src/sgraph/test_sgraph.cxx index 23965d5060..a32cce79e8 100644 --- a/panda/src/sgraph/test_sgraph.cxx +++ b/panda/src/sgraph/test_sgraph.cxx @@ -1,6 +1,19 @@ // Filename: test_sgraph.cxx // Created by: mike (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "camera.h" diff --git a/panda/src/sgraphutil/appTraverser.I b/panda/src/sgraphutil/appTraverser.I index c0e497fa83..92cb019b3c 100644 --- a/panda/src/sgraphutil/appTraverser.I +++ b/panda/src/sgraphutil/appTraverser.I @@ -1,6 +1,19 @@ // Filename: appTraverser.I // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgraphutil/appTraverser.cxx b/panda/src/sgraphutil/appTraverser.cxx index e45b62c56c..8444345819 100644 --- a/panda/src/sgraphutil/appTraverser.cxx +++ b/panda/src/sgraphutil/appTraverser.cxx @@ -1,6 +1,19 @@ // Filename: appTraverser.cxx // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "appTraverser.h" @@ -16,13 +29,13 @@ void AppTraverser:: traverse(Node *root) { if (!implicit_app_traversal) { - df_traverse(root, *this, NullAttributeWrapper(), NullLevelState(), + df_traverse(root, *this, NullAttributeWrapper(), NullLevelState(), _graph_type); } } //////////////////////////////////////////////////////////////////// -// Function: AppTraverser::reached_node +// Function: AppTraverser::reached_node // Access: Public // Description: //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgraphutil/appTraverser.h b/panda/src/sgraphutil/appTraverser.h index 6bb135b16b..74a59486c1 100644 --- a/panda/src/sgraphutil/appTraverser.h +++ b/panda/src/sgraphutil/appTraverser.h @@ -1,6 +1,19 @@ // Filename: appTraverser.h // Created by: drose (25Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef APPTRAVERSER_H @@ -30,7 +43,7 @@ public: void traverse(Node *root); -public: +public: // These methods, from parent class TraverserVisitor, define the // behavior of the AppTraverser as it traverses the graph. // Normally you would never call these directly. diff --git a/panda/src/sgraphutil/config_sgraphutil.cxx b/panda/src/sgraphutil/config_sgraphutil.cxx index e5006424fa..8f49dbeb58 100644 --- a/panda/src/sgraphutil/config_sgraphutil.cxx +++ b/panda/src/sgraphutil/config_sgraphutil.cxx @@ -1,6 +1,19 @@ // Filename: config_sgraphutil.cxx // Created by: drose (21Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_sgraphutil.h" diff --git a/panda/src/sgraphutil/config_sgraphutil.h b/panda/src/sgraphutil/config_sgraphutil.h index ada64ddcb4..ebd8ecd0d2 100644 --- a/panda/src/sgraphutil/config_sgraphutil.h +++ b/panda/src/sgraphutil/config_sgraphutil.h @@ -1,6 +1,19 @@ // Filename: config_sgraphutil.h // Created by: drose (21Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_SGRAPHUTIL_H diff --git a/panda/src/sgraphutil/directRenderLevelState.h b/panda/src/sgraphutil/directRenderLevelState.h index ae0240cf0a..0acb252267 100644 --- a/panda/src/sgraphutil/directRenderLevelState.h +++ b/panda/src/sgraphutil/directRenderLevelState.h @@ -1,6 +1,19 @@ // Filename: directRenderLevelState.h // Created by: drose (17Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DIRECTRENDERLEVELSTATE_H diff --git a/panda/src/sgraphutil/directRenderTraverser.I b/panda/src/sgraphutil/directRenderTraverser.I index 0b9e1aca5a..3e8ad7448f 100644 --- a/panda/src/sgraphutil/directRenderTraverser.I +++ b/panda/src/sgraphutil/directRenderTraverser.I @@ -1,5 +1,18 @@ // Filename: directRenderTraverser.I // Created by: drose (02Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/sgraphutil/directRenderTraverser.cxx b/panda/src/sgraphutil/directRenderTraverser.cxx index ee249eb5f9..42752971ac 100644 --- a/panda/src/sgraphutil/directRenderTraverser.cxx +++ b/panda/src/sgraphutil/directRenderTraverser.cxx @@ -1,6 +1,19 @@ // Filename: directRenderTraverser.cxx // Created by: drose (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "directRenderTraverser.h" @@ -63,7 +76,7 @@ DirectRenderTraverser:: // using this DirectRenderTraverser object. //////////////////////////////////////////////////////////////////// void DirectRenderTraverser:: -traverse(Node *root, +traverse(Node *root, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans) { // Statistics @@ -84,7 +97,7 @@ traverse(Node *root, level_state._decal_mode = decal_attrib->is_on(); } } - + // Determine the relative transform matrix from the camera to our // starting node. This is important for proper view-frustum // culling. @@ -103,7 +116,7 @@ traverse(Node *root, fc_traverse(_arc_chain, root, rel_from_camera, *this, render_state, level_state, _gsg, _graph_type); - if (level_state._decal_mode && + if (level_state._decal_mode && root->is_of_type(GeomNode::get_class_type())) { #ifndef NDEBUG if (support_decals == SD_hide) { @@ -117,7 +130,7 @@ traverse(Node *root, //////////////////////////////////////////////////////////////////// -// Function: DirectRenderTraverser::reached_node +// Function: DirectRenderTraverser::reached_node // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -151,7 +164,7 @@ reached_node(Node *node, AllAttributesWrapper &render_state, // Make sure the current display region is still in effect. _gsg->prepare_display_region(); - GeomNode *geom = DCAST(GeomNode, node); + GeomNode *geom = DCAST(GeomNode, node); // We must make decals a special case, because they're so strange. #ifndef NDEBUG @@ -183,7 +196,7 @@ reached_node(Node *node, AllAttributesWrapper &render_state, SwitchNode *swnode = DCAST(SwitchNode, node); swnode->compute_switch(this); } - + return true; } @@ -206,7 +219,7 @@ forward_arc(NodeRelation *arc, AllTransitionsWrapper &trans, mark_forward_arc(arc); #ifndef NDEBUG - if (support_subrender == SD_on) + if (support_subrender == SD_on) #endif { AllTransitionsWrapper::const_iterator nti; diff --git a/panda/src/sgraphutil/directRenderTraverser.h b/panda/src/sgraphutil/directRenderTraverser.h index f48346fc59..bdd4c87e44 100644 --- a/panda/src/sgraphutil/directRenderTraverser.h +++ b/panda/src/sgraphutil/directRenderTraverser.h @@ -2,6 +2,19 @@ // Created by: drose (18Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DIRECTRENDERTRAVERSER_H #define DIRECTRENDERTRAVERSER_H @@ -33,24 +46,24 @@ class NodeAttributes; // however, view-frustum culling is performed. //////////////////////////////////////////////////////////////////// class EXPCL_PANDA DirectRenderTraverser : - public RenderTraverser, + public RenderTraverser, public TraverserVisitor { public: DirectRenderTraverser(GraphicsStateGuardian *gsg, TypeHandle graph_type, const ArcChain &arc_chain = ArcChain()); virtual ~DirectRenderTraverser(); - virtual void traverse(Node *root, + virtual void traverse(Node *root, const AllAttributesWrapper &initial_state, const AllTransitionsWrapper &net_trans); -public: +public: // These methods, from parent class TraverserVisitor, define the // behavior of the DirectRenderTraverser as it traverses the graph. // Normally you would never call these directly. bool reached_node(Node *node, AllAttributesWrapper &render_state, DirectRenderLevelState &level_state); - + bool forward_arc(NodeRelation *arc, AllTransitionsWrapper &trans, AllAttributesWrapper &pre, AllAttributesWrapper &post, DirectRenderLevelState &level_state); @@ -76,7 +89,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/sgraphutil/frustumCullTraverser.I b/panda/src/sgraphutil/frustumCullTraverser.I index d86a64af9c..296a0b43e2 100644 --- a/panda/src/sgraphutil/frustumCullTraverser.I +++ b/panda/src/sgraphutil/frustumCullTraverser.I @@ -1,21 +1,34 @@ // Filename: frustumCullTraverser.I // Created by: drose (14Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: FrustumCullTraverser::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// template FrustumCullTraverser:: -FrustumCullTraverser(ArcChain &arc_chain, Node *root, +FrustumCullTraverser(ArcChain &arc_chain, Node *root, const LMatrix4f &rel_from_camera, Visitor &visitor, const AttributeWrapper &initial_render_state, const LevelState &initial_level_state, - GraphicsStateGuardian *gsg, + GraphicsStateGuardian *gsg, TypeHandle graph_type) : _arc_chain(arc_chain), _visitor(visitor), @@ -81,7 +94,7 @@ FrustumCullTraverser(ArcChain &arc_chain, Node *root, //////////////////////////////////////////////////////////////////// template void FrustumCullTraverser:: -traverse(NodeRelation *arc, AttributeWrapper render_state, +traverse(NodeRelation *arc, AttributeWrapper render_state, LevelState level_state, PT(GeometricBoundingVolume) local_frustum, bool all_in) { // local_frustum, above, is a PT(GeometricBoundingVolume), instead @@ -127,9 +140,9 @@ traverse(NodeRelation *arc, AttributeWrapper render_state, // In fake mode, we just render everything in red // wireframe instead of actually culling it. - ColorTransition *c = + ColorTransition *c = new ColorTransition(1.0, 0.0, 0.0, 1.0); - RenderModeTransition *w = + RenderModeTransition *w = new RenderModeTransition(RenderModeProperty::M_wireframe); TextureTransition *t = new TextureTransition(TextureTransition::off()); @@ -165,7 +178,7 @@ traverse(NodeRelation *arc, AttributeWrapper render_state, all_in = true; } - if (!all_in && + if (!all_in && arc->has_transition(TransformTransition::get_class_type())) { // Now apply the transform associated with this arc. We do // this after the bounding volume test, because the bounding @@ -201,16 +214,16 @@ traverse(NodeRelation *arc, AttributeWrapper render_state, if (carry_on) { // Now give the visitor a chance to veto this arc. - TransitionWrapper trans = + TransitionWrapper trans = TransitionWrapper::init_from(_initial_render_state); trans.extract_from(arc); - + AttributeWrapper post_state(render_state); post_state.apply_in_place(trans); - if (_visitor.forward_arc(arc, trans, render_state, post_state, + if (_visitor.forward_arc(arc, trans, render_state, post_state, level_state)) { - - traverse(arc->get_child(), post_state, level_state, + + traverse(arc->get_child(), post_state, level_state, local_frustum, all_in); _visitor.backward_arc(arc, trans, render_state, post_state, level_state); @@ -236,7 +249,7 @@ traverse(Node *node, AttributeWrapper &render_state, LevelState &level_state, if (_visitor.reached_node(node, render_state, level_state)) { // Look for further children of the given NodeRelation. - const DownRelationPointers &drp = + const DownRelationPointers &drp = node->find_connection(_graph_type).get_down(); // Now visit each of the children in turn. diff --git a/panda/src/sgraphutil/frustumCullTraverser.h b/panda/src/sgraphutil/frustumCullTraverser.h index 516bc4b80a..754ab64aa3 100644 --- a/panda/src/sgraphutil/frustumCullTraverser.h +++ b/panda/src/sgraphutil/frustumCullTraverser.h @@ -1,6 +1,19 @@ // Filename: frustumCullTraverser.h // Created by: drose (14Apr00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef FRUSTUMCULLTRAVERSER_H @@ -37,23 +50,23 @@ public: typedef TYPENAME Visitor::TransitionWrapper TransitionWrapper; typedef TYPENAME Visitor::AttributeWrapper AttributeWrapper; - FrustumCullTraverser(ArcChain &arc_chain, Node *root, + FrustumCullTraverser(ArcChain &arc_chain, Node *root, const LMatrix4f &rel_from_camera, Visitor &visitor, const AttributeWrapper &initial_render_state, const LevelState &initial_level_state, - GraphicsStateGuardian *gsg, + GraphicsStateGuardian *gsg, TypeHandle graph_type); protected: - void traverse(NodeRelation *arc, + void traverse(NodeRelation *arc, AttributeWrapper render_state, LevelState level_state, - PT(GeometricBoundingVolume) local_frustum, + PT(GeometricBoundingVolume) local_frustum, bool all_in); - void traverse(Node *node, + void traverse(Node *node, AttributeWrapper &render_state, LevelState &level_state, - GeometricBoundingVolume *local_frustum, + GeometricBoundingVolume *local_frustum, bool all_in); ArcChain &_arc_chain; @@ -72,13 +85,13 @@ protected: // Convenience function. template INLINE void -fc_traverse(ArcChain &arc_chain, Node *root, +fc_traverse(ArcChain &arc_chain, Node *root, const LMatrix4f &rel_from_camera, Visitor &visitor, - const AttributeWrapper &initial_render_state, + const AttributeWrapper &initial_render_state, const LevelState &initial_level_state, GraphicsStateGuardian *gsg, TypeHandle graph_type) { - FrustumCullTraverser - fct(arc_chain, root, rel_from_camera, visitor, initial_render_state, + FrustumCullTraverser + fct(arc_chain, root, rel_from_camera, visitor, initial_render_state, initial_level_state, gsg, graph_type); } diff --git a/panda/src/sgraphutil/get_rel_pos.I b/panda/src/sgraphutil/get_rel_pos.I index 2e5110053b..72c57fd05c 100644 --- a/panda/src/sgraphutil/get_rel_pos.I +++ b/panda/src/sgraphutil/get_rel_pos.I @@ -1,6 +1,19 @@ // Filename: get_rel_pos.I // Created by: drose (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -57,7 +70,7 @@ get_rel_mat(const Node *node, const Node *relative_to, // system) to the the indicated node, relative to // another node (such as render). //////////////////////////////////////////////////////////////////// -INLINE LVector3f +INLINE LVector3f get_rel_up(const Node *node, const Node *relative_to, CoordinateSystem cs) { LMatrix4f mat; @@ -72,7 +85,7 @@ get_rel_up(const Node *node, const Node *relative_to, // system) to the the indicated node, relative to // another node (such as render). //////////////////////////////////////////////////////////////////// -INLINE LVector3f +INLINE LVector3f get_rel_right(const Node *node, const Node *relative_to, CoordinateSystem cs) { LMatrix4f mat; @@ -87,7 +100,7 @@ get_rel_right(const Node *node, const Node *relative_to, // system) to the the indicated node, relative to // another node (such as render). //////////////////////////////////////////////////////////////////// -INLINE LVector3f +INLINE LVector3f get_rel_forward(const Node *node, const Node *relative_to, CoordinateSystem cs) { LMatrix4f mat; @@ -102,7 +115,7 @@ get_rel_forward(const Node *node, const Node *relative_to, // system) to the the indicated node, relative to // another node (such as render). //////////////////////////////////////////////////////////////////// -INLINE LVector3f +INLINE LVector3f get_rel_down(const Node *node, const Node *relative_to, CoordinateSystem cs) { LMatrix4f mat; @@ -117,7 +130,7 @@ get_rel_down(const Node *node, const Node *relative_to, // system) to the the indicated node, relative to // another node (such as render). //////////////////////////////////////////////////////////////////// -INLINE LVector3f +INLINE LVector3f get_rel_left(const Node *node, const Node *relative_to, CoordinateSystem cs) { LMatrix4f mat; @@ -132,7 +145,7 @@ get_rel_left(const Node *node, const Node *relative_to, // system) to the the indicated node, relative to // another node (such as render). //////////////////////////////////////////////////////////////////// -INLINE LVector3f +INLINE LVector3f get_rel_back(const Node *node, const Node *relative_to, CoordinateSystem cs) { LMatrix4f mat; diff --git a/panda/src/sgraphutil/get_rel_pos.cxx b/panda/src/sgraphutil/get_rel_pos.cxx index 8b5b198e99..3ca30dafd6 100644 --- a/panda/src/sgraphutil/get_rel_pos.cxx +++ b/panda/src/sgraphutil/get_rel_pos.cxx @@ -1,6 +1,19 @@ // Filename: get_rel_pos.cxx // Created by: drose (18Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "get_rel_pos.h" @@ -52,7 +65,7 @@ get_rel_rot_mat(const Node *node, const Node *relative_to, // Description: Returns the relative scale between the indicated node // and the other node. //////////////////////////////////////////////////////////////////// -LVecBase3f +LVecBase3f get_rel_scale(const Node *node, const Node *relative_to, TypeHandle graph_type) { NodeTransitionWrapper ntw(TransformTransition::get_class_type()); diff --git a/panda/src/sgraphutil/get_rel_pos.h b/panda/src/sgraphutil/get_rel_pos.h index cd64e345c9..76c15b52f3 100644 --- a/panda/src/sgraphutil/get_rel_pos.h +++ b/panda/src/sgraphutil/get_rel_pos.h @@ -2,6 +2,19 @@ // Created by: drose (18Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef GET_REL_POS_H #define GET_REL_POS_H @@ -15,14 +28,14 @@ class Node; -INLINE LPoint3f EXPCL_PANDA +INLINE LPoint3f EXPCL_PANDA get_rel_pos(const Node *node, const Node *relative_to, TypeHandle graph_type = RenderRelation::get_class_type()); -INLINE void EXPCL_PANDA +INLINE void EXPCL_PANDA get_rel_mat(const Node *node, const Node *relative_to, - LMatrix4f &mat, + LMatrix4f &mat, TypeHandle graph_type = RenderRelation::get_class_type()); -void EXPCL_PANDA +void EXPCL_PANDA get_rel_rot_mat(const Node *node, const Node *relative_to, LMatrix4f &mat, TypeHandle graph_type = RenderRelation::get_class_type()); @@ -32,7 +45,7 @@ get_rel_scale(const Node *node, const Node *relative_to, TypeHandle graph_type = RenderRelation::get_class_type()); -INLINE LVector3f EXPCL_PANDA +INLINE LVector3f EXPCL_PANDA get_rel_up(const Node *node, const Node *relative_to, CoordinateSystem cs = CS_default); INLINE LVector3f EXPCL_PANDA diff --git a/panda/src/sgraphutil/sceneGraphAnalyzer.cxx b/panda/src/sgraphutil/sceneGraphAnalyzer.cxx index 74f66b16cb..e8e61021e6 100644 --- a/panda/src/sgraphutil/sceneGraphAnalyzer.cxx +++ b/panda/src/sgraphutil/sceneGraphAnalyzer.cxx @@ -1,6 +1,19 @@ // Filename: sceneGraphAnalyzer.cxx // Created by: drose (02Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "sceneGraphAnalyzer.h" @@ -16,7 +29,7 @@ //////////////////////////////////////////////////////////////////// // Function: SceneGraphAnalyzer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// SceneGraphAnalyzer:: SceneGraphAnalyzer(TypeHandle graph_type) : @@ -28,7 +41,7 @@ SceneGraphAnalyzer(TypeHandle graph_type) : //////////////////////////////////////////////////////////////////// // Function: SceneGraphAnalyzer::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// SceneGraphAnalyzer:: ~SceneGraphAnalyzer() { @@ -99,14 +112,14 @@ add_node(Node *node) { void SceneGraphAnalyzer:: write(ostream &out, int indent_level) const { indent(out, indent_level) - << _num_nodes << " total nodes (including " + << _num_nodes << " total nodes (including " << _num_instances << " instances).\n"; indent(out, indent_level) << _num_transforms << " transforms"; if (_num_arcs != 0) { - out << "; " << 100 * _num_arcs_with_transitions / _num_arcs + out << "; " << 100 * _num_arcs_with_transitions / _num_arcs << "% of arcs have some transition."; } out << "\n"; @@ -124,7 +137,7 @@ write(ostream &out, int indent_level) const { if (_num_long_normals != 0 || _num_short_normals != 0) { indent(out, indent_level) - << _num_long_normals << " normals are too long, " + << _num_long_normals << " normals are too long, " << _num_short_normals << " are too short. Average normal length is " << _total_normal_length / (float)_num_normals << "\n"; } @@ -132,7 +145,7 @@ write(ostream &out, int indent_level) const { indent(out, indent_level) << _num_tris << " triangles:\n"; indent(out, indent_level + 2) - << _num_triangles_in_strips + << _num_triangles_in_strips << " of these are on " << _num_tristrips << " tristrips"; if (_num_tristrips != 0) { out << " (" @@ -142,7 +155,7 @@ write(ostream &out, int indent_level) const { out << ".\n"; indent(out, indent_level + 2) - << _num_triangles_in_fans + << _num_triangles_in_fans << " of these are on " << _num_trifans << " trifans"; if (_num_trifans != 0) { out << " (" @@ -152,7 +165,7 @@ write(ostream &out, int indent_level) const { out << ".\n"; indent(out, indent_level + 2) - << _num_individual_tris + << _num_individual_tris << " of these are independent triangles.\n"; indent(out, indent_level) @@ -161,7 +174,7 @@ write(ostream &out, int indent_level) const { << _num_spheres << " spheres.\n"; indent(out, indent_level) - << _textures.size() << " textures, estimated minimum " + << _textures.size() << " textures, estimated minimum " << (_texture_bytes + 1023) / 1024 << "K texture memory required.\n"; } @@ -188,11 +201,11 @@ collect_statistics(Node *node, bool under_instance) { under_instance = true; } } - + if (node->is_of_type(GeomNode::get_class_type())) { collect_statistics(DCAST(GeomNode, node)); } - + int num_children = node->get_num_children(_graph_type); for (int i = 0; i < num_children; i++) { NodeRelation *arc = node->get_child(_graph_type, i); @@ -343,10 +356,10 @@ collect_statistics(Geom *geom) { } else { sgraphutil_cat.warning() - << "Unknown GeomType in SceneGraphAnalyzer: " + << "Unknown GeomType in SceneGraphAnalyzer: " << geom->get_type() << "\n"; } -} +} //////////////////////////////////////////////////////////////////// // Function: SceneGraphAnalyzer::collect_statistics @@ -368,9 +381,9 @@ collect_statistics(Texture *texture) { PixelBuffer *pb = texture->_pbuffer; if (pb != (PixelBuffer *)NULL) { int bytes = - pb->get_xsize() * pb->get_ysize() * pb->get_num_components() * + pb->get_xsize() * pb->get_ysize() * pb->get_num_components() * pb->get_component_width(); - + bool is_mipmapped = false; switch (texture->get_minfilter()) { case Texture::FT_nearest_mipmap_nearest: @@ -383,14 +396,14 @@ collect_statistics(Texture *texture) { default: break; } - + if (is_mipmapped) { bytes *= 4/3; } _texture_bytes += bytes; } - + } else { // This texture has been encountered before; don't count it again. (*ti).second++; diff --git a/panda/src/sgraphutil/sceneGraphAnalyzer.h b/panda/src/sgraphutil/sceneGraphAnalyzer.h index 158ebe1bad..2ac010ead8 100644 --- a/panda/src/sgraphutil/sceneGraphAnalyzer.h +++ b/panda/src/sgraphutil/sceneGraphAnalyzer.h @@ -1,6 +1,19 @@ // Filename: sceneGraphAnalyzer.h // Created by: drose (02Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SCENEGRAPHANALYZER_H diff --git a/panda/src/sgraphutil/sceneGraphReducer.I b/panda/src/sgraphutil/sceneGraphReducer.I index de1f0bb75a..3604993149 100644 --- a/panda/src/sgraphutil/sceneGraphReducer.I +++ b/panda/src/sgraphutil/sceneGraphReducer.I @@ -1,13 +1,26 @@ // Filename: sceneGraphReducer.I // Created by: drose (22May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SceneGraphReducer::AccumulatedTransitions::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SceneGraphReducer::AccumulatedTransitions:: AccumulatedTransitions() { @@ -16,7 +29,7 @@ AccumulatedTransitions() { //////////////////////////////////////////////////////////////////// // Function: SceneGraphReducer::AccumulatedTransitions::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SceneGraphReducer::AccumulatedTransitions:: AccumulatedTransitions(const SceneGraphReducer::AccumulatedTransitions ©) : @@ -29,7 +42,7 @@ AccumulatedTransitions(const SceneGraphReducer::AccumulatedTransitions ©) : //////////////////////////////////////////////////////////////////// // Function: SceneGraphReducer::AccumulatedTransitions::Copy Assignment // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void SceneGraphReducer::AccumulatedTransitions:: operator = (const SceneGraphReducer::AccumulatedTransitions ©) { diff --git a/panda/src/sgraphutil/sceneGraphReducer.cxx b/panda/src/sgraphutil/sceneGraphReducer.cxx index 03a7b476f8..071fbf0369 100644 --- a/panda/src/sgraphutil/sceneGraphReducer.cxx +++ b/panda/src/sgraphutil/sceneGraphReducer.cxx @@ -1,6 +1,19 @@ // Filename: sceneGraphReducer.cxx // Created by: drose (22May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "sceneGraphReducer.h" @@ -26,14 +39,14 @@ apply_to_arc(NodeRelation *arc, int transition_types) { } _transform = new TransformTransition; } - + if ((transition_types & TT_color) != 0) { if (!_color->is_identity()) { arc->set_transition(_color); _color = new ColorTransition; } } - + if ((transition_types & TT_texture_matrix) != 0) { if (!_texture_matrix->get_matrix().almost_equal(LMatrix4f::ident_mat())) { arc->set_transition(_texture_matrix); @@ -45,7 +58,7 @@ apply_to_arc(NodeRelation *arc, int transition_types) { //////////////////////////////////////////////////////////////////// // Function: SceneGraphReducer::AccumulatedTransitions::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void SceneGraphReducer::AccumulatedTransitions:: write(ostream &out, int transition_types, int indent_level) const { @@ -63,7 +76,7 @@ write(ostream &out, int transition_types, int indent_level) const { //////////////////////////////////////////////////////////////////// // Function: SceneGraphReducer::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// SceneGraphReducer:: SceneGraphReducer(TypeHandle graph_type) : @@ -143,7 +156,7 @@ r_apply_transitions(NodeRelation *arc, int transition_types, nassertv(trans._texture_matrix != (TexMatrixTransition *)NULL); TexMatrixTransition *tmt; if (get_transition_into(tmt, arc)) { - trans._texture_matrix = + trans._texture_matrix = DCAST(TexMatrixTransition, trans._texture_matrix->compose(tmt)); arc->clear_transition(TexMatrixTransition::get_class_type()); } @@ -186,7 +199,7 @@ r_apply_transitions(NodeRelation *arc, int transition_types, PT(Node) new_node = node->make_copy(); if (new_node->get_type() != node->get_type()) { sgraphutil_cat.error() - << "Cannot apply transitions to " << *node + << "Cannot apply transitions to " << *node << "; don't know how to copy nodes of this type.\n"; trans.apply_to_arc(arc, transition_types); @@ -211,7 +224,7 @@ r_apply_transitions(NodeRelation *arc, int transition_types, if (arc->has_transition(BillboardTransition::get_class_type())) { if (sgraphutil_cat.is_debug()) { sgraphutil_cat.debug() - << "Arc " << *arc + << "Arc " << *arc << " contains a BillboardTransition; leaving transform here.\n"; } apply_types |= TT_transform; @@ -223,7 +236,7 @@ r_apply_transitions(NodeRelation *arc, int transition_types, << "; leaving a transform here but carrying on otherwise.\n"; } apply_types |= TT_transform; - } + } trans.apply_to_arc(arc, transition_types & apply_types); // Now apply what's left to the vertices. @@ -249,19 +262,19 @@ r_apply_transitions(NodeRelation *arc, int transition_types, } if ((transition_types & TT_texture_matrix) != 0) { if (trans._texture_matrix->get_matrix() != LMatrix4f::ident_mat()) { - _transformer.transform_texcoords(gnode, + _transformer.transform_texcoords(gnode, trans._texture_matrix->get_matrix()); } } - + } else { // This handles any kind of node other than a GeomNode. if ((transition_types & TT_transform) != 0) { node->xform(trans._transform->get_matrix()); } } - - const DownRelationPointers &drp = + + const DownRelationPointers &drp = node->find_connection(_graph_type).get_down(); DownRelationPointers drp_copy = drp; @@ -291,7 +304,7 @@ collapse_nodes(Node *node1, Node *node2, bool siblings) { // We can collapse two GeomNodes easily, if they're siblings. If // they're parent-child, we'd probably better not (it might // interfere with decaling). - if (siblings && + if (siblings && node1->is_exact_type(GeomNode::get_class_type()) && node2->is_exact_type(GeomNode::get_class_type())) { GeomNode *gnode1; diff --git a/panda/src/sgraphutil/sceneGraphReducer.h b/panda/src/sgraphutil/sceneGraphReducer.h index a91d925091..6e3389d475 100644 --- a/panda/src/sgraphutil/sceneGraphReducer.h +++ b/panda/src/sgraphutil/sceneGraphReducer.h @@ -1,6 +1,19 @@ // Filename: sceneGraphReducer.h // Created by: drose (22May00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SCENEGRAPHREDUCER_H diff --git a/panda/src/shader/casterShader.I b/panda/src/shader/casterShader.I index 8223706978..ad8c490c89 100644 --- a/panda/src/shader/casterShader.I +++ b/panda/src/shader/casterShader.I @@ -3,10 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Function: CasterShader::add_caster -// Access: -// Description: +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// int CasterShader::add_caster(NamedNode* node) { diff --git a/panda/src/shader/casterShader.cxx b/panda/src/shader/casterShader.cxx index c03302dc3d..36a55356a6 100644 --- a/panda/src/shader/casterShader.cxx +++ b/panda/src/shader/casterShader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "casterShader.h" diff --git a/panda/src/shader/casterShader.h b/panda/src/shader/casterShader.h index 84be543fb4..4da25ff415 100644 --- a/panda/src/shader/casterShader.h +++ b/panda/src/shader/casterShader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CASTERSHADER_H #define CASTERSHADER_H // diff --git a/panda/src/shader/config_shader.cxx b/panda/src/shader/config_shader.cxx index 32f2a4e6da..a5804f8c5d 100644 --- a/panda/src/shader/config_shader.cxx +++ b/panda/src/shader/config_shader.cxx @@ -1,6 +1,19 @@ // Filename: config_shader.cxx // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_shader.h" diff --git a/panda/src/shader/config_shader.h b/panda/src/shader/config_shader.h index 43aa99ec6d..6bb315b034 100644 --- a/panda/src/shader/config_shader.h +++ b/panda/src/shader/config_shader.h @@ -1,6 +1,19 @@ // Filename: config_shader.h // Created by: drose (19Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_SHADER_H diff --git a/panda/src/shader/outlineShader.cxx b/panda/src/shader/outlineShader.cxx index 4abaa416b6..ba19cd695f 100644 --- a/panda/src/shader/outlineShader.cxx +++ b/panda/src/shader/outlineShader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "outlineShader.h" #include @@ -43,7 +52,7 @@ OutlineShader::OutlineShader(const Colorf &color) : Shader() { } //////////////////////////////////////////////////////////////////// -// Function: OutlineShader::config +// Function: OutlineShader::config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -52,7 +61,7 @@ void OutlineShader::config(void) { } //////////////////////////////////////////////////////////////////// -// Function: OutlineShader::apply +// Function: OutlineShader::apply // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -75,7 +84,7 @@ apply(Node *node, const AllAttributesWrapper &init_state, trans.set_transition(new LightTransition(LightTransition::all_off())); // Enable line drawing - RenderModeTransition *rm = + RenderModeTransition *rm = new RenderModeTransition(RenderModeProperty::M_wireframe, 2.0); trans.set_transition(rm); @@ -84,12 +93,12 @@ apply(Node *node, const AllAttributesWrapper &init_state, // trans.set_transition(lsm); // Draw shared edges - DepthTestTransition *dta = + DepthTestTransition *dta = new DepthTestTransition(DepthTestProperty::M_less_equal); trans.set_transition(dta); // Draw back facing edges only - CullFaceTransition *cf = + CullFaceTransition *cf = new CullFaceTransition(CullFaceProperty::M_cull_counter_clockwise); trans.set_transition(cf); diff --git a/panda/src/shader/outlineShader.h b/panda/src/shader/outlineShader.h index 38ba52c87d..3dafa5d095 100644 --- a/panda/src/shader/outlineShader.h +++ b/panda/src/shader/outlineShader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef OUTILNESHADER_H #define OUTLINESHADER_H // diff --git a/panda/src/shader/planarReflector.cxx b/panda/src/shader/planarReflector.cxx index dba2fd71fe..e388fc7994 100644 --- a/panda/src/shader/planarReflector.cxx +++ b/panda/src/shader/planarReflector.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "planarReflector.h" #include "config_shader.h" @@ -45,7 +54,7 @@ TypeHandle PlanarReflector::_type_handle; // Access: // Description: //////////////////////////////////////////////////////////////////// -PlanarReflector::PlanarReflector(void) : CasterShader() +PlanarReflector::PlanarReflector(void) : CasterShader() { Colorf c(0.8f, 0.8f, 0.8f, 1.0f); init(NULL, c); @@ -80,7 +89,7 @@ PlanarReflector(const Colorf& c) : CasterShader() // Description: //////////////////////////////////////////////////////////////////// PlanarReflector:: -PlanarReflector(PlaneNode* plane_node, const Colorf& c) : CasterShader() +PlanarReflector(PlaneNode* plane_node, const Colorf& c) : CasterShader() { init(plane_node, c); } @@ -96,7 +105,7 @@ void PlanarReflector::init(PlaneNode *plane_node, const Colorf& c) plane_node = new PlaneNode; _save_color_buffer = true; - _save_depth_buffer = true; + _save_depth_buffer = true; _clip_to_plane = true; _color_buffer = NULL; @@ -109,7 +118,7 @@ void PlanarReflector::init(PlaneNode *plane_node, const Colorf& c) //////////////////////////////////////////////////////////////////// // Function: PlanarReflector::pre_apply // Access: -// Description: +// Description: //////////////////////////////////////////////////////////////////// void PlanarReflector:: pre_apply(Node *, const AllAttributesWrapper &, @@ -160,7 +169,7 @@ apply(Node *node, const AllAttributesWrapper &init_state, { // Copy the transition wrapper so we can modify it freely. AllTransitionsWrapper trans(net_trans); - + // Save the current fully-rendered scene that is in the back buffer int buffer_mask = RenderBuffer::T_stencil; if (_save_color_buffer) { @@ -172,11 +181,11 @@ apply(Node *node, const AllAttributesWrapper &init_state, ColorMaskTransition *cm = new ColorMaskTransition(0); trans.set_transition(cm); } else { - ColorMaskTransition *cm = + ColorMaskTransition *cm = new ColorMaskTransition(ColorMaskProperty::M_a); trans.set_transition(cm); } - + if (_save_depth_buffer) { gsg->copy_pixel_buffer(_depth_buffer, @@ -184,7 +193,7 @@ apply(Node *node, const AllAttributesWrapper &init_state, gsg->get_render_buffer(RenderBuffer::T_depth)); // gsg->get_render_buffer(RenderBuffer::T_back)); } - + // The scene has already been rendered so we need to stencil in an area // on the reflecting plane that is covered by the reflected objects. @@ -192,51 +201,51 @@ apply(Node *node, const AllAttributesWrapper &init_state, trans.set_transition(new LightTransition(LightTransition::all_off())); // Set the depth test to M_equal (? Or should this be M_none?) - DepthTestTransition *dta = + DepthTestTransition *dta = new DepthTestTransition(DepthTestProperty::M_equal); trans.set_transition(dta); - + // Turn off writes to the depth buffer DepthWriteTransition *dwa = new DepthWriteTransition; dwa->set_off(); trans.set_transition(dwa); - + // Enable the stencil buffer - StencilTransition *sa = + StencilTransition *sa = new StencilTransition(StencilProperty::M_not_equal, StencilProperty::A_replace); trans.set_transition(sa); - + // Disable texturing trans.set_transition(tex_off); - + // Disable blending trans.set_transition(new ColorBlendTransition(ColorBlendProperty::M_none)); - + // Clear the stencil buffer (and color buffer if we're saving it) gsg->clear(gsg->get_render_buffer(buffer_mask)); - + // Draw the reflecting object gsg->render_subgraph(&drt, node, init_state, trans); } { // Reflecting area on the plane has a stencil value of 1. We can now - // draw the reflected objects into this area. + // draw the reflected objects into this area. gsg->clear(gsg->get_render_buffer(RenderBuffer::T_depth)); - + // Copy the transition wrapper so we can modify it freely. AllTransitionsWrapper trans(net_trans); // Adjust the stencil buffer properties - StencilTransition *sa = + StencilTransition *sa = new StencilTransition(StencilProperty::M_equal, StencilProperty::A_keep); trans.set_transition(sa); // Draw back facing polys only - CullFaceTransition *cf = + CullFaceTransition *cf = new CullFaceTransition(CullFaceProperty::M_cull_counter_clockwise); trans.set_transition(cf); @@ -262,7 +271,7 @@ apply(Node *node, const AllAttributesWrapper &init_state, // Parent this caster group to the node itself, since it's already // converted to the coordinate space of the node. - PT(RenderRelation) caster_arc = + PT(RenderRelation) caster_arc = new RenderRelation(_plane_node, caster_group); LMatrix4f plane_mat = _plane_node->get_plane().get_reflection_mat(); @@ -297,17 +306,17 @@ apply(Node *node, const AllAttributesWrapper &init_state, gsg->render_subgraph(&drt, node, init_state, trans); } - + // Blend the previously rendered image with the reflected image - - if (_save_color_buffer) { + + if (_save_color_buffer) { NodeAttributes na; - - ColorBlendAttribute *cb = + + ColorBlendAttribute *cb = new ColorBlendAttribute; cb->set_mode(ColorBlendProperty::M_add); na.set_attribute(ColorBlendTransition::get_class_type(), cb); - + gsg->draw_pixel_buffer(_color_buffer, gsg->get_current_display_region(), gsg->get_render_buffer(RenderBuffer::T_back), na); } else { @@ -315,25 +324,25 @@ apply(Node *node, const AllAttributesWrapper &init_state, // Final color is reflecting obj color + (ref. obj. color * reflectivity) AllTransitionsWrapper trans(net_trans); - StencilTransition *sa = + StencilTransition *sa = new StencilTransition(StencilProperty::M_equal, StencilProperty::A_keep); trans.set_transition(sa); - DepthTestTransition *dta = + DepthTestTransition *dta = new DepthTestTransition(DepthTestProperty::M_equal); trans.set_transition(dta); - + DepthWriteTransition *dwa = new DepthWriteTransition; dwa->set_off(); trans.set_transition(dwa); - ColorBlendTransition *cb = + ColorBlendTransition *cb = new ColorBlendTransition(ColorBlendProperty::M_add); trans.set_transition(cb); gsg->render_subgraph(&drt, node, init_state, trans); - } + } if (_save_depth_buffer) { @@ -341,7 +350,7 @@ apply(Node *node, const AllAttributesWrapper &init_state, gsg->get_render_buffer(RenderBuffer::T_depth)); // gsg->get_render_buffer(RenderBuffer::T_back)); } - + // Restore the stencil buffer clear value gsg->set_stencil_clear_value(clear_stencil); diff --git a/panda/src/shader/planarReflector.h b/panda/src/shader/planarReflector.h index 63165d925c..4112722df9 100644 --- a/panda/src/shader/planarReflector.h +++ b/panda/src/shader/planarReflector.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PLANARREFLECTOR_H #define PLANARREFLECTOR_H // diff --git a/panda/src/shader/projtexShader.cxx b/panda/src/shader/projtexShader.cxx index 273973be54..08a51d727b 100644 --- a/panda/src/shader/projtexShader.cxx +++ b/panda/src/shader/projtexShader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "projtexShader.h" #include "config_shader.h" @@ -34,14 +43,14 @@ TypeHandle ProjtexShader::_type_handle; // Description: //////////////////////////////////////////////////////////////////// ProjtexShader::ProjtexShader(Texture* texture, - ColorBlendProperty::Mode mode) + ColorBlendProperty::Mode mode) : FrustumShader(), _blend(mode) { set_texture(texture); } //////////////////////////////////////////////////////////////////// -// Function: ProjtexShader::config +// Function: ProjtexShader::config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -53,7 +62,7 @@ void ProjtexShader::config(void) } //////////////////////////////////////////////////////////////////// -// Function: ProjtexShader::apply +// Function: ProjtexShader::apply // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -106,8 +115,8 @@ apply(Node *node, const AllAttributesWrapper &init_state, LMatrix4f tex_mat, proj_mat; const PerspectiveProjection *pp = DCAST(PerspectiveProjection, projection); proj_mat = pp->get_projection_mat(); - tex_mat = model_mat * proj_mat * - LMatrix4f::scale_mat(LVector3f(0.5,0.5,1)) * + tex_mat = model_mat * proj_mat * + LMatrix4f::scale_mat(LVector3f(0.5,0.5,1)) * LMatrix4f::translate_mat(LVector3f(0.5,0.5,0)); TexMatrixTransition *tm = new TexMatrixTransition; @@ -122,17 +131,17 @@ apply(Node *node, const AllAttributesWrapper &init_state, //Probably should move the brains for determing blending out to //shader transition - // Set a color blend mode that assumes this is a second pass over + // Set a color blend mode that assumes this is a second pass over // textured geometry ColorBlendTransition *cb = new ColorBlendTransition(_blend); trans.set_transition(cb); - TextureApplyTransition *ta = + TextureApplyTransition *ta = new TextureApplyTransition(TextureApplyProperty::M_decal); trans.set_transition(ta); // Set the depth test to M_equal (? Or should this be M_none?) - DepthTestTransition *dta = + DepthTestTransition *dta = new DepthTestTransition(DepthTestProperty::M_equal); trans.set_transition(dta); } diff --git a/panda/src/shader/projtexShader.h b/panda/src/shader/projtexShader.h index 2949cf84da..1c4ceb3e19 100644 --- a/panda/src/shader/projtexShader.h +++ b/panda/src/shader/projtexShader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PROJTEXSHADER_H #define PROJTEXSHADER_H // @@ -26,30 +38,30 @@ class EXPCL_SHADER ProjtexShader : public FrustumShader { public: - + ProjtexShader(Texture* texture = NULL, ColorBlendProperty::Mode mode = ColorBlendProperty::M_multiply); ~ProjtexShader() { } - + virtual void config(void); virtual void apply(Node *node, const AllAttributesWrapper &init_state, const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg); - + INLINE void set_texture(Texture* texture) { _texture = texture; make_dirty(); } INLINE Texture* get_texture(void) { return _texture; } - + protected: - + PT(Texture) _texture; ColorBlendProperty::Mode _blend; - + public: - + static TypeHandle get_class_type() { return _type_handle; } @@ -62,9 +74,9 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/shader/projtexShadower.cxx b/panda/src/shader/projtexShadower.cxx index 20752bf3d9..ade0a288d3 100644 --- a/panda/src/shader/projtexShadower.cxx +++ b/panda/src/shader/projtexShadower.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "projtexShadower.h" #include "config_shader.h" @@ -36,7 +45,7 @@ TypeHandle ProjtexShadower::_type_handle; // Access: // Description: //////////////////////////////////////////////////////////////////// -ProjtexShadower::ProjtexShadower(int size) : CasterShader() +ProjtexShadower::ProjtexShadower(int size) : CasterShader() { set_size(size); @@ -82,7 +91,7 @@ set_multipass(bool on) //////////////////////////////////////////////////////////////////// void ProjtexShadower:: pre_apply(Node *node, const AllAttributesWrapper &init_state, - const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg) + const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg) { DirectRenderTraverser drt(gsg, RenderRelation::get_class_type()); @@ -112,7 +121,7 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, // Save the current display region from the gsg Colorf clear_color = gsg->get_color_clear_value(); - + // Make sure the projtex shader has the same frustum _projtex_shader->remove_frustum(light); _projtex_shader->add_frustum(light); @@ -126,11 +135,11 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, nassertv(node != (Node *)NULL && gsg != (GraphicsStateGuardian *)NULL); // First, draw the receiving node quickly (with no rendering attributes) - // from the point of view of the light + // from the point of view of the light // Make a display region of the proper size and clear it to prepare for // rendering the shadow map - PT(DisplayRegion) disp_region = + PT(DisplayRegion) disp_region = gsg->get_window()->make_scratch_display_region(_size, _size); DisplayRegionStack old_dr = gsg->push_display_region(disp_region); @@ -162,15 +171,15 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, state.clear_attribute(TransformTransition::get_class_type()); // Render the node with the new transitions from the viewpoint of the light - + gsg->render_subgraph(&drt, node, light, state, trans); - // Now draw each of the casting objects in the shadow color using the + // Now draw each of the casting objects in the shadow color using the // depth buffer from the receiving object (this will project the shadows // onto the surface properly), and use this to generate the shadow texture - // map + // map - DepthTestTransition *dta = + DepthTestTransition *dta = new DepthTestTransition(DepthTestProperty::M_less); trans.set_transition(dta); @@ -202,7 +211,7 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, // Now render the group. gsg->render_subgraph(&drt, caster_group, light, state, trans); - + // Remove the caster group from the scene graph. This will also // delete the temporary group node (since the reference count is // zero), but not the caster objects themselves. diff --git a/panda/src/shader/projtexShadower.h b/panda/src/shader/projtexShadower.h index 0fce7b3318..8c6b40241b 100644 --- a/panda/src/shader/projtexShadower.h +++ b/panda/src/shader/projtexShadower.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PROJTEXSHADOWER_H #define PROJTEXSHADOWER_H // @@ -29,33 +41,33 @@ class EXPCL_SHADER ProjtexShadower : public CasterShader { public: - + ProjtexShadower(int size = 256); - + virtual void pre_apply(Node *node, const AllAttributesWrapper &init_state, const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg); virtual void apply(Node *node, const AllAttributesWrapper &init_state, const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg); - + // MPG - should we make this check for powers of 2? INLINE void set_size(int size) { _size = size; } INLINE int get_size(void) { return _size; } - + //Override base class shader's set_priority to allow - //us to set the priority of the contained projtex_shader at + //us to set the priority of the contained projtex_shader at //the same time virtual void set_priority(int priority); virtual void set_multipass(bool on); - + protected: - + PT(ProjtexShader) _projtex_shader; int _size; - + public: - + static TypeHandle get_class_type() { return _type_handle; } @@ -68,9 +80,9 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/shader/shader.I b/panda/src/shader/shader.I index 32303a50ea..ab0723f8c8 100644 --- a/panda/src/shader/shader.I +++ b/panda/src/shader/shader.I @@ -3,10 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Function: Shader::get_viz -// Access: -// Description: +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// INLINE Shader:: Visualize* Shader::get_viz(void) { diff --git a/panda/src/shader/shader.cxx b/panda/src/shader/shader.cxx index 3d068bc862..ddd785aae2 100644 --- a/panda/src/shader/shader.cxx +++ b/panda/src/shader/shader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "shader.h" @@ -19,10 +28,10 @@ Shader::Visualize* Shader::_viz = (Shader::Visualize*)0L; //////////////////////////////////////////////////////////////////// // Function: Shader::Constructor // Access: Protected -// Description: +// Description: //////////////////////////////////////////////////////////////////// Shader:: -Shader() : Configurable(), _priority(0) { +Shader() : Configurable(), _priority(0) { MemoryUsage::update_type(this, this); } @@ -49,12 +58,12 @@ void Shader::Visualize::Flush(void) //////////////////////////////////////////////////////////////////// // Function: Shader::apply // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Shader:: -apply(Node *, const AllAttributesWrapper &, - const AllTransitionsWrapper &, - GraphicsStateGuardian *) +apply(Node *, const AllAttributesWrapper &, + const AllTransitionsWrapper &, + GraphicsStateGuardian *) { if (is_dirty()) config(); } @@ -62,12 +71,12 @@ apply(Node *, const AllAttributesWrapper &, //////////////////////////////////////////////////////////////////// // Function: Shader::pre_apply // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Shader:: -pre_apply(Node *, const AllAttributesWrapper &, - const AllTransitionsWrapper &, - GraphicsStateGuardian *) +pre_apply(Node *, const AllAttributesWrapper &, + const AllTransitionsWrapper &, + GraphicsStateGuardian *) { } diff --git a/panda/src/shader/shader.h b/panda/src/shader/shader.h index b03ef5ab34..f015b83579 100644 --- a/panda/src/shader/shader.h +++ b/panda/src/shader/shader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SHADER_H #define SHADER_H // @@ -31,23 +43,23 @@ class EXPCL_SHADER Shader : public ReferenceCount, public Configurable { protected: - + Shader(); int _priority; bool _multipass_on; public: - + virtual ~Shader(void) { } - virtual void pre_apply(Node *, const AllAttributesWrapper &, - const AllTransitionsWrapper &, + virtual void pre_apply(Node *, const AllAttributesWrapper &, + const AllTransitionsWrapper &, GraphicsStateGuardian *); - - - virtual void apply(Node *, const AllAttributesWrapper &, - const AllTransitionsWrapper &, + + + virtual void apply(Node *, const AllAttributesWrapper &, + const AllTransitionsWrapper &, GraphicsStateGuardian *); virtual void set_priority(int priority); @@ -55,7 +67,7 @@ public: virtual void set_multipass(bool on); public: - + // This is used to visualize partial results, for debugging (and demos) class EXPCL_SHADER Visualize { public: @@ -65,10 +77,10 @@ public: virtual void DisplayPixelBuffer(PT(PixelBuffer)&, Shader*) = 0; virtual void Flush(void) = 0; }; - + static INLINE Visualize* get_viz(void); static INLINE void set_viz(Visualize*); - + static TypeHandle get_class_type() { return _type_handle; } @@ -83,11 +95,11 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + static Visualize* _viz; - + private: - + static TypeHandle _type_handle; }; @@ -100,25 +112,25 @@ private: class EXPCL_SHADER FrustumShader : public Shader { protected: - + FrustumShader(void) : Shader() { } - + public: - + virtual ~FrustumShader(void) { } - + INLINE int get_num_frusta(void) const { return _frusta.size(); } INLINE int add_frustum(ProjectionNode* frust); INLINE int remove_frustum(ProjectionNode* frust); - + typedef vector ProjectionVector; - + protected: - + ProjectionVector _frusta; - + public: - + static TypeHandle get_class_type() { return _type_handle; } @@ -130,9 +142,9 @@ public: virtual TypeHandle get_type() const { return get_class_type(); } - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/shader/shaderTransition.I b/panda/src/shader/shaderTransition.I index c0d4f31af8..3e4e8a1c7f 100644 --- a/panda/src/shader/shaderTransition.I +++ b/panda/src/shader/shaderTransition.I @@ -1,6 +1,19 @@ // Filename: shaderTransition.I // Created by: drose (24Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -8,7 +21,7 @@ //////////////////////////////////////////////////////////////////// // Function: ShaderTransition::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE ShaderTransition:: ShaderTransition() { @@ -21,7 +34,7 @@ ShaderTransition() { // shader to an existing ShaderTransition, or create a // new ShaderTransition if necessary. //////////////////////////////////////////////////////////////////// -INLINE bool +INLINE bool set_shader(NodeRelation *arc, Shader *shader) { ShaderTransition *st; if (get_transition_into(st, arc)) { @@ -41,7 +54,7 @@ set_shader(NodeRelation *arc, Shader *shader) { // shader from the existing ShaderTransition, if there // is one. //////////////////////////////////////////////////////////////////// -INLINE bool +INLINE bool clear_shader(NodeRelation *arc, Shader *shader) { ShaderTransition *st; if (get_transition_into(st, arc)) { @@ -57,7 +70,7 @@ clear_shader(NodeRelation *arc, Shader *shader) { // exists a ShaderTransition and it contains the // indicated shader, false otherwise. //////////////////////////////////////////////////////////////////// -INLINE bool +INLINE bool has_shader(const NodeRelation *arc, Shader *shader) { const ShaderTransition *st; if (get_transition_into(st, arc)) { diff --git a/panda/src/shader/shaderTransition.cxx b/panda/src/shader/shaderTransition.cxx index 8f7e64a108..94fe3155dd 100644 --- a/panda/src/shader/shaderTransition.cxx +++ b/panda/src/shader/shaderTransition.cxx @@ -1,6 +1,19 @@ // Filename: shaderTransition.cxx // Created by: mike (06Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "shaderTransition.h" @@ -67,7 +80,7 @@ set_shader_always_blend(TypeHandle shader) { //////////////////////////////////////////////////////////////////// // Function: ShaderTransition::clear // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void ShaderTransition:: clear() { @@ -77,7 +90,7 @@ clear() { //////////////////////////////////////////////////////////////////// // Function: ShaderTransition::is_empty // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// bool ShaderTransition:: is_empty() const { @@ -89,7 +102,7 @@ is_empty() const { // Access: Public // Description: Inserts the shader into the list, based // on the set order of the list. If there is no order set for -// the shader, it is put at the end of the list. +// the shader, it is put at the end of the list. //////////////////////////////////////////////////////////////////// void ShaderTransition:: insert(Shader *shader) { @@ -199,7 +212,7 @@ has_shader(Shader *shader) const { //////////////////////////////////////////////////////////////////// // Function: ShaderTransition::begin // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ShaderTransition::const_iterator ShaderTransition:: begin() const { @@ -209,7 +222,7 @@ begin() const { //////////////////////////////////////////////////////////////////// // Function: ShaderTransition::end // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ShaderTransition::const_iterator ShaderTransition:: end() const { @@ -238,7 +251,7 @@ must_blend() } //////////////////////////////////////////////////////////////////// -// Function: ShaderTransition::sub_render +// Function: ShaderTransition::sub_render // Access: Public, Virtual // Description: This is called by the RenderTraverser to tell the // shader to do its thing. @@ -269,7 +282,7 @@ sub_render(NodeRelation *arc, const AllAttributesWrapper &attrib, // thing and then when the scene is actually rendered, it will blow // those artifacts away. Those shaders will store their work to be // actually applied later when we call apply. - for (si = begin(); si != end(); ++si) + for (si = begin(); si != end(); ++si) { // We'll go ahead and tell each shader in turn if multipass is // needed or not now. @@ -284,9 +297,9 @@ sub_render(NodeRelation *arc, const AllAttributesWrapper &attrib, DirectRenderTraverser drt(gsg, RenderRelation::get_class_type()); gsg->render_subgraph(&drt, node, node_attrib, AllTransitionsWrapper()); } - + // Now apply each shader in turn. - for (si = begin(); si != end(); ++si) + for (si = begin(); si != end(); ++si) { (*si)->apply(node, node_attrib, AllTransitionsWrapper(), gsg); } diff --git a/panda/src/shader/shaderTransition.h b/panda/src/shader/shaderTransition.h index fb28190f24..26724fd8e5 100644 --- a/panda/src/shader/shaderTransition.h +++ b/panda/src/shader/shaderTransition.h @@ -2,6 +2,19 @@ // Created by: mike (19Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SHADERTRANSITION_H #define SHADERTRANSITION_H @@ -10,7 +23,7 @@ #include "shader.h" -#include +#include #include #include @@ -64,7 +77,7 @@ public: private: bool must_blend(); -public: +public: virtual NodeTransition *make_copy() const; virtual bool sub_render(NodeRelation *arc, diff --git a/panda/src/shader/spheretexHighlighter.cxx b/panda/src/shader/spheretexHighlighter.cxx index 256f5d7e07..f4636014a7 100644 --- a/panda/src/shader/spheretexHighlighter.cxx +++ b/panda/src/shader/spheretexHighlighter.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "spheretexHighlighter.h" #include "config_shader.h" @@ -29,7 +38,7 @@ TypeHandle SpheretexHighlighter::_type_handle; // Access: // Description: //////////////////////////////////////////////////////////////////// -SpheretexHighlighter::SpheretexHighlighter(int size) : FrustumShader() +SpheretexHighlighter::SpheretexHighlighter(int size) : FrustumShader() { set_size(size); @@ -79,7 +88,7 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, { if (get_num_frusta() == 0) { shader_cat.error() - << "SpheretexHighlighter::config() - no lights in frusta list" + << "SpheretexHighlighter::config() - no lights in frusta list" << endl; return; } else if (get_num_frusta() > 1) { @@ -89,7 +98,7 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, } if (_frusta[0]->get_type() != Spotlight::get_class_type()) { shader_cat.error() - << "SpheretexHighlighter::config() - only works for Spotlights" + << "SpheretexHighlighter::config() - only works for Spotlights" << " so far - we'll add point lights later" << endl; return; } @@ -99,10 +108,10 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, // Figure out how shiny the highlighted object is float shininess = 0.0; - const NodeAttribute *mat_attrib = + const NodeAttribute *mat_attrib = init_state.get_attribute(MaterialTransition::get_class_type()); if (mat_attrib != (NodeAttribute *)NULL) { - const Material *material = + const Material *material = DCAST(MaterialAttribute, mat_attrib)->get_material(); shininess = material->get_shininess(); } @@ -151,7 +160,7 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, // light (even slightly), no reflection will be seen if (intensity > 0.) { intensity = pow(intensity, shininess); - color[0] = color[1] = color[2] = (uchar)(intensity * 255.); + color[0] = color[1] = color[2] = (uchar)(intensity * 255.); } } } diff --git a/panda/src/shader/spheretexHighlighter.h b/panda/src/shader/spheretexHighlighter.h index 523c187b48..70073b49f5 100644 --- a/panda/src/shader/spheretexHighlighter.h +++ b/panda/src/shader/spheretexHighlighter.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPHERETEXHIGHLIGHTER_H #define SPHERETEXHIGHLIGHTER_H // @@ -30,30 +42,30 @@ class EXPCL_SHADER SpheretexHighlighter : public FrustumShader public: SpheretexHighlighter(int size = 128); - + virtual void pre_apply(Node *node, const AllAttributesWrapper &init_state, const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg); virtual void apply(Node *node, const AllAttributesWrapper &init_state, const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg); - + // MPG - should we make this check for powers of 2? INLINE void set_size(int size) { _size = size; } INLINE int get_size(void) { return _size; } //Override base class shader's set_priority to allow - //us to set the priority of the contained projtex_shader at + //us to set the priority of the contained projtex_shader at //the same time virtual void set_priority(int priority); virtual void set_multipass(bool on); - + protected: - + SpheretexShader _spheretex_shader; int _size; - + public: - + static TypeHandle get_class_type() { return _type_handle; } @@ -66,9 +78,9 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/shader/spheretexReflector.cxx b/panda/src/shader/spheretexReflector.cxx index 098289b15c..c41ef366d9 100644 --- a/panda/src/shader/spheretexReflector.cxx +++ b/panda/src/shader/spheretexReflector.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "spheretexReflector.h" #include "config_shader.h" @@ -34,7 +43,7 @@ TypeHandle SpheretexReflector::_type_handle; // Access: // Description: //////////////////////////////////////////////////////////////////// -SpheretexReflector::SpheretexReflector(int size) : CasterShader() +SpheretexReflector::SpheretexReflector(int size) : CasterShader() { set_size(size); _is_reflector = true; @@ -93,7 +102,7 @@ set_multipass(bool on) //////////////////////////////////////////////////////////////////// void SpheretexReflector:: pre_apply(Node *node, const AllAttributesWrapper &init_state, - const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg) + const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg) { if (get_num_casters() == 0) { shader_cat.error() @@ -163,7 +172,7 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, // Get camera pos in the coordinate space of the reflecting object LVector3f camera_pos = get_rel_pos(camera, node); LVector3f camera_up = get_rel_up(camera, node); - if (_is_reflector == true) + if (_is_reflector == true) { // Take the picture looking toward the camera look_at(r_mat, camera_pos, camera_up, gsg->get_coordinate_system()); @@ -173,7 +182,7 @@ pre_apply(Node *node, const AllAttributesWrapper &init_state, // And the vertex order for front facing polygons to compensate // for the above flip. - CullFaceTransition *cf = + CullFaceTransition *cf = new CullFaceTransition(CullFaceProperty::M_cull_counter_clockwise); trans.set_transition(cf); } diff --git a/panda/src/shader/spheretexReflector.h b/panda/src/shader/spheretexReflector.h index 8375b3a0c6..cf7f767511 100644 --- a/panda/src/shader/spheretexReflector.h +++ b/panda/src/shader/spheretexReflector.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPHERETEXREFLECTOR_H #define SPHERETEXREFLECTOR_H // @@ -26,46 +38,46 @@ class EXPCL_SHADER SpheretexReflector : public CasterShader { public: - + SpheretexReflector(int size = 256); ~SpheretexReflector(void); virtual void pre_apply(Node *node, const AllAttributesWrapper &init_state, const AllTransitionsWrapper &net_trans, - GraphicsStateGuardian *gsg); + GraphicsStateGuardian *gsg); virtual void apply(Node *node, const AllAttributesWrapper &init_state, const AllTransitionsWrapper &net_trans, GraphicsStateGuardian *gsg); - + // MPG - should we make this check for powers of 2? INLINE void set_size(int size) { _size = size; } INLINE int get_size(void) const { return _size; } - + INLINE bool is_reflector(void) const { return _is_reflector; } INLINE void make_reflector(void) { _is_reflector = true; } INLINE void make_refractor(void) { _is_reflector = false; } - + INLINE void set_near(float fnear) { _fnear = fnear; } INLINE float get_near(void) const { return _fnear; } INLINE void set_far(float ffar) { _ffar = ffar; } INLINE float get_far(void) const { return _ffar; } - + //Override base class shader's set_priority to allow - //us to set the priority of the contained projtex_shader at + //us to set the priority of the contained projtex_shader at //the same time virtual void set_priority(int priority); virtual void set_multipass(bool on); - + protected: - + SpheretexShader _spheretex_shader; int _size; bool _is_reflector; float _fnear; float _ffar; - + public: - + static TypeHandle get_class_type() { return _type_handle; } @@ -78,9 +90,9 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/shader/spheretexShader.cxx b/panda/src/shader/spheretexShader.cxx index 6fae4efade..293b9db599 100644 --- a/panda/src/shader/spheretexShader.cxx +++ b/panda/src/shader/spheretexShader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "spheretexShader.h" #include "config_shader.h" @@ -41,7 +50,7 @@ SpheretexShader::SpheretexShader(Texture* texture) : Shader() } //////////////////////////////////////////////////////////////////// -// Function: SpheretexShader::config +// Function: SpheretexShader::config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -57,7 +66,7 @@ void SpheretexShader::config(void) } //////////////////////////////////////////////////////////////////// -// Function: SpheretexShader::apply +// Function: SpheretexShader::apply // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -81,7 +90,7 @@ apply(Node *node, const AllAttributesWrapper &init_state, t->set_on(_texture); t->set_priority(_priority); trans.set_transition(t); - + if (_viz != (Shader::Visualize*)0L) _viz->DisplayTexture(_texture, this); @@ -95,18 +104,18 @@ apply(Node *node, const AllAttributesWrapper &init_state, // Do some extra work if we're doing the 2-pass version (e.g. the // object we are shading is textured) if (_multipass_on) { - // Set a color blend mode that assumes this is a second pass over + // Set a color blend mode that assumes this is a second pass over // textured geometry - ColorBlendTransition *cb = + ColorBlendTransition *cb = new ColorBlendTransition(_blend_mode); trans.set_transition(cb); - TextureApplyTransition *ta = + TextureApplyTransition *ta = new TextureApplyTransition(TextureApplyProperty::M_decal); trans.set_transition(ta); // Set the depth test to M_equal (? Or should this be M_none?) - DepthTestTransition *dta = + DepthTestTransition *dta = new DepthTestTransition(DepthTestProperty::M_equal); trans.set_transition(dta); } diff --git a/panda/src/shader/spheretexShader.h b/panda/src/shader/spheretexShader.h index 869166437f..29998b6fa0 100644 --- a/panda/src/shader/spheretexShader.h +++ b/panda/src/shader/spheretexShader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPHERETEXSHADER_H #define SPHERETEXSHADER_H // @@ -63,7 +75,7 @@ class EXPCL_SHADER SpheretexShader : public Shader return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/shader/spotlightShader.cxx b/panda/src/shader/spotlightShader.cxx index b10a63495e..badcc88abd 100644 --- a/panda/src/shader/spotlightShader.cxx +++ b/panda/src/shader/spotlightShader.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "spotlightShader.h" #include "config_shader.h" @@ -34,7 +43,7 @@ SpotlightShader::SpotlightShader(int size, float radius) : ProjtexShader(NULL, C } //////////////////////////////////////////////////////////////////// -// Function: SpotlightShader::config +// Function: SpotlightShader::config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -57,7 +66,7 @@ void SpotlightShader::config(void) return; } Spotlight* spotlight = (Spotlight *)_frusta[0]; - + spotlight->make_image(_texture, _radius); } diff --git a/panda/src/shader/spotlightShader.h b/panda/src/shader/spotlightShader.h index 74e9f86344..4434d07170 100644 --- a/panda/src/shader/spotlightShader.h +++ b/panda/src/shader/spotlightShader.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef SPOTLIGHTSHADER_H #define SPOTLIGHTSHADER_H // @@ -25,13 +37,13 @@ class EXPCL_SHADER SpotlightShader : public ProjtexShader { public: SpotlightShader(int size = 256, float radius = 0.7); - + virtual void config(void); // SpotlightShader uses ProjtexShader::apply() protected: float _radius; - + public: static TypeHandle get_class_type() { @@ -46,9 +58,9 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: - + static TypeHandle _type_handle; }; diff --git a/panda/src/switchnode/LODNode.I b/panda/src/switchnode/LODNode.I index 51b8495293..a29040d890 100644 --- a/panda/src/switchnode/LODNode.I +++ b/panda/src/switchnode/LODNode.I @@ -1,10 +1,19 @@ // Filename: LODNode.I // Created by: mike (27Sep99) -// -//////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////// -// Includes +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -13,7 +22,7 @@ //////////////////////////////////////////////////////////////////// // Function: LODNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LODNode:: LODNode(const string &name) : SwitchNodeOne(name) { @@ -22,10 +31,10 @@ LODNode(const string &name) : SwitchNodeOne(name) { //////////////////////////////////////////////////////////////////// // Function: LODNode::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LODNode:: -LODNode(const LODNode ©) : +LODNode(const LODNode ©) : SwitchNodeOne(copy), _lod(copy._lod) { diff --git a/panda/src/switchnode/LODNode.cxx b/panda/src/switchnode/LODNode.cxx index e8ffc7b297..939e6f54ec 100644 --- a/panda/src/switchnode/LODNode.cxx +++ b/panda/src/switchnode/LODNode.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "LODNode.h" #include "projectionNode.h" @@ -53,7 +62,7 @@ xform(const LMatrix4f &mat) { //////////////////////////////////////////////////////////////////// // Function: LODNode::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void LODNode:: output(ostream &out) const { @@ -92,7 +101,7 @@ compute_switch(RenderTraverser *trav) { } else { LOD_pos = _lod._center; } - + // Determine which child to traverse int index = _lod.compute_child(camera_pos, LOD_pos); select_child(index); diff --git a/panda/src/switchnode/LODNode.h b/panda/src/switchnode/LODNode.h index 848c5d306f..b5722dea58 100644 --- a/panda/src/switchnode/LODNode.h +++ b/panda/src/switchnode/LODNode.h @@ -2,6 +2,19 @@ // Created by: mike (09Jan97) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef LODNODE_H #define LODNODE_H @@ -46,7 +59,7 @@ public: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); static TypedWritable *make_LODNode(const FactoryParams ¶ms); diff --git a/panda/src/switchnode/config_switchnode.cxx b/panda/src/switchnode/config_switchnode.cxx index ae58dcbd21..20ab132780 100644 --- a/panda/src/switchnode/config_switchnode.cxx +++ b/panda/src/switchnode/config_switchnode.cxx @@ -1,6 +1,19 @@ // Filename: config_switchnode.cxx // Created by: drose (19Jan00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_switchnode.h" diff --git a/panda/src/switchnode/config_switchnode.h b/panda/src/switchnode/config_switchnode.h index c522b97ba1..7bc90d434c 100644 --- a/panda/src/switchnode/config_switchnode.h +++ b/panda/src/switchnode/config_switchnode.h @@ -2,6 +2,19 @@ // Created by: drose (19Jan00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef CONFIG_SWITCHNODE_H #define CONFIG_SWITCHNODE_H diff --git a/panda/src/switchnode/sequenceNode.cxx b/panda/src/switchnode/sequenceNode.cxx index c63c05f0c2..57647c1929 100644 --- a/panda/src/switchnode/sequenceNode.cxx +++ b/panda/src/switchnode/sequenceNode.cxx @@ -1,6 +1,19 @@ -// Filename: sequenceNode.h +// Filename: sequenceNode.cxx // Created by: jason (18Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// @@ -26,7 +39,7 @@ TypeHandle SequenceNode::_type_handle; //////////////////////////////////////////////////////////////////// // Function: SequenceNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// SequenceNode:: SequenceNode(const string &initial_name) : @@ -37,7 +50,7 @@ SequenceNode(const string &initial_name) : //////////////////////////////////////////////////////////////////// // Function: SequenceNode::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// SequenceNode:: SequenceNode(float switch_time, const string &initial_name) : @@ -48,7 +61,7 @@ SequenceNode(float switch_time, const string &initial_name) : //////////////////////////////////////////////////////////////////// // Function: SequenceNode::set_switch_time // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void SequenceNode:: set_switch_time(float switch_time) diff --git a/panda/src/switchnode/sequenceNode.h b/panda/src/switchnode/sequenceNode.h index 7cda0b3aa3..56dd564933 100644 --- a/panda/src/switchnode/sequenceNode.h +++ b/panda/src/switchnode/sequenceNode.h @@ -1,6 +1,19 @@ // Filename: sequenceNode.h // Created by: jason (18Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SEQUENCENODE_H @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Class : SequenceNode -// Description : A node that implements the ability to switch out +// Description : A node that implements the ability to switch out // what node is rendered based on time //////////////////////////////////////////////////////////////////// @@ -33,7 +46,7 @@ public: public: static void register_with_read_factory(); - virtual void write_datagram(BamWriter *manager, Datagram &me); + virtual void write_datagram(BamWriter *manager, Datagram &me); static TypedWritable *make_SequenceNode(const FactoryParams ¶ms); diff --git a/panda/src/switchnode/switchNodeOne.I b/panda/src/switchnode/switchNodeOne.I index f08d83c018..ae7e4aadfe 100644 --- a/panda/src/switchnode/switchNodeOne.I +++ b/panda/src/switchnode/switchNodeOne.I @@ -1,25 +1,38 @@ // Filename: switchNodeOne.I // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SwitchNodeOne::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SwitchNodeOne:: -SwitchNodeOne(const string &name) : - SwitchNode(name) -{ +SwitchNodeOne(const string &name) : + SwitchNode(name) +{ _selected_child_index = 0; } //////////////////////////////////////////////////////////////////// // Function: SwitchNodeOne::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE SwitchNodeOne:: SwitchNodeOne(const SwitchNodeOne ©) : @@ -31,7 +44,7 @@ SwitchNodeOne(const SwitchNodeOne ©) : //////////////////////////////////////////////////////////////////// // Function: SwitchNodeOne::Copy Assignment Operator // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void SwitchNodeOne:: operator = (const SwitchNodeOne ©) { diff --git a/panda/src/switchnode/switchNodeOne.cxx b/panda/src/switchnode/switchNodeOne.cxx index 5ae9a0488a..656a2f7124 100644 --- a/panda/src/switchnode/switchNodeOne.cxx +++ b/panda/src/switchnode/switchNodeOne.cxx @@ -1,6 +1,19 @@ // Filename: switchNodeOne.cxx // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "switchNodeOne.h" diff --git a/panda/src/switchnode/switchNodeOne.h b/panda/src/switchnode/switchNodeOne.h index 35d9d973bf..97bd6ac722 100644 --- a/panda/src/switchnode/switchNodeOne.h +++ b/panda/src/switchnode/switchNodeOne.h @@ -1,6 +1,19 @@ // Filename: switchNodeOne.h // Created by: drose (15May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef SWITCHNODEONE_H diff --git a/panda/src/switchnode/test_sequences.cxx b/panda/src/switchnode/test_sequences.cxx index 851a4cfc1f..82164e17e1 100644 --- a/panda/src/switchnode/test_sequences.cxx +++ b/panda/src/switchnode/test_sequences.cxx @@ -1,4 +1,20 @@ -//Nodes +// Filename: test_sequences.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include @@ -44,7 +60,7 @@ extern PT(GraphicsWindow) main_win; // Description: Set event handlers for the various keys needed, and // do any initialization necessary //////////////////////////////////////////////////////////////////// -void keys(EventHandler &eh) +void keys(EventHandler &eh) { PTA_Vertexf c1, c2, c3, c4, c5, c6; GeomSphere *s1, *s2, *s3, *s4, *s5, *s6; @@ -104,15 +120,15 @@ void keys(EventHandler &eh) PT_NamedNode sn = DCAST(NamedNode, new SequenceNode(1)); - new RenderRelation(render, sn); + new RenderRelation(render, sn); - new RenderRelation(sn, n1); - new RenderRelation(sn, n2); - new RenderRelation(sn, n3); - new RenderRelation(sn, n4); - new RenderRelation(sn, n5); + new RenderRelation(sn, n1); + new RenderRelation(sn, n2); + new RenderRelation(sn, n3); + new RenderRelation(sn, n4); + new RenderRelation(sn, n5); new RenderRelation(sn, n6); - + remove_arc(first_arc); } diff --git a/panda/src/testbed/chat_test.cxx b/panda/src/testbed/chat_test.cxx index 34ef48a9ec..e616ae4d19 100644 --- a/panda/src/testbed/chat_test.cxx +++ b/panda/src/testbed/chat_test.cxx @@ -1,3 +1,21 @@ +// Filename: chat_test.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include @@ -7,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -26,7 +44,7 @@ void event_enter(CPT_Event) { if (!in_chat_mode) { nout << "Enter chat mode" << endl; chat_input->reset(); - new DataRelation(mak, chat_input); + new DataRelation(mak, chat_input); in_chat_mode = true; } } @@ -49,7 +67,7 @@ void chat_keys(EventHandler& eh) { eh.add_hook("chat_exit", event_chat_exit); eh.add_hook("chat_overflow", event_chat_overflow); - PT_Node font = loader.load_sync("ttf-comic"); + PT_Node font = loader.load_sync("ttf-comic"); // Create the input text node input_text_node = new TextNode("input_text_node"); diff --git a/panda/src/testbed/deadrec_rec.cxx b/panda/src/testbed/deadrec_rec.cxx index cf51b0f3a6..990595e8a8 100644 --- a/panda/src/testbed/deadrec_rec.cxx +++ b/panda/src/testbed/deadrec_rec.cxx @@ -1,6 +1,19 @@ // Filename: deadrec_rec.cxx // Created by: cary (15Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "framework.h" diff --git a/panda/src/testbed/deadrec_send.cxx b/panda/src/testbed/deadrec_send.cxx index 60e1a1e3d3..0510a0faf0 100644 --- a/panda/src/testbed/deadrec_send.cxx +++ b/panda/src/testbed/deadrec_send.cxx @@ -1,6 +1,19 @@ // Filename: deadrec_send.cxx // Created by: cary (15Nov00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "framework.h" diff --git a/panda/src/testbed/demo.cxx b/panda/src/testbed/demo.cxx index 845af40797..be68abd0af 100644 --- a/panda/src/testbed/demo.cxx +++ b/panda/src/testbed/demo.cxx @@ -1,3 +1,21 @@ +// Filename: demo.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include "framework.h" #include @@ -86,7 +104,7 @@ RenderRelation *flare_arc = (RenderRelation *)NULL; /* -void +void setup_panda2d() { static bool already_setup = false; if (already_setup) { @@ -130,7 +148,7 @@ setup_panda2d() { // Put some interesting things in the 2-d scene graph. - PT_Node font = loader.load_sync("ttf-comic"); + PT_Node font = loader.load_sync("ttf-comic"); if (font != (NamedNode *)NULL) { label2d = new TextNode("label2d"); @@ -150,7 +168,7 @@ setup_panda2d() { label2d->set_text_color(0.2, 0.5, 1.0, 1.0); label2d->set_text("Now presenting Panda 2-D!"); - MouseWatcherRegion *region = + MouseWatcherRegion *region = new MouseWatcherRegion("label2d", label2d->get_card_transformed()); region->set_suppress_below(true); mouse_watcher->add_region(region); @@ -224,7 +242,7 @@ set_highlight() { if (selected_node.has_arcs()) { nout << "Bounding volume of arc is " << *selected_node.get_bounds() << "\n"; - + nout << "Transitions on arc:\n"; selected_node.arc()->write_transitions(nout, 2); selected_node.show_bounds(); @@ -244,7 +262,7 @@ event_up(CPT_Event) { static void event_down(CPT_Event) { - if (!selected_node.is_empty() && + if (!selected_node.is_empty() && selected_node.get_num_children() != 0) { clear_highlight(); selected_node = selected_node.get_child(0); @@ -339,7 +357,7 @@ event_B(CPT_Event event) { // recompute the volume. selected_node.ls(); selected_node.analyze(); - + if (selected_node.has_arcs()) { selected_node.arc()->force_bound_stale(); } @@ -353,13 +371,13 @@ enable_highlight() { // Set up the funny rendering attributes on the highlighted // geometry. - RenderModeTransition *rmt = + RenderModeTransition *rmt = new RenderModeTransition(RenderModeProperty::M_wireframe); - ColorTransition *ct = + ColorTransition *ct = new ColorTransition(1.0, 0.0, 0.0, 1.0); CullFaceTransition *cft = new CullFaceTransition(CullFaceProperty::M_cull_none); - TextureTransition *tt = + TextureTransition *tt = new TextureTransition; LightTransition *lt = new LightTransition; @@ -482,7 +500,7 @@ event_L(CPT_Event) { Texture *f4 = TexturePool::load_texture("Flare4.bw"); Texture *f5 = TexturePool::load_texture("Flare5.bw"); Texture *f6 = TexturePool::load_texture("Flare6.bw"); - + LensFlareNode *flare = new LensFlareNode(); PTA_float scales, offsets, angles; @@ -526,11 +544,11 @@ event_L(CPT_Event) { ColorBlendTransition *cb = new ColorBlendTransition(ColorBlendProperty::M_add); flare_arc->set_transition(cb); - TextureApplyTransition *ta = + TextureApplyTransition *ta = new TextureApplyTransition(TextureApplyProperty::M_decal); flare_arc->set_transition(ta); - DepthTestTransition *dta = + DepthTestTransition *dta = new DepthTestTransition(DepthTestProperty::M_none); flare_arc->set_transition(dta); } diff --git a/panda/src/testbed/downloader_test.cxx b/panda/src/testbed/downloader_test.cxx index 0cd3c3b846..c1b6c94951 100644 --- a/panda/src/testbed/downloader_test.cxx +++ b/panda/src/testbed/downloader_test.cxx @@ -1,3 +1,21 @@ +// Filename: downloader_test.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include diff --git a/panda/src/testbed/gui_demo.cxx b/panda/src/testbed/gui_demo.cxx index d1cdec870c..4c3d4bac96 100644 --- a/panda/src/testbed/gui_demo.cxx +++ b/panda/src/testbed/gui_demo.cxx @@ -1,3 +1,21 @@ +// Filename: gui_demo.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include "framework.h" #include diff --git a/panda/src/testbed/herc.cxx b/panda/src/testbed/herc.cxx index cf18090bdf..984e26881d 100644 --- a/panda/src/testbed/herc.cxx +++ b/panda/src/testbed/herc.cxx @@ -1,3 +1,21 @@ +// Filename: herc.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include @@ -112,7 +130,7 @@ void herc_overrides_func(ChanCfgOverrides &override, std::string&) { void herc_idle() { static const double walk_speed = 4.0; // feet per second - + if (follow_ball) { LPoint3f bp = get_rel_pos(ball, herc); LVector2f bv2(bp[0], bp[1]); @@ -152,7 +170,7 @@ void event_p(CPT_Event) { clear_shader(room_arc, proj_shader); clear_shader(herc_arc, proj_shader); clear_shader(ball_arc, proj_shader); - + set_alt_trackball(NULL); remove_child(tex_proj, proj_geom_node, RenderRelation::get_class_type()); @@ -312,15 +330,15 @@ void herc_keys(EventHandler &eh) { eh.add_hook("r", event_r); // Planar Reflector eh.add_hook("z", event_z); // Move ball eh.add_hook("Z", event_Z); // Follow ball - eh.add_hook("o", event_o); // Outlining + eh.add_hook("o", event_o); // Outlining //========================================================================== -// Models +// Models //========================================================================== // Load herc PT_NamedNode herc_model = loader.load_sync("herc-6000.egg"); PT_NamedNode herc_anim = loader.load_sync("HB_1_HE1.egg"); - assert(herc_model != (NamedNode *)NULL && + assert(herc_model != (NamedNode *)NULL && herc_anim != (NamedNode *)NULL); PT_NamedNode herc_parent = new NamedNode("herc_parent"); new RenderRelation(herc_parent, herc_model); @@ -353,7 +371,7 @@ void herc_keys(EventHandler &eh) { // Control the ball using a PlanarSlider tform. ball_slider = new PlanarSlider("ball_slider"); - ball_slider->set_transform(LMatrix4f::translate_mat(0.0, 0.0, 1.0) * + ball_slider->set_transform(LMatrix4f::translate_mat(0.0, 0.0, 1.0) * LMatrix4f::scale_mat(7.0, -7.0, 1.0)); ball_slider->set_mouse_pos(LPoint2f(4.0 / 7.0, 2.0 / -7.0)); Transform2SG *slider2ball = new Transform2SG("slider2ball"); @@ -412,7 +430,7 @@ void herc_keys(EventHandler &eh) { proj_shader->add_frustum(tex_proj); // Create a wireframe representation of the texture projector frustum - GeomLine* proj_geom = + GeomLine* proj_geom = (GeomLine *)tex_proj->get_projection()->make_geometry(); proj_geom_node = new GeomNode("proj_geometry"); proj_geom_node->add_geom(proj_geom); @@ -421,7 +439,7 @@ void herc_keys(EventHandler &eh) { //========================================================================== // Projected Texture Spotlight Shader //========================================================================== - tex_proj_spot = new Spotlight("tex_proj_spotlight"); + tex_proj_spot = new Spotlight("tex_proj_spotlight"); spot_arc = new RenderRelation(render, tex_proj_spot, 10); // Create a trackball to spin this around. @@ -450,7 +468,7 @@ void herc_keys(EventHandler &eh) { //========================================================================== -// Projected Texture Shadower +// Projected Texture Shadower //========================================================================== proj_shadow = new ProjtexShadower; proj_shadow->add_frustum(tex_proj_spot); @@ -460,20 +478,20 @@ void herc_keys(EventHandler &eh) { //========================================================================== -// Sphere Texture Shader +// Sphere Texture Shader //========================================================================== spheretex = new SpheretexShader(tex); //========================================================================== -// Sphere Texture Highlighter +// Sphere Texture Highlighter //========================================================================== highlight = new SpheretexHighlighter; highlight->add_frustum(tex_proj_spot); //========================================================================== -// Sphere Texture Reflector +// Sphere Texture Reflector //========================================================================== sreflect = new SpheretexReflector; sreflect->add_frustum(tex_proj_spot); @@ -483,9 +501,9 @@ void herc_keys(EventHandler &eh) { //========================================================================== -// Planar Reflector +// Planar Reflector //========================================================================== - // Create a plane that corresponds to the floor of the room + // Create a plane that corresponds to the floor of the room Planef p(LVector3f::up(), LPoint3f::origin()); PlaneNode* plane_node = new PlaneNode; plane_node->set_plane(p); diff --git a/panda/src/testbed/indirect.cxx b/panda/src/testbed/indirect.cxx index 3b0b648410..09c162eae9 100644 --- a/panda/src/testbed/indirect.cxx +++ b/panda/src/testbed/indirect.cxx @@ -1,6 +1,19 @@ // Filename: indirect.cxx // Created by: cary (25Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/testbed/loader_test.cxx b/panda/src/testbed/loader_test.cxx index 80792fa5f5..2709fdf82c 100644 --- a/panda/src/testbed/loader_test.cxx +++ b/panda/src/testbed/loader_test.cxx @@ -1,3 +1,21 @@ +// Filename: loader_test.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include diff --git a/panda/src/testbed/lod_test.cxx b/panda/src/testbed/lod_test.cxx index c2aa165c51..d4b8832b3f 100644 --- a/panda/src/testbed/lod_test.cxx +++ b/panda/src/testbed/lod_test.cxx @@ -1,3 +1,21 @@ +// Filename: lod_test.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include diff --git a/panda/src/testbed/min_herc.cxx b/panda/src/testbed/min_herc.cxx index 42eee77a43..10400a0b56 100644 --- a/panda/src/testbed/min_herc.cxx +++ b/panda/src/testbed/min_herc.cxx @@ -1,6 +1,19 @@ // Filename: min_herc.cxx // Created by: jason (28Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //Shaders @@ -118,7 +131,7 @@ void herc_overrides_func(ChanCfgOverrides &override, std::string&) { void herc_idle() { static const double walk_speed = 4.0; // feet per second - + if (follow_ball) { LPoint3f bp = get_rel_pos(ball, herc); LVector2f bv2(bp[0], bp[1]); @@ -158,7 +171,7 @@ void event_p(CPT_Event) { clear_shader(room_arc, proj_shader); clear_shader(herc_arc, proj_shader); clear_shader(ball_arc, proj_shader); - + set_alt_trackball(NULL); remove_child(tex_proj, proj_geom_node, RenderRelation::get_class_type()); @@ -260,12 +273,12 @@ void herc_keys(EventHandler &eh) { eh.add_hook("Z", event_Z); // Follow ball //========================================================================== -// Models +// Models //========================================================================== // Load herc PT_NamedNode herc_model = DCAST(NamedNode, loader.load_sync("herc-6000.egg")); PT_NamedNode herc_anim = DCAST(NamedNode, loader.load_sync("HB_1_HE1.egg")); - assert(herc_model != (NamedNode *)NULL && + assert(herc_model != (NamedNode *)NULL && herc_anim != (NamedNode *)NULL); PT_NamedNode herc_parent = new NamedNode("herc_parent"); new RenderRelation(herc_parent, herc_model); @@ -301,7 +314,7 @@ void herc_keys(EventHandler &eh) { // Control the ball using a PlanarSlider tform. ball_slider = new PlanarSlider("ball_slider"); - ball_slider->set_transform(LMatrix4f::translate_mat(0.0, 0.0, 1.0) * + ball_slider->set_transform(LMatrix4f::translate_mat(0.0, 0.0, 1.0) * LMatrix4f::scale_mat(7.0, -7.0, 1.0)); ball_slider->set_mouse_pos(LPoint2f(4.0 / 7.0, 2.0 / -7.0)); Transform2SG *slider2ball = new Transform2SG("slider2ball"); @@ -362,7 +375,7 @@ void herc_keys(EventHandler &eh) { proj_shader->add_frustum(tex_proj); // Create a wireframe representation of the texture projector frustum - GeomLine* proj_geom = + GeomLine* proj_geom = (GeomLine *)tex_proj->get_projection()->make_geometry(); proj_geom_node = new GeomNode("proj_geometry"); proj_geom_node->add_geom(proj_geom); @@ -371,7 +384,7 @@ void herc_keys(EventHandler &eh) { //========================================================================== // Projected Texture Spotlight Shader //========================================================================== - tex_proj_spot = new Spotlight("tex_proj_spotlight"); + tex_proj_spot = new Spotlight("tex_proj_spotlight"); spot_arc = new RenderRelation(render, tex_proj_spot, 10); // Create a trackball to spin this around. @@ -400,7 +413,7 @@ void herc_keys(EventHandler &eh) { //========================================================================== -// Projected Texture Shadower +// Projected Texture Shadower //========================================================================== proj_shadow = new ProjtexShadower; proj_shadow->add_frustum(tex_proj_spot); @@ -409,9 +422,9 @@ void herc_keys(EventHandler &eh) { proj_shadow->add_caster(camera_model); //========================================================================== -// Planar Reflector +// Planar Reflector //========================================================================== - // Create a plane that corresponds to the floor of the room + // Create a plane that corresponds to the floor of the room Planef p(LVector3f::up(), LPoint3f::origin()); PlaneNode* plane_node = new PlaneNode; plane_node->set_plane(p); diff --git a/panda/src/testbed/min_shader.cxx b/panda/src/testbed/min_shader.cxx index 4990e3164b..2b70f5eebc 100644 --- a/panda/src/testbed/min_shader.cxx +++ b/panda/src/testbed/min_shader.cxx @@ -1,6 +1,19 @@ // Filename: min_shader.cxx // Created by: jason (28Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //Shaders @@ -332,7 +345,7 @@ void Tiledviz::Flush(void) { d = layer->get_dr(count); (*pbi)->draw(g, d, r); - + ++count; if (count == layer->get_num_drs()) { count = 0; @@ -412,7 +425,7 @@ void event_s(CPT_Event) { // Access: Public // Description: Toggle projected shadows //////////////////////////////////////////////////////////////////// -void event_d(CPT_Event) +void event_d(CPT_Event) { static bool projtex_shadow_mode = false; @@ -422,8 +435,8 @@ void event_d(CPT_Event) clear_shader(room_arc, proj_shadow); set_alt_trackball(NULL); - } - else + } + else { set_shader(room_arc, proj_shadow); set_alt_trackball(tex_spot_trackball); @@ -436,15 +449,15 @@ void event_d(CPT_Event) // Access: Public // Description: Toggle planar reflection //////////////////////////////////////////////////////////////////// -void event_r(CPT_Event) +void event_r(CPT_Event) { static bool plane_reflect_mode = false; - + plane_reflect_mode = !plane_reflect_mode; if (!plane_reflect_mode) { // Set the normal mode on the render arc. - clear_shader(room_arc, preflect); - } + clear_shader(room_arc, preflect); + } else { // Set an override on the initial state. @@ -531,7 +544,7 @@ void event_o(CPT_Event) { //////////////////////////////////////////////////////////////////// // Function: setup_projtex // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void setup_projtex(void) { @@ -566,25 +579,25 @@ void setup_projtex(void) #define DISPLAY_TEXPROJFRUST #ifdef DISPLAY_TEXPROJFRUST // Display a wireframe representation of the texture projector frustum - GeomLine* proj_geom = + GeomLine* proj_geom = (GeomLine *)tex_proj->get_projection()->make_geometry(); GeomNode* proj_geom_node = new GeomNode("proj_geometry"); proj_geom_node->add_geom(proj_geom); RenderRelation *prr = new RenderRelation(tex_proj, proj_geom_node); LightTransition *plt = new LightTransition(LightTransition::all_off()); - prr->set_transition(plt); + prr->set_transition(plt); #endif } //////////////////////////////////////////////////////////////////// // Function: setup_spotlight // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void setup_spotlight(void) { // Create a projected texture spotlight shader - tex_proj_spot = new Spotlight("tex_proj_spotlight"); + tex_proj_spot = new Spotlight("tex_proj_spotlight"); //Push out the far clipping plane of the spotlight frustum Frustumf f; f.make_perspective(45.0f, 45.0f, f._fnear, 13); @@ -619,13 +632,13 @@ void setup_spotlight(void) #ifdef DISPLAY_TEXPROJSPOTFRUST // Display a wireframe representation of the spotlight frustum Colorf color_red(1., 0., 0., 1.); - GeomLine* frust_geom = + GeomLine* frust_geom = (GeomLine *)tex_proj_spot->get_projection()->make_geometry(color_red); GeomNode* frust_geom_node = new GeomNode("frustum_geometry"); frust_geom_node->add_geom(frust_geom); RenderRelation *rr = new RenderRelation(tex_proj_spot, frust_geom_node); LightTransition *lt = new LightTransition(LightTransition::all_off()); - rr->set_transition(lt); + rr->set_transition(lt); #endif #define DISPLAY_SHAFT @@ -639,7 +652,7 @@ void setup_spotlight(void) //////////////////////////////////////////////////////////////////// // Function: setup_planar // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void setup_planar(void) { @@ -653,7 +666,7 @@ void setup_planar(void) //////////////////////////////////////////////////////////////////// // Function: setup_projshadow // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void setup_projshadow(void) { @@ -673,25 +686,25 @@ void setup_projshadow(void) //////////////////////////////////////////////////////////////////// // Function: setup_vizes // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void setup_vizes(void) { // and now for some multipass partial visualization Shader::Visualize* v = Shader::get_viz(); std::string viztype = min_shader.GetString("multipass-viz", "none"); - - if (viztype == "old-style") + + if (viztype == "old-style") { PT(GraphicsWindow) w(main_win); v = new Oldviz(w); - } - else if (viztype == "new-single") + } + else if (viztype == "new-single") { PT(GraphicsPipe) p(((GraphicsPipe*)(main_win->get_pipe()))); v = new Viztex(p); - } - else if (viztype == "new-tile") + } + else if (viztype == "new-tile") { PT(GraphicsPipe) p(((GraphicsPipe*)(main_win->get_pipe()))); v = new Tiledviz(p); @@ -752,7 +765,7 @@ void min_shader_keys(EventHandler &eh) { // Load the room file PT_NamedNode room = DCAST(NamedNode, loader.load_sync("big-room.egg")); if (room != (NamedNode *)NULL) { - room_arc = new RenderRelation(render, room, 20); + room_arc = new RenderRelation(render, room, 20); sreflect->add_caster(room); } @@ -774,15 +787,15 @@ void min_shader_keys(EventHandler &eh) { PT_NamedNode smiley = DCAST(NamedNode, loader.load_sync("smiley.egg")); if (jack != (NamedNode *)NULL) { smiley_arc = new RenderRelation(render, smiley); - + proj_shadow->add_caster(smiley); preflect->add_caster(smiley); } // Load up a camera model to visualize our eyepoint. - PT_NamedNode camera_model = DCAST(NamedNode, loader.load_sync("camera.egg")); + PT_NamedNode camera_model = DCAST(NamedNode, loader.load_sync("camera.egg")); if (camera_model != (NamedNode *)NULL) { - camera_model_arc = new RenderRelation(cameras, camera_model); + camera_model_arc = new RenderRelation(cameras, camera_model); sreflect->add_caster(camera_model); proj_shadow->add_caster(camera_model); diff --git a/panda/src/testbed/motion.cxx b/panda/src/testbed/motion.cxx index 17ccc0d555..2114bb80f5 100644 --- a/panda/src/testbed/motion.cxx +++ b/panda/src/testbed/motion.cxx @@ -1,6 +1,19 @@ // Filename: motion.cxx // Created by: frang (23Mar99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include diff --git a/panda/src/testbed/panda.cxx b/panda/src/testbed/panda.cxx index f94671c16e..4d69c77987 100644 --- a/panda/src/testbed/panda.cxx +++ b/panda/src/testbed/panda.cxx @@ -1,3 +1,21 @@ +// Filename: panda.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include diff --git a/panda/src/testbed/shader_test.cxx b/panda/src/testbed/shader_test.cxx index 79d1582509..bbc1779e7a 100644 --- a/panda/src/testbed/shader_test.cxx +++ b/panda/src/testbed/shader_test.cxx @@ -1,3 +1,21 @@ +// Filename: shader_test.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include @@ -286,7 +304,7 @@ void Tiledviz::Flush(void) { //no longer exist. //JMC: Added call to get_dr #ifdef SHADER_VERBOSE - indent(nout, _level) << "Getting display region " << count + indent(nout, _level) << "Getting display region " << count << " from graphics layer" << endl; #endif d = layer->get_dr(count); @@ -545,7 +563,7 @@ void shader_keys(EventHandler &eh) { #define DISPLAY_TEXPROJFRUST #ifdef DISPLAY_TEXPROJFRUST // Display a wireframe representation of the texture projector frustum - GeomLine* proj_geom = + GeomLine* proj_geom = (GeomLine *)tex_proj->get_projection()->make_geometry(); GeomNode* proj_geom_node = new GeomNode("proj_geometry"); //JMC: Removed _drawable_vector.push_back call and added add_geom @@ -553,11 +571,11 @@ void shader_keys(EventHandler &eh) { proj_geom_node->add_geom(proj_geom); RenderRelation *prr = new RenderRelation(tex_proj, proj_geom_node); LightTransition *plt = new LightTransition(LightTransition::all_off()); - prr->set_transition(plt); + prr->set_transition(plt); #endif // Create a projected texture spotlight shader - tex_proj_spot = new Spotlight("tex_proj_spotlight"); + tex_proj_spot = new Spotlight("tex_proj_spotlight"); spot_arc = new RenderRelation(render, tex_proj_spot, 10); // Create a trackball to spin this around. @@ -585,7 +603,7 @@ void shader_keys(EventHandler &eh) { #ifdef DISPLAY_TEXPROJSPOTFRUST // Display a wireframe representation of the spotlight frustum Colorf color_red(1., 0., 0., 1.); - GeomLine* frust_geom = + GeomLine* frust_geom = (GeomLine *)tex_proj_spot->get_projection()->make_geometry(color_red); GeomNode* frust_geom_node = new GeomNode("frustum_geometry"); //JMC: Removed _drawable_vector.push_back call and added add_geom @@ -593,7 +611,7 @@ void shader_keys(EventHandler &eh) { frust_geom_node->add_geom(frust_geom); RenderRelation *rr = new RenderRelation(tex_proj_spot, frust_geom_node); LightTransition *lt = new LightTransition(LightTransition::all_off()); - rr->set_transition(lt); + rr->set_transition(lt); #endif #ifdef DISPLAY_SHAFT @@ -636,8 +654,8 @@ void shader_keys(EventHandler &eh) { // Load the room file PT_NamedNode room = loader.load_sync("big-room.egg"); if (room != (NamedNode *)NULL) { - room_arc = new RenderRelation(render, room, 20); - + room_arc = new RenderRelation(render, room, 20); + sreflect->add_caster(room); new RenderRelation(room, plane_node); } @@ -659,8 +677,8 @@ void shader_keys(EventHandler &eh) { // Load up a camera model to visualize our eyepoint. PT_NamedNode camera_model = loader.load_sync("camera.egg"); if (camera_model != (NamedNode *)NULL) { - camera_model_arc = new RenderRelation(cameras, camera_model); - + camera_model_arc = new RenderRelation(cameras, camera_model); + sreflect->add_caster(camera_model); proj_shadow->add_caster(camera_model); preflect->add_caster(camera_model); diff --git a/panda/src/testbed/test_eggWrite.cxx b/panda/src/testbed/test_eggWrite.cxx index f38e04bb78..e99b13bffe 100644 --- a/panda/src/testbed/test_eggWrite.cxx +++ b/panda/src/testbed/test_eggWrite.cxx @@ -1,6 +1,20 @@ // Filename: test_eggWrite.cxx // Created by: jason (16Jun00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #include #include @@ -32,14 +46,14 @@ public: PrintNodes() { _indent_level = 0; } - bool reached_node(Node *node, AttributeWrapper &state, NullLevelState &) + bool reached_node(Node *node, AttributeWrapper &state, NullLevelState &) { indent(nout, _indent_level) << "Reached " << *node << ", state is " << state << "\n"; - // if (node->is_of_type(GeomNode::get_class_type())) + // if (node->is_of_type(GeomNode::get_class_type())) // { // GeomNode *geomNode = (GeomNode *)node; // int num_geoms = geomNode->get_num_geoms(); -// for (int i = 0; i < num_geoms; i++) +// for (int i = 0; i < num_geoms; i++) // { // dDrawable *draw = geomNode->get_geom(i); // Geom *geom = DCAST(Geom, draw); @@ -49,12 +63,12 @@ public: // } return true; } - bool forward_arc(NodeRelation *, TransitionWrapper &, AttributeWrapper &, AttributeWrapper &, NullLevelState &) + bool forward_arc(NodeRelation *, TransitionWrapper &, AttributeWrapper &, AttributeWrapper &, NullLevelState &) { _indent_level += 2; return true; } - void backward_arc(NodeRelation *, TransitionWrapper &, AttributeWrapper &, AttributeWrapper &, const NullLevelState &) + void backward_arc(NodeRelation *, TransitionWrapper &, AttributeWrapper &, AttributeWrapper &, const NullLevelState &) { _indent_level -= 2; } @@ -82,12 +96,12 @@ int main(int argc, char* argv[]) { nout << "\n"; PrintNodes pn; - df_traverse(smiley, pn, + df_traverse(smiley, pn, NodeAttributeWrapper(TransformTransition::get_class_type()), NullLevelState(), RenderRelation::get_class_type()); nout << "\n"; - + stream.open(file::FILE_WRITE, _bam_header); manager.init(); manager.write_object(smiley); diff --git a/panda/src/testbed/test_particles.cxx b/panda/src/testbed/test_particles.cxx index c0c06df5ce..e03a55672f 100644 --- a/panda/src/testbed/test_particles.cxx +++ b/panda/src/testbed/test_particles.cxx @@ -1,3 +1,21 @@ +// Filename: test_particles.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include diff --git a/panda/src/testbed/test_recparticles.cxx b/panda/src/testbed/test_recparticles.cxx index 57f8145642..b958b1488a 100644 --- a/panda/src/testbed/test_recparticles.cxx +++ b/panda/src/testbed/test_recparticles.cxx @@ -1,3 +1,21 @@ +// Filename: test_recparticles.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include diff --git a/panda/src/testbed/test_sprite_particles.cxx b/panda/src/testbed/test_sprite_particles.cxx index 6a9043d694..0359690d7d 100644 --- a/panda/src/testbed/test_sprite_particles.cxx +++ b/panda/src/testbed/test_sprite_particles.cxx @@ -1,3 +1,21 @@ +// Filename: test_sprite_particles.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include diff --git a/panda/src/testbed/text_test.cxx b/panda/src/testbed/text_test.cxx index 5ddf72e540..2e96d986f2 100644 --- a/panda/src/testbed/text_test.cxx +++ b/panda/src/testbed/text_test.cxx @@ -1,3 +1,21 @@ +// Filename: text_test.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include #include #include @@ -34,7 +52,7 @@ void text_keys(EventHandler& eh) { eh.add_hook("s", event_s); text_node = new TextNode("text_node"); - PT_NamedNode font = loader.load_sync("cmr12"); + PT_NamedNode font = loader.load_sync("cmr12"); text_node->set_font(font.p()); text_node->set_wordwrap(20.0); text_node->set_card_as_margin(0.25, 0.25, 0.25, 0.25); @@ -45,15 +63,15 @@ void text_keys(EventHandler& eh) { tex->read("/beta/toons/textures/smGreyButtonUp.rgb"); text_node->set_card_texture( tex ); text_node->set_card_border(0.1, 0.1); - text_node->set_text( textStr ); - text_node->set_text_color( 0.0, 0.0, 0.0, 1.0 ); + text_node->set_text( textStr ); + text_node->set_text_color( 0.0, 0.0, 0.0, 1.0 ); if (text_node->has_card_texture()) nout << "I've got a texture!" << "\n"; else nout << "I don't have a texture..." << "\n"; nout << "text is " << text_node->get_width() << " by " << text_node->get_height() << "\n"; - + new RenderRelation(egg_root, text_node); } diff --git a/panda/src/testbed/vrpn_demo.cxx b/panda/src/testbed/vrpn_demo.cxx index 90d09bfde2..ee7628a256 100644 --- a/panda/src/testbed/vrpn_demo.cxx +++ b/panda/src/testbed/vrpn_demo.cxx @@ -1,3 +1,21 @@ +// Filename: vrpn_demo.cxx +// Created by: +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + #include "framework.h" #include diff --git a/panda/src/text/config_text.cxx b/panda/src/text/config_text.cxx index fe1b0b1677..00aef727b6 100644 --- a/panda/src/text/config_text.cxx +++ b/panda/src/text/config_text.cxx @@ -1,6 +1,19 @@ // Filename: config_text.cxx // Created by: drose (02Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_text.h" diff --git a/panda/src/text/config_text.h b/panda/src/text/config_text.h index 45725fdf8d..eda5594698 100644 --- a/panda/src/text/config_text.h +++ b/panda/src/text/config_text.h @@ -1,6 +1,19 @@ // Filename: config_text.h // Created by: drose (02Mar00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_TEXT_H diff --git a/panda/src/text/textFont.I b/panda/src/text/textFont.I index f014bf8c2e..351fe85125 100644 --- a/panda/src/text/textFont.I +++ b/panda/src/text/textFont.I @@ -1,11 +1,24 @@ // Filename: textFont.I // Created by: drose (03May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -// Function: TextFont::get_line_height +// Function: TextFont::get_line_height // Access: Published // Description: Returns the number of units high each line of text // is. This is based on the font. @@ -16,7 +29,7 @@ get_line_height() const { } //////////////////////////////////////////////////////////////////// -// Function: TextFont::get_line_height +// Function: TextFont::get_line_height // Access: Published // Description: Returns the number of units high each line of text // is. This is based on the font. diff --git a/panda/src/text/textFont.cxx b/panda/src/text/textFont.cxx index 36acecc73a..92b5730578 100644 --- a/panda/src/text/textFont.cxx +++ b/panda/src/text/textFont.cxx @@ -1,6 +1,19 @@ // Filename: textFont.cxx // Created by: drose (03May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "textFont.h" @@ -30,7 +43,7 @@ isblank(char ch) { // Description: //////////////////////////////////////////////////////////////////// TextFont::CharDef:: -CharDef(Geom *geom, float width, const AllTransitionsWrapper &trans) : +CharDef(Geom *geom, float width, const AllTransitionsWrapper &trans) : _geom(geom), _width(width), _trans(trans) { } //////////////////////////////////////////////////////////////////// @@ -58,7 +71,7 @@ TextFont(Node *font_def) { //////////////////////////////////////////////////////////////////// // Function: TextFont::Destructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// TextFont:: ~TextFont() { @@ -204,7 +217,7 @@ wordwrap_to(const string &text, float wordwrap_width) const { //////////////////////////////////////////////////////////////////// // Function: TextFont::write // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void TextFont:: write(ostream &out, int indent_level) const { @@ -227,7 +240,7 @@ find_character_gsets(Node *root, Geom *&ch, GeomPoint *&dot, AllTransitionsWrapper &trans) { if (root->is_of_type(GeomNode::get_class_type())) { GeomNode *geode = (GeomNode *)root; - + bool found = false; for (int i = 0; i < geode->get_num_geoms(); i++) { dDrawable *geom = geode->get_geom(i); @@ -240,7 +253,7 @@ find_character_gsets(Node *root, Geom *&ch, GeomPoint *&dot, } } return found; - + } else { TypeHandle graph_type = RenderRelation::get_class_type(); int num_children = root->get_num_children(graph_type); @@ -278,7 +291,7 @@ find_characters(Node *root) { all_digits = (isdigit(*p) != 0); p++; } - + if (all_digits) { int character = atoi(name.c_str()); Geom *ch = NULL; diff --git a/panda/src/text/textFont.h b/panda/src/text/textFont.h index ae562e7781..c3f4ad6f45 100644 --- a/panda/src/text/textFont.h +++ b/panda/src/text/textFont.h @@ -1,6 +1,19 @@ // Filename: textFont.h // Created by: drose (03May01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef TEXTFONT_H @@ -74,7 +87,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/text/textNode.I b/panda/src/text/textNode.I index 83872dc51b..c12a488a68 100644 --- a/panda/src/text/textNode.I +++ b/panda/src/text/textNode.I @@ -1,6 +1,19 @@ // Filename: textNode.I // Created by: mike (04Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -29,7 +42,7 @@ INLINE int TextNode:: freeze() { if (text_cat.is_debug()) { text_cat.debug() - << "Freezing " << this->get_name() << ", level = " + << "Freezing " << this->get_name() << ", level = " << _freeze_level << "\n"; } return _freeze_level++; @@ -60,12 +73,12 @@ INLINE int TextNode:: thaw() { if (text_cat.is_debug()) { text_cat.debug() - << "Thawing " << this->get_name() << ", level = " + << "Thawing " << this->get_name() << ", level = " << _freeze_level-1 << "\n"; } nassertr(_freeze_level > 0, _freeze_level); _freeze_level--; - + if (_freeze_level == 0 && _needs_rebuild) { do_rebuild(); } @@ -110,7 +123,7 @@ get_font() const { } //////////////////////////////////////////////////////////////////// -// Function: TextNode::get_line_height +// Function: TextNode::get_line_height // Access: Published // Description: Returns the number of units high each line of text // is. This is based on the font. @@ -190,7 +203,7 @@ clear_wordwrap() { //////////////////////////////////////////////////////////////////// // Function: TextNode::has_wordwrap // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: has_wordwrap() const { @@ -200,7 +213,7 @@ has_wordwrap() const { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_wordwrap // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE float TextNode:: get_wordwrap() const { @@ -243,7 +256,7 @@ clear_text_color() { //////////////////////////////////////////////////////////////////// // Function: TextNode::has_text_color // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: has_text_color() const { @@ -253,7 +266,7 @@ has_text_color() const { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_text_color // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Colorf TextNode:: get_text_color() const { @@ -284,7 +297,7 @@ set_frame_color(const Colorf &frame_color) { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_frame_color // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Colorf TextNode:: get_frame_color() const { @@ -369,7 +382,7 @@ set_card_color(const Colorf &card_color) { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_card_color // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Colorf TextNode:: get_card_color() const { @@ -391,7 +404,7 @@ set_card_texture(Texture *card_texture) { //////////////////////////////////////////////////////////////////// // Function: TextNode::clear_card_texture // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void TextNode:: clear_card_texture() { @@ -403,7 +416,7 @@ clear_card_texture() { //////////////////////////////////////////////////////////////////// // Function: TextNode::has_card_texture // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: has_card_texture() const { @@ -413,7 +426,7 @@ has_card_texture() const { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_card_texture // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Texture *TextNode:: get_card_texture() const { @@ -444,7 +457,7 @@ set_shadow_color(const Colorf &shadow_color) { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_shadow_color // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE Colorf TextNode:: get_shadow_color() const { @@ -502,7 +515,7 @@ clear_frame() { //////////////////////////////////////////////////////////////////// // Function: TextNode::has_frame // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: has_frame() const { @@ -555,7 +568,7 @@ INLINE LVecBase4f TextNode:: get_frame_actual() const { nassertr(has_frame(), LVecBase4f(0.0, 0.0, 0.0, 0.0)); if (is_frame_as_margin()) { - return LVecBase4f(get_left() - _frame_ul[0], + return LVecBase4f(get_left() - _frame_ul[0], get_right() + _frame_lr[0], get_bottom() - _frame_lr[1], get_top() + _frame_ul[1]); @@ -606,7 +619,7 @@ set_frame_corners(bool corners) { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_frame_corners // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: get_frame_corners() const { @@ -665,7 +678,7 @@ clear_card() { //////////////////////////////////////////////////////////////////// // Function: TextNode::has_card // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: has_card() const { @@ -724,7 +737,7 @@ get_card_actual() const { return LVecBase4f(get_left(), get_right(), get_bottom(), get_top()); } else if (is_card_as_margin()) { - return LVecBase4f(get_left() - _card_ul[0], + return LVecBase4f(get_left() - _card_ul[0], get_right() + _card_lr[0], get_bottom() - _card_lr[1], get_top() + _card_ul[1]); @@ -747,7 +760,7 @@ get_card_transformed() const { LVecBase4f card = get_card_actual(); LPoint3f ul = LPoint3f(card[0], 0.0, card[3]) * _transform; LPoint3f lr = LPoint3f(card[1], 0.0, card[2]) * _transform; - + return LVecBase4f(ul[0], lr[0], lr[2], ul[2]); } @@ -780,7 +793,7 @@ clear_shadow() { //////////////////////////////////////////////////////////////////// // Function: TextNode::has_shadow // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: has_shadow() const { @@ -901,7 +914,7 @@ set_transform(const LMatrix4f &transform) { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_transform // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE LMatrix4f TextNode:: get_transform() const { @@ -923,7 +936,7 @@ set_coordinate_system(CoordinateSystem coordinate_system) { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_coordinate_system // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE CoordinateSystem TextNode:: get_coordinate_system() const { @@ -956,7 +969,7 @@ clear_text() { //////////////////////////////////////////////////////////////////// // Function: TextNode::has_text // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE bool TextNode:: has_text() const { @@ -966,7 +979,7 @@ has_text() const { //////////////////////////////////////////////////////////////////// // Function: TextNode::get_text // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE string TextNode:: get_text() const { diff --git a/panda/src/text/textNode.cxx b/panda/src/text/textNode.cxx index ed7af0f908..a44362540f 100644 --- a/panda/src/text/textNode.cxx +++ b/panda/src/text/textNode.cxx @@ -1,10 +1,19 @@ // Filename: textNode.cxx // Created by: drose (12May99) -// -//////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////// -// Includes +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "textNode.h" #include "config_text.h" @@ -31,7 +40,7 @@ TypeHandle TextNode::_type_handle; //////////////////////////////////////////////////////////////////// // Function: TextNode::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// TextNode:: TextNode(const string &name) : NamedNode(name) { @@ -45,7 +54,7 @@ TextNode(const string &name) : NamedNode(name) { _frame_color.set(1.0, 1.0, 1.0, 1.0); _card_color.set(1.0, 1.0, 1.0, 1.0); _shadow_color.set(1.0, 1.0, 1.0, 1.0); - + _frame_width = 1.0; _frame_ul.set(0.0, 0.0); @@ -72,7 +81,7 @@ TextNode(const string &name) : NamedNode(name) { //////////////////////////////////////////////////////////////////// // Function: TextNode::Destructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// TextNode:: ~TextNode() { @@ -82,7 +91,7 @@ TextNode:: //////////////////////////////////////////////////////////////////// // Function: TextNode::write // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void TextNode:: write(ostream &out, int indent_level) const { @@ -105,7 +114,7 @@ write(ostream &out, int indent_level) const { case TM_ALIGN_LEFT: out << "TM_ALIGN_LEFT\n"; break; - + case TM_ALIGN_RIGHT: out << "TM_ALIGN_RIGHT\n"; break; @@ -122,7 +131,7 @@ write(ostream &out, int indent_level) const { if (has_frame()) { indent(out, indent_level + 2) - << "frame of color " << _frame_color << " at " + << "frame of color " << _frame_color << " at " << get_frame_as_set() << " line width " << _frame_width << "\n"; if (get_frame_corners()) { indent(out, indent_level + 2) @@ -139,7 +148,7 @@ write(ostream &out, int indent_level) const { } if (has_card()) { indent(out, indent_level + 2) - << "card of color " << _card_color << " at " + << "card of color " << _card_color << " at " << get_card_as_set() << "\n"; if (is_card_as_margin()) { indent(out, indent_level + 2) @@ -152,7 +161,7 @@ write(ostream &out, int indent_level) const { } if (has_shadow()) { indent(out, indent_level + 2) - << "shadow of color " << _shadow_color << " at " + << "shadow of color " << _shadow_color << " at " << _shadow_offset << "\n"; } if (has_bin()) { @@ -162,7 +171,7 @@ write(ostream &out, int indent_level) const { indent(out, indent_level + 2) << "draw order is " << _draw_order << ", " << _draw_order + 1 << ", " << _draw_order + 2 << "\n"; - + LVecBase3f scale, hpr, trans; if (decompose_matrix(_transform, scale, hpr, trans, _coordinate_system)) { indent(out, indent_level + 2) @@ -197,7 +206,7 @@ generate() { // The strategy here will be to assemble together a bunch of // letters, instanced from the letter hierarchy of font_def, into - // our own little hierarchy. + // our own little hierarchy. // There will be one root over the whole text block, that // contains the transform passed in. Under this root there will be @@ -224,8 +233,8 @@ generate() { // Compute the overall text transform matrix. We build the text in // a Z-up coordinate system and then convert it to whatever the user // asked for. - LMatrix4f mat = - LMatrix4f::convert_mat(CS_zup_right, _coordinate_system) * + LMatrix4f mat = + LMatrix4f::convert_mat(CS_zup_right, _coordinate_system) * _transform; root_arc->set_transition(new TransformTransition(mat)); @@ -239,7 +248,7 @@ generate() { LVector2f ul, lr; int num_rows = 0; PT_Node text_root = assemble_text(text.c_str(), ul, lr, num_rows); - RenderRelation *text_arc = + RenderRelation *text_arc = new RenderRelation(sub_root, text_root, _draw_order + 2); if (has_text_color()) { @@ -268,7 +277,7 @@ generate() { // Now deal with all the decorations. - + if (has_shadow()) { // Make a shadow by instancing the text behind itself. @@ -278,7 +287,7 @@ generate() { LMatrix4f offset = LMatrix4f::translate_mat(_shadow_offset[0], 0.0, -_shadow_offset[1]); - RenderRelation *shadow_arc = + RenderRelation *shadow_arc = new RenderRelation(sub_root, text_root, _draw_order + 1); shadow_arc->set_transition(new TransformTransition(offset)); shadow_arc->set_transition(new ColorTransition(_shadow_color)); @@ -316,7 +325,7 @@ generate() { card_root = make_card_with_border(); else card_root = make_card(); - RenderRelation *card_arc = + RenderRelation *card_arc = new RenderRelation(sub_root, card_root, _draw_order); card_arc->set_transition(new ColorTransition(_card_color)); if (_card_color[3] != 1.0) { @@ -332,7 +341,7 @@ generate() { (new GeomBinTransition(_bin, _draw_order)); } } - + // Now flatten our hierarchy to get rid of the transforms we put in, // applying them to the vertices. @@ -442,14 +451,14 @@ assemble_row(const char *&source, Node *dest) { if (def == (const TextFont::CharDef *)NULL) { text_cat.warning() << "No definition for character " << character << endl; - + } else { Geom *char_geom = def->_geom; float char_width = def->_width; const AllTransitionsWrapper &trans = def->_trans; LMatrix4f mat = LMatrix4f::ident_mat(); - mat.set_row(3, LVector3f(xpos, 0, 0)); + mat.set_row(3, LVector3f(xpos, 0, 0)); if (char_geom != NULL) { string ch(1, (char)character); GeomNode *geode = new GeomNode(ch); @@ -500,18 +509,18 @@ assemble_text(const char *source, LVector2f &ul, LVector2f &lr, // Skip past the newline. source++; } - + LMatrix4f mat = LMatrix4f::ident_mat(); if (_align == TM_ALIGN_LEFT) { - mat.set_row(3, LVector3f(0, 0, posy)); + mat.set_row(3, LVector3f(0, 0, posy)); lr[0] = max(lr[0], row_width); } else if (_align == TM_ALIGN_RIGHT) { - mat.set_row(3, LVector3f(-row_width, 0, posy)); + mat.set_row(3, LVector3f(-row_width, 0, posy)); ul[0] = min(ul[0], -row_width); } else { - mat.set_row(3, LVector3f(-row_width / 2.0, 0, posy)); + mat.set_row(3, LVector3f(-row_width / 2.0, 0, posy)); lr[0] = max(lr[0], row_width / 2); ul[0] = min(ul[0], -row_width / 2); } @@ -562,7 +571,7 @@ measure_row(const char *&source) { if (def == (const TextFont::CharDef *)NULL) { text_cat.warning() << "No definition for character " << character << endl; - + } else { float char_width = def->_width; xpos += char_width; @@ -596,7 +605,7 @@ measure_text(const char *source, LVector2f &ul, LVector2f &lr, // Skip past the newline. source++; } - + if (_align == TM_ALIGN_LEFT) { lr[0] = max(lr[0], row_width); @@ -629,7 +638,7 @@ make_frame() { float right = dimensions[1]; float bottom = dimensions[2]; float top = dimensions[3]; - + GeomLinestrip *geoset = new GeomLinestrip; PTA_int lengths(0); PTA_Vertexf verts; @@ -639,7 +648,7 @@ make_frame() { verts.push_back(Vertexf(right, 0.0, bottom)); verts.push_back(Vertexf(right, 0.0, top)); verts.push_back(Vertexf(left, 0.0, top)); - + geoset->set_num_prims(1); geoset->set_lengths(lengths); @@ -649,7 +658,7 @@ make_frame() { if (get_frame_corners()) { GeomPoint *geoset = new GeomPoint; - + geoset->set_num_prims(4); geoset->set_coords(verts, G_PER_VERTEX); geoset->set_size(_frame_width); @@ -683,12 +692,12 @@ make_card() { verts.push_back(Vertexf::rfu(left, 0.02, bottom)); verts.push_back(Vertexf::rfu(right, 0.02, top)); verts.push_back(Vertexf::rfu(right, 0.02, bottom)); - + geoset->set_num_prims(1); geoset->set_lengths(lengths); geoset->set_coords(verts, G_PER_VERTEX); - + if (has_card_texture()) { PTA_TexCoordf uvs; uvs.push_back(TexCoordf(0.0, 1.0)); @@ -698,7 +707,7 @@ make_card() { geoset->set_texcoords(uvs, G_PER_VERTEX); } - + card_geode->add_geom(geoset); return card_geode; @@ -740,70 +749,70 @@ make_card_with_border() { verts.push_back(Vertexf::rfu(left, 0.02, top)); verts.push_back(Vertexf::rfu(left, 0.02, top - _card_border_size)); verts.push_back(Vertexf::rfu(left + _card_border_size, 0.02, top)); - verts.push_back(Vertexf::rfu(left + _card_border_size, 0.02, + verts.push_back(Vertexf::rfu(left + _card_border_size, 0.02, top - _card_border_size)); - // verts 5,6,7,8 + // verts 5,6,7,8 verts.push_back(Vertexf::rfu(right - _card_border_size, 0.02, top)); - verts.push_back(Vertexf::rfu(right - _card_border_size, 0.02, + verts.push_back(Vertexf::rfu(right - _card_border_size, 0.02, top - _card_border_size)); verts.push_back(Vertexf::rfu(right, 0.02, top)); verts.push_back(Vertexf::rfu(right, 0.02, top - _card_border_size)); - // verts 9,10,11,12 + // verts 9,10,11,12 verts.push_back(Vertexf::rfu(left, 0.02, bottom + _card_border_size)); verts.push_back(Vertexf::rfu(left, 0.02, bottom)); - verts.push_back(Vertexf::rfu(left + _card_border_size, 0.02, + verts.push_back(Vertexf::rfu(left + _card_border_size, 0.02, bottom + _card_border_size)); verts.push_back(Vertexf::rfu(left + _card_border_size, 0.02, bottom)); // verts 13,14,15,16 - verts.push_back(Vertexf::rfu(right - _card_border_size, 0.02, + verts.push_back(Vertexf::rfu(right - _card_border_size, 0.02, bottom + _card_border_size)); verts.push_back(Vertexf::rfu(right - _card_border_size, 0.02, bottom)); verts.push_back(Vertexf::rfu(right, 0.02, bottom + _card_border_size)); verts.push_back(Vertexf::rfu(right, 0.02, bottom)); - + PTA_ushort indices; // tristrip #1 - indices.push_back(0); - indices.push_back(1); - indices.push_back(2); - indices.push_back(3); - indices.push_back(4); - indices.push_back(5); - indices.push_back(6); - indices.push_back(7); + indices.push_back(0); + indices.push_back(1); + indices.push_back(2); + indices.push_back(3); + indices.push_back(4); + indices.push_back(5); + indices.push_back(6); + indices.push_back(7); // tristrip #2 - indices.push_back(1); - indices.push_back(8); - indices.push_back(3); - indices.push_back(10); - indices.push_back(5); - indices.push_back(12); - indices.push_back(7); - indices.push_back(14); + indices.push_back(1); + indices.push_back(8); + indices.push_back(3); + indices.push_back(10); + indices.push_back(5); + indices.push_back(12); + indices.push_back(7); + indices.push_back(14); // tristrip #3 - indices.push_back(8); - indices.push_back(9); - indices.push_back(10); - indices.push_back(11); - indices.push_back(12); - indices.push_back(13); - indices.push_back(14); - indices.push_back(15); + indices.push_back(8); + indices.push_back(9); + indices.push_back(10); + indices.push_back(11); + indices.push_back(12); + indices.push_back(13); + indices.push_back(14); + indices.push_back(15); geoset->set_num_prims(3); geoset->set_lengths(lengths); geoset->set_coords(verts, G_PER_VERTEX, indices); - + if (has_card_texture()) { PTA_TexCoordf uvs; uvs.push_back(TexCoordf(0.0, 1.0)); //1 uvs.push_back(TexCoordf(0.0, 1.0 - _card_border_uv_portion)); //2 uvs.push_back(TexCoordf(0.0 + _card_border_uv_portion, 1.0)); //3 - uvs.push_back(TexCoordf(0.0 + _card_border_uv_portion, + uvs.push_back(TexCoordf(0.0 + _card_border_uv_portion, 1.0 - _card_border_uv_portion)); //4 uvs.push_back(TexCoordf( 1.0 -_card_border_uv_portion, 1.0)); //5 - uvs.push_back(TexCoordf( 1.0 -_card_border_uv_portion, + uvs.push_back(TexCoordf( 1.0 -_card_border_uv_portion, 1.0 - _card_border_uv_portion)); //6 uvs.push_back(TexCoordf(1.0, 1.0)); //7 uvs.push_back(TexCoordf(1.0, 1.0 - _card_border_uv_portion)); //8 @@ -822,7 +831,7 @@ make_card_with_border() { geoset->set_texcoords(uvs, G_PER_VERTEX, indices); } - + card_geode->add_geom(geoset); return card_geode; diff --git a/panda/src/text/textNode.h b/panda/src/text/textNode.h index 3e0d3ae88d..2351802555 100644 --- a/panda/src/text/textNode.h +++ b/panda/src/text/textNode.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TEXTNODE_H #define TEXTNODE_H // @@ -91,8 +103,8 @@ PUBLISHED: INLINE void set_shadow_color(float r, float g, float b, float a); INLINE void set_shadow_color(const Colorf &shadow_color); INLINE Colorf get_shadow_color() const; - - INLINE void set_frame_as_margin(float left, float right, + + INLINE void set_frame_as_margin(float left, float right, float bottom, float top); INLINE void set_frame_actual(float left, float right, float bottom, float top); @@ -107,9 +119,9 @@ PUBLISHED: INLINE void set_frame_corners(bool corners); INLINE bool get_frame_corners() const; - INLINE void set_card_as_margin(float left, float right, + INLINE void set_card_as_margin(float left, float right, float bottom, float top); - INLINE void set_card_actual(float left, float right, + INLINE void set_card_actual(float left, float right, float bottom, float top); INLINE void clear_card(); INLINE bool has_card() const; @@ -222,7 +234,7 @@ private: LMatrix4f _transform; CoordinateSystem _coordinate_system; - + string _text; LPoint2f _ul2d, _lr2d; @@ -244,7 +256,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/tform/buttonThrower.cxx b/panda/src/tform/buttonThrower.cxx index e6dc36ac95..987813ff23 100644 --- a/panda/src/tform/buttonThrower.cxx +++ b/panda/src/tform/buttonThrower.cxx @@ -1,6 +1,19 @@ // Filename: buttonThrower.cxx // Created by: drose (09Feb99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "buttonThrower.h" @@ -18,7 +31,7 @@ TypeHandle ButtonThrower::_button_events_type; //////////////////////////////////////////////////////////////////// // Function: ButtonThrower::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// ButtonThrower:: ButtonThrower(const string &name) : DataNode(name) { @@ -134,11 +147,11 @@ transmit_data(NodeAttributes &data) { _mods.button_up(be._button); event_name += "-up"; } - + throw_event(event_name); } } - + // Clear the data going down the pipe. data.clear(); } diff --git a/panda/src/tform/buttonThrower.h b/panda/src/tform/buttonThrower.h index a838b529b5..03ebf81a9c 100644 --- a/panda/src/tform/buttonThrower.h +++ b/panda/src/tform/buttonThrower.h @@ -2,6 +2,19 @@ // Created by: drose (09Feb99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef BUTTONTHROWER_H #define BUTTONTHROWER_H diff --git a/panda/src/tform/config_tform.cxx b/panda/src/tform/config_tform.cxx index ddefa1823a..7a1cffa777 100644 --- a/panda/src/tform/config_tform.cxx +++ b/panda/src/tform/config_tform.cxx @@ -1,6 +1,19 @@ // Filename: config_tform.cxx // Created by: drose (23Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_tform.h" diff --git a/panda/src/tform/config_tform.h b/panda/src/tform/config_tform.h index fc9f9f491d..e09867c09d 100644 --- a/panda/src/tform/config_tform.h +++ b/panda/src/tform/config_tform.h @@ -1,6 +1,19 @@ // Filename: config_tform.h // Created by: drose (23Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_TFORM_H diff --git a/panda/src/tform/dataValve.I b/panda/src/tform/dataValve.I index 8453287e20..eda5fe5051 100644 --- a/panda/src/tform/dataValve.I +++ b/panda/src/tform/dataValve.I @@ -1,6 +1,19 @@ // Filename: dataValve.I // Created by: drose (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/tform/dataValve.cxx b/panda/src/tform/dataValve.cxx index b2c9845534..643ab98781 100644 --- a/panda/src/tform/dataValve.cxx +++ b/panda/src/tform/dataValve.cxx @@ -1,6 +1,19 @@ // Filename: dataValve.cxx // Created by: drose (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "dataValve.h" @@ -43,7 +56,7 @@ is_on(const DataValve &valve) const { //////////////////////////////////////////////////////////////////// // Function: DataValve::Control::output // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DataValve::Control:: output(ostream &out) const { @@ -65,7 +78,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: DataValve::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// DataValve:: DataValve(const string &name) : DataNode(name) { @@ -75,7 +88,7 @@ DataValve(const string &name) : DataNode(name) { //////////////////////////////////////////////////////////////////// // Function: DataValve::Destructor // Access: Published, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// DataValve:: ~DataValve() { @@ -218,7 +231,7 @@ DataValve::Control *DataValve:: get_fine_control(int child_index, TypeHandle data_type) const { nassertr(child_index >= 0, NULL); if (child_index < (int)_controls.size()) { - FineControls::const_iterator fci = + FineControls::const_iterator fci = _controls[child_index]._fine_controls.find(data_type); if (fci != _controls[child_index]._fine_controls.end()) { return (*fci).second; @@ -230,7 +243,7 @@ get_fine_control(int child_index, TypeHandle data_type) const { //////////////////////////////////////////////////////////////////// // Function: DataValve::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void DataValve:: write(ostream &out, int indent_level) const { @@ -251,9 +264,9 @@ write(ostream &out, int indent_level) const { out << *child._control; } out << "\n"; - + FineControls::const_iterator fci; - for (fci = child._fine_controls.begin(); + for (fci = child._fine_controls.begin(); fci != child._fine_controls.end(); ++fci) { indent(out, indent_level + 4) diff --git a/panda/src/tform/dataValve.h b/panda/src/tform/dataValve.h index 003f7df020..6b927d7c4f 100644 --- a/panda/src/tform/dataValve.h +++ b/panda/src/tform/dataValve.h @@ -1,6 +1,19 @@ // Filename: dataValve.h // Created by: drose (05Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef DATAVALVE_H diff --git a/panda/src/tform/driveInterface.I b/panda/src/tform/driveInterface.I index 206c6189c3..4fd3336582 100644 --- a/panda/src/tform/driveInterface.I +++ b/panda/src/tform/driveInterface.I @@ -1,6 +1,19 @@ // Filename: driveInterface.I // Created by: drose (12Feb01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/tform/driveInterface.cxx b/panda/src/tform/driveInterface.cxx index bf1ba3597a..7debbeca85 100644 --- a/panda/src/tform/driveInterface.cxx +++ b/panda/src/tform/driveInterface.cxx @@ -1,6 +1,19 @@ // Filename: driveInterface.cxx // Created by: drose (17Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "driveInterface.h" @@ -94,7 +107,7 @@ operator < (const DriveInterface::KeyHeld &other) const { //////////////////////////////////////////////////////////////////// // Function: DriveInterface::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// DriveInterface:: DriveInterface(const string &name) : DataNode(name) { @@ -227,7 +240,7 @@ apply(double x, double y, bool any_button) { // Determine, based on the mouse's position and the amount of time // elapsed since last frame, how far forward/backward we should // move and how much we should rotate. - + // First, how fast are we moving? This is based on the mouse's // vertical position. @@ -237,19 +250,19 @@ apply(double x, double y, bool any_button) { if (y >= dead_zone_top) { // Motion is forward. Compute the throttle value: the ratio of // the mouse pointer within the range of vertical movement. - float throttle = - (min(y, 1.0) - dead_zone_top) / + float throttle = + (min(y, 1.0) - dead_zone_top) / (1.0 - dead_zone_top); _speed = throttle * _forward_speed; - + } else if (y <= dead_zone_bottom) { // Motion is backward. - float throttle = - (max(y, -1.0) - dead_zone_bottom) / + float throttle = + (max(y, -1.0) - dead_zone_bottom) / (-1.0 - dead_zone_bottom); _speed = -throttle * _reverse_speed; } - + // Now, what's our rotational velocity? This is based on the // mouse's horizontal position. @@ -260,15 +273,15 @@ apply(double x, double y, bool any_button) { // Rotation is to the right. Compute the throttle value: the // ratio of the mouse pointer within the range of horizontal // movement. - float throttle = - (min(x, 1.0) - dead_zone_right) / + float throttle = + (min(x, 1.0) - dead_zone_right) / (1.0 - dead_zone_right); _rot_speed = throttle * _rotate_speed; - + } else if (x <= dead_zone_left) { // Rotation is to the left. - float throttle = - (max(x, -1.0) - dead_zone_left) / + float throttle = + (max(x, -1.0) - dead_zone_left) / (-1.0 - dead_zone_left); _rot_speed = -throttle * _rotate_speed; } @@ -276,7 +289,7 @@ apply(double x, double y, bool any_button) { } else { // If we're not holding down any of the mouse buttons, do this // computation based on the arrow keys. - + // Which vertical arrow key changed state more recently? float throttle; @@ -322,7 +335,7 @@ apply(double x, double y, bool any_button) { // rot_mat is the rotation matrix corresponding to our previous // heading. - LMatrix3f rot_mat = + LMatrix3f rot_mat = LMatrix3f::rotate_mat_normaxis(_hpr[0], LVector3f::up(_cs), _cs); // Take a step in the direction of our previous heading. @@ -371,7 +384,7 @@ reextract() { } if (tform_cat.is_debug()) { - tform_cat.debug() + tform_cat.debug() << "Reextract " << _hpr << ", " << _xyz << " from:\n"; _mat.write(tform_cat.debug(false), 2); } @@ -392,7 +405,7 @@ recompute() { //////////////////////////////////////////////////////////////////// // Function: DriveInterface::transmit_data // Access: Public -// Description: Convert mouse data into a driveInterface matrix +// Description: Convert mouse data into a driveInterface matrix //////////////////////////////////////////////////////////////////// void DriveInterface:: transmit_data(NodeAttributes &data) { diff --git a/panda/src/tform/driveInterface.h b/panda/src/tform/driveInterface.h index 28fe3b35c6..124883a7b2 100644 --- a/panda/src/tform/driveInterface.h +++ b/panda/src/tform/driveInterface.h @@ -2,6 +2,19 @@ // Created by: drose (17Feb00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef DRIVEINTERFACE_H #define DRIVEINTERFACE_H @@ -67,9 +80,9 @@ PUBLISHED: INLINE void set_x(float x); INLINE void set_y(float y); INLINE void set_z(float z); - + /// **** Rotation **** - + INLINE const LVecBase3f &get_hpr() const; INLINE float get_h() const; INLINE float get_p() const; @@ -139,7 +152,7 @@ private: void set_key(bool down); void clear(); bool operator < (const KeyHeld &other) const; - + float _effect; bool _down; double _changed_time; diff --git a/panda/src/tform/mouseWatcher.I b/panda/src/tform/mouseWatcher.I index 8b6c97c3e6..295fc2239b 100644 --- a/panda/src/tform/mouseWatcher.I +++ b/panda/src/tform/mouseWatcher.I @@ -1,6 +1,19 @@ // Filename: mouseWatcher.I // Created by: drose (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -58,7 +71,7 @@ get_mouse_y() const { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::is_over_region +// Function: MouseWatcher::is_over_region // Access: Published // Description: Returns true if the mouse is over any rectangular // region, false otherwise. @@ -69,7 +82,7 @@ is_over_region() const { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::is_over_region +// Function: MouseWatcher::is_over_region // Access: Published // Description: Returns true if the mouse is over any rectangular // region, false otherwise. @@ -80,7 +93,7 @@ is_over_region(float x, float y) const { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::is_over_region +// Function: MouseWatcher::is_over_region // Access: Published // Description: Returns true if the mouse is over any rectangular // region, false otherwise. @@ -91,7 +104,7 @@ is_over_region(const LPoint2f &pos) const { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::get_over_region +// Function: MouseWatcher::get_over_region // Access: Published // Description: Returns the smallest region the mouse is currently // over, or NULL if it is over no region. @@ -102,7 +115,7 @@ get_over_region() const { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::get_over_region +// Function: MouseWatcher::get_over_region // Access: Published // Description: Returns the smallest region the indicated point is // over, or NULL if it is over no region. diff --git a/panda/src/tform/mouseWatcher.cxx b/panda/src/tform/mouseWatcher.cxx index 8aca59d355..314d7a6eaa 100644 --- a/panda/src/tform/mouseWatcher.cxx +++ b/panda/src/tform/mouseWatcher.cxx @@ -1,6 +1,19 @@ // Filename: mouseWatcher.cxx // Created by: drose (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "mouseWatcher.h" @@ -26,7 +39,7 @@ TypeHandle MouseWatcher::_button_events_type; //////////////////////////////////////////////////////////////////// // Function: MouseWatcher::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// MouseWatcher:: MouseWatcher(const string &name) : DataNode(name) { @@ -71,7 +84,7 @@ has_region(MouseWatcherRegion *region) const { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::remove_region +// Function: MouseWatcher::remove_region // Access: Published // Description: Removes the indicated region from the Watcher. // Returns true if it was successfully removed, or false @@ -89,7 +102,7 @@ remove_region(MouseWatcherRegion *region) { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::find_region +// Function: MouseWatcher::find_region // Access: Published // Description: Returns a pointer to the first region found with the // indicated name. If multiple regions share the same @@ -109,7 +122,7 @@ find_region(const string &name) const { } //////////////////////////////////////////////////////////////////// -// Function: MouseWatcher::get_over_region +// Function: MouseWatcher::get_over_region // Access: Published // Description: Returns the preferred region the mouse is over. In // the case of overlapping regions, the region with the @@ -145,7 +158,7 @@ get_over_region(const LPoint2f &pos) const { //////////////////////////////////////////////////////////////////// // Function: MouseWatcher::output // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void MouseWatcher:: output(ostream &out) const { @@ -156,7 +169,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: MouseWatcher::write // Access: Public, Virtual -// Description: +// Description: //////////////////////////////////////////////////////////////////// void MouseWatcher:: write(ostream &out, int indent_level) const { @@ -191,7 +204,7 @@ set_current_region(MouseWatcherRegion *region) { if (_current_region != (MouseWatcherRegion *)NULL) { throw_event_pattern(_enter_pattern, _current_region); } - } + } } //////////////////////////////////////////////////////////////////// @@ -201,7 +214,7 @@ set_current_region(MouseWatcherRegion *region) { // using the given pattern. //////////////////////////////////////////////////////////////////// void MouseWatcher:: -throw_event_pattern(const string &pattern, const MouseWatcherRegion *region, +throw_event_pattern(const string &pattern, const MouseWatcherRegion *region, const string &button_name) { if (pattern.empty()) { return; @@ -243,7 +256,7 @@ throw_event_pattern(const string &pattern, const MouseWatcherRegion *region, //////////////////////////////////////////////////////////////////// // Function: MouseWatcher::transmit_data // Access: Public -// Description: Convert mouse data into a mouseWatcher matrix +// Description: Convert mouse data into a mouseWatcher matrix //////////////////////////////////////////////////////////////////// void MouseWatcher:: transmit_data(NodeAttributes &data) { diff --git a/panda/src/tform/mouseWatcher.h b/panda/src/tform/mouseWatcher.h index 461ac6c540..456dd8f382 100644 --- a/panda/src/tform/mouseWatcher.h +++ b/panda/src/tform/mouseWatcher.h @@ -1,6 +1,19 @@ // Filename: mouseWatcher.h // Created by: drose (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MOUSEWATCHER_H @@ -67,7 +80,7 @@ PUBLISHED: INLINE void set_button_up_pattern(const string &pattern); INLINE const string &get_button_up_pattern() const; - + INLINE void set_enter_pattern(const string &pattern); INLINE const string &get_enter_pattern() const; @@ -119,7 +132,7 @@ public: virtual void transmit_data(NodeAttributes &data); - // inputs & outputs + // inputs & outputs static TypeHandle _xyz_type; static TypeHandle _pixel_xyz_type; static TypeHandle _button_events_type; diff --git a/panda/src/tform/mouseWatcherRegion.I b/panda/src/tform/mouseWatcherRegion.I index 226a01c549..5d882bc11e 100644 --- a/panda/src/tform/mouseWatcherRegion.I +++ b/panda/src/tform/mouseWatcherRegion.I @@ -1,13 +1,26 @@ // Filename: mouseWatcherRegion.I // Created by: drose (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: MouseWatcherRegion::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MouseWatcherRegion:: MouseWatcherRegion(const string &name, float left, float right, @@ -23,7 +36,7 @@ MouseWatcherRegion(const string &name, float left, float right, //////////////////////////////////////////////////////////////////// // Function: MouseWatcherRegion::Constructor // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE MouseWatcherRegion:: MouseWatcherRegion(const string &name, const LVecBase4f &frame) : @@ -38,7 +51,7 @@ MouseWatcherRegion(const string &name, const LVecBase4f &frame) : //////////////////////////////////////////////////////////////////// // Function: MouseWatcherRegion::set_frame // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void MouseWatcherRegion:: set_frame(float left, float right, float bottom, float top) { @@ -48,7 +61,7 @@ set_frame(float left, float right, float bottom, float top) { //////////////////////////////////////////////////////////////////// // Function: MouseWatcherRegion::set_frame // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE void MouseWatcherRegion:: set_frame(const LVecBase4f &frame) { @@ -59,7 +72,7 @@ set_frame(const LVecBase4f &frame) { //////////////////////////////////////////////////////////////////// // Function: MouseWatcherRegion::get_frame // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE const LVecBase4f &MouseWatcherRegion:: get_frame() const { diff --git a/panda/src/tform/mouseWatcherRegion.cxx b/panda/src/tform/mouseWatcherRegion.cxx index 883f70f2a0..a086f79052 100644 --- a/panda/src/tform/mouseWatcherRegion.cxx +++ b/panda/src/tform/mouseWatcherRegion.cxx @@ -1,6 +1,19 @@ // Filename: mouseWatcherRegion.cxx // Created by: drose (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "mouseWatcherRegion.h" @@ -13,7 +26,7 @@ TypeHandle MouseWatcherRegion::_type_handle; //////////////////////////////////////////////////////////////////// // Function: MouseWatcherRegion::output // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void MouseWatcherRegion:: output(ostream &out) const { @@ -23,7 +36,7 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: MouseWatcherRegion::write // Access: Published -// Description: +// Description: //////////////////////////////////////////////////////////////////// void MouseWatcherRegion:: write(ostream &out, int indent_level) const { diff --git a/panda/src/tform/mouseWatcherRegion.h b/panda/src/tform/mouseWatcherRegion.h index 23f12906a3..53301c8633 100644 --- a/panda/src/tform/mouseWatcherRegion.h +++ b/panda/src/tform/mouseWatcherRegion.h @@ -1,6 +1,19 @@ // Filename: mouseWatcherRegion.h // Created by: drose (13Jul00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef MOUSEWATCHERREGION_H diff --git a/panda/src/tform/planarSlider.cxx b/panda/src/tform/planarSlider.cxx index 5ac8b78a5a..7b00f7f9f2 100644 --- a/panda/src/tform/planarSlider.cxx +++ b/panda/src/tform/planarSlider.cxx @@ -1,6 +1,19 @@ // Filename: planarSlider.cxx // Created by: drose (10Jan00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "planarSlider.h" @@ -24,7 +37,7 @@ TypeHandle PlanarSlider::_transform_type; //////////////////////////////////////////////////////////////////// // Function: PlanarSlider::Constructor // Access: Public, Scheme -// Description: +// Description: //////////////////////////////////////////////////////////////////// PlanarSlider:: PlanarSlider(const string &name) : DataNode(name) { @@ -120,7 +133,7 @@ set_mouse_pos(const LPoint2f &mouse_pos) { _mouse_pos.set(max(min(mouse_pos[0], 1.0f), -1.0f), max(min(mouse_pos[1], 1.0f), -1.0f)); - LMatrix4f mat = + LMatrix4f mat = _inverse_mat * LMatrix4f::translate_mat(LVector3f::rfu(_mouse_pos[0], _mouse_pos[1], @@ -130,7 +143,7 @@ set_mouse_pos(const LPoint2f &mouse_pos) { _transform->set_value(mat); } - + //////////////////////////////////////////////////////////////////// // Function: PlanarSlider::get_mouse_pos // Access: Public, Scheme @@ -145,7 +158,7 @@ get_mouse_pos() const { //////////////////////////////////////////////////////////////////// // Function: PlanarSlider::transmit_data // Access: Public -// Description: Convert mouse data into a planarSlider matrix +// Description: Convert mouse data into a planarSlider matrix //////////////////////////////////////////////////////////////////// void PlanarSlider:: transmit_data(NodeAttributes &data) { @@ -157,7 +170,7 @@ transmit_data(NodeAttributes &data) { // Now look for a mouse position. const NodeAttribute *xyz = data.get_attribute(_xyz_type); - + if (xyz != (NodeAttribute *)NULL) { if (_mods.is_any_down()) { LVecBase3f p = DCAST(Vec3DataAttribute, xyz)->get_value(); diff --git a/panda/src/tform/planarSlider.h b/panda/src/tform/planarSlider.h index 45899f2d0a..664d834a72 100644 --- a/panda/src/tform/planarSlider.h +++ b/panda/src/tform/planarSlider.h @@ -2,6 +2,19 @@ // Created by: drose (10Jan00) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef PLANARSLIDER_H #define PLANARSLIDER_H diff --git a/panda/src/tform/trackball.cxx b/panda/src/tform/trackball.cxx index cffd82d942..0f2e8d8081 100644 --- a/panda/src/tform/trackball.cxx +++ b/panda/src/tform/trackball.cxx @@ -1,6 +1,19 @@ // Filename: trackball.cxx // Created by: drose (27Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "trackball.h" @@ -236,7 +249,7 @@ reset_origin_here() { _rotation = _orig; _translation.set(0.0, 0.0, 0.0); } - + //////////////////////////////////////////////////////////////////// // Function: Trackball::move_origin @@ -384,28 +397,28 @@ apply(double x, double y, int button) { } if (button == B1_MASK) { // Button 1: translate in plane parallel to screen. - - _translation += + + _translation += x * _fwdscale * LVector3f::right(_cs) + y * _fwdscale * LVector3f::down(_cs); - + } else if (button == (B2_MASK | B3_MASK)) { // Buttons 2 + 3: rotate about the vector perpendicular to the // screen. - - _rotation *= - LMatrix4f::rotate_mat_normaxis((x - y) * _rotscale, + + _rotation *= + LMatrix4f::rotate_mat_normaxis((x - y) * _rotscale, LVector3f::forward(_cs), _cs); - + } else if ((button == B2_MASK) || (button == (B1_MASK | B3_MASK))) { // Button 2, or buttons 1 + 3: rotate about the right and up // vectors. (We alternately define this as buttons 1 + 3, to // support two-button mice.) - + _rotation *= LMatrix4f::rotate_mat_normaxis(x * _rotscale, LVector3f::up(_cs), _cs) * LMatrix4f::rotate_mat_normaxis(y * _rotscale, LVector3f::right(_cs), _cs); - + } else if ((button == B3_MASK) || (button == (B1_MASK | B2_MASK))) { // Button 3, or buttons 1 + 2: dolly in and out along the forward // vector. (We alternately define this as buttons 1 + 2, to @@ -466,7 +479,7 @@ recompute() { //////////////////////////////////////////////////////////////////// // Function: Trackball::transmit_data // Access: Public -// Description: Convert mouse data into a trackball matrix +// Description: Convert mouse data into a trackball matrix //////////////////////////////////////////////////////////////////// void Trackball:: transmit_data(NodeAttributes &data) { @@ -478,7 +491,7 @@ transmit_data(NodeAttributes &data) { // Now, check for mouse motion. const NodeAttribute *pixel_xyz = data.get_attribute(_pixel_xyz_type); - + if (pixel_xyz != (NodeAttribute *)NULL) { LVecBase3f p = DCAST(Vec3DataAttribute, pixel_xyz)->get_value(); float this_x = p[0]; @@ -499,7 +512,7 @@ transmit_data(NodeAttributes &data) { float y = this_y - _lasty; apply(x, y, this_button); - + _lastx = this_x; _lasty = this_y; } diff --git a/panda/src/tform/trackball.h b/panda/src/tform/trackball.h index 76c53696bf..4c7264d364 100644 --- a/panda/src/tform/trackball.h +++ b/panda/src/tform/trackball.h @@ -2,6 +2,19 @@ // Created by: drose (27Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TRACKBALL_H #define TRACKBALL_H @@ -51,9 +64,9 @@ PUBLISHED: void set_x(float x); void set_y(float y); void set_z(float z); - + /// **** Rotation **** - + LVecBase3f get_hpr() const; float get_h() const; float get_p() const; @@ -96,7 +109,7 @@ private: float _rotscale; float _fwdscale; - + LMatrix4f _rotation; LPoint3f _translation; LMatrix4f _mat, _orig; diff --git a/panda/src/tform/transform2sg.cxx b/panda/src/tform/transform2sg.cxx index 7ece0045a1..842a9a3393 100644 --- a/panda/src/tform/transform2sg.cxx +++ b/panda/src/tform/transform2sg.cxx @@ -1,6 +1,19 @@ // Filename: transform2sg.cxx // Created by: drose (27Jan99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "transform2sg.h" @@ -52,12 +65,12 @@ get_arc() const { //////////////////////////////////////////////////////////////////// // Function: Transform2SG::transmit_data // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void Transform2SG:: transmit_data(NodeAttributes &data) { const NodeAttribute *transform = data.get_attribute(_transform_type); - + if (transform != (NodeAttribute *)NULL && _arc != (NodeRelation *)NULL) { const LMatrix4f &mat = DCAST(MatrixDataAttribute, transform)->get_value(); _arc->set_transition(new TransformTransition(mat)); @@ -78,7 +91,7 @@ init_type() { DataNode::init_type(); register_type(_type_handle, "Transform2SG", DataNode::get_class_type()); - + MatrixDataTransition::init_type(); register_data_transition(_transform_type, "Transform", MatrixDataTransition::get_class_type()); diff --git a/panda/src/tform/transform2sg.h b/panda/src/tform/transform2sg.h index 91250321e6..0a769f4d1b 100644 --- a/panda/src/tform/transform2sg.h +++ b/panda/src/tform/transform2sg.h @@ -2,6 +2,19 @@ // Created by: drose (27Jan99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef TRANSFORM2SG_H #define TRANSFORM2SG_H @@ -28,7 +41,7 @@ PUBLISHED: private: NodeRelation *_arc; - + //////////////////////////////////////////////////////////////////// // From parent class DataNode //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/config_vrpn.cxx b/panda/src/vrpn/config_vrpn.cxx index b0d8e47a97..bb7b98d4f8 100644 --- a/panda/src/vrpn/config_vrpn.cxx +++ b/panda/src/vrpn/config_vrpn.cxx @@ -1,6 +1,19 @@ // Filename: config_vrpn.cxx // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_vrpn.h" diff --git a/panda/src/vrpn/config_vrpn.h b/panda/src/vrpn/config_vrpn.h index 2fd4b08eca..e5524d3bd3 100644 --- a/panda/src/vrpn/config_vrpn.h +++ b/panda/src/vrpn/config_vrpn.h @@ -1,6 +1,19 @@ // Filename: config_vrpn.h // Created by: jason (07Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef CONFIG_VRPN_H diff --git a/panda/src/vrpn/vrpnAnalog.I b/panda/src/vrpn/vrpnAnalog.I index 9458d6d73e..544cd78a2a 100644 --- a/panda/src/vrpn/vrpnAnalog.I +++ b/panda/src/vrpn/vrpnAnalog.I @@ -1,6 +1,19 @@ // Filename: vrpnAnalog.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnAnalog.cxx b/panda/src/vrpn/vrpnAnalog.cxx index a900fcad46..7fe5769024 100644 --- a/panda/src/vrpn/vrpnAnalog.cxx +++ b/panda/src/vrpn/vrpnAnalog.cxx @@ -1,6 +1,19 @@ // Filename: vrpnAnalog.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnAnalog.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: VrpnAnalog::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnAnalog:: VrpnAnalog(const string &analog_name, vrpn_Connection *connection) : @@ -29,7 +42,7 @@ VrpnAnalog(const string &analog_name, vrpn_Connection *connection) : //////////////////////////////////////////////////////////////////// // Function: VrpnAnalog::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnAnalog:: ~VrpnAnalog() { @@ -62,7 +75,7 @@ unmark(VrpnAnalogDevice *device) { vrpn_cat.debug() << *this << " unmarking " << *device << "\n"; } - Devices::iterator di = + Devices::iterator di = find(_devices.begin(), _devices.end(), device); if (di != _devices.end()) { @@ -73,7 +86,7 @@ unmark(VrpnAnalogDevice *device) { //////////////////////////////////////////////////////////////////// // Function: VrpnAnalog::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnAnalog:: output(ostream &out) const { @@ -83,11 +96,11 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: VrpnAnalog::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnAnalog:: write(ostream &out, int indent_level) const { - indent(out, indent_level) + indent(out, indent_level) << get_analog_name() << " (" << _devices.size() << " devices)\n"; } diff --git a/panda/src/vrpn/vrpnAnalog.h b/panda/src/vrpn/vrpnAnalog.h index 8f9251c434..7f79e05595 100644 --- a/panda/src/vrpn/vrpnAnalog.h +++ b/panda/src/vrpn/vrpnAnalog.h @@ -1,6 +1,19 @@ // Filename: vrpnAnalog.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNANALOG_H diff --git a/panda/src/vrpn/vrpnAnalogDevice.I b/panda/src/vrpn/vrpnAnalogDevice.I index a4e2814f43..0f0db50b66 100644 --- a/panda/src/vrpn/vrpnAnalogDevice.I +++ b/panda/src/vrpn/vrpnAnalogDevice.I @@ -1,6 +1,19 @@ // Filename: vrpnAnalogDevice.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnAnalogDevice.cxx b/panda/src/vrpn/vrpnAnalogDevice.cxx index 214a932f8b..45e01906ef 100644 --- a/panda/src/vrpn/vrpnAnalogDevice.cxx +++ b/panda/src/vrpn/vrpnAnalogDevice.cxx @@ -1,6 +1,19 @@ // Filename: vrpnAnalogDevice.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnAnalogDevice.h" @@ -11,7 +24,7 @@ TypeHandle VrpnAnalogDevice::_type_handle; //////////////////////////////////////////////////////////////////// // Function: VrpnAnalogDevice::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnAnalogDevice:: VrpnAnalogDevice(VrpnClient *client, const string &device_name, @@ -24,7 +37,7 @@ VrpnAnalogDevice(VrpnClient *client, const string &device_name, //////////////////////////////////////////////////////////////////// // Function: VrpnAnalogDevice::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnAnalogDevice:: ~VrpnAnalogDevice() { diff --git a/panda/src/vrpn/vrpnAnalogDevice.h b/panda/src/vrpn/vrpnAnalogDevice.h index 31ef76dbe3..6506a40168 100644 --- a/panda/src/vrpn/vrpnAnalogDevice.h +++ b/panda/src/vrpn/vrpnAnalogDevice.h @@ -1,6 +1,19 @@ // Filename: vrpnAnalogDevice.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNANALOGDEVICE_H @@ -45,7 +58,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/vrpn/vrpnButton.I b/panda/src/vrpn/vrpnButton.I index 8ca8e50821..836af67e08 100644 --- a/panda/src/vrpn/vrpnButton.I +++ b/panda/src/vrpn/vrpnButton.I @@ -1,6 +1,19 @@ // Filename: vrpnButton.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnButton.cxx b/panda/src/vrpn/vrpnButton.cxx index 3c9b39a04d..959913f375 100644 --- a/panda/src/vrpn/vrpnButton.cxx +++ b/panda/src/vrpn/vrpnButton.cxx @@ -1,6 +1,19 @@ // Filename: vrpnButton.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnButton.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: VrpnButton::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnButton:: VrpnButton(const string &button_name, vrpn_Connection *connection) : @@ -29,7 +42,7 @@ VrpnButton(const string &button_name, vrpn_Connection *connection) : //////////////////////////////////////////////////////////////////// // Function: VrpnButton::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnButton:: ~VrpnButton() { @@ -62,7 +75,7 @@ unmark(VrpnButtonDevice *device) { vrpn_cat.debug() << *this << " unmarking " << *device << "\n"; } - Devices::iterator di = + Devices::iterator di = find(_devices.begin(), _devices.end(), device); if (di != _devices.end()) { @@ -73,7 +86,7 @@ unmark(VrpnButtonDevice *device) { //////////////////////////////////////////////////////////////////// // Function: VrpnButton::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnButton:: output(ostream &out) const { @@ -83,11 +96,11 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: VrpnButton::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnButton:: write(ostream &out, int indent_level) const { - indent(out, indent_level) + indent(out, indent_level) << get_button_name() << " (" << _devices.size() << " devices)\n"; } diff --git a/panda/src/vrpn/vrpnButton.h b/panda/src/vrpn/vrpnButton.h index 3ebb663224..8f1c55dea8 100644 --- a/panda/src/vrpn/vrpnButton.h +++ b/panda/src/vrpn/vrpnButton.h @@ -1,6 +1,19 @@ // Filename: vrpnButton.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNBUTTON_H diff --git a/panda/src/vrpn/vrpnButtonDevice.I b/panda/src/vrpn/vrpnButtonDevice.I index ff88455ac8..d6d349c6d3 100644 --- a/panda/src/vrpn/vrpnButtonDevice.I +++ b/panda/src/vrpn/vrpnButtonDevice.I @@ -1,6 +1,19 @@ // Filename: vrpnButtonDevice.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnButtonDevice.cxx b/panda/src/vrpn/vrpnButtonDevice.cxx index 9b3d25c8e4..ec5fa07395 100644 --- a/panda/src/vrpn/vrpnButtonDevice.cxx +++ b/panda/src/vrpn/vrpnButtonDevice.cxx @@ -1,6 +1,19 @@ // Filename: vrpnButtonDevice.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnButtonDevice.h" @@ -11,7 +24,7 @@ TypeHandle VrpnButtonDevice::_type_handle; //////////////////////////////////////////////////////////////////// // Function: VrpnButtonDevice::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnButtonDevice:: VrpnButtonDevice(VrpnClient *client, const string &device_name, @@ -24,7 +37,7 @@ VrpnButtonDevice(VrpnClient *client, const string &device_name, //////////////////////////////////////////////////////////////////// // Function: VrpnButtonDevice::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnButtonDevice:: ~VrpnButtonDevice() { diff --git a/panda/src/vrpn/vrpnButtonDevice.h b/panda/src/vrpn/vrpnButtonDevice.h index fa200d4f56..f124ad7055 100644 --- a/panda/src/vrpn/vrpnButtonDevice.h +++ b/panda/src/vrpn/vrpnButtonDevice.h @@ -1,6 +1,19 @@ // Filename: vrpnButtonDevice.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNBUTTONDEVICE_H @@ -45,7 +58,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/vrpn/vrpnClient.I b/panda/src/vrpn/vrpnClient.I index 8cbca3500c..4f2deb5569 100644 --- a/panda/src/vrpn/vrpnClient.I +++ b/panda/src/vrpn/vrpnClient.I @@ -1,6 +1,19 @@ // Filename: vrpnClient.I // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// @@ -59,7 +72,7 @@ convert_to_secs(struct timeval msg_time) { //////////////////////////////////////////////////////////////////// // Function: VrpnClient::constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// INLINE VrpnClient:: VrpnClient(const string &server) : @@ -72,7 +85,7 @@ VrpnClient(const string &server) : // Function: VrpnClient::tracker_position // Access: Private // Description: Stores the latest position information as sent by -// the tracker (for the particular sensor we have +// the tracker (for the particular sensor we have // interest in) //////////////////////////////////////////////////////////////////// INLINE void VrpnClient:: @@ -88,14 +101,14 @@ tracker_position(const string &tracker, const vrpn_TRACKERCB info) { // Function: VrpnClient::tracker_velocity // Access: Private // Description: Stores the latest velocity information as sent by -// the tracker (for the particular sensor we have +// the tracker (for the particular sensor we have // interest in) //////////////////////////////////////////////////////////////////// INLINE void VrpnClient:: tracker_velocity(const string &tracker, const vrpn_TRACKERVELCB info) { double vtime = convert_to_secs(info.msg_time); LPoint3f vel(info.vel[0], info.vel[1], info.vel[2]); - LVector4f vquat(info.vel_quat[0], info.vel_quat[1], + LVector4f vquat(info.vel_quat[0], info.vel_quat[1], info.vel_quat[2], info.vel_quat[3]); float dt = info.vel_quat_dt; @@ -105,14 +118,14 @@ tracker_velocity(const string &tracker, const vrpn_TRACKERVELCB info) { // Function: VrpnClient::tracker_acceleration // Access: Private // Description: Stores the latest acceleration information as sent by -// the tracker (for the particular sensor we have +// the tracker (for the particular sensor we have // interest in) //////////////////////////////////////////////////////////////////// INLINE void VrpnClient:: tracker_acceleration(const string &tracker, const vrpn_TRACKERACCCB info) { double atime = convert_to_secs(info.msg_time); LPoint3f acc(info.acc[0], info.acc[1], info.acc[2]); - LVector4f aquat(info.acc_quat[0], info.acc_quat[1], + LVector4f aquat(info.acc_quat[0], info.acc_quat[1], info.acc_quat[2], info.acc_quat[3]); float dt = info.acc_quat_dt; diff --git a/panda/src/vrpn/vrpnClient.cxx b/panda/src/vrpn/vrpnClient.cxx index 3837ade375..99abbca2e9 100644 --- a/panda/src/vrpn/vrpnClient.cxx +++ b/panda/src/vrpn/vrpnClient.cxx @@ -1,6 +1,19 @@ // Filename: vrpnClient.cxx // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnClient.h" @@ -22,7 +35,7 @@ TypeHandle VrpnClient::_type_handle; //////////////////////////////////////////////////////////////////// // Function: VrpnClient::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnClient:: VrpnClient(const string &server_name) : @@ -46,7 +59,7 @@ VrpnClient(const string &server_name) : //////////////////////////////////////////////////////////////////// // Function: VrpnClient::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnClient:: ~VrpnClient() { @@ -201,7 +214,7 @@ do_poll() { if (vrpn_cat.is_spam()) { vrpn_cat.spam() - << "VrpnClient " << _server_name << " polling " + << "VrpnClient " << _server_name << " polling " << _trackers.size() + _buttons.size() + _analogs.size() + _dials.size() << " devices.\n"; } @@ -269,7 +282,7 @@ make_tracker_device(const string &device_name) { string tracker_name = device_name; int sensor = 0; VrpnTrackerDevice::DataType data_type = VrpnTrackerDevice::DT_position; - + size_t colon = device_name.rfind(':'); if (colon != string::npos && colon + 1 < device_name.length()) { size_t begin = colon + 1; @@ -303,7 +316,7 @@ make_tracker_device(const string &device_name) { VrpnTracker *tracker = get_tracker(tracker_name); - VrpnTrackerDevice *device = + VrpnTrackerDevice *device = new VrpnTrackerDevice(this, device_name, sensor, data_type, tracker); if (vrpn_cat.is_debug()) { @@ -330,7 +343,7 @@ make_button_device(const string &device_name) { VrpnButton *button = get_button(device_name); - VrpnButtonDevice *device = + VrpnButtonDevice *device = new VrpnButtonDevice(this, device_name, button); if (vrpn_cat.is_debug()) { @@ -357,7 +370,7 @@ make_analog_device(const string &device_name) { VrpnAnalog *analog = get_analog(device_name); - VrpnAnalogDevice *device = + VrpnAnalogDevice *device = new VrpnAnalogDevice(this, device_name, analog); if (vrpn_cat.is_debug()) { @@ -384,7 +397,7 @@ make_dial_device(const string &device_name) { VrpnDial *dial = get_dial(device_name); - VrpnDialDevice *device = + VrpnDialDevice *device = new VrpnDialDevice(this, device_name, dial); if (vrpn_cat.is_debug()) { @@ -809,7 +822,7 @@ max_analog_channels() { // some kind of cacheing scheme so we don't call mainloop // multiple times when a user is just asking for the data // of multiple sensors on 1 tracker (as that is the interface -// supported). This is a non-trivial problem as it is +// supported). This is a non-trivial problem as it is // difficult to know when we should and shouldn't cache. //////////////////////////////////////////////////////////////////// void VrpnClient:: diff --git a/panda/src/vrpn/vrpnClient.h b/panda/src/vrpn/vrpnClient.h index 64cf83065a..c21b742ee3 100644 --- a/panda/src/vrpn/vrpnClient.h +++ b/panda/src/vrpn/vrpnClient.h @@ -1,6 +1,19 @@ // Filename: vrpnClient.h // Created by: jason (04Aug00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNCLIENT_H @@ -39,12 +52,12 @@ PUBLISHED: public: INLINE static double convert_to_secs(struct timeval msg_time); - + protected: virtual PT(ClientDevice) make_device(TypeHandle device_type, const string &device_name); - virtual bool disconnect_device(TypeHandle device_type, + virtual bool disconnect_device(TypeHandle device_type, const string &device_name, ClientDevice *device); @@ -100,7 +113,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; }; diff --git a/panda/src/vrpn/vrpnDial.I b/panda/src/vrpn/vrpnDial.I index 4711f87ca3..3d4ac259e7 100644 --- a/panda/src/vrpn/vrpnDial.I +++ b/panda/src/vrpn/vrpnDial.I @@ -1,6 +1,19 @@ // Filename: vrpnDial.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnDial.cxx b/panda/src/vrpn/vrpnDial.cxx index 3f12291abc..b7409cf56b 100644 --- a/panda/src/vrpn/vrpnDial.cxx +++ b/panda/src/vrpn/vrpnDial.cxx @@ -1,6 +1,19 @@ // Filename: vrpnDial.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnDial.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: VrpnDial::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnDial:: VrpnDial(const string &dial_name, vrpn_Connection *connection) : @@ -29,7 +42,7 @@ VrpnDial(const string &dial_name, vrpn_Connection *connection) : //////////////////////////////////////////////////////////////////// // Function: VrpnDial::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnDial:: ~VrpnDial() { @@ -62,7 +75,7 @@ unmark(VrpnDialDevice *device) { vrpn_cat.debug() << *this << " unmarking " << *device << "\n"; } - Devices::iterator di = + Devices::iterator di = find(_devices.begin(), _devices.end(), device); if (di != _devices.end()) { @@ -73,7 +86,7 @@ unmark(VrpnDialDevice *device) { //////////////////////////////////////////////////////////////////// // Function: VrpnDial::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnDial:: output(ostream &out) const { @@ -83,11 +96,11 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: VrpnDial::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnDial:: write(ostream &out, int indent_level) const { - indent(out, indent_level) + indent(out, indent_level) << get_dial_name() << " (" << _devices.size() << " devices)\n"; } diff --git a/panda/src/vrpn/vrpnDial.h b/panda/src/vrpn/vrpnDial.h index 97525ca6db..e9452bb873 100644 --- a/panda/src/vrpn/vrpnDial.h +++ b/panda/src/vrpn/vrpnDial.h @@ -1,6 +1,19 @@ // Filename: vrpnDial.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNDIAL_H diff --git a/panda/src/vrpn/vrpnDialDevice.I b/panda/src/vrpn/vrpnDialDevice.I index 0154dd5f22..62796757f3 100644 --- a/panda/src/vrpn/vrpnDialDevice.I +++ b/panda/src/vrpn/vrpnDialDevice.I @@ -1,6 +1,19 @@ // Filename: vrpnDialDevice.I // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnDialDevice.cxx b/panda/src/vrpn/vrpnDialDevice.cxx index 5d7f82f0de..4be327ffc0 100644 --- a/panda/src/vrpn/vrpnDialDevice.cxx +++ b/panda/src/vrpn/vrpnDialDevice.cxx @@ -1,6 +1,19 @@ // Filename: vrpnDialDevice.cxx // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnDialDevice.h" @@ -11,7 +24,7 @@ TypeHandle VrpnDialDevice::_type_handle; //////////////////////////////////////////////////////////////////// // Function: VrpnDialDevice::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnDialDevice:: VrpnDialDevice(VrpnClient *client, const string &device_name, @@ -24,7 +37,7 @@ VrpnDialDevice(VrpnClient *client, const string &device_name, //////////////////////////////////////////////////////////////////// // Function: VrpnDialDevice::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnDialDevice:: ~VrpnDialDevice() { diff --git a/panda/src/vrpn/vrpnDialDevice.h b/panda/src/vrpn/vrpnDialDevice.h index 31478fb847..1d1dd3919a 100644 --- a/panda/src/vrpn/vrpnDialDevice.h +++ b/panda/src/vrpn/vrpnDialDevice.h @@ -1,6 +1,19 @@ // Filename: vrpnDialDevice.h // Created by: drose (26Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNDIALDEVICE_H @@ -45,7 +58,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/vrpn/vrpnTracker.I b/panda/src/vrpn/vrpnTracker.I index ba8b87130e..75de1560df 100644 --- a/panda/src/vrpn/vrpnTracker.I +++ b/panda/src/vrpn/vrpnTracker.I @@ -1,6 +1,19 @@ // Filename: vrpnTracker.I // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnTracker.cxx b/panda/src/vrpn/vrpnTracker.cxx index e4f12c59bb..bc81169c4c 100644 --- a/panda/src/vrpn/vrpnTracker.cxx +++ b/panda/src/vrpn/vrpnTracker.cxx @@ -1,6 +1,19 @@ // Filename: vrpnTracker.cxx // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnTracker.h" @@ -15,7 +28,7 @@ //////////////////////////////////////////////////////////////////// // Function: VrpnTracker::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnTracker:: VrpnTracker(const string &tracker_name, vrpn_Connection *connection) : @@ -31,7 +44,7 @@ VrpnTracker(const string &tracker_name, vrpn_Connection *connection) : //////////////////////////////////////////////////////////////////// // Function: VrpnTracker::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnTracker:: ~VrpnTracker() { @@ -64,7 +77,7 @@ unmark(VrpnTrackerDevice *device) { vrpn_cat.debug() << *this << " unmarking " << *device << "\n"; } - Devices::iterator di = + Devices::iterator di = find(_devices.begin(), _devices.end(), device); if (di != _devices.end()) { @@ -75,7 +88,7 @@ unmark(VrpnTrackerDevice *device) { //////////////////////////////////////////////////////////////////// // Function: VrpnTracker::output // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnTracker:: output(ostream &out) const { @@ -85,11 +98,11 @@ output(ostream &out) const { //////////////////////////////////////////////////////////////////// // Function: VrpnTracker::write // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// void VrpnTracker:: write(ostream &out, int indent_level) const { - indent(out, indent_level) + indent(out, indent_level) << get_tracker_name() << " (" << _devices.size() << " devices)\n"; } @@ -146,7 +159,7 @@ vrpn_velocity_callback(void *userdata, const vrpn_TRACKERVELCB info) { device->lock(); device->_data.set_time(VrpnClient::convert_to_secs(info.msg_time)); device->_data.set_pos(LPoint3f(info.vel[0], info.vel[1], info.vel[2])); - device->_data.set_orient(LOrientationf(info.vel_quat[0], info.vel_quat[1], + device->_data.set_orient(LOrientationf(info.vel_quat[0], info.vel_quat[1], info.vel_quat[2], info.vel_quat[3])); device->_data.set_dt(info.vel_quat_dt); device->unlock(); @@ -177,7 +190,7 @@ vrpn_acceleration_callback(void *userdata, const vrpn_TRACKERACCCB info) { device->lock(); device->_data.set_time(VrpnClient::convert_to_secs(info.msg_time)); device->_data.set_pos(LPoint3f(info.acc[0], info.acc[1], info.acc[2])); - device->_data.set_orient(LOrientationf(info.acc_quat[0], info.acc_quat[1], + device->_data.set_orient(LOrientationf(info.acc_quat[0], info.acc_quat[1], info.acc_quat[2], info.acc_quat[3])); device->_data.set_dt(info.acc_quat_dt); device->unlock(); diff --git a/panda/src/vrpn/vrpnTracker.h b/panda/src/vrpn/vrpnTracker.h index 4cdf0f4e1c..e7c9366b6b 100644 --- a/panda/src/vrpn/vrpnTracker.h +++ b/panda/src/vrpn/vrpnTracker.h @@ -1,6 +1,19 @@ // Filename: vrpnTracker.h // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNTRACKER_H diff --git a/panda/src/vrpn/vrpnTrackerDevice.I b/panda/src/vrpn/vrpnTrackerDevice.I index 8f201af9d6..b5a31c5c31 100644 --- a/panda/src/vrpn/vrpnTrackerDevice.I +++ b/panda/src/vrpn/vrpnTrackerDevice.I @@ -1,6 +1,19 @@ // Filename: vrpnTrackerDevice.I // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// diff --git a/panda/src/vrpn/vrpnTrackerDevice.cxx b/panda/src/vrpn/vrpnTrackerDevice.cxx index 57bfb493c4..21fb9f2182 100644 --- a/panda/src/vrpn/vrpnTrackerDevice.cxx +++ b/panda/src/vrpn/vrpnTrackerDevice.cxx @@ -1,6 +1,19 @@ // Filename: vrpnTrackerDevice.cxx // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "vrpnTrackerDevice.h" @@ -11,7 +24,7 @@ TypeHandle VrpnTrackerDevice::_type_handle; //////////////////////////////////////////////////////////////////// // Function: VrpnTrackerDevice::Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnTrackerDevice:: VrpnTrackerDevice(VrpnClient *client, const string &device_name, @@ -27,7 +40,7 @@ VrpnTrackerDevice(VrpnClient *client, const string &device_name, //////////////////////////////////////////////////////////////////// // Function: VrpnTrackerDevice::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// VrpnTrackerDevice:: ~VrpnTrackerDevice() { diff --git a/panda/src/vrpn/vrpnTrackerDevice.h b/panda/src/vrpn/vrpnTrackerDevice.h index 89e67eb0ea..86fde2d0f2 100644 --- a/panda/src/vrpn/vrpnTrackerDevice.h +++ b/panda/src/vrpn/vrpnTrackerDevice.h @@ -1,6 +1,19 @@ // Filename: vrpnTrackerDevice.h // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPNTRACKERDEVICE_H @@ -61,7 +74,7 @@ public: return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - + private: static TypeHandle _type_handle; diff --git a/panda/src/vrpn/vrpn_interface.h b/panda/src/vrpn/vrpn_interface.h index 1954fa59e0..5f205e58c5 100644 --- a/panda/src/vrpn/vrpn_interface.h +++ b/panda/src/vrpn/vrpn_interface.h @@ -1,6 +1,19 @@ // Filename: vrpn_interface.h // Created by: drose (25Jan01) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef VRPN_INTERFACE_H diff --git a/panda/src/wdxdisplay/config_wdxdisplay.cxx b/panda/src/wdxdisplay/config_wdxdisplay.cxx index 8f9a04a5c1..f2d65d572f 100644 --- a/panda/src/wdxdisplay/config_wdxdisplay.cxx +++ b/panda/src/wdxdisplay/config_wdxdisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_wdxdisplay.cxx // Created by: mike (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_wdxdisplay.h" diff --git a/panda/src/wdxdisplay/config_wdxdisplay.h b/panda/src/wdxdisplay/config_wdxdisplay.h index bb8475973d..c663525183 100644 --- a/panda/src/wdxdisplay/config_wdxdisplay.h +++ b/panda/src/wdxdisplay/config_wdxdisplay.h @@ -2,6 +2,19 @@ // Created by: mike (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CONFIG_WDXDISPLAY_H__ #define __CONFIG_WDXDISPLAY_H__ diff --git a/panda/src/wdxdisplay/wdxGraphicsPipe.cxx b/panda/src/wdxdisplay/wdxGraphicsPipe.cxx index c40e06adcc..d1809f6f74 100644 --- a/panda/src/wdxdisplay/wdxGraphicsPipe.cxx +++ b/panda/src/wdxdisplay/wdxGraphicsPipe.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "wdxGraphicsPipe.h" #include "config_wdxdisplay.h" diff --git a/panda/src/wdxdisplay/wdxGraphicsPipe.h b/panda/src/wdxdisplay/wdxGraphicsPipe.h index 5661571d6d..6639e4ee2d 100644 --- a/panda/src/wdxdisplay/wdxGraphicsPipe.h +++ b/panda/src/wdxdisplay/wdxGraphicsPipe.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef WDXGRAPHICSPIPE_H #define WDXGRAPHICSPIPE_H // diff --git a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx index 723544823f..edda3f9080 100644 --- a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx +++ b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx @@ -2,7 +2,18 @@ // Created by: mike (09Jan00) // //////////////////////////////////////////////////////////////////// -// Includes +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #ifndef STRICT #define STRICT @@ -62,7 +73,7 @@ static void DebugPrintPixFmt(DDPIXELFORMAT* pddpf) { *dbgout << " StencilBits:" << (void *) pddpf->dwStencilBitDepth; } - *dbgout << endl; + *dbgout << endl; iddpfnum++; } @@ -81,7 +92,7 @@ HRESULT CALLBACK EnumZBufFmtsCallback( LPDDPIXELFORMAT pddpf, VOID* param ) { } //////////////////////////////////////////////////////////////////// -// Function: lookup_key +// Function: lookup_key // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -188,7 +199,7 @@ void AtExitFn() { } //////////////////////////////////////////////////////////////////// -// Function: static_window_proc +// Function: static_window_proc // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -239,12 +250,12 @@ extern void dbgPrintVidMem(LPDIRECTDRAW7 pDD, LPDDSCAPS2 lpddsCaps,const char *p // Tell PStats about the state of the texture memory. GraphicsStateGuardian::_total_texmem_pcollector.set_level(dwTotal); GraphicsStateGuardian::_used_texmem_pcollector.set_level(dwTotal - dwFree); - #endif + #endif } #endif //////////////////////////////////////////////////////////////////// -// Function: window_proc +// Function: window_proc // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -263,7 +274,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { // to enable this, need to delete call to AtExitFn from under GetMessage loop return 0; - case WM_CLOSE: + case WM_CLOSE: PostQuitMessage(0); return 0; @@ -277,7 +288,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { case WM_SYSCHAR: case WM_CHAR: - return 0; + return 0; case WM_SYSKEYDOWN: case WM_KEYDOWN: GetCursorPos(&point); @@ -306,7 +317,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { y = HIWORD(lparam); if(x & 1 << 15) x -= (1 << 16); if(y & 1 << 15) y -= (1 << 16); - if(_dxgsg->GetDXReady()) + if(_dxgsg->GetDXReady()) handle_keypress(MouseButton::button(button), x, y); return 0; @@ -323,7 +334,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { y = HIWORD(lparam); if(x & 1 << 15) x -= (1 << 16); if(y & 1 << 15) y -= (1 << 16); - if(_dxgsg->GetDXReady()) + if(_dxgsg->GetDXReady()) handle_keyrelease(MouseButton::button(button), x, y); return 0; @@ -333,10 +344,10 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { y = HIWORD(lparam); if(x & 1 << 15) x -= (1 << 16); if(y & 1 << 15) y -= (1 << 16); - if(mouse_motion_enabled() + if(mouse_motion_enabled() && wparam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) { handle_mouse_motion(x, y); - } else if(mouse_passive_motion_enabled() && + } else if(mouse_passive_motion_enabled() && ((wparam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) == 0)) { handle_mouse_motion(x, y); } @@ -344,11 +355,11 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { return 0; case WM_MOVE: - if(_dxgsg->GetDXReady()) + if(_dxgsg->GetDXReady()) handle_window_move(LOWORD(lparam), HIWORD(lparam) ); return 0; - case WM_EXITSIZEMOVE: + case WM_EXITSIZEMOVE: #ifdef _DEBUG wdxdisplay_cat.spam() << "WM_EXITSIZEMOVE received" << endl; #endif @@ -356,9 +367,9 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if(_WindowAdjustingType==Resizing) { _dxgsg->SetDXReady(false); // disable rendering whilst we mess with surfs - // Want to change rendertarget size without destroying d3d device. To save vid memory + // Want to change rendertarget size without destroying d3d device. To save vid memory // (and make resizing work on memory-starved 4MB cards), we need to construct - // a temporary mini-sized render target for the d3d device (it cannot point to a + // a temporary mini-sized render target for the d3d device (it cannot point to a // NULL rendertarget) before creating the fully resized buffers. The old // rendertargets will be freed when these temp targets are set, and that will give // us the memory to create the resized target @@ -409,7 +420,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { exit(1); } RELEASE(pddsDummyZ); - RELEASE(pddsDummy); + RELEASE(pddsDummy); RECT view_rect; GetClientRect( _mwindow, &view_rect ); @@ -423,7 +434,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { _props._xorg = view_rect.left; // _props origin should reflect view rectangle _props._yorg = view_rect.top; - _dxgsg->SetDXReady(true); + _dxgsg->SetDXReady(true); } _WindowAdjustingType = NotAdjusting; return 0; @@ -436,7 +447,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { case WM_DISPLAYCHANGE: { #ifdef _DEBUG - width = LOWORD(lparam); height = HIWORD(lparam); + width = LOWORD(lparam); height = HIWORD(lparam); DWORD newbitdepth=wparam; wdxdisplay_cat.spam() <<"WM_DISPLAYCHANGE received with width:" << width << " height: " << height << " bpp: " << wparam<< endl; #endif @@ -451,7 +462,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { #ifdef _DEBUG { width = LOWORD(lparam); height = HIWORD(lparam); - wdxdisplay_cat.spam() << "WM_SIZE received with width:" << width << " height: " << height << " flags: " << + wdxdisplay_cat.spam() << "WM_SIZE received with width:" << width << " height: " << height << " flags: " << ((wparam == SIZE_MAXHIDE)? "SIZE_MAXHIDE " : "") << ((wparam == SIZE_MAXSHOW)? "SIZE_MAXSHOW " : "") << ((wparam == SIZE_MINIMIZED)? "SIZE_MINIMIZED " : "") << ((wparam == SIZE_RESTORED)? "SIZE_RESTORED " : "") << ((wparam == SIZE_MAXIMIZED)? "SIZE_MAXIMIZED " : "") << endl; @@ -466,7 +477,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if(_props._xsize != width || _props._ysize != height) { _WindowAdjustingType = Resizing; - // for maximized,unmaximize, need to call resize code artificially + // for maximized,unmaximize, need to call resize code artificially // since no WM_EXITSIZEMOVE is generated if(wparam==SIZE_MAXIMIZED) { _bSizeIsMaximized=TRUE; @@ -546,7 +557,7 @@ wdxGraphicsWindow::~wdxGraphicsWindow(void) { } //////////////////////////////////////////////////////////////////// -// Function: config +// Function: config // Access: // Description: Set up win32 window //////////////////////////////////////////////////////////////////// @@ -584,7 +595,7 @@ void wdxGraphicsWindow::config(void) { string windows_icon_filename = get_icon_filename().to_os_specific(); if(!windows_icon_filename.empty()) { - // Note: LoadImage seems to cause win2k internal heap corruption (outputdbgstr warnings) + // Note: LoadImage seems to cause win2k internal heap corruption (outputdbgstr warnings) // if icon is more than 8bpp wc.hIcon = (HICON) LoadImage(NULL, windows_icon_filename.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE); } else { @@ -605,7 +616,7 @@ void wdxGraphicsWindow::config(void) { int style; RECT win_rect; - SetRect(&win_rect, _props._xorg, _props._yorg, _props._xorg + _props._xsize, + SetRect(&win_rect, _props._xorg, _props._yorg, _props._xorg + _props._xsize, _props._yorg + _props._ysize); // rect now contains the coords for the entire window, not the client @@ -630,7 +641,7 @@ void wdxGraphicsWindow::config(void) { } _mwindow = CreateWindow("wdxDisplay", _props._title.c_str(), - style, win_rect.left, win_rect.top, win_rect.right-win_rect.left, + style, win_rect.left, win_rect.top, win_rect.right-win_rect.left, win_rect.bottom-win_rect.top, NULL, NULL, hinstance, 0); } @@ -647,7 +658,7 @@ void wdxGraphicsWindow::config(void) { _hdc = GetDC(_mwindow); - dx_setup(); + dx_setup(); _mouse_input_enabled = false; _mouse_motion_enabled = false; @@ -670,7 +681,7 @@ void wdxGraphicsWindow::config(void) { // UpdateWindow( _mwindow ); } -HRESULT CALLBACK EnumDevicesCallback(LPSTR pDeviceDescription, LPSTR pDeviceName, +HRESULT CALLBACK EnumDevicesCallback(LPSTR pDeviceDescription, LPSTR pDeviceName, LPD3DDEVICEDESC7 pD3DDeviceDesc,LPVOID pContext) { D3DDEVICEDESC7 *pd3ddevs = (D3DDEVICEDESC7 *)pContext; #ifdef _DEBUG @@ -691,10 +702,10 @@ HRESULT WINAPI EnumDisplayModesCallBack(LPDDSURFACEDESC2 lpDDSurfaceDesc,LPVOID DWORD *pDDBDMask = (DWORD*)lpContext; *pDDBDMask |= BitDepth_2_DDBDMask(lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount); - return DDENUMRET_OK; + return DDENUMRET_OK; } -BOOL WINAPI DriverEnumCallback( GUID* pGUID, TCHAR* strDesc,TCHAR* strName, +BOOL WINAPI DriverEnumCallback( GUID* pGUID, TCHAR* strDesc,TCHAR* strName, VOID *argptr, HMONITOR hm) { if(hm!=NULL) // skip over non-primary display devices return DDENUMRET_OK; @@ -727,7 +738,7 @@ dx_setup() { RECT view_rect; int i; HRESULT hr; - DX_DECLARE_CLEAN( DDSURFACEDESC2, SurfaceDesc ); + DX_DECLARE_CLEAN( DDSURFACEDESC2, SurfaceDesc ); // Check for DirectX 7 by looking for DirectDrawCreateEx @@ -778,7 +789,7 @@ dx_setup() { #endif // imperfect method to ID NVid, could also scan desc str, but that isnt fullproof either - BOOL bIsNvidia = (dddi.dwVendorId==4318) || (dddi.dwVendorId==4818); + BOOL bIsNvidia = (dddi.dwVendorId==4318) || (dddi.dwVendorId==4818); // Query DirectDraw for access to Direct3D @@ -789,7 +800,7 @@ dx_setup() { exit(1); } - // just look for HAL and TnL devices right now. I dont think + // just look for HAL and TnL devices right now. I dont think // we have any interest in the sw rasts at this point D3DDEVICEDESC7 d3ddevs[2]; // put HAL in 0, TnL in 1 @@ -834,7 +845,7 @@ dx_setup() { DWORD dwFullScreenBitDepth; - // Now we try to figure out if we can use requested screen resolution and best + // Now we try to figure out if we can use requested screen resolution and best // rendertarget bpp and still have at least 2 meg of texture vidmem // Get Current VidMem avail. Note this is only an estimate, when we switch to fullscreen @@ -851,7 +862,7 @@ dx_setup() { exit(1); } -#ifdef _DEBUG +#ifdef _DEBUG wdxdisplay_cat.debug() << "before FullScreen switch: GetAvailableVidMem returns Total: " << dwTotal/1000000.0 << " Free: " << dwFree/1000000.0 << endl; #endif @@ -875,7 +886,7 @@ dx_setup() { if(dwFree< LOWVIDMEMTHRESHOLD) { // we're going to need 800x600 or 640x480 at 16 bit to save enough tex vidmem dwFullScreenBitDepth=16; // do 16bpp - dwRenderWidth=640; + dwRenderWidth=640; dwRenderHeight=480; wdxdisplay_cat.debug() << "wdxGraphicsWindow:: "<SetCooperativeLevel(_mwindow, SCL_FLAGS))) { wdxdisplay_cat.fatal() @@ -1063,7 +1074,7 @@ dx_setup() { } // Create a clipper object which handles all our clipping for cases when - // our window is partially obscured by other windows. + // our window is partially obscured by other windows. LPDIRECTDRAWCLIPPER Clipper; if(FAILED(hr = pDD->CreateClipper( 0, &Clipper, NULL ))) { wdxdisplay_cat.fatal() @@ -1087,7 +1098,7 @@ dx_setup() { exit(1); } - // Setup a surface description to create a backbuffer. + // Setup a surface description to create a backbuffer. SurfaceDesc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; SurfaceDesc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY; SurfaceDesc.dwWidth = dwRenderWidth; @@ -1126,7 +1137,7 @@ dx_setup() { ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT; ddsd.ddsCaps.dwCaps = DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY; - DDPIXELFORMAT ZBufPixFmts[MAX_DX_ZBUF_FMTS]; + DDPIXELFORMAT ZBufPixFmts[MAX_DX_ZBUF_FMTS]; // Get an appropiate pixel format from enumeration of the formats. On the // first pass, we look for a zbuffer dpeth which is equal to the frame @@ -1174,7 +1185,7 @@ dx_setup() { // must pick zbuf depth to match primary surface depth for nvidia if(ddsd_pri.ddpfPixelFormat.dwRGBBitCount==16) { assert(pz16!=NULL); - ddsd.ddpfPixelFormat = *pz16; + ddsd.ddpfPixelFormat = *pz16; } else { assert(pz24!=NULL); ddsd.ddpfPixelFormat = *pz24; //take the no-stencil version of the 32-bit Zbuf @@ -1219,7 +1230,7 @@ dx_setup() { } // Create the device. The device is created off of our back buffer, which - // becomes the render target for the newly created device. + // becomes the render target for the newly created device. hr = pD3DI->CreateDevice( IID_IDirect3DHALDevice, pBackDDSurf, &pD3DDevice ); if(hr != DD_OK) { wdxdisplay_cat.fatal() @@ -1243,7 +1254,7 @@ dx_setup() { } //////////////////////////////////////////////////////////////////// -// Function: setup_colormap +// Function: setup_colormap // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1305,7 +1316,7 @@ void wdxGraphicsWindow::setup_colormap(void) { //////////////////////////////////////////////////////////////////// -// Function: begin_frame +// Function: begin_frame // Access: //////////////////////////////////////////////////////////////////// void wdxGraphicsWindow::begin_frame(void) { @@ -1320,7 +1331,7 @@ void wdxGraphicsWindow::show_frame(void) { //////////////////////////////////////////////////////////////////// -// Function: end_frame +// Function: end_frame // Access: // Description: timer info, incs frame # //////////////////////////////////////////////////////////////////// @@ -1421,7 +1432,7 @@ void wdxGraphicsWindow::handle_changes(void) { /* //////////////////////////////////////////////////////////////////// -// Function: idle_wait +// Function: idle_wait // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1451,7 +1462,7 @@ supports_update() const { #if 0 //////////////////////////////////////////////////////////////////// -// Function: process_events +// Function: process_events // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1466,7 +1477,7 @@ void wdxGraphicsWindow::process_events(void) { // Call window_proc DispatchMessage(&event); } - + while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)); } #endif @@ -1485,7 +1496,7 @@ void INLINE wdxGraphicsWindow::process_events(void) { TranslateMessage(&msg); // Call window_proc DispatchMessage(&msg); - } + } } //////////////////////////////////////////////////////////////////// @@ -1513,8 +1524,8 @@ void wdxGraphicsWindow::update(void) { #endif call_idle_callback(); -/* - if (_idle_callback) +/* + if (_idle_callback) idle_wait(); else if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) process_events(); @@ -1525,7 +1536,7 @@ void wdxGraphicsWindow::update(void) { } //////////////////////////////////////////////////////////////////// -// Function: enable_mouse_input +// Function: enable_mouse_input // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1534,7 +1545,7 @@ void wdxGraphicsWindow::enable_mouse_input(bool val) { } //////////////////////////////////////////////////////////////////// -// Function: enable_mouse_motion +// Function: enable_mouse_motion // Access: // Description: //////////////////////////////////////////////////////////////////// diff --git a/panda/src/wdxdisplay/wdxGraphicsWindow.h b/panda/src/wdxdisplay/wdxGraphicsWindow.h index d0340b17bd..8fca2c5444 100644 --- a/panda/src/wdxdisplay/wdxGraphicsWindow.h +++ b/panda/src/wdxdisplay/wdxGraphicsWindow.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef WDXGRAPHICSWINDOW_H #define WDXGRAPHICSWINDOW_H //#define WBD_GL_MODE 1 // if setting this, do it in wdxGraphicsStateGuardian.h too @@ -55,8 +67,8 @@ public: INLINE bool mouse_entry_enabled(void) { return _mouse_entry_enabled; } INLINE bool mouse_motion_enabled(void) { return _mouse_motion_enabled; } - INLINE bool mouse_passive_motion_enabled(void) { - return _mouse_passive_motion_enabled; + INLINE bool mouse_passive_motion_enabled(void) { + return _mouse_passive_motion_enabled; } void handle_window_move( int x, int y ); void handle_mouse_motion( int x, int y ); diff --git a/panda/src/wgldisplay/config_wgldisplay.cxx b/panda/src/wgldisplay/config_wgldisplay.cxx index a4baffeced..9445da0939 100644 --- a/panda/src/wgldisplay/config_wgldisplay.cxx +++ b/panda/src/wgldisplay/config_wgldisplay.cxx @@ -1,6 +1,19 @@ // Filename: config_wgldisplay.cxx // Created by: mike (07Oct99) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "config_wgldisplay.h" diff --git a/panda/src/wgldisplay/config_wgldisplay.h b/panda/src/wgldisplay/config_wgldisplay.h index 35749a5589..25da7f8a6b 100644 --- a/panda/src/wgldisplay/config_wgldisplay.h +++ b/panda/src/wgldisplay/config_wgldisplay.h @@ -2,6 +2,19 @@ // Created by: mike (07Oct99) // //////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef __CONFIG_WGLDISPLAY_H__ #define __CONFIG_WGLDISPLAY_H__ diff --git a/panda/src/wgldisplay/test_wgl.cxx b/panda/src/wgldisplay/test_wgl.cxx index 2f622340bf..a9dcfab11a 100644 --- a/panda/src/wgldisplay/test_wgl.cxx +++ b/panda/src/wgldisplay/test_wgl.cxx @@ -1,6 +1,19 @@ // Filename: test_wgl.cxx // Created by: mike (02Feb00) -// +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include @@ -40,7 +53,7 @@ int main() { cout << " " << (*pti) << endl; } cout << "after Known pipe types" << endl; - + GraphicsPipe::PipeFactory& factory = GraphicsPipe::_factory; GraphicsPipe::PipePrioritiesIter pribegin = GraphicsPipe::get_priorities_begin(); diff --git a/panda/src/wgldisplay/wglGraphicsPipe.cxx b/panda/src/wgldisplay/wglGraphicsPipe.cxx index fcac93db87..d99a288c94 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.cxx +++ b/panda/src/wgldisplay/wglGraphicsPipe.cxx @@ -3,8 +3,17 @@ // //////////////////////////////////////////////////////////////////// // -//////////////////////////////////////////////////////////////////// -// Includes +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "wglGraphicsPipe.h" #include "config_wgldisplay.h" @@ -41,7 +50,7 @@ wglGraphicsPipe::wglGraphicsPipe(const PipeSpecifier& spec) string windows_icon_filename = get_icon_filename_().to_os_specific(); if(!windows_icon_filename.empty()) { - // Note: LoadImage seems to cause win2k internal heap corruption (outputdbgstr warnings) + // Note: LoadImage seems to cause win2k internal heap corruption (outputdbgstr warnings) // if icon is more than 8bpp wc.hIcon = (HICON) LoadImage(NULL, windows_icon_filename.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE); } else { @@ -143,7 +152,7 @@ find_window(HWND win) { } //////////////////////////////////////////////////////////////////// -// Function: static_window_proc +// Function: static_window_proc // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -153,7 +162,7 @@ static_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { } //////////////////////////////////////////////////////////////////// -// Function: window_proc +// Function: window_proc // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -252,11 +261,11 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { y = HIWORD(lparam); if (x & 1 << 15) x -= (1 << 16); if (y & 1 << 15) y -= (1 << 16); - if (window->mouse_motion_enabled() + if (window->mouse_motion_enabled() && wparam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) { window->make_current(); window->handle_mouse_motion(x, y); - } else if (window->mouse_passive_motion_enabled() && + } else if (window->mouse_passive_motion_enabled() && ((wparam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) == 0)) { window->make_current(); window->handle_mouse_motion(x, y); @@ -285,7 +294,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { return 1; #endif case WM_SETFOCUS: - SetCursor(hMouseCrossIcon); + SetCursor(hMouseCrossIcon); window = find_window(hwnd); if (window) { if (window->mouse_entry_enabled()) { @@ -309,7 +318,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { } //////////////////////////////////////////////////////////////////// -// Function: lookup_key +// Function: lookup_key // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -362,7 +371,7 @@ wglGraphicsPipe::lookup_key(WPARAM wparam) const { int key = MapVirtualKey(wparam, 2); if (isascii(key) && key != 0) { if (GetKeyState(VK_SHIFT) >= 0) - key = tolower(key); + key = tolower(key); else { switch (key) { case '1': key = '!'; break; diff --git a/panda/src/wgldisplay/wglGraphicsPipe.h b/panda/src/wgldisplay/wglGraphicsPipe.h index 0a9730f126..3216edc81f 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.h +++ b/panda/src/wgldisplay/wglGraphicsPipe.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef WGLGRAPHICSPIPE_H #define WGLGRAPHICSPIPE_H // diff --git a/panda/src/wgldisplay/wglGraphicsWindow.cxx b/panda/src/wgldisplay/wglGraphicsWindow.cxx index 24004f3e74..8f44bc9f89 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.cxx +++ b/panda/src/wgldisplay/wglGraphicsWindow.cxx @@ -1,7 +1,19 @@ // Filename: wglGraphicsWindow.cxx +// Created by: // //////////////////////////////////////////////////////////////////// -// Includes +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// //////////////////////////////////////////////////////////////////// #include "wglGraphicsWindow.h" @@ -89,7 +101,7 @@ try_for_visual(wglGraphicsPipe *pipe, int mask, } else { want_color_component_bits = max(want_color_bits / 3, 1); } - + attrib_list[n++] = GLX_RGBA; attrib_list[n++] = GLX_RED_SIZE; attrib_list[n++] = want_color_component_bits; @@ -219,7 +231,7 @@ try_for_visual(wglGraphicsPipe *pipe, int mask, if (stereo) { if (!(match->dwFlags & PFD_STEREO)) { wgldisplay_cat.info() - << "wglGraphicsWindow::try_for_visual() - request for stereo failed" << endl; + << "wglGraphicsWindow::try_for_visual() - request for stereo failed" << endl; } } } @@ -228,15 +240,15 @@ try_for_visual(wglGraphicsPipe *pipe, int mask, } //////////////////////////////////////////////////////////////////// -// Function: get_config +// Function: get_config // Access: // Description: //////////////////////////////////////////////////////////////////// void wglGraphicsWindow:: get_config(PIXELFORMATDESCRIPTOR *visual, int attrib, int *value) { if (visual == NULL) - return; - + return; + switch (attrib) { case GLX_USE_GL: if (visual->dwFlags & (PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW)) { @@ -349,7 +361,7 @@ int wglGraphicsWindow::choose_visual(void) { bool special_size_request = (want_depth_bits != 1 || want_color_bits != 1); - + // We try to be smart about choosing a close match for the visual. // First, we'll eliminate some of the more esoteric options one at // a time, then two at a time, and finally we'll try just the bare @@ -365,18 +377,18 @@ int wglGraphicsWindow::choose_visual(void) { if (_visual == NULL) { // Ok, not good enough. Now try to eliminate options, but keep // as many bits as we asked for. - + // This array keeps the bitmasks of options that we pull out of // the requested mask, in order. - - static const int strip_properties[] = { + + static const int strip_properties[] = { // One esoteric option removed. W_MULTISAMPLE, W_STENCIL, W_ACCUM, W_ALPHA, W_STEREO, - + // Two esoteric options removed. W_STENCIL | W_MULTISAMPLE, W_ACCUM | W_MULTISAMPLE, @@ -386,14 +398,14 @@ int wglGraphicsWindow::choose_visual(void) { W_ALPHA | W_STEREO, W_STENCIL | W_ACCUM | W_MULTISAMPLE, W_ALPHA | W_STEREO | W_MULTISAMPLE, - + // All esoteric options removed. W_STENCIL | W_ACCUM | W_ALPHA | W_STEREO | W_MULTISAMPLE, // All esoteric options, plus some we'd really really prefer, // removed. W_STENCIL | W_ACCUM | W_ALPHA | W_STEREO | W_MULTISAMPLE | W_DOUBLE, - + // A zero marks the end of the array. 0 }; @@ -413,7 +425,7 @@ int wglGraphicsWindow::choose_visual(void) { if (special_size_request) { tried_masks.clear(); tried_masks.insert(mask); - + if (_visual == NULL) { // Try once more, this time eliminating all of the size // requests. @@ -425,13 +437,13 @@ int wglGraphicsWindow::choose_visual(void) { } } } - + if (_visual == NULL) { // Here's our last-ditch desparation attempt: give us any GLX // visual at all! _visual = try_for_visual(pipe, 0); } - + if (_visual == NULL) { wgldisplay_cat.fatal() << "wglGraphicsWindow::choose_visual() - could not get any " @@ -445,7 +457,7 @@ int wglGraphicsWindow::choose_visual(void) { int render_mode, double_buffer, stereo, red_size, green_size, blue_size, alpha_size, ared_size, agreen_size, ablue_size, aalpha_size, depth_size, stencil_size; - + get_config(_visual, GLX_RGBA, &render_mode); get_config(_visual, GLX_DOUBLEBUFFER, &double_buffer); get_config(_visual, GLX_STEREO, &stereo); @@ -478,7 +490,7 @@ typedef enum {Software, MCD, ICD} OGLDriverType; #ifdef _DEBUG void PrintPFD(PIXELFORMATDESCRIPTOR *pfd,char *msg) { - wgldisplay_cat.spam() << msg << endl + wgldisplay_cat.spam() << msg << endl << "PFD flags: 0x" << (void*)pfd->dwFlags << " (" << ((pfd->dwFlags & PFD_GENERIC_ACCELERATED) ? " PFD_GENERIC_ACCELERATED |" : "") << ((pfd->dwFlags & PFD_GENERIC_FORMAT) ? " PFD_GENERIC_FORMAT |" : "") << @@ -520,7 +532,7 @@ int wglGraphicsWindow::choose_visual(void) { pfd.nSize=sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion=1; -// if (_props._fullscreen) { +// if (_props._fullscreen) { // do anything different for fullscrn? // just use the pixfmt of the current desktop @@ -602,7 +614,7 @@ int wglGraphicsWindow::choose_visual(void) { if(i>MaxPixFmtNum) { wgldisplay_cat.error() << "wglGraphicsWindow:: ERROR: couldn't find HW-accelerated OpenGL pixfmt appropriate for this desktop!!\n"; - if(cur_bpp>16) + if(cur_bpp>16) wgldisplay_cat.error() << "wglGraphicsWindow:: try reducing the screen resolution or reducing the screen pixeldepth\n"; else wgldisplay_cat.error() << "wglGraphicsWindow:: try reducing the screen resolution\n"; exit(1); @@ -627,7 +639,7 @@ int wglGraphicsWindow::choose_visual(void) { #endif //////////////////////////////////////////////////////////////////// -// Function: adjust_coords +// Function: adjust_coords // Access: // Description: Adjust the window rectangle because Win32 thinks // that the x, y, width, and height are the *entire* @@ -638,7 +650,7 @@ void wglGraphicsWindow:: adjust_coords(int &xorg, int &yorg, int &xsize, int &ysize) { RECT rect; rect.left = xorg; rect.top = yorg; - rect.right = xorg + xsize; + rect.right = xorg + xsize; rect.bottom = yorg + ysize; // Style determines whether there are borders or not @@ -662,7 +674,7 @@ adjust_coords(int &xorg, int &yorg, int &xsize, int &ysize) { } //////////////////////////////////////////////////////////////////// -// Function: config +// Function: config // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -678,9 +690,9 @@ void wglGraphicsWindow::config(void) { // This just runs fullscrn at current display res & depth // want to be smarter about this like wdxdisplay and pick a res // that will have HW acceleration and adequate texmem, but we cant - // get the appropriate info yet in GL (unlike DX). - - // BUGBUG: The Configrc res vars (_props.x/ysize) are ignored; + // get the appropriate info yet in GL (unlike DX). + + // BUGBUG: The Configrc res vars (_props.x/ysize) are ignored; // instead we should consider switching to the specified res // (cant use DDraw for this though due to inconsistent driver support) @@ -689,7 +701,7 @@ void wglGraphicsWindow::config(void) { _props._xsize = GetSystemMetrics(SM_CXSCREEN); _props._ysize = GetSystemMetrics(SM_CYSCREEN); _mwindow = CreateWindow("wglFullscreen", _props._title.c_str(), - WS_POPUP | WS_MAXIMIZE, + WS_POPUP | WS_MAXIMIZE, _props._xorg, _props._yorg, _props._xsize, _props._ysize, desktop, NULL, hinstance, 0); @@ -780,7 +792,7 @@ void wglGraphicsWindow::config(void) { // 128 enough to handle all the ascii chars // this creates a display list for each char. displist numbering starts // at FONT_BITMAP_OGLDISPLAYLISTNUM. Might want to optimize just to save - // mem by just allocing bitmaps for chars we need (0-9 fps,SPC) + // mem by just allocing bitmaps for chars we need (0-9 fps,SPC) wglUseFontBitmaps(_hdc, 0, 128, FONT_BITMAP_OGLDISPLAYLISTNUM); } @@ -799,7 +811,7 @@ void wglGraphicsWindow::config(void) { } //////////////////////////////////////////////////////////////////// -// Function: setup_colormap +// Function: setup_colormap // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -860,7 +872,7 @@ void wglGraphicsWindow::setup_colormap(void) { } //////////////////////////////////////////////////////////////////// -// Function: end_frame +// Function: end_frame // Access: // Description: Swaps the front and back buffers. //////////////////////////////////////////////////////////////////// @@ -868,64 +880,64 @@ void wglGraphicsWindow::end_frame(void) { if (gl_show_fps_meter) { PStatTimer timer(_show_fps_pcollector); DWORD now = timeGetTime(); // this is win32 fn - + float time_delta = (now - _start_time) * 0.001f; - + if(time_delta > gl_fps_meter_update_interval) { // didnt use global clock object, it wasnt working properly when // I tried, its probably slower due to cache faults, and I can // easily track all the info I need in dxgsg DWORD num_frames = _cur_frame_count - _start_frame_count; - + _current_fps = num_frames / time_delta; _start_time = now; _start_frame_count = _cur_frame_count; } - + char fps_msg[15]; sprintf(fps_msg, "%.02f fps", _current_fps); - + // Note: we cant use simple GDI TextOut calls to draw FPS meter // chars (like DX fps meter) because WGL doesnt support GDI in // double-buffered mode. Instead we have to use glBitMap display // lists created by wglUseFontBitmaps - + glColor3f(0.0,1.0,1.0); - + GLboolean tex_was_on = glIsEnabled(GL_TEXTURE_2D); - + if(tex_was_on) glDisable(GL_TEXTURE_2D); - + glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadMatrixf(LMatrix4f::ident_mat().get_data()); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadMatrixf(LMatrix4f::ident_mat().get_data()); - + glOrtho(_props._xorg,_props._xorg+_props._xsize, _props._yorg,_props._yorg+_props._ysize,-1.0,1.0); - + glRasterPos2f(_props._xsize-70,_props._ysize-20); // these seem to be good for default font - - // set up for a string-drawing display list call + + // set up for a string-drawing display list call glListBase(FONT_BITMAP_OGLDISPLAYLISTNUM); - + // draw a string using font display lists. chars index their // corresponding displist name glCallLists(strlen(fps_msg), GL_UNSIGNED_BYTE, fps_msg); - + glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); - + if(tex_was_on) glEnable(GL_TEXTURE_2D); - + _cur_frame_count++; // only used by fps meter right now } - + { PStatTimer timer(_swap_pcollector); SwapBuffers(_hdc); @@ -934,7 +946,7 @@ void wglGraphicsWindow::end_frame(void) { } //////////////////////////////////////////////////////////////////// -// Function: handle_reshape +// Function: handle_reshape // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -944,7 +956,7 @@ void wglGraphicsWindow::handle_reshape(int w, int h) { _props._xsize = w; _props._ysize = h; make_current(); - GdiFlush(); + GdiFlush(); resized(w, h); _change_mask |= WGLWIN_CONFIGURE; } @@ -1024,7 +1036,7 @@ void wglGraphicsWindow::handle_changes(void) { } //////////////////////////////////////////////////////////////////// -// Function: process_events +// Function: process_events // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1043,7 +1055,7 @@ void wglGraphicsWindow::process_events(void) { } //////////////////////////////////////////////////////////////////// -// Function: idle_wait +// Function: idle_wait // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1086,7 +1098,7 @@ void wglGraphicsWindow::update(void) { // Always ask for a redisplay for now call_draw_callback(true); - if (_idle_callback) + if (_idle_callback) idle_wait(); else process_events(); @@ -1094,7 +1106,7 @@ void wglGraphicsWindow::update(void) { } //////////////////////////////////////////////////////////////////// -// Function: enable_mouse_input +// Function: enable_mouse_input // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1103,7 +1115,7 @@ void wglGraphicsWindow::enable_mouse_input(bool val) { } //////////////////////////////////////////////////////////////////// -// Function: enable_mouse_motion +// Function: enable_mouse_motion // Access: // Description: //////////////////////////////////////////////////////////////////// @@ -1164,7 +1176,7 @@ make_wglGraphicsWindow(const FactoryParams ¶ms) { } GraphicsPipe *pipe = pipe_param->get_pipe(); - + GraphicsWindow::WindowProps *props_param; if (!get_param_into(props_param, params)) { return new wglGraphicsWindow(pipe); diff --git a/panda/src/wgldisplay/wglGraphicsWindow.h b/panda/src/wgldisplay/wglGraphicsWindow.h index fea2371276..6c34ba489f 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.h +++ b/panda/src/wgldisplay/wglGraphicsWindow.h @@ -3,6 +3,18 @@ // //////////////////////////////////////////////////////////////////// // +// PANDA 3D SOFTWARE +// Copyright (c) 2001, 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://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// #ifndef WGLGRAPHICSWINDOW_H #define WGLGRAPHICSWINDOW_H // @@ -67,8 +79,8 @@ public: INLINE bool mouse_entry_enabled(void) { return _mouse_entry_enabled; } INLINE bool mouse_motion_enabled(void) { return _mouse_motion_enabled; } - INLINE bool mouse_passive_motion_enabled(void) { - return _mouse_passive_motion_enabled; + INLINE bool mouse_passive_motion_enabled(void) { + return _mouse_passive_motion_enabled; } void handle_reshape( int w, int h ); void handle_mouse_motion( int x, int y );