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);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The tMap chunk within a LwoSurfaceBlock chunk.
void get_transform(LMatrix4d &mat) const
Fills up the indicated matrix with the net transform indicated by the TMAP chunk, accounting for scal...
Specifies whether texture coordinates are computed based on the vertices' world coordinates or local ...
The basic kind of record in an EA "IFF" file, which the LightWave object file is based on.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class supervises the construction of an EggData structure from the data represented by the LwoHe...
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Specifies a reference object that the texture UV's are to be computed relative to.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A four-byte chunk ID appearing in an "IFF" file.
IffId get_id() const
Returns the ID associated with this chunk.