Mouse
Joined: 24 Nov 2007 Posts: 6
|
Posted: Wed Nov 28, 2007 9:42 pm Post subject: foo.exe has triggered a breakpoint |
|
|
Whilst getting started I've been dropping a small cube onto a plane (which works fine.) For giggles and to try out a collision with bigger objects I made the plane 10000 square and the cube an odd size.
Running it gave me "foo.exe has triggered a breakpoint" and broke into the debugger which shows the breakpoint on line 18246 of zpta028.cpp
Not a biggie as I was just messing - but did wonder what it was about what i'd done that caused this?
Code at breakpoint.
| Code: | TA\
_\
ASSERT
(
ll\
OllOlOO\
OOl
.
llOl\
lOlOOOlO
[
0
]
>
0.0f
) |
The plane is created with:
| Code: |
TA::StaticObject* staticObject = TA::StaticObject::CreateNew();
TA::CollisionObjectAABBMesh* staticCollisionObject =
TA::CollisionObjectAABBMesh::CreateNew();
staticCollisionObject->Initialise(
4, // Num vertices.
1, // Num polygons.
4); // Num polygon indices.
float k_fGroundExtent = 10000.0f;
staticCollisionObject->AddVertex( TA::Vec3( k_fGroundExtent, -100.0f, k_fGroundExtent ) );
staticCollisionObject->AddVertex( TA::Vec3( -k_fGroundExtent, -100.0f, k_fGroundExtent) );
staticCollisionObject->AddVertex( TA::Vec3( -k_fGroundExtent, -100.0f, -k_fGroundExtent ) );
staticCollisionObject->AddVertex( TA::Vec3( k_fGroundExtent, -100.0f, -k_fGroundExtent ) );
int pnPolygonIndexList[4] = { 0, 1, 2, 3 };
staticCollisionObject->AddPolygon( 4, pnPolygonIndexList );
staticCollisionObject->FinishedAddingGeometry();
|
And the cube like:
| Code: |
pDynamicObject = TA::DynamicObject::CreateNew();
aabb.Initialise( // Make a 10 by 1 by 10 box.
TA::Vec3(0.0f, 0.0f, 0.0f), // Center.
TA::Vec3(500, 5, 500)); // Extent
pDynamicObject->InitialiseAsABox(aabb);
// Place the dynamic object
pDynamicObject->SetPosition(TA::Vec3(0.0f, 2.0f, 0.0f));
|
|
|