Difference between revisions of "VESSEL::AddMesh"
Jump to navigation
Jump to search
(Added category.) |
|||
Line 19: | Line 19: | ||
{{VesselVisualFunc}} | {{VesselVisualFunc}} | ||
+ | |||
+ | [[Category: VESSEL]] |
Revision as of 11:18, 16 May 2021
Add a mesh to the visual representation of a vessel.
Synopsis
- int AddMesh(MESHHANDLE mesh, const VECTOR3 *ofs = NULL);
- int AddMesh(const char* pszMeshname, const VECTOR3 *ofs = NULL);
The first version of the function adds a preloaded mesh to the vessel’s visual representation. Using the second version of the function, it loads a new mesh from file and adds it to the vessel’s visual representation.
Parameters
- mesh
- Mesh handle of the loaded mesh.
- meshname
- mesh file name (without path and file extension) which must exist in the Meshes subdirectory.
- ofs
- optional pointer to a displacement vector which describes the offset (in meter) of the mesh origin against the vessel origin in local vessel coordinates.
Return value
The function returns the index of the mesh in the vessels visual representation, which can be used for further manipulating the mesh.
Visual manipulation functions in VESSEL |
---|
AddAnimationComponent - AddMesh - ClearMeshes - CreateAnimation - DelAnimationComponent - GetMesh - MeshgroupTransform - RecordEvent - RegisterAnimation - SetAnimation - SetExhaustScales - SetMeshVisibilityMode - SetReentryTexture - UnregisterAnimation |