3ds Max C++ API Reference
IContext Class Referenceabstract

Class IContext does all the actual skin weight computations. More...

#include <geombind.h>

+ Inheritance diagram for IContext:

Public Member Functions

virtual void makeCurrent ()=0
 This makes the current OGL context active
More...
 
virtual const ISparseVertexWeightsbindSparseGV (IMesh *mesh, ITransformHierarchy *hierarchy, IProgress *progress=0, float falloff=0.0f, int maxInfluences=-1, int maxResolution=256, bool useWindingNumbers=true)=0
 This creates skin weights based on a voxel data data structure. More...
 
virtual const ISparseVertexWeightsbindHeatmap (IMesh *mesh, ITransformHierarchy *hierarchy, IProgress *progress, float falloff=0.0f, int maxInfluences=-1)=0
 This creates skin weights based on a heat map algorithm, restrictions are that the mesh be manifold, only the first mesh element will have its weight computed. More...
 

Static Public Member Functions

static IContextcreate ()
 This creates an instance of a context
More...
 
static void dispose (IContext *)
 This disposes an instance of a context
More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Protected Member Functions

 IContext ()
 
virtual ~IContext ()=0
 

Detailed Description

Class IContext does all the actual skin weight computations.

NOTE this uses OGL so you have to set up an OGL context first and also all the data structures are in OGL format

Examples of how to use this interface can be found in the bonesdef.vprog in maxsdk/samples/modifiers/bonesdef

Constructor & Destructor Documentation

◆ IContext()

IContext ( )
inlineprotected
227 { }

◆ ~IContext()

virtual ~IContext ( )
protectedpure virtual

Member Function Documentation

◆ create()

static IContext* create ( )
static

This creates an instance of a context

◆ dispose()

static void dispose ( IContext )
static

This disposes an instance of a context

◆ makeCurrent()

virtual void makeCurrent ( )
pure virtual

This makes the current OGL context active

◆ bindSparseGV()

virtual const ISparseVertexWeights* bindSparseGV ( IMesh mesh,
ITransformHierarchy hierarchy,
IProgress progress = 0,
float  falloff = 0.0f,
int  maxInfluences = -1,
int  maxResolution = 256,
bool  useWindingNumbers = true 
)
pure virtual

This creates skin weights based on a voxel data data structure.

Parameters
meshthis is the mesh that is being skinned
hierarchythis the skeleton of the mesh being skinned
progressthe update bar to let the system know how far along the solve is and if it should cancel
falloffhow smooth the blend weights are 0 is the most smooth 1 is the least smooth
maxInfluencesthe maximum number of weights per vertex that can be applied
maxResolutionthe maximum density of the voxel data structure, the higher the more accurate but slower
useWindingNumberscan produce better weight results when their are arbitrary voxel results

◆ bindHeatmap()

virtual const ISparseVertexWeights* bindHeatmap ( IMesh mesh,
ITransformHierarchy hierarchy,
IProgress progress,
float  falloff = 0.0f,
int  maxInfluences = -1 
)
pure virtual

This creates skin weights based on a heat map algorithm, restrictions are that the mesh be manifold, only the first mesh element will have its weight computed.

Usually the voxel algorithm produces better results.

Parameters
meshthis is the mesh that is being skinned
hierarchythis the skeleton of the mesh being skinned
progressthe update bar to let the system know how far along the solve is and if it should cancel
falloffhow smooth the blend weights are 0 is the most smooth 1 is the least smooth
maxInfluencesthe maximum number of weights per vertex that can be applied