Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/collada/TransformWriter.cpp
| Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | default: { | ||||
| float rot[3] = {0.0f, 0.0f, 0.0f}; | float rot[3] = {0.0f, 0.0f, 0.0f}; | ||||
| add_transform(node, loc, rot, scale); | add_transform(node, loc, rot, scale); | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void TransformWriter::add_transform(COLLADASW::Node &node, | void TransformWriter::add_transform(COLLADASW::Node &node, | ||||
| float loc[3], | const float loc[3], | ||||
| float rot[3], | const float rot[3], | ||||
| float scale[3]) | const float scale[3]) | ||||
| { | { | ||||
| node.addScale("scale", scale[0], scale[1], scale[2]); | node.addScale("scale", scale[0], scale[1], scale[2]); | ||||
| node.addRotateZ("rotationZ", RAD2DEGF(rot[2])); | node.addRotateZ("rotationZ", RAD2DEGF(rot[2])); | ||||
| node.addRotateY("rotationY", RAD2DEGF(rot[1])); | node.addRotateY("rotationY", RAD2DEGF(rot[1])); | ||||
| node.addRotateX("rotationX", RAD2DEGF(rot[0])); | node.addRotateX("rotationX", RAD2DEGF(rot[0])); | ||||
| node.addTranslate("location", loc[0], loc[1], loc[2]); | node.addTranslate("location", loc[0], loc[1], loc[2]); | ||||
| } | } | ||||