Crystal Space
Welcome, Guest. Please login or register.
November 28, 2014, 09:36:52 am

Login with username, password and session length
Search:     Advanced search
9026 Posts in 2046 Topics by 9151 Members
Latest Member: Steialk
* Home Help Search Login Register
  Show Posts
Pages: 1 2 [3] 4 5 6
31  Crystal Space Development / Support / How to get the player's position and camera's position in walktut? on: December 11, 2008, 09:33:57 am
     Now i have run "walktut"  in cel successful.
    The problem is that if i want to get the player's position and camera's position, i don't know how to do it ?!  Please help me , thank you!!
32  Crystal Space Development / Support / some problems about how to create my own plugin? on: December 04, 2008, 09:27:13 am
      In CS manual, it told us how to create our own plugin. I followed its steps , and used the code to create a plugin, it name is "myplugin" as the manual told me, then i use the new plugin in one of the cs' tutorial —— simple1 (the application i have run successfully before, and the way to use the plugin ,I also followed the manual strickly.) But when i run "simple1" again( which have add the using of the new plugin ) , it told me that I can't load the plugin ,i don't know why?!

the part of the code is followed:

bool Simple::OnInitialize(int /*argc*/, char* /*argv*/ [])
{
    if (!csInitializer::RequestPlugins(GetObjectRegistry(),
    CS_REQUEST_VFS,
    CS_REQUEST_OPENGL3D,
    CS_REQUEST_ENGINE,
    CS_REQUEST_FONTSERVER,
    CS_REQUEST_IMAGELOADER,
    CS_REQUEST_LEVELLOADER,
    CS_REQUEST_REPORTER,
   CS_REQUEST_PLUGIN("crystalspace.mygame.plugin", iMyApi),
    CS_REQUEST_REPORTERLISTENER,
    CS_REQUEST_END))
    return ReportError("Failed to initialize plugins!");

…………
}

bool Simple::SetupModules ()
{
  csRef<iMyApi> my = csQueryRegistry<iMyApi> (object_reg);
  if (!my) return ReportError("Failed to locate iMyApi!");
  my->DoSomething (1, csVector3 (2, 3, 4));
  printf ("%d\n", my->GetSomething ());
…………
}


Please help me !! Thank you!!
33  Crystal Space Development / Support / some problems about how to create my own plugin? on: December 04, 2008, 09:14:37 am
     Hello, ereybody, i am new in cs. I have some problems about how to create my own plugin.
34  Crystal Space Development / Support / Re: How to get the picture every frame before rendering? on: November 24, 2008, 09:04:34 am
  I finally found the way to get all the vertices of portal ,the code is followed:

 
   iMeshWrapper* portal_mesh = engine->FindMeshObject("_p_door01");
   csRef<iPortalContainer> portal_container = portal_mesh->GetPortalContainer();
   iPortal* portal = portal_container->GetPortal (0);
   
   int portalcount = portal->GetVertexIndicesCount();
   printf("the portal vertex is :%d\n",portalcount);
   const csVector3 *portalver = portal->GetVertices();

               for(int i=1; i<=portalcount;i++)
   {   
        printf("the portal's vertex is :%f,%f,%f\n",portalver->x,portalver->y,portalver->z);
        portalver ++;  // there we can make the pointer to the next vertex
   }

35  Crystal Space Development / Support / How to get the picture every frame before rendering? on: November 24, 2008, 08:56:05 am
     I am new in CS.
     In my programe I want to get the rendering picture before it is rendered on screen every frame, but i don't know how to get it! Please help me !!!
   
    Thank you very much!!!
36  Crystal Space Development / Support / sorry, but i have more question about portal! on: November 23, 2008, 03:42:28 pm
 
 I am new in cs. I know the question maybe stupid, but please help me !!!

   we know that the "iPortal" interface provide a function "GetWorldVertices()" to get an array of world space vertices of portal, the api document tells me that "Use GetWorldVertices() in combination with GetVertexIndices() to find out where the portal is". But i don't know how to use them together to get all  the vertices information of the portal.

37  Crystal Space Development / Support / Re: some question about portal and creating mirror on: November 23, 2008, 11:09:05 am
     sorry, I have another question about portal.
     I use the function of virtual const csVector3 *  GetWorldVertices ()=0 of iPortal interface to get the portal's vertex, but using this function i only can get one vertex of the portal if i want to get the four vertices of portal, how can i do??
     
