Collada - removed TransformBase baseclass (not needed for anything)
This commit is contained in:
parent
7c094f6079
commit
6cfa962986
@ -1934,7 +1934,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No
|
||||
mul_m4_m4m4(mat, ipar, temp);
|
||||
}
|
||||
|
||||
TransformBase::decompose(mat, job->loc, NULL, job->quat, job->size);
|
||||
bc_decompose(mat, job->loc, NULL, job->quat, job->size);
|
||||
|
||||
if (par_job) {
|
||||
job->parent = par_job;
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
//struct Object;
|
||||
|
||||
class TransformReader : public TransformBase
|
||||
class TransformReader
|
||||
{
|
||||
protected:
|
||||
|
||||
|
@ -27,11 +27,10 @@
|
||||
|
||||
|
||||
#include "BKE_object.h"
|
||||
#include "BLI_math.h"
|
||||
|
||||
#include "TransformWriter.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
|
||||
void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[4][4], float parent_mat[4][4])
|
||||
{
|
||||
float loc[3], rot[3], scale[3];
|
||||
@ -51,7 +50,7 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[4][4],
|
||||
converter->mat4_to_dae_double(dmat, local);
|
||||
delete converter;
|
||||
|
||||
TransformBase::decompose(local, loc, rot, NULL, scale);
|
||||
bc_decompose(local, loc, rot, NULL, scale);
|
||||
|
||||
if (node.getType() == COLLADASW::Node::JOINT) {
|
||||
// XXX Why are joints handled differently ?
|
||||
@ -116,7 +115,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob, B
|
||||
case BC_TRANSFORMATION_TYPE_TRANSROTLOC:
|
||||
{
|
||||
float loc[3], rot[3], scale[3];
|
||||
TransformBase::decompose(f_obmat, loc, rot, NULL, scale);
|
||||
bc_decompose(f_obmat, loc, rot, NULL, scale);
|
||||
add_transform(node, loc, rot, scale);
|
||||
break;
|
||||
}
|
||||
|
@ -33,9 +33,10 @@
|
||||
#include "DNA_object_types.h"
|
||||
|
||||
#include "collada_internal.h"
|
||||
#include "collada_utils.h"
|
||||
#include "collada.h"
|
||||
|
||||
class TransformWriter : protected TransformBase
|
||||
class TransformWriter
|
||||
{
|
||||
protected:
|
||||
void add_node_transform(COLLADASW::Node& node, float mat[4][4], float parent_mat[4][4]);
|
||||
|
@ -162,18 +162,6 @@ void UnitConverter::calculate_scale(Scene &sce)
|
||||
size_to_mat4(scale_mat4, rescale);
|
||||
}
|
||||
|
||||
void TransformBase::decompose(float mat[4][4], float *loc, float eul[3], float quat[4], float *size)
|
||||
{
|
||||
mat4_to_size(size, mat);
|
||||
if (eul) {
|
||||
mat4_to_eul(eul, mat);
|
||||
}
|
||||
if (quat) {
|
||||
mat4_to_quat(quat, mat);
|
||||
}
|
||||
copy_v3_v3(loc, mat[3]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translation map.
|
||||
* Used to translate every COLLADA id to a valid id, no matter what "wrong" letters may be
|
||||
|
@ -85,12 +85,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
class TransformBase
|
||||
{
|
||||
public:
|
||||
void decompose(float mat[4][4], float *loc, float eul[3], float quat[4], float *size);
|
||||
};
|
||||
|
||||
extern void clear_global_id_map();
|
||||
/** Look at documentation of translate_map */
|
||||
extern std::string translate_id(const std::string &id);
|
||||
|
Loading…
Reference in New Issue
Block a user