When you develop a geometric object that inherits from SimpleObject2
you will have to construct and initialize the SimpleObject::mesh
member variable which is of type Mesh
. This is usually done in an override of the SimpleObject::BuildMesh()
virtual member function which is called by 3ds Max when the mesh needs to be recreated.
If you have a very complex mesh that you wish to display, you can first design it in 3ds Max and use MAXScript to generate the source code that initializes the vertices of a mesh. For more information see the section "Generating C++ Code from Mesh Data" in the Tips and Tricks topic.