38  Crystal Space Development / Support / Re: some question about portal and creating mirror on: November 23, 2008, 08:46:26 am




39  Crystal Space Development / Support / Re: some question about portal and creating mirror on: November 23, 2008, 08:42:59 am
    Thank you very much for your help!!  But it till have some problems.
    I have changed the portal to mirror successfully. But the  effect of rendering in screen is not stabilization, only the actor walks closed enough to the mirror ,   the effect of the mirror can render well.


   But if the actor far from the mirror or the angle of camera is changed  , the mirror becomes like a wall again , I don't know why?!


40  Crystal Space Development / Support / some question about portal and creating mirror on: November 22, 2008, 07:50:09 am
    I am new in CS and CEL;
    I have used 3ds max to build a simple world which includes two sectors and a portal, and i have used portal to connect the two sectors so the actor can go through from one sector to another by portal . Now I want to change this portal to mirror using C++, but I don't know how to do it ? Can you help me ?!
    And in Cel's tutorial "walktut", if i want to get " iportal" interface how can i do ? Which function can i use?

Thank you very much!!
41  Crystal Space Development / Support / some question about portal and creating mirror on: November 22, 2008, 07:49:03 am
    I am new in CS and CEL;
    I have used 3ds max to build a simple world which includes two sectors and a portal, and i have used portal to connect the two sectors so the actor can go through from one sector to another by portal . Now I want to change this portal to mirror using C++, but I don't know how to do it ? Can you help me ?!
    And in Cel's tutorial "walktut", if i want to get " iportal" interface how can i do ? Which function can i use?

Thank you very much!!
   
42  Crystal Space Development / Support / some questions about "portal " on: November 18, 2008, 04:17:54 am
   I am new in CEL and CS.
   When i use cel and cs, i met some questions.
    I have created two entities to describe the world and the Actor. "LevelEntity" is used to describe the world and "ActorEntity" is used to describe the actor.The questions is following:
   
   1. In  cel, it provides a property class -- "iPcPortal", I want to use this property class to get the portal's vertex  in world space, but i am not sure which entity i can add the "iPcPortal" property class to, ActorEntity or levelEntity? 
   2. In CS of "iPortal" interface, it provides a function of "virtual const csPlane3 &  GetObjectPlane ()=0 " , the description of it is "Get the object space plane of this portal", what does it mean of "object space plane "? Does it mean "object space"?
   3. I want to get the vertex coordinate in world space of a portal which is in the game world, but i don't know which function to use in "iPortal" to get the portal's vertex coordinate?
   4. In CS, the portal is rendering the contents of that other sector as seen through this portal, so if i want to get this content how can I do, or which function can i use to get it?  And Is the content which i get a picture or anything else?    

   Please help me!!!  Thank you!!
43  Crystal Space Development / Support / Re: how to get the mesh object's name? on: October 30, 2008, 10:12:31 am
  Now i get a point which points to sector , if a want to get the name of the sector , can i do like this :

   iSector* sector = pcmesh->GetMesh ()->GetMovable ()->GetSectors ()->Get (0);
   char *name = sector->QueryObjec->GetName();
44  Crystal Space Development / Support / Re: how to get the mesh object's name? on: October 30, 2008, 10:02:07 am
   uh, Yes, it is!!!  Thank you!!
   
   In walktut application,   it is using the code to build a zone and region with the name of "main", then loading the world of  "walktut_world"  for the game,  Is the zone/region means "walktut_world" . or they are only the part of the world?!

The code to build the zone and region is follow:

csRef<iPcZoneManager> zonemgr = CEL_QUERY_PROPCLASS_ENT (level_entity,
     iPcZoneManager);
  iCelZone* zone = zonemgr->CreateZone ("main");
  iCelRegion* region = zonemgr->CreateRegion ("main");
  zone->LinkRegion (region);
45  Crystal Space Development / Support / Re: how to get the mesh object's name? on: October 30, 2008, 09:52:13 am
   The game world is make up of many rooms, and they are named when they are builded. How can i get the name of the room using c++ code?
Pages: 1 2 [3] 4 5 6
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.461 seconds with 15 queries.