M&B: Bannerlord 1.1.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.Engine.Mesh Class Reference

Inherits TaleWorlds.Engine.Resource.

Public Member Functions

Mesh GetBaseMesh ()
 
void SetColorAndStroke (uint color, uint strokeColor, bool drawStroke)
 
void SetMeshRenderOrder (int renderOrder)
 
bool HasTag (string str)
 
Mesh CreateCopy ()
 Creates and returns a separate copy of this mesh.
 
void SetMaterial (string newMaterialName)
 
void SetVectorArgument (float vectorArgument0, float vectorArgument1, float vectorArgument2, float vectorArgument3)
 
void SetVectorArgument2 (float vectorArgument0, float vectorArgument1, float vectorArgument2, float vectorArgument3)
 
void SetMaterial (Material material)
 Sets 'material' as the material of this mesh.
 
Material GetMaterial ()
 
Material GetSecondMaterial ()
 
int AddFaceCorner (Vec3 position, Vec3 normal, Vec2 uvCoord, uint color, System.UIntPtr lockHandle)
 
int AddFace (int patchNode0, int patchNode1, int patchNode2, System.UIntPtr lockHandle)
 
void ClearMesh ()
 
void SetColorAlpha (uint newAlpha)
 
uint GetFaceCount ()
 
uint GetFaceCornerCount ()
 
void ComputeNormals ()
 
void ComputeTangents ()
 
void AddMesh (string meshResourceName, MatrixFrame meshFrame)
 
void AddMesh (Mesh mesh, MatrixFrame meshFrame)
 
MatrixFrame GetLocalFrame ()
 
void SetLocalFrame (MatrixFrame meshFrame)
 
void SetVisibilityMask (VisibilityMaskFlags visibilityMask)
 
void UpdateBoundingBox ()
 
void SetAsNotEffectedBySeason ()
 
float GetBoundingBoxWidth ()
 
float GetBoundingBoxHeight ()
 
Vec3 GetBoundingBoxMin ()
 
Vec3 GetBoundingBoxMax ()
 
void AddTriangle (Vec3 p1, Vec3 p2, Vec3 p3, Vec2 uv1, Vec2 uv2, Vec2 uv3, uint color, System.UIntPtr lockHandle)
 
void AddTriangleWithVertexColors (Vec3 p1, Vec3 p2, Vec3 p3, Vec2 uv1, Vec2 uv2, Vec2 uv3, uint c1, uint c2, uint c3, System.UIntPtr lockHandle)
 
void HintIndicesDynamic ()
 
void HintVerticesDynamic ()
 
void RecomputeBoundingBox ()
 
void SetEditDataFaceCornerVertexColor (int index, uint color)
 
uint GetEditDataFaceCornerVertexColor (int index)
 
void PreloadForRendering ()
 
void SetContourColor (Vec3 color, bool alwaysVisible, bool maskMesh)
 
void DisableContour ()
 
void SetExternalBoundingBox (BoundingBox bbox)
 
void AddEditDataUser ()
 
void ReleaseEditDataUser ()
 
void SetEditDataPolicy (EditDataPolicy policy)
 
System.UIntPtr LockEditDataWrite ()
 
void UnlockEditDataWrite (System.UIntPtr handle)
 

Static Public Member Functions

static Mesh CreateMeshWithMaterial (Material material)
 
static Mesh CreateMesh (bool editable=true)
 
static Mesh GetFromResource (string meshName)
 Initializes a new instance of the MBMesh class. Creates an empty mesh. Since each mesh need to have a material, it should be provided by 'material'.
 
static Mesh GetRandomMeshWithVdecl (int inputLayout)
 

Properties

string Name [get, set]
 
MBMeshCullingMode CullingMode [set]
 
float MorphTime [set]
 
uint Color [get, set]
 Primary color.
 
uint Color2 [get, set]
 Secondary color.
 
BillboardType Billboard [get, set]
 
VisibilityMaskFlags VisibilityMask [get, set]
 
int EditDataFaceCornerCount [get]
 
- Properties inherited from TaleWorlds.Engine.Resource
bool IsValid [get]
 

Additional Inherited Members

- Protected Member Functions inherited from TaleWorlds.Engine.Resource
 Resource ()
 
void CheckResourceParameter (Resource param, string paramName="")
 Check if the parameter 'param' is null or invalid and throws an exception containing 'paramName' as further information.
 

