BCB-Tools.com

Home of
RAD DirectX

C++ Builder wrapping DirectX

...

Please Register

So we can
create more

the TDx_Library
the TDx9_Library



Welcome to BCB-Tools.com Latest News

Development Tools Demo Applications Step-by-Step Tutorials Component Reference

Register Here! Available Downloads

Frequently Asked Questions Discussion Forums Receive emails from BCB-Tools.com Send us some Feedback

Links to other sites Information about the BCB-Tools.com website


    TDx_Input_Library v1.90 Component Reference

    -= Click to navigate the reference =-

    -= Go to the TDIEffect description =-   Component: TDIEFFECT::TYPESPECIFICPARAMS

    Go to the Welcome Page
    [ TDIEffect ]     [ next: TypeSpecificParamsSize ]     [ prev: TriggerRepeatInterval ]

    public:
         __property void* TypeSpecificParams = { read=FGetTypeSpecificParams, write=FSetTypeSpecificParams, default=NULL };

    If you would like to submit additions or improvements to this page, click: admin@bcb-tools.com.


    DESCRIPTION

    Top     See Also

    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    






























Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Forums |  Feedback |  Mailing List |  Links |  Site Information

This page is Copyright © 2008 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.