Skip to content

classHModelCache 03

Member Function Documentation

HCP * HModelCache::AddCP HCP cp,
Vector p
 

Returns a pointer to the HCP that is created and linked to after the prevcp that is passed in. The position of the new HCP is set to the vector p. Note: NEVER use AddCP() to create a new spline. New splines must be created with StartSpline(), and subsequent HCPs should be added with AddCP();

Parameters:
cp  - (prevcp) address of the HCP you are adding to.
p  - position of the new HCP that is to be created.

HDecal * HModelCache::AddDecal HClip clipcache = NULL  ) 
 

Adds a Decal. Will create the "decals folder" if it doesn't exist.

Parameters:
clipcache  - If NULL, a prompt will be displayed to the user.

HSegmentCache * HModelCache::AddSegment HBoneCache parentbonecache,
HBoneCache afterbonecache,
String name,
COLORREF  color
 

Creates a new bone and places it on the bones tree as child of parentbonecache and right after the afterbonecache. Will also create the HBoneCacheContainer and an HSegmentCache where controlled CPs may be added

Parameters:
parentbonecache  - Parent of which the new bone will be a child. May be NULL in which case, the new bone is added at the model root level.
afterbonecache  - The new bone will be added right after this bone
name  - the name of the new bone
color  - the color of the new bone. Use global function GetColor to get a color according to the number of bones in the model
Returns:
A pointer to a new HSegmentCache for the newly created hBoneCache.
Example:
modelcache->AddSegment(NULL, NULL, "Bone1", GetColor(modelcache->CountBones()));
See also:
HSegmentCache

void HModelCache::AddToTemporaryGroup HGroupCP gh  ) 
 

This function adds a group of control points to the model's "Untitled" temporary group. You pass in the first HGroupCP of a group to wish to add to the temporary group. This group will be selected when you exit the plugin. The group that is passed into this function will be freed.

Parameters:
gh  - pointer to the first HGroupCP in the group to add to the temporary group.

BOOL HModelCache::AttachCPs HCP cp1,
HCP cp2
 

Returns whether the two attached control points create a loop. This is TRUE if cp1 and cp2 are the beginning and the end of the same spline. If a loop is created, a number of things happen. If cp2 is the first control point in the spline, the spline is reversed before the loop is made. The last control point in the spline gets deleted (make sure you keep this in mind if you are performing operations on HCPs after they are attached (check the return value to see if a loop was made). Also, the control point before the last control point has its IsLoop flag set, and its GetNext() pointer set to the first HCP in the spline. If the attach operation does not create a loop, then the two HCPs are stacked, and added to their attached control point list. They are also linked to the HCP::GetHead() which stores the position for all of the control points that are attached to each other.

Parameters:
cp1  - first control point to attach
cp2  - second control point to attach
Note:
If you use AttachCPs in such a way as to cause a loopback, be careful not to add the tail CP to any HGroup that you are accumulating, as something happens to that CP after the attach that will cause a crash if you've added it to the group.

BOOL HModelCache::AttachHook HCP cp1,
HCP cp2,
float  s
 

void HModelCache::BreakSpline HCP cp  ) 
 

IEPolyModel* HModelCache::BuildExportModel IEPolyModelParms iemp,
const char *  modelmapfilename
 

IEPatchModel* HModelCache::BuildExportModel