This virtual class is implemented by applications that want to supply a conversion method from one object type to another.
A typical use would be to support conversion of a native 3ds Max
type (such as TriObject) to a plug-in's object type.
There are a set of global functions that can be used with this
class. These are documented at the bottom of the topic. One of
these is called to register the
ObjectConverter with the system. Note that the registered
object converters are called from the methods:
Object::CanConvertToType and
Object::ConvertToType.
So for individual objects to support these, they'll need to add the
line
if (Object::CanConvertToType(obtype)) return 1;
to the end of their CanConvertToType methods and
if (Object::CanConvertToType(obtype))
return Object::ConvertToType(t, obtype);
to the end of their ConvertToType methods.
#include <object.h>
Public Member Functions |
|
virtual Class_ID | ConvertsFrom ()=0 |
This method returns the Class ID of the
object this converter converts from. |
|
virtual Class_ID | ConvertsTo ()=0 |
This method returns the Class ID of the
object this converter converts to. |
|
virtual Object * | Convert (Object *from)=0 |
This method actually performs the
conversion, creating and returning a new object with the class ID
specified in
ConvertsTo(). |
|
virtual void | DeleteThis () |
This should delete the
ObjectConverter if necessary. |
virtual Class_ID ConvertsFrom | ( | ) | [pure virtual] |
This method returns the Class ID of the object this converter converts from.
virtual Class_ID ConvertsTo | ( | ) | [pure virtual] |
This method returns the Class ID of the object this converter converts to.
This method actually performs the conversion, creating and returning a new object with the class ID specified in ConvertsTo().
from | Points to the object to convert. |
virtual void DeleteThis | ( | ) | [inline, virtual] |