Made cylinders and spheres act as spheres
This commit is contained in:
@@ -7,11 +7,6 @@
|
|||||||
#include "strsafe.h"
|
#include "strsafe.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
|
||||||
/*typedef struct typPRGP {
|
|
||||||
Instance* instance; // Declare member types
|
|
||||||
Property ∝
|
|
||||||
} PRGP;*/
|
|
||||||
|
|
||||||
std::vector<PROPGRIDITEM> prop;
|
std::vector<PROPGRIDITEM> prop;
|
||||||
std::vector<Instance*> children;
|
std::vector<Instance*> children;
|
||||||
Instance * selectedInstance;
|
Instance * selectedInstance;
|
||||||
|
|||||||
@@ -73,13 +73,14 @@ void XplicitNgine::createBody(PartInstance* partInstance)
|
|||||||
partInstance->physBody = dBodyCreate(physWorld);
|
partInstance->physBody = dBodyCreate(physWorld);
|
||||||
|
|
||||||
// Create geom
|
// Create geom
|
||||||
|
if(partInstance->shape == Enum::Shape::Block)
|
||||||
|
{
|
||||||
partInstance->physGeom[0] = dCreateBox(physSpace,
|
partInstance->physGeom[0] = dCreateBox(physSpace,
|
||||||
partInstance->getSize()[0],
|
partInstance->getSize()[0],
|
||||||
partInstance->getSize()[1],
|
partInstance->getSize()[1],
|
||||||
partInstance->getSize()[2]
|
partInstance->getSize()[2]
|
||||||
);
|
);
|
||||||
|
|
||||||
// Debug output
|
|
||||||
dVector3 result;
|
dVector3 result;
|
||||||
dGeomBoxGetLengths(partInstance->physGeom[0], result);
|
dGeomBoxGetLengths(partInstance->physGeom[0], result);
|
||||||
printf("[XplicitNgine] Part Geom Size: %.1f, %.1f, %.1f\n",
|
printf("[XplicitNgine] Part Geom Size: %.1f, %.1f, %.1f\n",
|
||||||
@@ -87,6 +88,15 @@ void XplicitNgine::createBody(PartInstance* partInstance)
|
|||||||
result[1],
|
result[1],
|
||||||
result[2]
|
result[2]
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
partInstance->physGeom[0] = dCreateSphere(physSpace, partInstance->getSize()[0]/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Debug output
|
||||||
|
|
||||||
|
|
||||||
// Create rigid body
|
// Create rigid body
|
||||||
printf("[XplicitNgine] Created Geom for PartInstance\n");
|
printf("[XplicitNgine] Created Geom for PartInstance\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user