Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
1.0.0:custommesh [2023/03/23 13:47] – [Example] admin1.0.0:custommesh [2023/03/23 13:51] – [Vertex Groups] admin
Line 137: Line 137:
 |function AddTriangle(const AIndexOffset : Integer; const ATriangle : TTriangleID; const AVertices : TList<TVertexData>; const AIndices : TList<TTriangleIndex>; const AVertexOrder : TVertexOrder = TVertexOrder.CCW) : Integer;|Adds triangle vertices and indices to AVertices and AIndices based on the index values inside of TTriangleID VertexData values are taken from Cache.PositionSource and so on...| |function AddTriangle(const AIndexOffset : Integer; const ATriangle : TTriangleID; const AVertices : TList<TVertexData>; const AIndices : TList<TTriangleIndex>; const AVertexOrder : TVertexOrder = TVertexOrder.CCW) : Integer;|Adds triangle vertices and indices to AVertices and AIndices based on the index values inside of TTriangleID VertexData values are taken from Cache.PositionSource and so on...|
 |function AddPolygon(const AIndexOffset : Integer; const APolygon : TPolygonID; const AVertices : TList<TVertexData>; const AIndices : TList<TTriangleIndex>; const AVertexOrder : TVertexOrder = TVertexOrder.CCW) : Integer;|Adds polygon vertices and indices to AVertices and AIndices based on the index values inside of TPolygonID VertexData values are taken from Cache.PositionSource and so on... //__CAUTION:__ this method triangulates the polygon automatically!//| |function AddPolygon(const AIndexOffset : Integer; const APolygon : TPolygonID; const AVertices : TList<TVertexData>; const AIndices : TList<TTriangleIndex>; const AVertexOrder : TVertexOrder = TVertexOrder.CCW) : Integer;|Adds polygon vertices and indices to AVertices and AIndices based on the index values inside of TPolygonID VertexData values are taken from Cache.PositionSource and so on... //__CAUTION:__ this method triangulates the polygon automatically!//|
-=== Example ===+ 
 +==== Example ====
  
 In this detailed example, let's create a mesh the same like in the "fast-way" example above. In this detailed example, let's create a mesh the same like in the "fast-way" example above.
Line 144: Line 145:
  
 In the first step we're going to show the usage of TVertexCache to setup mesh data. In the first step we're going to show the usage of TVertexCache to setup mesh data.
 +
 +=== Adding MeshData ===
  
 <file pascal> <file pascal>
Line 283: Line 286:
 </file> </file>
  
-==== Add Hierarchy ====+=== Add Hierarchy ===
  
 Since v1.0 most objects in DefTypes are inherited from TTransformDef.   Since v1.0 most objects in DefTypes are inherited from TTransformDef.  
Line 325: Line 328:
  
  
-===Vertex Groups ====+=== How To Use Vertex Groups ===
  
 VertexGroups are helper structures referring to an owner mesh, which holds original vertex data and complete indices list, while this structure only holds a separated index source for partially rendering a mesh. VertexGroups are helper structures referring to an owner mesh, which holds original vertex data and complete indices list, while this structure only holds a separated index source for partially rendering a mesh.
Line 349: Line 352:
 end; end;
 </file> </file>
-==== Add Material ====+=== Add Material ===
  
 To expand the dynamic model setup, let's add a material to our sub-mesh. To expand the dynamic model setup, let's add a material to our sub-mesh.
Line 378: Line 381:
 </file> </file>
  
-==== Add Animation ====+=== Add A Simple Animation ===
  
 Adding animations can become a very challenging part due to complexity. Adding animations can become a very challenging part due to complexity.
Line 430: Line 433:
  
  
-==== Add Armature & SkinController ====+=== Add Armature & SkinController ===
  
 To make skin- or skeleton-animations possible you will need an armature with a hierarchy of joints representing the internal skeleton of a body. To make skin- or skeleton-animations possible you will need an armature with a hierarchy of joints representing the internal skeleton of a body.
Line 514: Line 517:
 end; end;
 </file> </file>
 +
 +=== Add a Skin-Animation ===
  
 To animate the armature and it's necessary to have compatible animation stages and interpolators. To animate the armature and it's necessary to have compatible animation stages and interpolators.
Line 601: Line 606:
 __NOTICE:__ You will need a stage for each joint to be modified during the animation. __NOTICE:__ You will need a stage for each joint to be modified during the animation.
  
-==== Create FMX Components from Definition ====+=== Create FMX Components from Definition ===
  
 <file pascal> <file pascal>