Snippet Class Reference

Snippet Class Reference

#include <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 (BipMaster *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. More...
 
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. 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...
 

Constructor & Destructor Documentation

virtual BIPExport ~Snippet ( )
virtual

Member Function Documentation

BIPExport void ClearActiveTransitions ( )
BIPExport void ClearSelectedTransitions ( )
BIPExport int ActivateTransitionTo ( Snippet toSN)
BIPExport Transition* GetTransitionTo ( 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 Snippet& operator= ( const Snippet SN)
Transition* TranHitTest ( 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 
)
Snippet* GetNextRandScriptSnippet ( int transindex)
Snippet* NextRealTime ( BipMaster *  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
inline
280 { return start; }
int start
Definition: IMoFlow.h:224
void SetStart ( int  s)
inline
281 { start = s; }
int start
Definition: IMoFlow.h:224
int GetEnd ( ) const
inline
282 { return end; }
int end
Definition: IMoFlow.h:225
void SetEnd ( int  e)
inline
283 { end = e; }
int end
Definition: IMoFlow.h:225
const MCHAR* GetClipName ( ) const
inline
285 { return sname; }
MCHAR sname[MAXNAME]
Definition: IMoFlow.h:226
void SetClipName ( const MCHAR n)
inline
286 { _tcscpy_s(sname, MAXNAME, n); }
MCHAR sname[MAXNAME]
Definition: IMoFlow.h:226
#define MAXNAME
Definition: CSConstants.h:38
const MaxSDK::AssetManagement::AssetUser& GetFile ( ) const
inline
288 { return file; }
MaxSDK::AssetManagement::AssetUser file
Definition: IMoFlow.h:227
void SetFile ( const MaxSDK::AssetManagement::AssetUser assetUser)
inline
289 { file = assetUser; }
MaxSDK::AssetManagement::AssetUser file
Definition: IMoFlow.h:227
virtual IPoint2 GetPosition ( ) const
inlinevirtual
291 { return IPoint2(posx, posy); }
Definition: ipoint2.h:32
int posx
Definition: IMoFlow.h:228
int posy
Definition: IMoFlow.h:229
virtual void SetPosition ( IPoint2  p)
inlinevirtual
292 { posx = p.x; posy = p.y; }
int y
Definition: ipoint2.h:36
int posx
Definition: IMoFlow.h:228
int posy
Definition: IMoFlow.h:229
int x
Definition: ipoint2.h:36
BOOL GetActive ( ) const
inline
293 { return active; }
int active
Definition: IMoFlow.h:233
void SetActive ( BOOL  act)
inline
294 { active = act; }
int active
Definition: IMoFlow.h:233
BOOL GetRandStart ( ) const
inline
296 { return randstart; }
BOOL randstart
Definition: IMoFlow.h:235
void SetRandStart ( BOOL  rs)
inline
297 { randstart = rs; }
BOOL randstart
Definition: IMoFlow.h:235
BOOL GetRandStartPercent ( ) const
inline
298 { return randstartpct; }
int randstartpct
Definition: IMoFlow.h:236
void SetRandStartPercent ( int  rsp)
inline
299 { randstartpct = rsp; }
int randstartpct
Definition: IMoFlow.h:236
int NumTransitions ( )
inline
301 { return nTrans; }
int nTrans
Definition: IMoFlow.h:231
Transition* GetTransition ( int  Tindex) const
inline
303  { assert (Tindex < nTrans); return &Transitions[Tindex]; }
int nTrans
Definition: IMoFlow.h:231
Transition * Transitions
Definition: IMoFlow.h:237
#define assert(expr)
Definition: assert1.h:71
void SetTransition ( int  Tindex,
Transition ti 
)
inline
305  { assert (Tindex < nTrans); Transitions[Tindex] = *ti; }
int nTrans
Definition: IMoFlow.h:231
Transition * Transitions
Definition: IMoFlow.h:237
#define assert(expr)
Definition: assert1.h:71

Member Data Documentation

int visited
float distance_to_stop
float distance_to_loop
int start
int end
MCHAR sname[MAXNAME]
int posx
int posy
int width
int nTrans
int curtime
int active
int validload
BOOL randstart
int randstartpct
Transition* Transitions
HWND hwnd
int orgposx
int orgposy
Snippet* next
animal* A