編集

次の方法で共有


ID3DX10SkinInfo::Compact method

Limit the number of bones that can influence a vertex and/or limit the amount of influence a bone can have on a vertex.

Syntax

HRESULT Compact(
  [in] UINT  MaxPerVertexInfluences,
  [in] UINT  ScaleMode,
  [in] float MinWeight
);

Parameters

MaxPerVertexInfluences [in]

Type: UINT

The maximum number of bones that can influence any given vertex. This value is ignored if it is greater than the value returned by ID3DX10SkinInfo::GetMaxBoneInfluences.

ScaleMode [in]

Type: UINT

A flag describing how to scale the remaining weights on a given vertex after some have been chopped off by MinWeight. If D3DX10_SKININFO_NO_SCALING is specified, the weights will not be scaled at all. If D3DX10_SKININFO_SCALE_TO_1 is specified, the weights greater than MinWeight will be scaled up so that they add up to 1.0. If D3DX10_SKININFO_SCALE_TO_TOTAL is specified, the weights greater than MinWeight will be scaled up so that they add up to the original total.

MinWeight [in]

Type: float

The minimum percentage of influence, or weight, that any bone can have on any vertex. This value must be between 0 and 1.

Return value

Type: HRESULT

If the method succeeds, the return value is S_OK. If the method fails, the return value can be: E_OUTOFMEMORY or E_INVALIDARG.

Requirements

Requirement Value
Header
D3DX10.h
Library
D3DX10.lib

See also

ID3DX10SkinInfo

D3DX Interfaces