25 CLwoSurfaceBlockTMap::
27 _converter(converter),
30 _center.set(0.0, 0.0, 0.0);
31 _size.set(1.0, 1.0, 1.0);
32 _rotation.set(0.0, 0.0, 0.0);
33 _csys = LwoSurfaceBlockCoordSys::T_object;
34 _reference_object =
"(none)";
37 int num_chunks = _tmap->get_num_chunks();
38 for (
int i = 0; i < num_chunks; i++) {
39 const IffChunk *chunk = _tmap->get_chunk(i);
41 if (chunk->
is_of_type(LwoSurfaceBlockTransform::get_class_type())) {
44 _center = trans->_vec;
48 _rotation = trans->_vec;
51 }
else if (chunk->
is_of_type(LwoSurfaceBlockRefObj::get_class_type())) {
53 _reference_object = ref->_name;
55 }
else if (chunk->
is_of_type(LwoSurfaceBlockCoordSys::get_class_type())) {
68 LPoint3d hpr(rad_2_deg(_rotation[0]),
69 rad_2_deg(-_rotation[1]),
70 rad_2_deg(-_rotation[2]));
71 compose_matrix(mat, LCAST(
double, _size), hpr,
72 LCAST(
double, _center), CS_yup_left);