mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
*** empty log message ***
This commit is contained in:
parent
326b9e9e02
commit
a9d78600fb
@ -22,6 +22,15 @@ EggNameUniquifier() {
|
||||
_index = 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggNameUniquifier::Destructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
EggNameUniquifier::
|
||||
~EggNameUniquifier() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggNameUniquifier::clear
|
||||
// Access: Public
|
||||
|
@ -79,6 +79,7 @@ class EggNode;
|
||||
class EXPCL_PANDAEGG EggNameUniquifier : public EggObject {
|
||||
public:
|
||||
EggNameUniquifier();
|
||||
~EggNameUniquifier();
|
||||
|
||||
void clear();
|
||||
|
||||
|
@ -763,7 +763,7 @@ scale_mat(FLOATTYPE sx, FLOATTYPE sy) {
|
||||
// degrees counterclockwise about the indicated vector.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LMatrix3)::
|
||||
rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) &axis,
|
||||
rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis,
|
||||
CoordinateSystem cs) {
|
||||
if (cs == CS_default) {
|
||||
cs = default_coordinate_system;
|
||||
@ -1003,8 +1003,6 @@ operator * (FLOATTYPE scalar) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LMatrix3)::
|
||||
operator / (FLOATTYPE scalar) const {
|
||||
FLOATNAME(LMatrix3) t;
|
||||
|
||||
FLOATTYPE recip_scalar = 1.0/scalar;
|
||||
return (*this) * recip_scalar;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ PUBLISHED:
|
||||
// The following named constructors return 3x3 matrices suitable for
|
||||
// scale/rotate transforms in 3-d coordinate space.
|
||||
static INLINE_LINMATH FLOATNAME(LMatrix3) rotate_mat(FLOATTYPE angle,
|
||||
FLOATNAME(LVecBase3) &axis,
|
||||
FLOATNAME(LVecBase3) axis,
|
||||
CoordinateSystem cs = CS_default);
|
||||
static INLINE_LINMATH FLOATNAME(LMatrix3) scale_mat(const FLOATNAME(LVecBase3) &scale);
|
||||
static INLINE_LINMATH FLOATNAME(LMatrix3) scale_mat(FLOATTYPE sx, FLOATTYPE sy, FLOATTYPE sz);
|
||||
|
@ -355,24 +355,29 @@ rfu(FLOATTYPE right_v, FLOATTYPE fwd_v, FLOATTYPE up_v,
|
||||
}
|
||||
FLOATTYPE vy,vz;
|
||||
switch(cs) {
|
||||
case CS_yup_right:
|
||||
vz = -fwd_v;
|
||||
vy = up_v;
|
||||
break;
|
||||
case CS_yup_right:
|
||||
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;
|
||||
|
||||
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;
|
||||
default:
|
||||
linmath_cat.error()
|
||||
<< "Invalid coordinate system!\n";
|
||||
return FLOATNAME(LVector3)(0.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
return FLOATNAME(LVector3)(right_v,vy,vz);
|
||||
|
@ -4,31 +4,6 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NameUniquifier::Constructor
|
||||
// Access: Public
|
||||
// Description: Creates a new NameUniquifier.
|
||||
//
|
||||
// The separator string is used to separate the original
|
||||
// name (or supplied prefix) and the generated number
|
||||
// when a name must be generated.
|
||||
//
|
||||
// If the original name is empty, the empty string is
|
||||
// used, followed by the generated number.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE NameUniquifier::
|
||||
NameUniquifier(const string &separator,
|
||||
const string &empty) :
|
||||
_separator(separator),
|
||||
_empty(empty)
|
||||
{
|
||||
_counter = 0;
|
||||
|
||||
if (_empty.empty()) {
|
||||
_empty = _separator;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NameUniquifier::add_name
|
||||
// Access: Public
|
||||
|
@ -10,6 +10,40 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NameUniquifier::Constructor
|
||||
// Access: Public
|
||||
// Description: Creates a new NameUniquifier.
|
||||
//
|
||||
// The separator string is used to separate the original
|
||||
// name (or supplied prefix) and the generated number
|
||||
// when a name must be generated.
|
||||
//
|
||||
// If the original name is empty, the empty string is
|
||||
// used, followed by the generated number.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
NameUniquifier::
|
||||
NameUniquifier(const string &separator,
|
||||
const string &empty) :
|
||||
_separator(separator),
|
||||
_empty(empty)
|
||||
{
|
||||
_counter = 0;
|
||||
|
||||
if (_empty.empty()) {
|
||||
_empty = _separator;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NameUniquifier::Destructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
NameUniquifier::
|
||||
~NameUniquifier() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NameUniquifier::add_name_body
|
||||
// Access: Private
|
||||
|
@ -21,8 +21,9 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDA NameUniquifier {
|
||||
public:
|
||||
INLINE NameUniquifier(const string &separator = string(),
|
||||
const string &empty = string());
|
||||
NameUniquifier(const string &separator = string(),
|
||||
const string &empty = string());
|
||||
~NameUniquifier();
|
||||
|
||||
INLINE string add_name(const string &name);
|
||||
INLINE string add_name(const string &name, const string &prefix);
|
||||
|
Loading…
x
Reference in New Issue
Block a user