Crystal Space
Welcome, Guest. Please login or register.
October 20, 2017, 10:52:28 pm

Login with username, password and session length
Search:     Advanced search
9063 Posts in 2051 Topics by 77514 Members
Latest Member: Hulmeaq9y
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  MeshWrapper hierarchical structures
« previous next »
Pages: [1] Print
Author Topic: MeshWrapper hierarchical structures  (Read 1558 times)
Posts: 2

View Profile Email
« on: March 05, 2010, 04:53:35 pm »


I’m new to CS and I’m reading the manual and trying out some parts just now.
In Section 4.10.2 (Using Mesh Objects) in the User Manual I have read something about hierarchical structures of “iMeshWrapper”. I’m not sure if I have understood this part right. Are this hierarchical structures of iMeshWrapper only used for LOD? Or is it possible to represent an object, which consists of many other objects with such hierarchical structures? i.e. I would like to generate a car which consist of 3 factories (frame, wheel and steering wheel). Would it be possible to generate an iMeshWrapper “car” which contains the objects of this 3 categories? i.e.
<meshobj name=”car”>
  <meshobj name=”leftWheel”>

I could only find methods in iMeshWrapper which belongs to LOD. If it is possible to create such hierarchical structures – is there an example somewhere? I would like to use it from code …


Best regards

Global Moderator
Jr. Member
Posts: 79

View Profile
« Reply #1 on: August 08, 2010, 04:09:19 pm »

Sorry to answer so lately, hopefuly this can however help someone else.

You can create hierarchical structures of meshes, cameras and lights through the scene graph system. See iSceneNode and iMovable for that.

Basically, you simply need to call something like:

childMesh->QuerySceneNode ()->SetParent (parentMesh->QuerySceneNode ());
Then the relative position of the nodes will be automatically kept constant. The sectors of the child node will also be updated when the parent is added/removed from a sector.

It seems that the XML loader cannot handle that, although this feature should not be hard to add.
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 9.235 seconds with 16 queries.