Enfusion Script API
Loading...
Searching...
No Matches
MeshObject Interface Reference

MeshObject. More...

Inheritance diagram for MeshObject:
VObject BaseResourceObject global_pointer pointer

Public Member Functions

proto external void UpdateVerts (int meshIdx, vector verts[], float uv[])
 
proto external void UpdateIndices (int meshIdx, int indices[])
 
proto external int GetNumGeoms ()
 
proto external bool HasValidMask ()
 
proto external bool HasLayerMask (int layerMask, int layerFilter)
 
- Public Member Functions inherited from VObject
proto external int GetMaterials (string materials[])
 
- Public Member Functions inherited from BaseResourceObject
proto external BaseContainer ToBaseContainer ()
 
proto external IEntitySource ToEntitySource ()
 
proto external MeshObject ToMeshObject ()
 
proto external AnimationSource ToAnimation ()
 
proto external VObject ToVObject ()
 
proto external void Release (bool flush=false)
 Release object.
 
proto external ResourceName GetResourceName ()
 Returns name of visual object.
 
- Public Member Functions inherited from pointer
proto string ToString ()
 

Static Public Member Functions

static proto ref Resource Create (int numMeshes, int numVerts[], int numIndices[], string materials[], MeshObjectFlags flags)
 

Detailed Description

MeshObject.

void GenerateModel(IEntity obj)
{
vector verts[3] = {Vector(0, 0, 0), Vector(0, 0, 1000), Vector(1000, 0, 0)};
float uvs[6] = {0.0,0.0, 1.0,0.0, 0.0,1.0};
int indices[3] = {0,1,2};
int numVertices[] = {3};
int numIndices[] = {3};
string materials[] = {"{726C1969B0B78245}defMat.emat"};
Resource res = MeshObject.Create(1, numVertices, numIndices, materials, 0);
MeshObject meshObject = res.GetResource().ToMeshObject();
meshObject.UpdateVerts(0, verts, uvs);
meshObject.UpdateIndices(0, indices);
obj.SetObject(meshObject,"");
}
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
proto external MeshObject ToMeshObject()
Definition IEntity.c:13
proto external void SetObject(VObject object, string options)
Sets the visual object to this entity.
MeshObject.
Definition MeshObject.c:34
static proto ref Resource Create(int numMeshes, int numVerts[], int numIndices[], string materials[], MeshObjectFlags flags)
proto external void UpdateVerts(int meshIdx, vector verts[], float uv[])
proto external void UpdateIndices(int meshIdx, int indices[])
Object holding reference to resource.
Definition Resource.c:25
proto external BaseResourceObject GetResource()
Definition vector.c:13

Member Function Documentation

◆ Create()

static proto ref Resource MeshObject.Create ( int numMeshes,
int numVerts[],
int numIndices[],
string materials[],
MeshObjectFlags flags )
static

◆ GetNumGeoms()

proto external int MeshObject.GetNumGeoms ( )

◆ HasLayerMask()

proto external bool MeshObject.HasLayerMask ( int layerMask,
int layerFilter )

◆ HasValidMask()

proto external bool MeshObject.HasValidMask ( )

◆ UpdateIndices()

proto external void MeshObject.UpdateIndices ( int meshIdx,
int indices[] )

◆ UpdateVerts()

proto external void MeshObject.UpdateVerts ( int meshIdx,
vector verts[],
float uv[] )

The documentation for this interface was generated from the following file: