SimApi Physics GetActorEntityNameAndId 1

From SIMboxWiki
Jump to navigation Jump to search

Icon attributes.pngstatic bool SimApi::Physics::GetActorEntityNameAndId(const NxActor *i_pActor, wstring &o_EntityName, int &o_EntityId)

    Description

    Returns the simulation entity name and entity ID that the PhysX actor is related to, using unicode strings

    Parameters

    i_pActor - a pointer to the PhysX actor the data is requested for
    o_EntityName - The simulation entity name the actor is related to
    o_EntityId - The simulation entity id the actor is related to

    Return

    Type: bool   Description: true if the actor has entity name and entity id data, false if not

    Remarks
    



    Code Sample
    

 NxActor* pHummerWheel01 = SimApi::Physics::GetActorFromEntity(L"Hummer 1",L"wheel01");
if (pHummerWheel01 != NULL){
        pHummerWheel01->setMass(100.0f); // sets the mass to 100Kg
	wstring entityName;
	int entityId(-1);
	SimApi::Physics::GetActorEntityNameAndId(pHummerWheel01,entityName,entityId);
}


    See Also

    SimApi Physics