MeshBaker
Public Member Functions | Static Public Member Functions | Protected Attributes | Properties | List of all members
DigitalOpus.MB.Core.MB3_MeshCombiner Class Referenceabstract
Inheritance diagram for DigitalOpus.MB.Core.MB3_MeshCombiner:
DigitalOpus.MB.Core.MB3_MeshCombinerSingle DigitalOpus.MB.Core.MB3_MultiMeshCombiner

Public Member Functions

delegate void GenerateUV2Delegate (Mesh m)
 
virtual bool doUV2 ()
 
abstract int GetLightmapIndex ()
 
abstract void ClearBuffers ()
 
abstract void ClearMesh ()
 
abstract void DestroyMesh ()
 
abstract void DestroyMeshEditor (MB2_EditorMethodsInterface editorMethods)
 
abstract List< GameObject > GetObjectsInCombined ()
 
abstract int GetNumObjectsInCombined ()
 
abstract int GetNumVerticesFor (GameObject go)
 
abstract int GetNumVerticesFor (int instanceID)
 
virtual void Apply ()
 Copies Mesh Baker internal data to the mesh. More...
 
abstract void Apply (GenerateUV2Delegate uv2GenerationMethod)
 Copies Mesh Baker internal data to the mesh. More...
 
abstract void Apply (bool triangles, bool vertices, bool normals, bool tangents, bool uvs, bool colors, bool uv1, bool uv2, bool bones=false, GenerateUV2Delegate uv2GenerationMethod=null)
 Apply the specified triangles, vertices, normals, tangents, uvs, colors, uv1, uv2, bones and uv2GenerationMethod. More...
 
abstract void UpdateGameObjects (GameObject[] gos, bool recalcBounds=true, bool updateVertices=true, bool updateNormals=true, bool updateTangents=true, bool updateUV=false, bool updateUV1=false, bool updateUV2=false, bool updateColors=false, bool updateSkinningInfo=false)
 Updates the data in the combined mesh for meshes that are already in the combined mesh. More...
 
abstract bool AddDeleteGameObjects (GameObject[] gos, GameObject[] deleteGOs, bool disableRendererInSource=true)
 
abstract bool AddDeleteGameObjectsByID (GameObject[] gos, int[] deleteGOinstanceIDs, bool disableRendererInSource)
 
abstract bool CombinedMeshContains (GameObject go)
 
abstract void UpdateSkinnedMeshApproximateBounds ()
 
abstract void UpdateSkinnedMeshApproximateBoundsFromBones ()
 
abstract void UpdateSkinnedMeshApproximateBoundsFromBounds ()
 Updates the skinned mesh approximate bounds from the bounds of the source objects. More...
 

Static Public Member Functions

static void UpdateSkinnedMeshApproximateBoundsFromBonesStatic (Transform[] bs, SkinnedMeshRenderer smr)
 Updates the skinned mesh bounds by creating a bounding box that contains the bones (skeleton) of the source objects. More...
 
static void UpdateSkinnedMeshApproximateBoundsFromBoundsStatic (List< GameObject > objectsInCombined, SkinnedMeshRenderer smr)
 

Protected Attributes

MBVersion _MBVersion
 
MB2_LogLevel _LOG_LEVEL = MB2_LogLevel.info
 
MB2_ValidationLevel _validationLevel = MB2_ValidationLevel.robust
 
string _name
 
MB2_TextureBakeResults _textureBakeResults
 
GameObject _resultSceneObject
 
UnityEngine.Renderer _targetRenderer
 
MB_RenderType _renderType
 
MB2_OutputOptions _outputOption
 
MB2_LightmapOptions _lightmapOption = MB2_LightmapOptions.ignore_UV2
 
bool _doNorm = true
 
bool _doTan = true
 
bool _doCol
 
bool _doUV = true
 
bool _doUV1
 

Properties

static bool EVAL_VERSION [get]
 
virtual MB2_LogLevel LOG_LEVEL [get, set]
 
virtual MB2_ValidationLevel validationLevel [get, set]
 
string name [get, set]
 
virtual MB2_TextureBakeResults textureBakeResults [get, set]
 
