Is it possible to add animation around user selected edge (Custom axis))

I am trying to rotate rectangular box around its edge. Its like door. Which is rotate around pivot point.
Current the component is rotating around axis which is defined by the origin point. I am not able to set the axis at the user selected point or edge.
I am using Open cascade library( RWGltf_CafWriter) for writing the GLTF file
Is there any way to do so?
Thank you for any suggestion.

Are you using any particular software or programming languages?

I am using C++ language with Open cascade library ( RWGltf_CafWriter)

glTF (as a file format) does not have a pivot point feature as such. Any particular software used to edit it might have such a feature and could encode it into the glTF in various ways.

Probably the more common choices would be one of:

  • A. Offset the the mesh geometry (each vertex position) such that the origin (0,0,0) is at the desired pivot point and vertices are offset relative to that.
  • B. Create a new parent node above the target node. The parent should have the original transform/rotation/scale, and the child node should have only an offset for the pivot point.

For example if your door is currently rotating around its geometric center, the offset required is the difference between that geometric center and the corner or edge around which you want to rotate.