Exporting Geometry
...
Code Block |
---|
byte Cmaxwell::setTriangleUVW ( dword iTriangle, // triangle index dword iChannel, // UVW channel index float u1, float v1, float w1, // uvw value (1 edge) float u2, float v2, float w2, // uvw value (2 edge) float u3, float v3, float w3 // uvw value (3 edge) ) |
Exporting Attributtes
Cobject has some methods used to apply special attributes to objects. All of them are set to false by default except excludeOfCutPlanes which is set to true.
...
Code Block |
---|
byte setRFRKparameters(); |
Hierarchies
Cobject has the methods
Code Block |
---|
void Cobject::setParent (Cmaxwell::Cobject object) Cmaxwell::Cobject getParent(void) |
to set the scene hierarchy. This is very useful when the user wants to open the scene in Maxwell Studio, because the scene hierarchy is kept.
Instances
Cobject has the following method for creating instances of Cobjects:
...
This method returns a Cobject which is an instance (not a mesh). It is only needed to create it with a name, the reference object and a transformation matrix. Then a material can be applied to the Cobject returned with setMaterial (if setMaterial is not used it gets the material of the reference object even if it is different in each triangle, but if setMaterial is used for the instance in the instance, it only supports a material for the whole instance). Other Cobject methods as setHide(), setHideToCamera(), etc are also supported in instances.
Triangle Groups
Triangle groups are very useful to export sub-object info, so the user can recover triangle selections inside Studio. It is only needed to add new triangle groups to the scene using this method:
...