MeshBaker
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

Classes

class  MBBlendShapeKey
 
class  MBBlendShapeValue
 

Public Member Functions

delegate void GenerateUV2Delegate (Mesh m, float hardAngle, float packMargin)
 
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)
 
abstract Dictionary< MBBlendShapeKey, MBBlendShapeValueBuildSourceBlendShapeToCombinedIndexMap ()
 
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 uv2, bool uv3, bool uv4, bool colors, bool bones=false, bool blendShapeFlag=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 updateUV2=false, bool updateUV3=false, bool updateUV4=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 CheckIntegrity ()
 
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)
 

Public Attributes

float uv2UnwrappingParamsHardAngle = 60f
 
float uv2UnwrappingParamsPackMargin = .005f
 

Protected Member Functions

virtual bool _CheckIfAllObjsToAddUseSameMaterialsAndCreateTemporaryTextrueBakeResult (GameObject[] gos)
 

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 _doUV3
 
bool _doUV4
 
bool _doBlendShapes
 
bool _usingTemporaryTextureBakeResult
 

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]
 
virtual bool doUV3 [get, set]
 
virtual bool doUV4 [get, set]
 
virtual bool doBlendShapes [get, set]
 

Member Function Documentation

§ _CheckIfAllObjsToAddUseSameMaterialsAndCreateTemporaryTextrueBakeResult()

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner._CheckIfAllObjsToAddUseSameMaterialsAndCreateTemporaryTextrueBakeResult ( GameObject []  gos)
protectedvirtual

§ AddDeleteGameObjects()

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

§ AddDeleteGameObjectsByID()

abstract bool DigitalOpus.MB.Core.MB3_MeshCombiner.AddDeleteGameObjectsByID ( GameObject []  gos,
int []  deleteGOinstanceIDs,
bool  disableRendererInSource 
)
pure virtual

§ Apply() [1/3]

virtual void DigitalOpus.MB.Core.MB3_MeshCombiner.Apply ( )
virtual

Copies Mesh Baker internal data to the mesh.

§ Apply() [2/3]

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.

§ Apply() [3/3]

abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.Apply ( bool  triangles,
bool  vertices,
bool  normals,
bool  tangents,
bool  uvs,
bool  uv2,
bool  uv3,
bool  uv4,
bool  colors,
bool  bones = false,
bool  blendShapeFlag = 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.
uv3Uv3.
uv4Uv4.
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.

§ BuildSourceBlendShapeToCombinedIndexMap()

abstract Dictionary<MBBlendShapeKey, MBBlendShapeValue> DigitalOpus.MB.Core.MB3_MeshCombiner.BuildSourceBlendShapeToCombinedIndexMap ( )
pure virtual

§ CheckIntegrity()

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

§ ClearBuffers()

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

§ ClearMesh()

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

§ CombinedMeshContains()

abstract bool DigitalOpus.MB.Core.MB3_MeshCombiner.CombinedMeshContains ( GameObject  go)
pure virtual

§ DestroyMesh()

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

§ DestroyMeshEditor()

abstract void DigitalOpus.MB.Core.MB3_MeshCombiner.DestroyMeshEditor ( MB2_EditorMethodsInterface  editorMethods)
pure virtual

§ doUV2()

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV2 ( )
virtual

§ GenerateUV2Delegate()

delegate void DigitalOpus.MB.Core.MB3_MeshCombiner.GenerateUV2Delegate ( Mesh  m,
float  hardAngle,
float  packMargin 
)

§ GetLightmapIndex()

abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetLightmapIndex ( )
pure virtual

§ GetNumObjectsInCombined()

abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetNumObjectsInCombined ( )
pure virtual

§ GetNumVerticesFor() [1/2]

abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetNumVerticesFor ( GameObject  go)
pure virtual

§ GetNumVerticesFor() [2/2]

abstract int DigitalOpus.MB.Core.MB3_MeshCombiner.GetNumVerticesFor ( int  instanceID)
pure virtual

§ GetObjectsInCombined()

abstract List<GameObject> DigitalOpus.MB.Core.MB3_MeshCombiner.GetObjectsInCombined ( )
pure virtual

§ UpdateGameObjects()

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  updateUV2 = false,
bool  updateUV3 = false,
bool  updateUV4 = 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.

§ UpdateSkinnedMeshApproximateBounds()

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

§ UpdateSkinnedMeshApproximateBoundsFromBones()

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

§ UpdateSkinnedMeshApproximateBoundsFromBonesStatic()

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.

§ UpdateSkinnedMeshApproximateBoundsFromBounds()

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.

§ UpdateSkinnedMeshApproximateBoundsFromBoundsStatic()

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

Member Data Documentation

§ _doBlendShapes

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doBlendShapes
protected

§ _doCol

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doCol
protected

§ _doNorm

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doNorm = true
protected

§ _doTan

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doTan = true
protected

§ _doUV

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doUV = true
protected

§ _doUV3

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doUV3
protected

§ _doUV4

bool DigitalOpus.MB.Core.MB3_MeshCombiner._doUV4
protected

§ _lightmapOption

MB2_LightmapOptions DigitalOpus.MB.Core.MB3_MeshCombiner._lightmapOption = MB2_LightmapOptions.ignore_UV2
protected

§ _LOG_LEVEL

MB2_LogLevel DigitalOpus.MB.Core.MB3_MeshCombiner._LOG_LEVEL = MB2_LogLevel.info
protected

§ _MBVersion

MBVersion DigitalOpus.MB.Core.MB3_MeshCombiner._MBVersion
protected

§ _name

string DigitalOpus.MB.Core.MB3_MeshCombiner._name
protected

§ _outputOption

MB2_OutputOptions DigitalOpus.MB.Core.MB3_MeshCombiner._outputOption
protected

§ _renderType

MB_RenderType DigitalOpus.MB.Core.MB3_MeshCombiner._renderType
protected

§ _resultSceneObject

GameObject DigitalOpus.MB.Core.MB3_MeshCombiner._resultSceneObject
protected

§ _targetRenderer

UnityEngine.Renderer DigitalOpus.MB.Core.MB3_MeshCombiner._targetRenderer
protected

§ _textureBakeResults

MB2_TextureBakeResults DigitalOpus.MB.Core.MB3_MeshCombiner._textureBakeResults
protected

§ _usingTemporaryTextureBakeResult

bool DigitalOpus.MB.Core.MB3_MeshCombiner._usingTemporaryTextureBakeResult
protected

§ _validationLevel

MB2_ValidationLevel DigitalOpus.MB.Core.MB3_MeshCombiner._validationLevel = MB2_ValidationLevel.robust
protected

§ uv2UnwrappingParamsHardAngle

float DigitalOpus.MB.Core.MB3_MeshCombiner.uv2UnwrappingParamsHardAngle = 60f

§ uv2UnwrappingParamsPackMargin

float DigitalOpus.MB.Core.MB3_MeshCombiner.uv2UnwrappingParamsPackMargin = .005f

Property Documentation

§ doBlendShapes

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doBlendShapes
getset

§ doCol

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doCol
getset

§ doNorm

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doNorm
getset

§ doTan

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doTan
getset

§ doUV

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV
getset

§ doUV1

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV1
getset

§ doUV3

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV3
getset

§ doUV4

virtual bool DigitalOpus.MB.Core.MB3_MeshCombiner.doUV4
getset

§ EVAL_VERSION

bool DigitalOpus.MB.Core.MB3_MeshCombiner.EVAL_VERSION
staticget

§ lightmapOption

virtual MB2_LightmapOptions DigitalOpus.MB.Core.MB3_MeshCombiner.lightmapOption
getset

§ LOG_LEVEL

virtual MB2_LogLevel DigitalOpus.MB.Core.MB3_MeshCombiner.LOG_LEVEL
getset

§ name

string DigitalOpus.MB.Core.MB3_MeshCombiner.name
getset

§ outputOption

virtual MB2_OutputOptions DigitalOpus.MB.Core.MB3_MeshCombiner.outputOption
getset

§ renderType

virtual MB_RenderType DigitalOpus.MB.Core.MB3_MeshCombiner.renderType
getset

§ resultSceneObject

virtual GameObject DigitalOpus.MB.Core.MB3_MeshCombiner.resultSceneObject
getset

§ targetRenderer

virtual Renderer DigitalOpus.MB.Core.MB3_MeshCombiner.targetRenderer
getset

§ textureBakeResults

virtual MB2_TextureBakeResults DigitalOpus.MB.Core.MB3_MeshCombiner.textureBakeResults
getset

§ validationLevel

virtual MB2_ValidationLevel DigitalOpus.MB.Core.MB3_MeshCombiner.validationLevel
getset

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