Code Monkey home page Code Monkey logo

Comments (14)

stephengold avatar stephengold commented on May 21, 2024 1

The anticipated release is now available: https://github.com/stephengold/Libbulletjme/releases/tag/12.1.1

I'll be very interested in any feedback you have on the new double-precision accessors:

  • PhysicsCollisionObject.getPhysicsLocationDp()
  • PhysicsCollisionObject.getPhysicsRotationDp()
  • PhysicsRigidBody.getAngularVelocityDp()
  • PhysicsRigidBody.getLinearVelocityDp()
  • PhysicsRigidBody.setAngularVelocityDp()
  • PhysicsRigidBody.setLinearVelocityDp()
  • PhysicsRigidBody.setPhysicsLocationDp()
  • PhysicsRigidBody.setPhysicsRotationDp()

from libbulletjme.

tmvkrpxl0 avatar tmvkrpxl0 commented on May 21, 2024

Also, I'm not seeing debug drawer in this library, Is there alternative way to draw it?

from libbulletjme.

stephengold avatar stephengold commented on May 21, 2024

Thanks for reaching out to me. I'm always curious how my work is being reused.

The max/min coordinate values are ignored when using DBVT broadphase acceleration, so there shouldn't be any measurable performance impact. There's even a single-argument constructor for PhysicsSpace which you can use to avoid having to specify max/min coordinate values.

The library does not provide access to Bullet's debug drawer. That's because I mostly use the library with JMonkeyEngine, which has its own debug drawer. I'll add "debug drawer" to the "What's missing" list in the README.

from libbulletjme.

tmvkrpxl0 avatar tmvkrpxl0 commented on May 21, 2024

I see, I expected it to work with double precision but I don't see a way to do so, even though there's native libraries for double precision. Is there way to use double precision on java binding? All values in Transform is float, and It mostly, if not only, uses Vector3f

from libbulletjme.

stephengold avatar stephengold commented on May 21, 2024

The JNI interface is entirely single-precision. The "Dp" native libraries use double precision internally, but use the single-precision interface to communicate with Java.

from libbulletjme.

stephengold avatar stephengold commented on May 21, 2024

Adding double-precision methods to the library wouldn't be difficult. If you tell me which methods you think would be most useful, I'll start adding them. Along with Vec3d, Quatd, Matrix3d, and so on.

from libbulletjme.

tmvkrpxl0 avatar tmvkrpxl0 commented on May 21, 2024

Adding double-precision methods to the library wouldn't be difficult. If you tell me which methods you think would be most useful, I'll start adding them. Along with Vec3d, Quatd, Matrix3d, and so on.

I'd like to contribute on this project. As it seems that I'll need to work with mostly double.
I have not worked with JNI before, but I'll try

from libbulletjme.

stephengold avatar stephengold commented on May 21, 2024

I don't need contributed code. Just tell me which methods you would use, and I'll create double-precision versions of those methods.

from libbulletjme.

tmvkrpxl0 avatar tmvkrpxl0 commented on May 21, 2024

I don't need contributed code. Just tell me which methods you would use, and I'll create double-precision versions of those methods.

They are no actually methods. I need a way to set/get position and velocity of a rigid body in double precision. Currently it uses Matrix4f or Vector3f to interface with native library. I need it to use Matrix4d and Vector3d instead

from libbulletjme.

stephengold avatar stephengold commented on May 21, 2024

I'll add double-precision versions of

  • getPhysicsLocation()
  • setPhysicsLocation()
  • getLinearVelocity() and
  • setLinearVelocity()

in the next release.

from libbulletjme.

tmvkrpxl0 avatar tmvkrpxl0 commented on May 21, 2024

Thank you

from libbulletjme.

tmvkrpxl0 avatar tmvkrpxl0 commented on May 21, 2024

Thank you. I have one more question, I want to render physical object myself, as I'm using it with minecraft. How do I get world position of each vertices of a rigid body?

from libbulletjme.

stephengold avatar stephengold commented on May 21, 2024

If you created the body's collision shape using MeshCollisionShape or GImpactCollisionShape or HeightfieldCollisionShape, then your application knows the position of every vertex and triangle in the mesh.

In any event, you can use DebugShapeFactory.getDebugTriangles() to generate a triangle mesh that approximates a specified collision shape.

from libbulletjme.

tmvkrpxl0 avatar tmvkrpxl0 commented on May 21, 2024

Thank you

from libbulletjme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.