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