- How does scaling work in Newton 4? Are scaled matrices or shapes supported?
- What is the Newton 4 equivalent to NewtonBodySetContinuousCollisionMode()?
- Is there an equivalent to NewtonCollisionPointDistance and NewtonCollisionCollide?
More to come...
Moderators: Sascha Willems, walaber
ndShape* box = new ndShapeBox(1, 1, 1);
ndShapeNull* test = box->GetAsShapeNull();
Julio Jerez wrote:That is correct, if you make a box, it will go the box function and returns null, because a box is not a null. Only box and classes derived from boxes will return a vud pointer.
D_COLLISION_API virtual ndShapeBox* GetAsShapeBox() { return this; }
ndAssert(!body->GetCollisionShape().GetShape()->GetAsShapeNull());
ndShapeBox xxx(1.0f, 1.0f, 1.0f);
ndShapeNull* xxxxx = xxx.GetAsShapeNull();
> newton_tests.exe!ndShape::GetAsShapeNull() Line 219 C++
newton_tests.exe!RigidBody_MoveWithUnitForce_Test::TestBody() Line 76 C++
newton_tests.exe!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2584 C++
newton_tests.exe!testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2635 C++
newton_tests.exe!testing::Test::Run() Line 2681 C++
class ndShape: public ndContainersFreeListAlloc<ndShape>
{
public:
...
...
virtual ndShapeBox* GetAsShapeBox() { return nullptr; }
virtual ndShapeNull* GetAsShapeNull() { return nullptr; }
virtual ndShapeCone* GetAsShapeCone() { return nullptr; }
virtual ndShapePoint* GetAsShapePoint() { return nullptr; }
virtual ndShapeConvex* GetAsShapeConvex() { return nullptr; }
virtual ndShapeSphere* GetAsShapeSphere() { return nullptr; }
virtual ndShapeCapsule* GetAsShapeCapsule() { return nullptr; }
#include <windows.h>
#include <iostream>
#include "newton-4.00/sdk/dNewton/ndNewton.h"
int main()
{
auto v = ndVector::m_zero;
}
PhysicsNode::Free()
{
if (newtonbody)
{
if (world && world->newtonworld) world->newtonworld->RemoveBody(newtonbody);
delete newtonbody;
}
}
Users browsing this forum: No registered users and 3 guests