virtual GameObject resultSceneObject [get, set]
 
virtual Renderer targetRenderer [get, set]
 
virtual MB_RenderType renderType [get, set]
 
virtual MB2_OutputOptions outputOption [get, set]
 
virtual MB2_LightmapOptions lightmapOption [get, set]
 
virtual bool doNorm [get, set]
 
virtual bool doTan [get, set]
 
virtual bool doCol [get, set]
 
virtual bool doUV [get, set]
 
virtual bool doUV1 [get, set]
 

Member Function Documentation

abstract bool DigitalOpus.MB.Core.MB3_MeshCombiner.AddDeleteGameObjects ( GameObject[]  gos,
GameObject[]  deleteGOs,
bool  disableRendererInSource = true 
)
pure virtual
abstract bool DigitalOpus.MB.Core.MB3_MeshCombiner.AddDeleteGameObjectsByID ( GameObject[]  gos,
int[]  deleteGOinstanceIDs,
bool  disableRendererInSource 
)
pure virtual
virtual void DigitalOpus.MB.Core.MB3_MeshCombiner.Apply ( )
virtual

Copies Mesh Baker internal data to the mesh.

abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.Apply ( GenerateUV2Delegate  uv2GenerationMethod)
pure virtual

Copies Mesh Baker internal data to the mesh.

Parameters
uv2GenerationMethodUv2 generation method. This is normally editor class method Unwrapping.GenerateSecondaryUVSet

Implemented in DigitalOpus.MB.Core.MB3_MeshCombinerSingle.

abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.Apply ( bool  triangles,
bool  vertices,
bool  normals,
bool  tangents,
bool  uvs,
bool  colors,
bool  uv1,
bool  uv2,
bool  bones = false,
GenerateUV2Delegate  uv2GenerationMethod = null 
)
pure virtual

Apply the specified triangles, vertices, normals, tangents, uvs, colors, uv1, uv2, bones and uv2GenerationMethod.

Parameters
trianglesTriangles.
verticesVertices.
normalsNormals.
tangentsTangents.
uvsUvs.
colorsColors.
uv1Uv1.
uv2Uv2.
bonesBones.
uv2GenerationMethodUv2 generation method. This is normally method Unwrapping.GenerateSecondaryUVSet. This should be null when calling Apply at runtime.

Implemented in DigitalOpus.MB.Core.MB3_MeshCombinerSingle.

abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.ClearBuffers ( )
pure virtual
abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.ClearMesh ( )
pure virtual
abstract bool DigitalOpus.MB.Core.MB3_MeshCombiner.CombinedMeshContains ( GameObject  go)
pure virtual
abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.DestroyMesh ( )
pure virtual
abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.DestroyMeshEditor ( MB2_EditorMethodsInterface  editorMethods)
pure virtual
virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV2 ( )
virtual
delegate void DigitalOpus.MB.Core.MB3_MeshCombiner.GenerateUV2Delegate ( Mesh  m)
abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetLightmapIndex ( )
pure virtual
abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetNumObjectsInCombined ( )
pure virtual
abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetNumVerticesFor ( GameObject  go)
pure virtual
abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetNumVerticesFor ( int  instanceID)
pure virtual
abstract List<GameObject> DigitalOpus.MB.Core.MB3_MeshCombiner.GetObjectsInCombined ( )
pure virtual
abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.UpdateGameObjects ( GameObject[]  gos,
bool  recalcBounds = true,
bool  updateVertices = true,
bool  updateNormals = true,
bool  updateTangents = true,
bool  updateUV = false,
bool  updateUV1 = false,
bool  updateUV2 = false,
bool  updateColors = false,
bool  updateSkinningInfo = false 
)
pure virtual

Updates the data in the combined mesh for meshes that are already in the combined mesh.

This is faster than adding and removing a mesh and has a much lower memory footprint. This method can only be used if the meshes being updated have the same layout(number of vertices, triangles, submeshes). This is faster than removing and re-adding For efficiency update as few channels as possible. Apply must be called to apply the changes to the combined mesh

