The Wizards Wiki

Explore your world

User Tools

Site Tools


documentation:entity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:entity [2011/06/06 22:32] – created mhgameworkdocumentation:entity [2024/08/26 13:25] (current) – external edit 127.0.0.1
Line 10: Line 10:
  
 A **MeshPart** represents a single piece of geometry (which can be rendered with one DrawPrimitive call). It does not contain any material info. A **MeshPart** represents a single piece of geometry (which can be rendered with one DrawPrimitive call). It does not contain any material info.
-\\TODO: rename to Geometry or smth? EDIT: <color red>Now that this is also shared, this should be renamed.</color>+\\ TODO: rename to Geometry or smth? EDIT: <color red>Now that this is also shared, this should be renamed.</color>
  
 {{ :documentation:entitystructure.png?direct |}} {{ :documentation:entitystructure.png?direct |}}
  
-===== Classes =====+===== Classes : Core ===== 
 + 
 +<graphviz center> 
 +digraph { 
 +  node [shape = box]; 
 +IMesh -> MeshCoreData -> IMeshPart; 
 +IMesh -> MeshCollisionData; 
 +IMeshPart -> MeshPartGeometryData; 
 +
 +</graphviz>
  
 ==== IMesh, IEntity, IObject, IMeshPart ==== ==== IMesh, IEntity, IObject, IMeshPart ====
Line 62: Line 71:
 Represents the core geometry of the model.  Represents the core geometry of the model. 
 Note: could be made uniform GeometryData Note: could be made uniform GeometryData
 +
 +
 +===== Classes : Client =====
 +
 +**IMPORTANT!** This design is similar to the design of the other Client Modules like ‘Terrain.Client’ and ‘Player.Client’
 +
 +**TODO:** Implement the creation of the actor by using a Factory passed by the constructor. This moves the creation/caching/syncronizing logic to the outside. For a sketch of this implementation, see the Data System above.
 +
 +==== EntityPhysicsActorBuilder ====
 +
 +This class uses an EntityFullData as input to produce a PhysX actor object that represents collision for the given entity.
 + Currently this is done by creating a trianglemeshshape using the entity’s rendering triangles. 
 +This should be extended later on to allow simplified versions of the model or a collision model composed of boxes, spheres, convexmesh. 
 +These simplified versions should be build in the editor
 +
 +Currently there is one PhysX actor per entity, and one PhysX shape per model. 
 +
 +There is some serious unwinding done concerning the scaling of entities or models. The scaling of model and entity is done directly on the model’s vertices for the TriangleMesh. So is the models local matrix. Remainder of the entity transform is stored in the global pose of the actor.
 +
 +==== EntityClientPhysics ====
 +
 +This class implements the IClientPhysics interface, thus representing a client physics entity. These objects are static by default. Support for dynamic entities should be implemented at a later time.
 +===== Classes : AL =====
 +
 +==== EntityWizardsEditorExtension (AL) ====
 +
 +This is the main class for the application logic. It holds gui stuff and loads everything else. It also holds the data system.
 +
 +===== Classes : Data System =====
 +
 +There are no more FullData-classes. Data should be split in coherent pieces. The EditorObject performs the function of the FullData, by holding all the pieces (for editor use)
 +
 +==== EditorObject (AL?) ====
 +
 +This class is still used in the old system. It should however become the Object DataObject for the Editor Data System
 +
 +TODO: Editor meshes currently have no spatial information stored with them in the EditorObject
 +
 +==== EditorMesh (AL?) ====
 +
 +Represents a single renderable model, containing parts for different materials.
 +
 +<color red>WARNING: You must call setChanged() if you make changes to the mesh, because otherwise the changes wont be stored to the db.</color>
 +
 +==== EditorMeshPart (AL?) ====
 +
 +Represents a single material part of a Mesh
 +
 +
 +
 +===== Classes : Mesh rendering=====
 +
 +==== ColladaMeshImporter (AL) ====
 +
 +Is responsible for converting a collada file, to a The Wizards Mesh, using Editor functionality.
 +
 +Note: this class could be adjusted that it simply loads a colladaMesh as a mesh in the WorldDatabase, not referencing any editor logic. This might be unnecessary
 +
 +<color red>**TODO: A layer should be added to this class. There should be a class that reads the collada format and saves it into its own structure (which is equivalent with the current Data System structure). Then some other instance should copy it from the collada importer structure to the data system (Data System decoupling) Same goes for the OBJ importer.**</color>
 +
 +==== EditorMeshPartRenderData (AL) ====
 +
 +This class is responsible for loading, building resources and rendering an EditorMeshPart.
 +
 +Note that this is a **shared resource**, it can be used in different meshes at the same time
 +
 +==== EditorMeshRenderData (AL) ====
 +
 +This class is responsible for loading, building resources and rendering an EditorMeshPart.
 +
 +Note that this is a **shared resource**, it can be used in different meshes at the same time
 +
 +This class also requires material creation, so it should have access to some methods of the render system.
 +
 +
 +
  
  
documentation/entity.1307399537.txt.gz · Last modified: 2024/08/26 13:57 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki