3ds Max C++ API Reference
Loading...
Searching...
No Matches
Snippet Class Reference

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/CS/IMoFlow.h>

Inheritance diagram for Snippet:

Public Member Functions

BIPExport Snippet ()
virtual BIPExport ~Snippet ()
BIPExport void ClearActiveTransitions ()
BIPExport void ClearSelectedTransitions ()
BIPExport int ActivateTransitionTo (Snippet *toSN)
BIPExport TransitionGetTransitionTo (Snippet *toSN)
BIPExport int GetTransitionIndex (Transition *theTR)
BIPExport float AddTransition (Snippet *child, int optimize)
BIPExport float ComputeTransitionPoints (Transition *nTR, Snippet *Src, Snippet *Dest, int preference, int optimize)
BIPExport float ComputeOptimalTransitionPoints (BOOL SearchAll, int PrefTranLen, int SearchBefore, int SearchAfter, Transition *nTR, Snippet *Src, Snippet *Dst)
BIPExport void RecomputeTransitions ()
BIPExport int DeleteTransitionsTo (Snippet *child)
BIPExport int DeleteTransition (int index)
BIPExport void DeleteSelectedTransitions (MoFlow *MF)
BIPExport int IsChild (Snippet *Child)
void Paint (HDC hdc, int selected, int startnode, int editnode, int transhow)
void PaintTransitions (HDC hdc, BOOL transhow)
void ComputeWidth (HDC hdc, BOOL transhow)
int Inside (POINT &mp, float *dist)
BIPExport void UpdateUI ()
BIPExport Snippetoperator= (const Snippet &SN)
TransitionTranHitTest (POINT &mp)
void TranRegionSelect (POINT &min, POINT &max, int set, int active)
void Output (MFL_IOProcessor *IOProc, bool asWChar)
void Input (MFL_IOProcessor *IOProc, bool asWChar)
BIPExport int LoadFile (bool UpdateTheUI=true, int ErrorType=3)
SnippetGetNextRandScriptSnippet (int *transindex)
SnippetNextRealTime (IBipDriver *mc, Script *scr, animal *A, int frame, path_properties *desired_properties, int global_frame, int global_last_clip_start, int currentScript_index, int *transindex, int *found)
 MG added for new MF based forward simulatiom.
int GetStart () const
void SetStart (int s)
int GetEnd () const
void SetEnd (int e)
const MCHARGetClipName () const
void SetClipName (const MCHAR *n)
const MaxSDK::AssetManagement::AssetUserGetFile () const
void SetFile (const MaxSDK::AssetManagement::AssetUser &assetUser)
virtual IPoint2 GetPosition () const
virtual void SetPosition (IPoint2 p)
BOOL GetActive () const
void SetActive (BOOL act)
BOOL GetRandStart () const
void SetRandStart (BOOL rs)
BOOL GetRandStartPercent () const
void SetRandStartPercent (int rsp)
int NumTransitions ()
TransitionGetTransition (int Tindex) const
void SetTransition (int Tindex, Transition *ti)

Public Attributes

int visited
float distance_to_stop
float distance_to_loop
int start
int end
MCHAR sname [MAXNAME]
MaxSDK::AssetManagement::AssetUser file
int posx
int posy
int width
int nTrans
int curtime
int active
int validload
BOOL randstart
int randstartpct
TransitionTransitions
HWND hwnd
int orgposx
int orgposy
Snippetnext
animal * A

Additional Inherited Members

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.

Constructor & Destructor Documentation

◆ Snippet()

◆ ~Snippet()

virtual BIPExport ~Snippet ( )
virtual

Member Function Documentation

◆ ClearActiveTransitions()

BIPExport void ClearActiveTransitions ( )

◆ ClearSelectedTransitions()

BIPExport void ClearSelectedTransitions ( )

◆ ActivateTransitionTo()

BIPExport int ActivateTransitionTo ( Snippet * toSN)

◆ GetTransitionTo()

BIPExport Transition * GetTransitionTo ( Snippet * toSN)

◆ GetTransitionIndex()

BIPExport int GetTransitionIndex ( Transition * theTR)

◆ AddTransition()

BIPExport float AddTransition ( Snippet * child,
int optimize )

◆ ComputeTransitionPoints()

BIPExport float ComputeTransitionPoints ( Transition * nTR,
Snippet * Src,
Snippet * Dest,
int preference,
int optimize )

◆ ComputeOptimalTransitionPoints()

BIPExport float ComputeOptimalTransitionPoints ( BOOL SearchAll,
int PrefTranLen,
int SearchBefore,
int SearchAfter,
Transition * nTR,
Snippet * Src,
Snippet * Dst )

◆ RecomputeTransitions()

BIPExport void RecomputeTransitions ( )

◆ DeleteTransitionsTo()

BIPExport int DeleteTransitionsTo ( Snippet * child)

◆ DeleteTransition()

BIPExport int DeleteTransition ( int index)

◆ DeleteSelectedTransitions()

BIPExport void DeleteSelectedTransitions ( MoFlow * MF)

◆ IsChild()

BIPExport int IsChild ( Snippet * Child)

◆ Paint()

void Paint ( HDC hdc,
int selected,
int startnode,
int editnode,
int transhow )

◆ PaintTransitions()

void PaintTransitions ( HDC hdc,
BOOL transhow )

◆ ComputeWidth()

void ComputeWidth ( HDC hdc,
BOOL transhow )

◆ Inside()

int Inside ( POINT & mp,
float * dist )

◆ UpdateUI()

BIPExport void UpdateUI ( )

◆ operator=()

BIPExport Snippet & operator= ( const Snippet & SN)

◆ TranHitTest()

Transition * TranHitTest ( POINT & mp)

◆ TranRegionSelect()

void TranRegionSelect ( POINT & min,
POINT & max,
int set,
int active )

◆ Output()

void Output ( MFL_IOProcessor * IOProc,
bool asWChar )

◆ Input()

void Input ( MFL_IOProcessor * IOProc,
bool asWChar )

◆ LoadFile()

BIPExport int LoadFile ( bool UpdateTheUI = true,
int ErrorType = 3 )

◆ GetNextRandScriptSnippet()

Snippet * GetNextRandScriptSnippet ( int * transindex)

◆ NextRealTime()

Snippet * NextRealTime ( IBipDriver * mc,
Script * scr,
animal * A,
int frame,
path_properties * desired_properties,
int global_frame,
int global_last_clip_start,
int currentScript_index,
int * transindex,
int * found )

MG added for new MF based forward simulatiom.

◆ GetStart()

int GetStart ( ) const
inline
280{ return start; }
int start
Definition IMoFlow.h:224

◆ SetStart()

void SetStart ( int s)
inline
281{ start = s; }

◆ GetEnd()

int GetEnd ( ) const
inline
282{ return end; }
int end
Definition IMoFlow.h:225

◆ SetEnd()

void SetEnd ( int e)
inline
283{ end = e; }

◆ GetClipName()

const MCHAR * GetClipName ( ) const
inline
285{ return sname; }
MCHAR sname[MAXNAME]
Definition IMoFlow.h:226

◆ SetClipName()

void SetClipName ( const MCHAR * n)
inline
286{ _tcsncpy_s(sname, MAXNAME, n, MAXNAME-1); }
#define MAXNAME
Definition CSConstants.h:38

◆ GetFile()

const MaxSDK::AssetManagement::AssetUser & GetFile ( ) const
inline
288{ return file; }
MaxSDK::AssetManagement::AssetUser file
Definition IMoFlow.h:227

◆ SetFile()

void SetFile ( const MaxSDK::AssetManagement::AssetUser & assetUser)
inline
289{ file = assetUser; }

◆ GetPosition()

virtual IPoint2 GetPosition ( ) const
inlinevirtual
291{ return IPoint2(posx, posy); }
int posy
Definition IMoFlow.h:229
int posx
Definition IMoFlow.h:228

◆ SetPosition()

virtual void SetPosition ( IPoint2 p)
inlinevirtual
292{ posx = p.x; posy = p.y; }

◆ GetActive()

BOOL GetActive ( ) const
inline
293{ return active; }
int active
Definition IMoFlow.h:233

◆ SetActive()

void SetActive ( BOOL act)
inline
294{ active = act; }

◆ GetRandStart()

BOOL GetRandStart ( ) const
inline
296{ return randstart; }
BOOL randstart
Definition IMoFlow.h:235

◆ SetRandStart()

void SetRandStart ( BOOL rs)
inline
297{ randstart = rs; }

◆ GetRandStartPercent()

BOOL GetRandStartPercent ( ) const
inline
298{ return randstartpct; }
int randstartpct
Definition IMoFlow.h:236

◆ SetRandStartPercent()

void SetRandStartPercent ( int rsp)
inline
299{ randstartpct = rsp; }

◆ NumTransitions()

int NumTransitions ( )
inline
301{ return nTrans; }
int nTrans
Definition IMoFlow.h:231

◆ GetTransition()

Transition * GetTransition ( int Tindex) const
inline
303 { assert (Tindex < nTrans); return &Transitions[Tindex]; }
Transition * Transitions
Definition IMoFlow.h:237
#define assert(expr)
Definition assert1.h:82

◆ SetTransition()

void SetTransition ( int Tindex,
Transition * ti )
inline
305 { assert (Tindex < nTrans); Transitions[Tindex] = *ti; }

Member Data Documentation

◆ visited

int visited

◆ distance_to_stop

float distance_to_stop

◆ distance_to_loop

float distance_to_loop

◆ start

int start

◆ end

int end

◆ sname

MCHAR sname[MAXNAME]

◆ file

◆ posx

int posx

◆ posy

int posy

◆ width

int width

◆ nTrans

int nTrans

◆ curtime

int curtime

◆ active

int active

◆ validload

int validload

◆ randstart

BOOL randstart

◆ randstartpct

int randstartpct

◆ Transitions

Transition* Transitions

◆ hwnd

HWND hwnd

◆ orgposx

int orgposx

◆ orgposy

int orgposy

◆ next

Snippet* next

◆ A

animal* A