Game Development Community

Max2map programming question

by Steve Boris · in Torque Game Engine · 09/10/2003 (7:11 pm) · 2 replies

In max2map inside the SceneObject::process()function there is a function call to the max matrix library:

Point3 maxPnt = nodeTM.PointTransform(mesh.getVert(face.v[j]));
      maxPnt += offset;
      maxPnt *= gMapProperties.mGeometryScale;

that transforms the current node's face vertices to the current nodes transform matrix and then add's the current node's offset to each vertice.
and then scales it to the geometry scale.

my question is why?? transform each vertice.

what's the need to do it?

the only thing i can think off is if there are WSM modifiers on the stack.

From the MaxSdk
Quote:This method returns the world space transformation matrix of the node at the specified time. This matrix contains its parents transformation. This matrix does not include the object-offset transformation, or any world space modifier (Space Warp) affects.

this is used to construct the plane that map2dif will use to re-construct each brush from a .map file

Any thought to why the transform.

#1
09/11/2003 (7:49 am)
All of the mesh verts are in object space. You need to use the objects transformation matrix to convert them to world space.

John.
#2
09/11/2003 (9:06 am)
Thanks John!

That's what I was looking for.