Astra Unity 2.6.6
Astra Unity Plugin
Astra.Asset.MeshTarget Class Reference

Data around how a mesh is modified, such as by blendshapes More...

Public Member Functions

 MeshTarget ()
 Basic constructor
 
 MeshTarget (Vector3[] deltas, Vector3[] norms, Vector3[] tans)
 Constructor for setting up a mesh target from given data More...
 
 MeshTarget (PrimitiveMeshTarget primitiveMeshTarget)
 Constructor for setting up a mesh target marshalled from a PrimitiveMeshTarget More...
 
PrimitiveMeshTarget ToPrimitiveMeshTarget ()
 Convert this mesh target into a PrimitiveMeshTarget
 
int InjectBlendshape (Mesh realMesh, string name, string batch="", bool driveVertices=true, bool driveNormals=true, bool driveTangents=false, bool workAroundUnityBug=true)
 Applies a morphable's MeshTarget data into a blendshape. This call is an internal call that is handled by MorphableItem typically. More...
 
int InjectBlendshape (MeshItem meshItem, string batch="", bool driveVertices=true, bool driveNormals=true, bool driveTangents=false)
 

Public Attributes

string morphableId
 Id of the morphable that is driving this target
 
string meshId
 Id of the mesh that is being driven
 
Vector3[] vertices
 Modified vertices for this mesh target
 
Vector3[] normals
 Modifed normals for this mesh target
 
Vector3[] tangents
 Modified tangents for this mesh target
 

Detailed Description

Data around how a mesh is modified, such as by blendshapes

Constructor & Destructor Documentation

◆ MeshTarget() [1/2]

Astra.Asset.MeshTarget.MeshTarget ( Vector3[]  deltas,
Vector3[]  norms,
Vector3[]  tans 
)
inline

Constructor for setting up a mesh target from given data

Parameters
deltasModified delta values
normsModified normal values
tansModified tangent values

◆ MeshTarget() [2/2]

Astra.Asset.MeshTarget.MeshTarget ( PrimitiveMeshTarget  primitiveMeshTarget)
inline

Constructor for setting up a mesh target marshalled from a PrimitiveMeshTarget

Parameters
primitiveMeshTargetPrimitiveMeshTarget to pull values from

Member Function Documentation

◆ InjectBlendshape()

int Astra.Asset.MeshTarget.InjectBlendshape ( Mesh  realMesh,
string  name,
string  batch = "",
bool  driveVertices = true,
bool  driveNormals = true,
bool  driveTangents = false,
bool  workAroundUnityBug = true 
)
inline

Applies a morphable's MeshTarget data into a blendshape. This call is an internal call that is handled by MorphableItem typically.

Parameters
realMeshThe Unity mesh the blendshape is being installed on
nameAn Astra GUID for the morphable
batch
driveVerticesIf true the blendshape vertices will move
driveNormalsIf true the blendshape normals will move
driveTangentsIf true the blendshape tangents will move (avoid this typically)
workAroundUnityBugIf true (default) works around an occasional bug in unity's blendshape lookup
Returns
The blendshape index that was used, else -1 for error

summary>Creates a blendshape and injects it into the mesh for immediate use

returns>the slot of the blendshape throws>


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