### 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 - Uncle Ray

Pages: [1] 2 3 ... 6
1
##### Support / why translate and setorigin are different location?
« on: September 21, 2015, 06:19:51 am »
method A
{
obj.cleartranslation();
obj.translate(10,10,10);
}

method B
{
obj.cleartranslation();
obj.setorigin(10,10,10);
}

In my project,method A and method B are different obj's location,
Any tips?

2
##### Support / Re: How to make checkForCollisionEllipsoid's Ellipsoid visible?my bug?
« on: May 22, 2015, 05:08:01 pm »
problem still.ego,how do you make the collide ellipsoid viaible?
maybe my code was wrong?
i just need to see the collide ellipsoid.
any tips?

3
##### Support / Re: How to make checkForCollisionEllipsoid's Ellipsoid visible?my bug?
« on: May 22, 2015, 01:21:38 pm »
I just need create a Ellipsoid,which is the same width,height,lengh and position with checkforcollitionEllipsoid's Ellipsoid.

Any helps will be much appreciated.

4
##### Support / How to make checkForCollisionEllipsoid's Ellipsoid visible?my bug?
« on: May 22, 2015, 01:16:05 pm »
SimpleVector Ellipsoid=new SimpleVector(0,0,0)
SimpleVector boundingEllipsoid =new SimpleVector(0,0,0)
Object3D boundingbox;
Object3D target;
float scale=2;
ini()
{
target=...............;
target.setscale(scale);
float[] box = target.getMesh().getBoundingBox();
float widthX = box[1] - box[0];
float heightY = box[3] - box[2];
float lengthZ = box[5] - box[4];
ellipsoid.x = widthX/2+1 ;
ellipsoid.y = heightY/2+1 ;
ellipsoid.z = lengthZ/2+1 ;
boundingEllipsoid.x=ellipsoid.x*2/scale;
boundingEllipsoid.y=ellipsoid.y*2/scale;
boundingEllipsoid.z=ellipsoid.z*2/scale;
boundingbox= ExtendedPrimitives.createEllipsoid(boundingEllipsoid, 20);
boundingbox.clearTranslation();
boundingbox.setOrigin(target.getTransformedCenter());

}

update()
{
fix_front=obj.checkForCollisionEllipsoid(front, Ellipsoid,5);
if(front.equals(fix_front)==true)
{
obj.setTransparency(-1);
}
if(front.equals(fix_front)==false)
{
obj.setTransparency(0);
}

}

MY PROBLEM:
i want Ellipsoid visible,so i create boundingbox to show the checkEllipsoid's Ellipsoid.but i my program,some times the checkcollideEllipsoid work,and some times checkcollideEllipsoid unwork.

so,i think may be my boundingbox is wrong,so how to create the right boudingbox,the same scale and the same position with checkcollideEllipsoid's Ellipsoid?

5
##### Support / question about checkForCollisionEllipsoid's detect distance;
« on: May 21, 2015, 12:13:07 pm »
Object3D source;
Object3D target;
SimpleVector ellipsoid=new SimpleVector(10,10,10);
ini()
{
source.setCollisionMode(Object3D.COLLISION_CHECK_SELF|Object3D.COLLISION_CHECK_OTHERS);
target.setCollisionMode(Object3D.COLLISION_CHECK_SELF|Object3D.COLLISION_CHECK_OTHERS);
source.build();
target.build();
}

update()
{
simpleVector front=obj.getZAxis();
simpleVector fix_front=null;
fix_front=obj.checkForCollisionEllipsoid(front,ellipsoid, 5);
if(front.equals(fix_front)==true)
{
source.setTransparency(-1);//source will see
}
else if(front.equals(fix_front)==false)
{
source.setTransparency(0);//source will disappear
}
source.translat(fix_front);
}

my problem:
when ellipsoid=(10,10,10) or ellipsoid=(100,100,100);
their checkcollition's distance was the same,just same unit away between source and target,then source be disappear.

