mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
oops, missing files from teedee's checkin
This commit is contained in:
parent
e97e6c03f8
commit
078ddc7c27
44
panda/src/egg/eggVertexAux.I
Normal file
44
panda/src/egg/eggVertexAux.I
Normal file
@ -0,0 +1,44 @@
|
||||
// Filename: eggVertexAux.I
|
||||
// Created by: jenes (15Nov11)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the revised BSD
|
||||
// license. You should have received a copy of this license along
|
||||
// with this source code in a file named "LICENSE."
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::set_name
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void EggVertexAux::
|
||||
set_name(const string &name) {
|
||||
Namable::set_name(name);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::get_aux
|
||||
// Access: Published
|
||||
// Description: Returns the auxiliary data quadruple.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const LVecBase4d &EggVertexAux::
|
||||
get_aux() const {
|
||||
return _aux;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::set_aux
|
||||
// Access: Published
|
||||
// Description: Sets the auxiliary data quadruple.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void EggVertexAux::
|
||||
set_aux(const LVecBase4d &aux) {
|
||||
_aux = aux;
|
||||
}
|
99
panda/src/egg/eggVertexAux.cxx
Normal file
99
panda/src/egg/eggVertexAux.cxx
Normal file
@ -0,0 +1,99 @@
|
||||
// Filename: eggVertexAux.cxx
|
||||
// Created by: jenes (15Nov11)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the revised BSD
|
||||
// license. You should have received a copy of this license along
|
||||
// with this source code in a file named "LICENSE."
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "eggVertexAux.h"
|
||||
#include "eggParameters.h"
|
||||
|
||||
#include "indent.h"
|
||||
|
||||
TypeHandle EggVertexAux::_type_handle;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::Constructor
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
EggVertexAux::
|
||||
EggVertexAux(const string &name, const LVecBase4d &aux) :
|
||||
EggNamedObject(name),
|
||||
_aux(aux)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::Copy Constructor
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
EggVertexAux::
|
||||
EggVertexAux(const EggVertexAux ©) :
|
||||
EggNamedObject(copy),
|
||||
_aux(copy._aux)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::Copy Assignment Operator
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
EggVertexAux &EggVertexAux::
|
||||
operator = (const EggVertexAux ©) {
|
||||
EggNamedObject::operator = (copy);
|
||||
_aux = copy._aux;
|
||||
|
||||
return (*this);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::Destructor
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
EggVertexAux::
|
||||
~EggVertexAux() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::write
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void EggVertexAux::
|
||||
write(ostream &out, int indent_level) const {
|
||||
string inline_name = get_name();
|
||||
if (!inline_name.empty()) {
|
||||
inline_name += ' ';
|
||||
}
|
||||
indent(out, indent_level)
|
||||
<< "<Aux> " << inline_name << "{ " << get_aux() << " }\n";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggVertexAux::compare_to
|
||||
// Access: Public
|
||||
// Description: An ordering operator to compare two vertices for
|
||||
// sorting order. This imposes an arbitrary ordering
|
||||
// useful to identify unique vertices.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int EggVertexAux::
|
||||
compare_to(const EggVertexAux &other) const {
|
||||
int compare;
|
||||
compare = _aux.compare_to(other._aux, egg_parameters->_pos_threshold);
|
||||
if (compare != 0) {
|
||||
return compare;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
72
panda/src/egg/eggVertexAux.h
Normal file
72
panda/src/egg/eggVertexAux.h
Normal file
@ -0,0 +1,72 @@
|
||||
// Filename: eggVertexAux.h
|
||||
// Created by: jenes (15Nov11)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the revised BSD
|
||||
// license. You should have received a copy of this license along
|
||||
// with this source code in a file named "LICENSE."
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef EGGVERTEXAUX_H
|
||||
#define EGGVERTEXAUX_H
|
||||
|
||||
#include "pandabase.h"
|
||||
|
||||
#include "eggMorphList.h"
|
||||
#include "eggNamedObject.h"
|
||||
|
||||
#include "luse.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : EggVertexAux
|
||||
// Description : The set of named auxiliary data that may or may not
|
||||
// be assigned to a vertex. Panda will import this data
|
||||
// and create a custom column for it in the vertex data,
|
||||
// but will not otherwise interpret it. Presumably, a
|
||||
// shader will process the data later.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDAEGG EggVertexAux : public EggNamedObject {
|
||||
PUBLISHED:
|
||||
EggVertexAux(const string &name, const LVecBase4d &aux);
|
||||
EggVertexAux(const EggVertexAux ©);
|
||||
EggVertexAux &operator = (const EggVertexAux ©);
|
||||
virtual ~EggVertexAux();
|
||||
|
||||
INLINE void set_name(const string &name);
|
||||
|
||||
INLINE const LVecBase4d &get_aux() const;
|
||||
INLINE void set_aux(const LVecBase4d &aux);
|
||||
|
||||
void write(ostream &out, int indent_level) const;
|
||||
int compare_to(const EggVertexAux &other) const;
|
||||
|
||||
private:
|
||||
LVecBase4d _aux;
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
EggNamedObject::init_type();
|
||||
register_type(_type_handle, "EggVertexAux",
|
||||
EggNamedObject::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#include "eggVertexAux.I"
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user