Implemented in DigitalOpus.MB.Core.MB3_MeshCombinerSingle, and DigitalOpus.MB.Core.MB3_MultiMeshCombiner.

abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.UpdateSkinnedMeshApproximateBounds ( )
pure virtual
abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.UpdateSkinnedMeshApproximateBoundsFromBones ( )
pure virtual
static void DigitalOpus.MB.Core.MB3_MeshCombiner.UpdateSkinnedMeshApproximateBoundsFromBonesStatic ( Transform[]  bs,
SkinnedMeshRenderer  smr 
)
static

Updates the skinned mesh bounds by creating a bounding box that contains the bones (skeleton) of the source objects.

abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.UpdateSkinnedMeshApproximateBoundsFromBounds ( )
pure virtual

Updates the skinned mesh approximate bounds from the bounds of the source objects.

Implemented in DigitalOpus.MB.Core.MB3_MeshCombinerSingle, and DigitalOpus.MB.Core.MB3_MultiMeshCombiner.

static void DigitalOpus.MB.Core.MB3_MeshCombiner.UpdateSkinnedMeshApproximateBoundsFromBoundsStatic ( List< GameObject >  objectsInCombined,
SkinnedMeshRenderer  smr 
)
static

Member Data Documentation

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doCol
protected
bool DigitalOpus.MB.Core.MB3_MeshCombiner._doNorm = true
protected
bool DigitalOpus.MB.Core.MB3_MeshCombiner._doTan = true
protected
bool DigitalOpus.MB.Core.MB3_MeshCombiner._doUV = true
protected
bool DigitalOpus.MB.Core.MB3_MeshCombiner._doUV1
protected
MB2_LightmapOptions DigitalOpus.MB.Core.MB3_MeshCombiner._lightmapOption = MB2_LightmapOptions.ignore_UV2
protected
MB2_LogLevel DigitalOpus.MB.Core.MB3_MeshCombiner._LOG_LEVEL = MB2_LogLevel.info
protected
MBVersion DigitalOpus.MB.Core.MB3_MeshCombiner._MBVersion
protected
string DigitalOpus.MB.Core.MB3_MeshCombiner._name
protected
MB2_OutputOptions DigitalOpus.MB.Core.MB3_MeshCombiner._outputOption
protected
MB_RenderType DigitalOpus.MB.Core.MB3_MeshCombiner._renderType
protected
GameObject DigitalOpus.MB.Core.MB3_MeshCombiner._resultSceneObject
protected
UnityEngine.Renderer DigitalOpus.MB.Core.MB3_MeshCombiner._targetRenderer
protected
MB2_TextureBakeResults DigitalOpus.MB.Core.MB3_MeshCombiner._textureBakeResults
protected
MB2_ValidationLevel DigitalOpus.MB.Core.MB3_MeshCombiner._validationLevel = MB2_ValidationLevel.robust
protected

Property Documentation

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doCol
getset
virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doNorm
getset
virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doTan
getset
virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV
getset
virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV1
getset
bool DigitalOpus.MB.Core.MB3_MeshCombiner.EVAL_VERSION
staticget
virtual MB2_LightmapOptions DigitalOpus.MB.Core.MB3_MeshCombiner.lightmapOption
getset
virtual MB2_LogLevel DigitalOpus.MB.Core.MB3_MeshCombiner.LOG_LEVEL
getset
string DigitalOpus.MB.Core.MB3_MeshCombiner.name
getset
virtual MB2_OutputOptions DigitalOpus.MB.Core.MB3_MeshCombiner.outputOption
getset
virtual MB_RenderType DigitalOpus.MB.Core.MB3_MeshCombiner.renderType
getset
virtual GameObject DigitalOpus.MB.Core.MB3_MeshCombiner.resultSceneObject
getset
virtual Renderer DigitalOpus.MB.Core.MB3_MeshCombiner.targetRenderer
getset
virtual MB2_TextureBakeResults DigitalOpus.MB.Core.MB3_MeshCombiner.textureBakeResults
getset
virtual MB2_ValidationLevel DigitalOpus.MB.Core.MB3_MeshCombiner.validationLevel
getset

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