Files
RCBASIC4/doc/serenity_docs/serenity_api_meshes.html
n00b87 ee5395bd66 WIP
2025-08-22 15:25:07 -05:00

201 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>Serenity3D [RCBasic Doc] </title>
</head>
<body>
<p><h2>Serenity3D Mesh API </h2></p>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetAN8Count()</b>
</p>
<ul>
<li>
Returns the number of Anim8or objects loaded with the current stage
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetAN8ID(an8_index)</b>
</p>
<ul>
<li>
Returns the RCBasic Anim8or ID
<ul>
<li>
NOTE: an8_index should be from 0 to Serenity_GetAN8Count()-1
</li>
</ul>
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshIndex(mesh_name$)</b>
</p>
<ul>
<li>
Returns the Serenity Mesh Index which is used to access mesh data in the API
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshID(mesh_index)</b>
</p>
<ul>
<li>
Returns the RCBasic Mesh ID of the given mesh index or -1 if mesh_index is not valid
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshName$(mesh_index)</b>
</p>
<ul>
<li>
Returns the mesh name fron the given mesh index
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshType(mesh_index)</b>
</p>
<ul>
<li>
Returns the mesh type
</li>
<li>
Possible values are:
<ul>
<li>
SN_MESH_TYPE_NORMAL - Unless the mesh is loaded from an Anim8or project or a zip its going to be this
</li>
<li>
SN_MESH_TYPE_ZIPPED - A mesh loaded from an archive like a *.pak file
</li>
<li>
SN_MESH_TYPE_AN8_SCENE - Anim8or mesh
</li>
</ul>
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshAN8Index(mesh_index)</b>
</p>
<ul>
<li>
Returns the Serenity Anim8or object index
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshAN8Scene$(mesh_index)</b>
</p>
<ul>
<li>
Returns the scene name$ in Anim8or that this mesh is loaded from
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshArchiveName$(mesh_index)</b>
</p>
<ul>
<li>
Returns the name of the archive that the mesh is loaded from
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshFile$(mesh_index)</b>
</p>
<ul>
<li>
Returns the name of the mesh file that the mesh is loaded from
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshMaterialCount(mesh_index)</b>
</p>
<ul>
<li>
Returns the number of materials on given mesh
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshMaterialIndex(mesh_index, material_num)</b>
</p>
<ul>
<li>
Returns the Serenity Material Index from the material number on the given mesh
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshAnimationCount(mesh_index)</b>
</p>
<ul>
<li>
Returns the number of animations on the given mesh
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshAnimationID(mesh_index, animation_num)</b>
</p>
<ul>
<li>
Returns the RCBasic mesh animation id
</li>
</ul>
<p>
<br>
</p>
<p>
<b>Function Serenity_GetMeshAnimationIDByName(mesh_index, animation_name$)</b>
</p>
<ul>
<li>
Returns the RCBasic mesh animation id
</li>
</ul>
<p>
<br>
</p>
<p>
</body>
</html>