Show Posts
|
|
Pages: 1 ... 3 4 [5] 6 7 ... 114
|
|
64
|
Crystal Space Development / General Crystal Space Discussion / Re: State of the java support
|
on: March 04, 2009, 09:16:05 am
|
Hi,
I want to begin a game project with java, and cs seems to be very nice feature-wise. Are the java bindings a seperate project or maintained by the cs team? And what's their state, e.g. are all parts of cs covered, and are there examples also in java or only c++?
thanks
They are part of the CS project. I would say roughly 98% of the CS API is covered and there are a few examples included. Greetings,
|
|
|
|
|
65
|
Crystal Space Development / Support / Re: some questions about coordinates Transformation
|
on: February 17, 2009, 10:07:03 am
|
I know, but the red area which I marked would be changed after the player is moving every frame. I need to render the changing every frame in another place. And I can use "g3d->SetRenderTarget()" also?
Yes, doing this every frame is no problem. It will be a HUGE deal faster then doing it one pixel at a time. Greetings,
|
|
|
|
|
67
|
Crystal Space Development / Support / Re: some questions about coordinates Transformation
|
on: February 17, 2009, 09:45:48 am
|
|
Yes, reading any information from a 3D card is slow since communication between 3D card and computer is designed so that it is only fast from the computer to the card. Not the other way around.
If you want to copy part of the screen somewhere else I think you should use other functions. Without really knowing what you want to do I guess that you can probably get a lot further by simply rendering the contents of the portal to a texture (I told you this before). And then you can render that texture anywhere you want on the screen.
Greetings,
|
|
|
|
|
68
|
Crystal Space Development / Support / Re: some questions about coordinates Transformation
|
on: February 17, 2009, 09:07:36 am
|
|
Ok, but you didn't tell me what you are trying to do. You are only telling me the technical thing you are trying to do but not why. What is the effect you are trying to achieve?
Reading RGB values from the 3D card is very very slow. It sounds to me as if you are going about this the wrong way. But first I need to know what it is that you want to do.
Greetings,
|
|
|
|
|
72
|
Crystal Space Development / Support / Re: some questions about coordinates Transformation
|
on: February 16, 2009, 09:41:16 am
|
Is the result which I use " camera->Perspective()" to get have the same large to screen , or I need to do some clip after that?
The result is not clipped. Even worse. Before giving vertices to the Perspective() function you must make sure that it is actually in front of the camera or the function will not be correct (i.e. vertex.z > 0 to test if it is in front of the camera). Note that this can be complicated. For example, a polygon might be partially in front of the camera and partially behind it. In that case you need to clip the polygon in 3D space to the Z=0 plane so that only the part of the polygon in front of the camera remains. Greetings,
|
|
|
|
|
73
|
Crystal Space Development / Support / Re: some questions about coordinates Transformation
|
on: February 16, 2009, 09:21:57 am
|
Hi, I am new in CS. I have some problems about coordinate Transformation. Assuming that there is an polygon in the world map. Now I want to get the polygon vertices' object space coordinates, world space coordinates and screen coordinates. which function can i use? And how to get the transform which will transform object space of the polygon to world space? How to get the transform which will transform world space of the polygon to screen ? Please help me! Thank you very much!
The object to world transform can be found in the movable of the object. So if you have a pointer to the mesh that contains the polygon you can do mesh->GetMovable()->GetFullTransform(). This transform represents the transformation from object space to world space. Calling This2Other() on this transform would convert a vector from object space to world space. Calling Other2This() would do the reverse. The transform to get from world space to screen is in the camera that you use. You can use camera->GetTransform() to get that. Doing Other2This() on this transform will transform from world to camera space. Camera space is still 3D space. So if you want to get screen coordinates you have to do perspective projection too. The camera has a function for that. You can call camera->Perspective() to convert a 3D camera space vector to a 2D screen location. Hope this helps, Greetings,
|
|
|
|
|
|