Need an infinite collision plane - best way?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Need an infinite collision plane - best way?

Postby misho » Tue Jan 30, 2018 5:45 pm

Hi,

I need an infinite collision plane ( a "floor" for my scene ) which will be a tangent to a sphere with its origin in 3D space. My set up is a whole-earth visual system in real size, and I want to model a local scene, so for all practical intents and purposes, an infinite plane located on the sphere will do. My gravity vector always points to the centre of the sphere, so however the plane is oriented, the gravity always points "down", inverse normal to the sphere.

This means, I need to specify an orientation vector (normal to the plane), and an offset of R, radius of the sphere. It does NOT need to have a visual component - my objects just need to bounce off it.

What's the best way to build this? I looked into NewtonCreateHeightFieldCollision, but creating the whole flat height field seems a bit of an overkill. I've also looked at

Code: Select all
NewtonCollision* CreateInfinitePlane (NewtonWorld* const world, const dVector& planeEquation)
{
   dInfinitePlane* const planeCollision = new dInfinitePlane (world, planeEquation);
   return planeCollision->m_collision;
}


It seems to me this could work: plane equation "orients" the plane, all I'd have to add is the placement of it...
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Need an infinite collision plane - best way?

Postby Julio Jerez » Tue Jan 30, 2018 5:53 pm

that does it, I think
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Need an infinite collision plane - best way?

Postby misho » Wed Jan 31, 2018 1:23 pm

Thanks!!
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 8 guests