Welcome to
www.tdxlibrary.org
Home of the
the TDx_Library...
"RAD DirectX"
for
C++ Builder
...
|
TDx_Input_Library v2.00 Component Reference
|
|
[ TDIEffect::TypeSpecificParams ]
[ next: TypeSpecificParamsSize ]
[ prev: TriggerRepeatInterval ]
public:
__property void* TypeSpecificParams = { read=FGetTypeSpecificParams, write=FSetTypeSpecificParams, default=NULL };
TDIEFFECT::TYPESPECIFICPARAMS
[ component property ]
- Description
The TypeSpecificParams property references the internal structure of the appropriate TDICustomForce, TDIPeriodic, TDIConstantForce, TDIRampForce or TDICondition component, which in turn provide additional parameters appropriate to the effect type.
NULL may be set when the effect has no type specific parameters.
The TDIEffectInfo::EffectType property defines the effect type :- DIEFT_CONDITION, DIEFT_CONSTANTFORCE, DIEFT_CUSTOMFORCE, DIEFT_PERIODIC or DIEFT_RAMPFORCE.
For DIEFT_CONDITION effects, this property should reference the internal array of DICONDITION structures referenced by the TDICondition::Internal_DICONDITION_Ptr property.
For example:
void __fastcall TForm1::Button1Click(TObject* Sender)
{
// set multiwrapper to contain 5 x DICONDITION structures.
DICondition1->ArraySize = 5;
.
.
.
// set effect type
DIEffectInfo1->EffectType = DIEFT_CONDITION;
// set the array size
DIEffect1->TypeSpecificParamsSize = 5 * DICondition1->Size;
// or you could set it like this
DIEffect1->TypeSpecificParamsSize = DICondition1->SizeAll;
// or even like this
DIEffect1->TypeSpecificParamsSize = 5*sizeof(DICONDITION);
// point to first of the internal DICONDITION structures in the DICondition1 component
DIEffect1->TypeSpecificParams = DICondition1->Internal_DICONDITION_Ptr[0];
}
When only one condition is being used the direction will be obtained from TDIEffect::Direction. Otherwise, there must be one internal DICONDITION structure for each axis affected, in the same order as TDIEffect::Axes, the effect should not be rotated and the following values used in the TDIEffect::Direction array:
Spherical coordinates : 0, 0, etc
Polar coordinates : 9000, 0, etc
Cartesian coordinates 1, 0, etc
When using the other effect types, this property should reference the internal structure of the appropriate wrapper component.
For example:
void __fastcall TForm1::Button1Click(TObject* Sender)
{
// set effect type
DIEffectInfo1->EffectType = DIEFT_CONSTANTFORCE;
// set the size
DIEffect1->TypeSpecificParamsSize = DIConstantForce1->Size;
// point to the internal DICONSTANTFORCE structure of DIConstantForce1
DIEffect1->TypeSpecificParams = DIConstantForce1->Internal_DICONSTANTFORCE_Ptr;
}
- See Also
- Top
If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.
|
|