so how to change checkcollition's distance?whatever i do with ellipsoid,but the distance just the same.

6
##### Support / Re: FrameBuffer.freememory sometimes useless?
« on: April 29, 2015, 04:45:30 am »
yes,yes,the very key is the GLSurfaceView.setPreserveEGLContextOnPause(true);it solved my problem perfectly.
Giant appreciation to you ego,Nothing i can see,without thx.

7
##### Support / Re: FrameBuffer.freememory sometimes useless?
« on: April 28, 2015, 11:49:46 am »
in onPause,i did nothing just super method

protected void onPause()
{

super.onPause();
mGLView.onPause();//GLSurfaceView mGLView

}

8
##### Support / Re: FrameBuffer.freememory sometimes useless?
« on: April 28, 2015, 11:46:30 am »
because,if i without  touch home button,like "Unloaded texture: <int>",will display.

but,if i touch home button and return my app,like "Unloaded texture: <int>".was disappear.

yes,your are right,may the old context is destroyed,but their memory never freed,after i return to app,the freememoy just freeed the new context's memory,the old context's memory will never free,although the old context was destroyed.

i have soled,in this way,meybe there is better solution?can you tell me?
public void onSurfaceChanged(GL10 gl, int width, int height)
{

fb=null;
fb=new frameeBuffer(width,height);
ini_tex(fb);//initialize new context's framebuffer
................................................
fb.freememory;
}

9
##### Support / FrameBuffer.freememory sometimes useless?
« on: April 27, 2015, 11:04:34 am »
Solved by ego

_______________________________________________________
without touch phone's home button,freememory method it was good.
it free memory immediately,very nice.
but if i touch phone's home button and return to my app again.
the freememory method was never work,and the memory was never free.

may be my bug was in onSurfaceChanged?

here is my code:

public void onSurfaceChanged(GL10 gl, int width, int height)
{
fb=null;
fb=new frameeBuffer(width,height);
................................................
fb.freememory;
}

10
##### Support / Re: why world.removeObject not destroy object3D?
« on: April 24, 2015, 11:41:25 am »
with DDMS，set object3d to null,later memory will be freed.
but world.removeobject(obj),memory never freed.

ok,i think set to null,it was the best method to destroy Object3D.

11
##### Support / why world.removeObject not destroy object3D?
« on: April 24, 2015, 04:26:21 am »
When i use world.removeObject(obj),and later use world.addObject(obj),the obj  is still there.

i thought removeobject() will clear object from memory,in fact i am wrong?

so,if i want to destroy obj,i just use,
obj.clearobject();
obj.clearrotation();
obj.cleartranslation();
obj=null;

is that right?

in a shorting say,if i want destroy a object3D,which method will free memory,and really set the obj clear?

12
##### Support / Re: why the same texture shows different in jpct and 3ds max?
« on: January 31, 2015, 09:31:15 pm »
i am sorry,the reason is not ser.

the reason is 3ds max,when 3ds max export to 3ds,md2,ser,the uv would be strange.

it is my fault,not the bug of jpct.

Thank you very much,for your help.

Next time,i would be check it and check it many times
before pose a question,in here.

thank you again,and again.

13
##### Support / Re: why the same texture shows different in jpct and 3ds max?
« on: January 31, 2015, 08:26:24 pm »
i have sent it to you with email,please check it.

14
##### Support / Re: why the same texture shows different in jpct and 3ds max?
« on: January 31, 2015, 04:10:46 pm »
Thx，i think，i found the reason.
yes,you're right.it is exporter issue.

3ds max with md2,its right.jpct with ser,it's strange.
so i give up to translate md2 to ser.just keep md2.
when i keep the md2,the 3ds max and jpct just look the same.

honestly,it's not the first time appears issue with ser.
somtimes uv issue,sometimes location issue,sometime obj's id issue.

15
##### Support / Re: why the same texture shows different in jpct and 3ds max?
« on: January 31, 2015, 02:51:30 pm »
both device and emulator.
i have the model and texture,