Member Function Documentation

◆ CreateMeshWithMaterial()

static Mesh TaleWorlds.Engine.Mesh.CreateMeshWithMaterial ( Material  material)
static

◆ CreateMesh()

static Mesh TaleWorlds.Engine.Mesh.CreateMesh ( bool  editable = true)
static

◆ GetBaseMesh()

Mesh TaleWorlds.Engine.Mesh.GetBaseMesh ( )

◆ GetFromResource()

static Mesh TaleWorlds.Engine.Mesh.GetFromResource ( string  meshName)
static
Parameters
materialThe material.

Returns a MBMesh instance whose name is 'meshName'.

Parameters
meshNameName of the mesh to get
Returns
Returns the MBMesh representation of the mesh named 'meshName'. Returns the previously retrieved instance. A new instance is created if there is none previously or its has been GCed. Returns null if there is no mesh named 'meshName'

◆ GetRandomMeshWithVdecl()

static Mesh TaleWorlds.Engine.Mesh.GetRandomMeshWithVdecl ( int  inputLayout)
static

◆ SetColorAndStroke()

void TaleWorlds.Engine.Mesh.SetColorAndStroke ( uint  color,
uint  strokeColor,
bool  drawStroke 
)

◆ SetMeshRenderOrder()

void TaleWorlds.Engine.Mesh.SetMeshRenderOrder ( int  renderOrder)

◆ HasTag()

bool TaleWorlds.Engine.Mesh.HasTag ( string  str)

◆ CreateCopy()

Mesh TaleWorlds.Engine.Mesh.CreateCopy ( )
Returns
Returns a separate copy of this mesh

◆ SetMaterial() [1/2]

void TaleWorlds.Engine.Mesh.SetMaterial ( string  newMaterialName)

◆ SetVectorArgument()

void TaleWorlds.Engine.Mesh.SetVectorArgument ( float  vectorArgument0,
float  vectorArgument1,
float  vectorArgument2,
float  vectorArgument3 
)

◆ SetVectorArgument2()

void TaleWorlds.Engine.Mesh.SetVectorArgument2 ( float  vectorArgument0,
float  vectorArgument1,
float  vectorArgument2,
float  vectorArgument3 
)

◆ SetMaterial() [2/2]

void TaleWorlds.Engine.Mesh.SetMaterial ( Material  material)
Parameters
materialThe material to set
Returns

◆ GetMaterial()

Material TaleWorlds.Engine.Mesh.GetMaterial ( )

◆ GetSecondMaterial()

Material TaleWorlds.Engine.Mesh.GetSecondMaterial ( )

◆ AddFaceCorner()

int TaleWorlds.Engine.Mesh.AddFaceCorner ( Vec3  position,
Vec3  normal,
Vec2  uvCoord,
uint  color,
System::UIntPtr  lockHandle 
)

◆ AddFace()

int TaleWorlds.Engine.Mesh.AddFace ( int  patchNode0,
int  patchNode1,
int  patchNode2,
System::UIntPtr  lockHandle 
)

◆ ClearMesh()

void TaleWorlds.Engine.Mesh.ClearMesh ( )

◆ SetColorAlpha()

void TaleWorlds.Engine.Mesh.SetColorAlpha ( uint  newAlpha)

◆ GetFaceCount()

uint TaleWorlds.Engine.Mesh.GetFaceCount ( )

◆ GetFaceCornerCount()

uint TaleWorlds.Engine.Mesh.GetFaceCornerCount ( )

◆ ComputeNormals()

void TaleWorlds.Engine.Mesh.ComputeNormals ( )

◆ ComputeTangents()

void TaleWorlds.Engine.Mesh.ComputeTangents ( )

◆ AddMesh() [1/2]

void TaleWorlds.Engine.Mesh.AddMesh ( string  meshResourceName,
MatrixFrame  meshFrame 
)

◆ AddMesh() [2/2]

void TaleWorlds.Engine.Mesh.AddMesh ( Mesh  mesh,
MatrixFrame  meshFrame 
)

◆ GetLocalFrame()

MatrixFrame TaleWorlds.Engine.Mesh.GetLocalFrame ( )

◆ SetLocalFrame()

void TaleWorlds.Engine.Mesh.SetLocalFrame ( MatrixFrame  meshFrame)

