Comments (5)
If you change it to:
shape.ptr.calculateLocalInertia(Mass, LocalInertia);
Is there any difference?
Keeping this compatible with hxcpp is quite a pain, something always goes wrong.
from haxebullet.
Sorry, I think I am overworked LocalInertia and LocalInertia.value is the same thing. :)
Maybe we need to change signature of that function?
public function calculateLocalInertia(mass:BtScalar, inertia:BtVector3):Void;
from haxebullet.
It's already that though. If you're asking why I add .value
when it still works without it, well I don't know lol. I tried without it too, no change.
Here is the generated C++, if there's any way of getting rid of all the HX_STACK_THIS
and other other HX things in the output to make it cleaner let me know. I tried compiling in release mode too but the output is pretty much the same.
Void BPhys_obj::finalizeShape( Float Mass){
{
HX_STACK_FRAME("blip.BPhys","finalizeShape",0x2b9ab92c,"blip.BPhys.finalizeShape","blip/BPhys.hx",56,0x710a0ce8)
HX_STACK_THIS(this)
HX_STACK_ARG(Mass,"Mass")
HX_STACK_LINE(57)
cpp::Struct<btVector3> tmp = btVector3((int)0,(int)0,(int)0); HX_STACK_VAR(tmp,"tmp");
HX_STACK_LINE(57)
cpp::Struct<btVector3> LocalInertia = tmp; HX_STACK_VAR(LocalInertia,"LocalInertia");
HX_STACK_LINE(59)
Float tmp1 = Mass; HX_STACK_VAR(tmp1,"tmp1");
HX_STACK_LINE(59)
cpp::Struct<btVector3> tmp2 = LocalInertia; HX_STACK_VAR(tmp2,"tmp2");
HX_STACK_LINE(59)
this->shape->ptr->calculateLocalInertia(tmp1,tmp2);
HX_STACK_LINE(60)
Float tmp3 = LocalInertia->x(); HX_STACK_VAR(tmp3,"tmp3");
HX_STACK_LINE(60)
Float tmp4 = LocalInertia->y(); HX_STACK_VAR(tmp4,"tmp4");
HX_STACK_LINE(60)
Float tmp5 = LocalInertia->z(); HX_STACK_VAR(tmp5,"tmp5");
struct _Function_1_1{
inline static Dynamic Block( Float &tmp5,Float &tmp4){
HX_STACK_FRAME("*","closure",0x5bdab937,"*.closure","blip/BPhys.hx",60,0x710a0ce8)
{
hx::Anon __result = hx::Anon_obj::Create();
__result->Add(HX_HCSTRING("fileName","\xe7","\x5a","\x43","\x62") , HX_HCSTRING("BPhys.hx","\x0a","\x0c","\x77","\x4a"),false);
__result->Add(HX_HCSTRING("lineNumber","\xdd","\x81","\x22","\x76") , (int)60,false);
__result->Add(HX_HCSTRING("className","\xa3","\x92","\x3d","\xdc") , HX_HCSTRING("blip.BPhys","\x37","\x3b","\x7c","\xdb"),false);
__result->Add(HX_HCSTRING("methodName","\xcc","\x19","\x0f","\x12") , HX_HCSTRING("finalizeShape","\xa3","\xf0","\x18","\xb4"),false);
__result->Add(HX_HCSTRING("customParams","\xd7","\x51","\x18","\xed") , cpp::ArrayBase_obj::__new().Add(tmp4).Add(tmp5),false);
return __result;
}
return null();
}
};
HX_STACK_LINE(60)
Dynamic tmp6 = _Function_1_1::Block(tmp5,tmp4); HX_STACK_VAR(tmp6,"tmp6");
HX_STACK_LINE(60)
::haxe::Log_obj::trace(tmp3,tmp6);
HX_STACK_LINE(63)
Float tmp7 = Mass; HX_STACK_VAR(tmp7,"tmp7");
HX_STACK_LINE(66)
cpp::Struct<btVector3> tmp8 = LocalInertia; HX_STACK_VAR(tmp8,"tmp8");
HX_STACK_LINE(62)
cpp::Struct<btRigidBody::btRigidBodyConstructionInfo> tmp9 = btRigidBody::btRigidBodyConstructionInfo(tmp7,this->motion,this->shape,tmp8); HX_STACK_VAR(tmp9,"tmp9");
HX_STACK_LINE(62)
cpp::Struct<btRigidBody::btRigidBodyConstructionInfo> config = tmp9; HX_STACK_VAR(config,"config");
HX_STACK_LINE(68)
this->body = ::cpp::Pointer< btRigidBody >(::cpp::Pointer_obj::fromRaw((new btRigidBody(config))));
}
return null();
}
HX_DEFINE_DYNAMIC_FUNC1(BPhys_obj,finalizeShape,(void))
from haxebullet.
I had to rework the externs again to compile with latest hxcpp, please let me know if you get the chance and issue persist.
from haxebullet.
Thank you! Will let you know soon.
from haxebullet.
Related Issues (14)
- Wrong path to bullet .h files generated HOT 3
- Need a little help with BtRigidBody plz HOT 2
- lime cpp target? HOT 7
- 'btRigidBody': no appropriate default constructor available HOT 4
- In the vehicle class not working of frictions HOT 1
- What Do We Need To Autogenerate Javascript Bindings? HOT 30
- [FR] Please include AllHitsRayResultCallback in haxelib HOT 8
- Managing pointers in cpp target HOT 9
- Readme test case HOT 1
- Collision callback HOT 2
- haxelib.json missing HOT 2
- error C2819: type 'btRigidBody' does not have an overloaded member 'operator ->' HOT 5
- Crash on android HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haxebullet.