A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by pHySiQuE » Thu Feb 21, 2013 6:05 pm
I updated and am having trouble compiling with all these int** attribute parameters. What is the correct way to declare these arrays and pass them to the function?
int attribute[10];
NewtonCollisionRayCast(..., ..., .., &attribute?)
-
pHySiQuE
-
- Posts: 608
- Joined: Fri Sep 02, 2011 9:54 pm
by pHySiQuE » Thu Feb 21, 2013 7:26 pm
Oh, and NewtonOnAABBOverlap is never being called.
-
pHySiQuE
-
- Posts: 608
- Joined: Fri Sep 02, 2011 9:54 pm
by Julio Jerez » Wed Mar 06, 2013 10:15 am
what do you mean it is not called,it is call form here
- Code: Select all
void dgCollidingPairCollector::AddPair (dgContact* const contact, dgInt32 threadIndex)
{
...
const dgContactMaterial* const material = contact->m_material;
if (material->m_flags & dgContactMaterial::m_collisionEnable) {
dgInt32 processContacts = 1;
if (material->m_aabbOverlap) {
processContacts = material->m_aabbOverlap (*material, *body0, *body1, threadIndex);
}
if (processContacts) {
I just added that callback to demo BasicFriction.cpp if I set a break point I get the callback.
- Code: Select all
static int UserOnAABBOverlap (const NewtonMaterial* const material, const NewtonBody* const body0, const NewtonBody* const body1, int threadIndex)
{
return 1;
}
did you set the call back in you project?,
The attribute is a an array opf pointer, see the usage in teh demos.
I have to do that to make it compatible with 64 bit. in 64 bit long and pointer have diffrent size, and user data to data truture fail if casted to a long. makin the user dat and array of pointe solve the problem almost every where
but fiuntion that use array of user data need to change the protytye to an array of pointer.
each point in fact contaion a int.
In restrospect it would have being better to make an array of long long,
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 2 guests