ImpNode Class Reference

Search for all occurrences

Detailed Description

See also:
Class ImpInterface, Class INode, Class Matrix3, Class Point3.

Description:
Import Node class. Methods of this class may be used to set various properties of the node. All methods of this class are implemented by the system.
Sample Code:
The following sample code fragment (from /MAXSDK/SAMPLES/IMPEXP/DXFIMP.CPP) demonstrates the use of many of the methods of this class.

ImpNode *node = iface->CreateNode();
if (node)
{
    TriObject *tri = CreateNewTriObject();
// Now find the center of the vertices and use that as the  pivot
    int verts = m->getNumVerts();
    Point3 accum(0,0,0);
    for(int i = 0; i < verts; ++i)
        accum += m->verts[i];
    Point3 delta = accum / (float)verts;
    for(i = 0; i < verts; ++i)
        m->verts[i] -= delta;
    tri->mesh = *m;
    node->Reference(tri);
    Matrix3 tm;
    tm.IdentityMatrix();                          // Reset initial matrix to identity
    tm.SetTrans(delta);                           // Add in the center point
    node->SetTransform(0,tm);
    iface->AddNodeToScene(node);
    node->SetName(n->name);
}

#include <impapi.h>

Inheritance diagram for ImpNode:
Inheritance graph
[legend]

List of all members.


ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode
ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode ImpNode