How to get the status of Mesh updates?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi dear Max community!
Using this function I read mesh data for my external renderer:
// Collect CentiLeo data from 3ds max data
if( Object* obj = node->EvalWorldState( t ).obj )
{
if( GeomObject* geo = (GeomObject*)obj )
{
if( obj->CanConvertToType( triObjectClassID ) )
{
// BOOL deleteMesh;
NullView nw;
Mesh * mesh = geo->GetRenderMesh( t, node, nw, deleteMesh );
// do my things
This procedure converts any input (based on patches, splines or some meshes) into triangles and later it is sent to external interactive renderer.
But in some cases there are a lot of INodes in the scene or the meshes can be large or smooth modifiers may be connected to objects. That's why calling this code is expensive.
When I process the event on TimeChanged based on the class TimeChangeCallback I have new TimeValue t and later I iterate over all scene INodes, give them updated t and request to compute the meshes.
But in reality for the new value of t some meshes are changed and some are not (and their modifiers are not changed).
Is there any flag like getDirty() or INode->GeometryChanged() in Max or are there any mechanisms which will allow me to check if the underlying mesh of the INode has changed since previous time or not. Based on this I want to avoid recomputing the mesh for new value of t where it hasn't changed..