4eb0da / war3-model

TypeScript-based mdl/mdx (Warcraft 3 model formats) converter/renderer
MIT License
97 stars 30 forks source link

about CollisionShape parse #11

Closed ChrisCatCP closed 3 months ago

ChrisCatCP commented 2 years ago

parse and generate CollisionShapes


public enum Type {
    BOX,
    PLANE,
    SPHERE,
    CYLINDER;
}

if (type != Type.SPHERE) {
    reader.readFloat32Array(vertices[1]);
}

if ((type == Type.SPHERE) || (type == Type.CYLINDER)) {
    boundsRadius = reader.readFloat32();
}

When I read the source code of ReterasModelStudio I found a different parsing method For the time being, I don't know which one is effective