Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - aleks1283

Pages: 1 [2] 3 4
16
Projects / Re: Physics example
« on: May 29, 2021, 09:41:09 pm »
Thanks, I hope you see a cool game this year.
I need something like object.clearRotation and preferably object.clearTranslation to apply to sourceMesh.clearRotation and sourceMesh.clearTranslation.

17
Projects / Re: Physics example
« on: May 29, 2021, 08:42:34 pm »
I understand what the problem is. If initially the object had some kind of rotation angle or movement, then when the frames are updated and when multiplied by the matrix, it does not become in its proper place, but adds value every time. Even if the original object is no longermoves and does not turn.how to solve this problem ???
So I don't like these vector movements)))

18
Projects / Re: Physics example
« on: May 29, 2021, 02:27:57 pm »
When i do - aaa[f].matMul(cyl7.getRotationMatrix());   // or  aaa[f].rotate(cyl7.getRotationMatrix());         
                    X77[f] = aaa[f].x + cyl7.getTranslation().x;
                    Y77[f] = aaa[f].y + cyl7.getTranslation().y;
                    Z77[f] = aaa[f].z + cyl7.getTranslation().z; all good(coordinates,and the shape of the object) but object wrong(infinite) rotation,instead of the original turn

19
Projects / Re: Physics example
« on: May 29, 2021, 02:22:14 pm »
Not work

 aaa[f].matMul(cyl1.getTranslationMatrix()); or aaa[f].matMul(cyl1.getWorldTransformation()); - returns coordinates of order 6234 or 2323 in world space when the original(Source object cyl7) coordinates are - 6 ... 7 in world space

20
Projects / Re: Physics example
« on: May 29, 2021, 01:40:59 pm »
SimpleVector[] aaa = getSourceMesh();
aaa[f].matMul(cyl7.getWorldTransformation()); - return wrong world coordinate

21
Projects / Re: Physics example
« on: May 29, 2021, 12:55:13 pm »
Yes,every vertex in world space.
My target mesh will consist of interconnected meshes of several objects, so to speak, it's easy to visualize the fragmented parts - skin tight muscles. Therefore, I need to get the global coordinates of the vertices of the objects as they look in the world inplace with rotation angles, and the target mesh will have to give a copy of the selected objects, and in places where I need this target mesh, I will link with new polygons .

22
Projects / Re: Physics example
« on: May 29, 2021, 11:25:08 am »
Why when I call the multiplication of each vector of the point of the object by the matrix(getRotationMatrix), the incorrect rotation of the object (infinite rotation) starts? ..

23
Projects / Re: Physics example
« on: May 28, 2021, 06:24:11 pm »
 //Dont copy object. -

VVV = new GenericVertexController() {
            @Override
            public void apply() {         
                SimpleVector[] aaa = getSourceMesh();
                SimpleVector[] bbb = getDestinationMesh();           
                                int lll=aaa.length;
                                for (int f=0;f<lll;f++)
                                {
                                    //bbb[f].matMul(objSkinCyl7.getWorldTransformation());
                                    bbb[f].x = X77[f];
                                    bbb[f].y = Y77[f];
                                    bbb[f].z = Z77[f];
                                }
            }
        };
        VVV2 = new GenericVertexController() {
            @Override
            public void apply() {
                SimpleVector[] aaa = getSourceMesh();       
                int lll=aaa.length;
                SimpleVector[] hhh = new SimpleVector[lll];             
                X77 = new float[lll];
                Y77 = new float[lll];
                Z77 = new float[lll];
                for (int f=0;f<lll;f++)
                {                 
                    aaa[f].matMul(cyl7.getWorldTransformation());                           
                    X77[f] = aaa[f].x;
                    Y77[f] = aaa[f].y;
                    Z77[f] = aaa[f].z;
                }
            }
        };
cyl7.setVisibility(false);

///////////
///////////
///////////
//Copy object,but wrong rotate. Infinite rotation -


VVV = new GenericVertexController() {
            @Override
            public void apply() {             
                SimpleVector[] aaa = getSourceMesh();
                SimpleVector[] bbb = getDestinationMesh();

                                int lll=aaa.length;
                                for (int f=0;f<lll;f++)
                                {
                                    //bbb[f].matMul(objSkinCyl7.getWorldTransformation());
                                    bbb[f].x = X77[f];
                                    bbb[f].y = Y77[f];
                                    bbb[f].z = Z77[f];
                                }
            }
        };
        VVV2 = new GenericVertexController() {
            @Override
            public void apply() {               
                SimpleVector[] aaa = getSourceMesh();             
                int lll=aaa.length;
                SimpleVector[] hhh = new SimpleVector[lll];               
                X77 = new float[lll];
                Y77 = new float[lll];
                Z77 = new float[lll];
                for (int f=0;f<lll;f++)
                {                   
                    aaa[f].matMul(cyl7.getRotationMatrix());                 
                    X77[f] = aaa[f].x + cyl7.getTranslation().x;
                    Y77[f] = aaa[f].y + cyl7.getTranslation().y;
                    Z77[f] = aaa[f].z + cyl7.getTranslation().z;
                }
            }
        };

cyl7.setVisibility(false);

24
Projects / Re: Physics example
« on: May 27, 2021, 05:20:48 pm »
How get global(world) coordinate of vertex from mesh?In GenerateVertexController

25
Projects / Re: Physics example
« on: May 27, 2021, 02:33:56 pm »
      Everything started to work.
Added to onDrawFrame -     

            cyl7.compile(true);
            cyl7.touch();
            objSkinCyl7.compile(true);
            objSkinCyl7.touch();
            cyl7.getMesh().applyVertexController();
            objSkinCyl7.getMesh().applyVertexController();

26
Projects / Re: Physics example
« on: May 27, 2021, 12:52:05 pm »
I can dynamically create the object I want using getPolygonManager. But it seems to me that it will be too slow, since it will be necessary to add an object to the scene and draw a texture on it every time.

27
Projects / Re: Physics example
« on: May 27, 2021, 12:15:14 am »
GenerateVertexController does not work in real time, makes a change in the object from the value (0) of the variable to "private" once and does not work anymore. I looked through the whole forum and I probably did it right. I also use jbullet in the project. Could it beis it that GenerateVertexController is not compatible with Jbullet in the same project?

28
Projects / Re: Physics example
« on: May 22, 2021, 02:38:41 pm »
Thanks Egon.
In general, my next project is very non-trivial. :) :) :)

29
Projects / Re: Physics example
« on: May 21, 2021, 10:33:00 pm »
and apply a texture to the mesh

30
Projects / Re: Physics example
« on: May 21, 2021, 10:10:26 pm »
So that the mesh stretches when moving parts of the human body

Pages: 1 [2] 3 4