Skip to content

classHPatch 02

Member Function Documentation

static void HPatch::DeleteHandle HPatch handle  )  [static]
 

HAttrProperty * HPatch::GetAttr  ) 
  This returns a pointer to the real HAttr in the Model or Group on the HPatch in case a person wanted to take their own samples from a HAttr.

HAttrProperty * HPatch::GetCompositedAttr  ) 
  On a HPatch there is a HAttr that is a composited attribute using the coordinates (0,0,0). This is what Hash use in real-time.

HCP * HPatch::GetCP1  ) 
 

Returns a pointer to the first HCP in the list of 4 CPs that defines the patch.

Note:

There aren't actually real "first" CP but we need to start somewhere.

When looking down the patch normal, patch vertices are numbered in ascending order, counter clockwise.

A vertex's normal N can be computed by getting the cross product of its Out Tangent A with its In Tangent B; N = A ^ B ( the ^ symbol is defined as the cross product operator for the Vector class )
A: the Out Tangent A, is the "in" tangent of the spline leading to the next vertex ( unless the IsFlipV for the current vertex is set )
B: The In Tangent B, is the "out" tangent of the spline leading from the previous vertex ( unless the IsFlipV for the previous vertex is set )

HCP * HPatch::GetCP2  ) 
  Returns a pointer to the second HCP in the list of 4 CPs that defines the patch.

HCP * HPatch::GetCP3  ) 
  Returns a pointer to the third HCP in the list of 4 CPs that defines the patch.

HCP * HPatch::GetCP4  ) 
  Returns a pointer to the fourth HCP in the list of 4 CPs that defines the patch.

int HPatch::GetGroupImageRotation  ) 
 

Vector & HPatch::GetIT1  ) 
 

Returns a Vector that is the In tangent to the first HCP in the list of 4 CPs that defines the patch.

Note:
There aren't actually real "first" CP but we need to start somewhere.
See also:
HPatch::GetOT1()

Vector & HPatch::GetIT2  ) 
 

Returns a Vector that is the In tangent to the second HCP in the list of 4 CPs that defines the patch.

See also:
HPatch::GetOT1()

Vector & HPatch::GetIT3  ) 
 

Returns a Vector that is the In tangent to the third HCP in the list of 4 CPs that defines the patch.

See also:
HPatch::GetOT1()

Vector & HPatch::GetIT4  ) 
 

Returns a Vector that is the In tangent to the fourth HCP in the list of 4 CPs that defines the patch.

See also:
HPatch::GetOT1()

int HPatch::GetNumPoints  ) 
 

Vector & HPatch::GetOT1  ) 
 

Returns a Vector that is the Out tangent to the first HCP in the list of 4 CPs that defines the patch.

Note:

GetIT1 and GetOT1 will get the tangent from different HCPs. That is because an HPatch is the result of HSpline crossing and so the InTangent is from one of the crossing HSplines while the OutTangent is from the other crossing HSpline. The CP and their tangents may be viewed like this:

CP-Tangents.gif

Relations between In tangents, Out tangents and CPs

The functions GetITx() and GetOTx() are usefull for the computing of normals to the CPs in a patch. it1^ot1 (that is the cross product between it1 and ot1) will generate the surface normal for the cp1 on the patch. However, just crossing the in & out tangents of the splines that make the patch will produce some normals facing in and some out.

There aren't actually real "first" CP but we need to start somewhere.

<table