◆ SetVisibilityMask()

void TaleWorlds.Engine.Mesh.SetVisibilityMask ( VisibilityMaskFlags  visibilityMask)

◆ UpdateBoundingBox()

void TaleWorlds.Engine.Mesh.UpdateBoundingBox ( )

◆ SetAsNotEffectedBySeason()

void TaleWorlds.Engine.Mesh.SetAsNotEffectedBySeason ( )

◆ GetBoundingBoxWidth()

float TaleWorlds.Engine.Mesh.GetBoundingBoxWidth ( )

◆ GetBoundingBoxHeight()

float TaleWorlds.Engine.Mesh.GetBoundingBoxHeight ( )

◆ GetBoundingBoxMin()

Vec3 TaleWorlds.Engine.Mesh.GetBoundingBoxMin ( )

◆ GetBoundingBoxMax()

Vec3 TaleWorlds.Engine.Mesh.GetBoundingBoxMax ( )

◆ AddTriangle()

void TaleWorlds.Engine.Mesh.AddTriangle ( Vec3  p1,
Vec3  p2,
Vec3  p3,
Vec2  uv1,
Vec2  uv2,
Vec2  uv3,
uint  color,
System::UIntPtr  lockHandle 
)

◆ AddTriangleWithVertexColors()

void TaleWorlds.Engine.Mesh.AddTriangleWithVertexColors ( Vec3  p1,
Vec3  p2,
Vec3  p3,
Vec2  uv1,
Vec2  uv2,
Vec2  uv3,
uint  c1,
uint  c2,
uint  c3,
System::UIntPtr  lockHandle 
)

◆ HintIndicesDynamic()

void TaleWorlds.Engine.Mesh.HintIndicesDynamic ( )

◆ HintVerticesDynamic()

void TaleWorlds.Engine.Mesh.HintVerticesDynamic ( )

◆ RecomputeBoundingBox()

void TaleWorlds.Engine.Mesh.RecomputeBoundingBox ( )

◆ SetEditDataFaceCornerVertexColor()

void TaleWorlds.Engine.Mesh.SetEditDataFaceCornerVertexColor ( int  index,
uint  color 
)

◆ GetEditDataFaceCornerVertexColor()

uint TaleWorlds.Engine.Mesh.GetEditDataFaceCornerVertexColor ( int  index)

◆ PreloadForRendering()

void TaleWorlds.Engine.Mesh.PreloadForRendering ( )

◆ SetContourColor()

void TaleWorlds.Engine.Mesh.SetContourColor ( Vec3  color,
bool  alwaysVisible,
bool  maskMesh 
)

◆ DisableContour()

void TaleWorlds.Engine.Mesh.DisableContour ( )

◆ SetExternalBoundingBox()

void TaleWorlds.Engine.Mesh.SetExternalBoundingBox ( BoundingBox  bbox)

◆ AddEditDataUser()

void TaleWorlds.Engine.Mesh.AddEditDataUser ( )

◆ ReleaseEditDataUser()

void TaleWorlds.Engine.Mesh.ReleaseEditDataUser ( )

◆ SetEditDataPolicy()

void TaleWorlds.Engine.Mesh.SetEditDataPolicy ( EditDataPolicy  policy)

◆ LockEditDataWrite()

System.UIntPtr TaleWorlds.Engine.Mesh.LockEditDataWrite ( )

◆ UnlockEditDataWrite()

void TaleWorlds.Engine.Mesh.UnlockEditDataWrite ( System::UIntPtr  handle)

Property Documentation

◆ Name

string TaleWorlds.Engine.Mesh.Name
getset

◆ CullingMode

MBMeshCullingMode TaleWorlds.Engine.Mesh.CullingMode
set

◆ MorphTime

float TaleWorlds.Engine.Mesh.MorphTime
set

◆ Color

uint TaleWorlds.Engine.Mesh.Color
getset

◆ Color2

uint TaleWorlds.Engine.Mesh.Color2
getset

◆ Billboard

BillboardType TaleWorlds.Engine.Mesh.Billboard
getset

◆ VisibilityMask

VisibilityMaskFlags TaleWorlds.Engine.Mesh.VisibilityMask
getset

◆ EditDataFaceCornerCount

int TaleWorlds.Engine.Mesh.EditDataFaceCornerCount
get