Crystal Space
Welcome, Guest. Please login or register.
November 24, 2014, 10:59:30 pm

Login with username, password and session length
Search:     Advanced search
9018 Posts in 2046 Topics by 9111 Members
Latest Member: Jorak
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  creating multiple sectors within one view
« previous next »
Pages: [1] Print
Author Topic: creating multiple sectors within one view  (Read 2689 times)
Mcarsten
Newbie
*
Posts: 19


View Profile Email
« on: December 15, 2008, 03:46:35 pm »

Hello,
I am trying to create a simple view (no panning or movement) that has multiple sectors (one main sector and three smaller ones on the rhs).  The thing I do not understand is how do i specify where each sector is placed in the world (in my case this is just the whole display).  Any help is greatly appreciated.
Also, I have been looking through the demos and tutorials and have not been able to find any help regarding this, if anyone knows of a demo or tutorial that would help with this that would be great.
Thanks
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: December 15, 2008, 03:50:51 pm »

Sectors have no position in the world. They just represent infinite space containing objects. To connect sectors so that the coordinate systems of both sectors are related to each other you have to create a portal between them. So the second sector will be visible only through a portal starting from the first sector. With a default portal coordinates of objects in the destination sector are not transformed but you can also attach a transformation to a portal. By doing that you can change the relative coordinate systems between two sectors. Note that you can have multiple portals between two sectors, each with a different transform so the second sector would have multiple different relative coordinate systems depending on which portal you look through (these portals can even be visible on the screen at the same time).

Let me know if this is not 100% clear.

Greetings,
Logged
Mcarsten
Newbie
*
Posts: 19


View Profile Email
« Reply #2 on: December 15, 2008, 03:57:05 pm »

Thank you.
I am not 100% clear, but I think I am following what you are saying.
It sounds to me like I do not need multiple sectors, maybe just one sector with multiple portals?

basically what I am trying to set up is a main display and some informational/configurable smaller displays that the user will interact with all together on one screen.

Thanks again.
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: December 15, 2008, 03:58:22 pm »

You can do multiple sectors by using portals yes.

But I don't understand what you are trying to do. It almost sounds as if you are making some kind of user interface using sectors? Can you elaborate on that?

Greetings,
Logged
Mcarsten
Newbie
*
Posts: 19


View Profile Email
« Reply #4 on: December 15, 2008, 04:02:36 pm »

Yes, i am trying to have a user interface, but still not sure if I should have:
a) multiple sectors with portals
b) one sector with multiple portals
c) some other config

The user interface i need is a main area and then three or four smaller areas.  Where I plan to use the mouse to select items from the smaller areas and drag them onto the main area.

Once I figure out whether a, b or c is best from above my next issue is defining the coordinates where each part lives in the dispaly.

Thanks.
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #5 on: December 15, 2008, 04:04:20 pm »

Well I don't understand why you're using sectors at all? Sectors are for 3D objects. i.e. the 3D part of the game. A user interface is (usually) 2D. Most of the times people do user interface with CEGUI or something related to that.

In any case, you can't have multiple sectors in one view. But from your description it doesn't sound like portals are going to help. Perhaps you would be better off by using multiple views. And in every view you can have another sector.

Greetings,
Logged
Mcarsten
Newbie
*
Posts: 19


View Profile Email
« Reply #6 on: December 15, 2008, 04:07:25 pm »

Ok, that makes a lot of sense.
I do not need any 3D, only 2D (for now).  I have read a little on CEGUI, and will go look into that more now.

Sounds good about the multiple views and having a separate sector per view.  How do I set up multiple views?

Thanks.
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #7 on: December 15, 2008, 04:08:25 pm »

Well that's easy. Just make a second view. If you look at simple1 you can see that it already creates one view. Just create another one and make sure that the rectangles on screen don't overlap. Then also make sure to draw both views every frame.

Greetings,
Logged
Mcarsten
Newbie
*
Posts: 19


View Profile Email
« Reply #8 on: December 15, 2008, 04:09:36 pm »

great, thanks for your help!
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.43 seconds with 17 queries.