Deform¶
ILxFalloff¶
-
class
ILxFalloff
¶ A falloff is a scalar field, filling space with a weight value typically between zero and one.
Public Functions
-
LxResult
Bounds
(LXtObjectID self, LXtBBox *box)¶ For any falloff with a specific bounds, the falloff can return a bounding box.
-
float
WeightF
(LXtObjectID self, const LXtFVector position, LXtPointID point, LXtPolygonID polygon)¶ Clients can either query by position, by vertex, by polygon or a combination of all three.
-
LxResult
WeightRun
(LXtObjectID self, const float **pos, const LXtPointID *points, const LXtPolygonID *polygons, float *weight, unsigned num)¶ Weights can also be evaluated in runs.
-
LxResult
SetMesh
(LXtObjectID self, LXtObjectID mesh, LXtMatrix4 xfrm)¶ If the falloff is being evaluated using a vertex or polygon, the SetMesh should be called to provide a context for any subsequent weight evaluations.
-
LxResult
-
LXsITYPE_FALLOFF
¶ Falloff items all derive from a common type, a type of locator. Being a locator type allows all falloffs to act as influences and to perform direct deformations, even if a specific falloff type has no location. It also allows the falloff to present a Tool interface, so it can be evaluated as a falloff in a procedural modeling context.
LXsICHAN_FALLOFF_FALLOFF
LXsICHAN_FALLOFF_DEFORMER
LXsICHAN_FALLOFF_FALLENAB
LXsICHAN_FALLOFF_DEFORMENAB
LXsICHAN_FALLOFF_STRENGTH
LXsICHAN_FALLOFF_INVERT
LXsICHAN_FALLOFF_TOOL
LXsICHAN_FALLOFF_GRADIENT
ILxFalloff1¶
-
class
ILxFalloff1
¶ Public Functions
-
LxResult
Bounds
(LXtObjectID self, LXtBBox *box)¶ Translation from ILxFalloff to legacy interfaces.
-
float
WeightF
(LXtObjectID self, const LXtFVector position)¶
-
LxResult
WeightRun
(LXtObjectID self, const float **pos, float *weight, unsigned num)¶
-
LxResult
ILxDeformation¶
-
class
ILxDeformation
¶ Public Functions
-
unsigned
Flags
(LXtObjectID self)¶ A deformation is basically a warping of space. Given an input point location and a weight value typically from 0 to 1, the deformation computes the offset of the point. The offset must approach zero as the weight approaches zero. Flag bits indicate if a deformation is non-linear and/or rigid. Non-linear means that offsets don’t lie on a simple line for different weight values but instead trace curves. Rigid means that the transform at weight 1 can be described by a 4x4 matrix.
-
LxResult
Transform
(LXtObjectID self, LXtMatrix4 xfrm)¶ For rigid deformations, this method returns the matrix for unity weight.
-
void
OffsetF
(LXtObjectID self, const LXtFVector position, float weight, LXtFVector offset)¶ These three methods compute the offset from a starting position at a given weight value. OffsetF() takes a single point and a weight; OffsetRun() takes vector arrays for faster computation, and the weight array pointer can be null to indicate unity.
-
void
OBSOLETE
(LXtObjectID self)¶
-
LxResult
OffsetRun
(LXtObjectID self, const float **pos, const float *weight, float **offset, unsigned num)¶
-
unsigned
LXfDEFORMATION_NONLINEAR
LXfDEFORMATION_RIGIDXFRM
-
LXsPKG_DEFORMATION_CHANNEL
¶ Deformation items indicate their deformation object channel through a server tag on their package.
-
LXsPKG_DEFORMER_CHANNEL
¶ Influences define weighted deformations over specific domains. Each influence does two things it provides all the information necessary to perform the deformation, and it allows deformations to be composed. Thus it may completely control the deformation of the target domain, or it may be under the control of another influence driving its weights. Item types provide a mesh influence through an object reference channel, the name given by a server tag. An optional tag can also define default mesh influence flags.
LXsPKG_DEFORMER_FLAGS
LXsPKG_DEFORMER_CREATECMD
-
LXfDEFORMER_NO_WEIGHT
¶ If defined, the flags string is a “+” character followed by a set of single letters.
NO_WEIGHT Given by ‘W’, this indicates that the mesh influence has no weights. All the points are equally weighted at 100%.
NO_OFFSET Given by ‘O’, this indicates that the influence does not define it’s own offsets. Instead offsets need to be provided by a deformation.
IS_FALLOFF This is an internal flag which indicates that the mesh influence is derived from a falloff plus locator deformation.
IS_MESHOP This is an internal flag which indicates that the mesh operation is performing a procedural modeling operation.
NULL_WEIGHT Given by ‘N’, this flag indicates that the effector wishes to operate on 0-weighted vertices. By default, these points are skipped by general influences.
LXfDEFORMER_NO_OFFSET
LXfDEFORMER_REQ_WEIGHT
LXfDEFORMER_REQ_OFFSET
LXfDEFORMER_IS_FALLOFF
LXfDEFORMER_IS_MESHOP
LXfDEFORMER_NULL_WEIGHT
-
typedef void *
LXtDeformElt
¶ A deform influence describes a collection of elements and how they might move. The flags indicate if the deformation has internal weights, offsets and/or a per-element transform.
ILxDeformer¶
-
class
ILxDeformer
¶ Public Functions
-
unsigned
Flags
(LXtObjectID self)¶ Flags are the same flags assigned to the deformer item type, plus a runtime flag to indicate if linear interpolation should be used.
-
unsigned
PartitionCount
(LXtObjectID self)¶ All the elements affected by this deformer exist in partitions. This method enumerates the elements in a specific partition.
-
LxResult
EnumeratePartition
(LXtObjectID self, LXtObjectID visitor, unsigned part)¶
-
LXtDeformElt
Element
(LXtObjectID self, unsigned *segment)¶ The element pointer can be read out during enumeration. For a mesh partition the element must be a LXtPointID, and for and item partition the element must be an ILxUnknownID for the item. For deformers that support items, the items are all assumed to be in partition zero. Elements in a partition can be further segmented by numeric ID which is also returned from this method. All the elements in a run will come from the same segment.
-
LxResult
SetPartition
(LXtObjectID self, unsigned part)¶ As an alternative to enumerating elements, the client can set a specific element ID and partition before quering for attributes.
-
float
Weight
(LXtObjectID self, LXtDeformElt elt, const LXtFVector pos)¶ The query methods get data about specific elements given their element ID. Weight() gets the degree of influence on the element, and Offset() gets the weighted offset for the deformation. Both of these get an input position that may be the real input position or may be a hypothetical.
-
void
Offset
(LXtObjectID self, LXtDeformElt elt, float weight, const LXtFVector pos, LXtFVector offset)¶
-
LxResult
WeightRun
(LXtObjectID self, unsigned segment, const LXtDeformElt *elt, const float **pos, float *weight, unsigned num)¶ The “Run” versions of the interfaces operate on arrays of elements, positions and weights. OffsetRun() can be called with a null ‘weight’ pointer to get offsets with all unity weight.
-
LxResult
OffsetRun
(LXtObjectID self, unsigned segment, const LXtDeformElt *elt, const float **pos, const float *weight, float **offset, unsigned num)¶
-
unsigned
LXfDEFORMER_USE_LINEAR
-
LXeDEFORM_IDENTICAL
¶ The modifier’s Evaluate() method can return codes indicating the type of changes that happened. IDENTICAL means no change at all and previous cached results will be reused. NEWOFFSET means that offsets changed, but the set of affected element and the weights are the same. NEWWEIGHT means that the set of element is the same but the weights have changed. DIFFERENT (same as the default ‘OK’) means that the set of elements may have changed.
LXeDEFORM_NEWOFFSET
LXeDEFORM_NEWWEIGHT
LXeDEFORM_DIFFERENT
ILxMeshInfluence¶
-
class
ILxMeshInfluence
¶ Public Functions
-
unsigned
MeshCount
(LXtObjectID self)¶ A mesh influence is a specific sub-type of deform influence that operates on points in meshes. The partition of the mesh influence is different meshes. The mesh influence interface can be found in two contexts. The first is by reading the influence channel of an item that affects meshes. In that case it will be polymorphic with the deform influence interface, and each mesh in the list is a partition in the deform. The mesh influence interface may also be found on items. If it is then that item affects direct control over a set of meshes. An item without a mesh influence interface that nonetheless generates a mesh influence object on its influence channel is an “any mesh” influence. It will be automatically wrapped as a deform influence acting on linked meshes. Meshes are given by a count and indices. MeshByIndex() actually gets the mesh item affected.
-
LxResult
MeshByIndex
(LXtObjectID self, unsigned index, void **ppvObj)¶
-
unsigned
PartitionIndex
(LXtObjectID self, unsigned index)¶ This returns the partition index for the given mesh index, since they may not match exactly.
-
LxResult
SetMesh
(LXtObjectID self, unsigned index, LXtObjectID mesh, LXtObjectID item)¶ Before reading out values, the client sets the actual mesh and transform based on the index of the mesh item. Once set these don’t change unless the mesh or transform are changed.
-
LxResult
SetTransform
(LXtObjectID self, unsigned index, LXtMatrix4 xfrm)¶
-
LxResult
MeshChange
(LXtObjectID self, unsigned index, LxResult change)¶
-
bool
GetMesh
(unsigned index, CLxLoc_Item &item)¶ User Class Only:
-
unsigned
ILxItemInfluence¶
-
class
ILxItemInfluence
¶ Public Functions
-
LxResult
HasItems
(LXtObjectID self)¶ Analogous to MeshInfluence, except that there’s no concept of a partition. It’s just a list of items. The list is accessed with a visitor.
-
LxResult
Enumerate
(LXtObjectID self, LXtObjectID visitor)¶
-
LxResult
GetItem
(LXtObjectID self, void **ppvObj)¶
-
LxResult
AllowTransform
(LXtObjectID self, unsigned index, unsigned *flags)¶
-
LxResult
LXfITEMINF_POSITION
LXfITEMINF_ROTATION
LXfITEMINF_SCALE
LXfITEMINF_PROBEWEIGHTS
-
LXsITYPE_DEFORMGROUP
¶ Deformer group items can be parents to other deformers in the deformTree hierarchy. A deform group is itself a deformer that performs a composite deformation of the child deformers.
LXsICHAN_DEFORMGROUP_DEFORMER
LXsICHAN_DEFORMGROUP_ENABLE
LXsICHAN_DEFORMGROUP_INTERPOLATION
LXsICHAN_DEFORMGROUP_LIMITENABLE
LXsICHAN_DEFORMGROUP_LIMITMAX
LXsICHAN_DEFORMGROUP_THRESHOLD
LXsICHAN_DEFORMGROUP_SHARPNESS
LXsICVAL_DEFORMGROUP_INTERPOLATION_LOCAL
LXsICVAL_DEFORMGROUP_INTERPOLATION_LINEAR
LXsICVAL_DEFORMGROUP_INTERPOLATION_DQS
ILxGroupDeformer¶
-
class
ILxGroupDeformer
¶ Public Types
-
typedef std::vector<CDeformerWeight>
DeformerWeightArray
¶
Public Functions
-
unsigned
DeformerCount
(LXtObjectID self)¶ The ILxGroupDeformer interface allows clients to read out the blended weights affecting each point in the group. The DeformerCount / ByIndex() methods allow the client to see the members of the group. PointEffect() takes a point in one of the target meshes and returns lists of member deformer indicies and their weights. If the provided buffers are too small this returns LXe_SHORTBUFFER.
-
LxResult
DeformerByIndex
(LXtObjectID self, unsigned index, void **ppvObj)¶
-
LxResult
PointEffect
(LXtObjectID self, unsigned meshIndex, LXtPointID point, unsigned *deformer, float *weight, unsigned *count, unsigned max)¶
-
bool
GetDeformer
(unsigned index, CLxLoc_Item &item)¶ User Class Only:
-
LxResult
PointEffectList
(unsigned meshIndex, LXtPointID point, DeformerWeightArray &list)¶
-
class
CDeformerWeight
¶ User Class Only: The user class allows the effect at each point to be read safely into a vector of composite elements.
-
typedef std::vector<CDeformerWeight>
ILxGroupDeformer::CDeformerWeight¶
-
class
CDeformerWeight
User Class Only: The user class allows the effect at each point to be read safely into a vector of composite elements.
Public Members
-
unsigned
deformer
-
float
weight
-
unsigned
-
LXsITYPE_DEFORMFOLDER
¶ A deformer folder is just a grouping construct. Deformers that are children of a folder are still applied bottom to top at the location of the folder. The enable state of the folder can disable all children as well.
LXsICHAN_DEFORMFOLDER_ENABLE
ILxWeightMapDeformerItem¶
-
class
ILxWeightMapDeformerItem
¶ Public Functions
-
LxResult
GetMapName
(LXtObjectID self, LXtObjectID chanRead, char *buf, unsigned len)¶ A subset of deformer items get their weights from weight maps. This interface allows the weight map for the deformer to be displayed and edited in the 3D view.
-
LxResult
GetColor
(LXtObjectID self, LXtObjectID chanRead, LXtVector col)¶
-
LxResult
LXeDEFORM_AUTO_COLOR
-
LXsITYPE_ITEMINFLUENCE
¶ The itemInfluence item type (really Item Deformer) serves as the container influence object for deforming items.
LXsICHAN_ITEMINFLUENCE_ITEMINF
LXsICHAN_ITEMINFLUENCE_ENABLE
LXsICHAN_ITEMINFLUENCE_INTERPOLATION
LXsICHAN_ITEMINFLUENCE_POSENABLE
LXsICHAN_ITEMINFLUENCE_ROTENABLE
LXsICHAN_ITEMINFLUENCE_SCLENABLE
LXsICHAN_ITEMINFLUENCE_SAMPLEWEIGHT
LXsICVAL_ITEMINFLUENCE_INTERPOLATION_LOCAL
LXsICVAL_ITEMINFLUENCE_INTERPOLATION_LINEAR
ILxDeformerService¶
-
class
ILxDeformerService
¶ Public Functions
-
LxResult
ScriptQuery
(LXtObjectID self, void **ppvObj)¶
-
LxResult
DeformerFlags
(LXtObjectID self, LXtObjectID item, unsigned *flags)¶ The DeformerFlags() method returns the LXfDEFORMER_* flags for the item, or NOTFOUND if this is not a deformer. DeformerChannel() returns the channel index for the evaluated deformer object.
-
LxResult
DeformerChannel
(LXtObjectID self, LXtObjectID item, unsigned *index)¶
-
LxResult
MergeChangeState
(LXtObjectID self, LxResult c1, LxResult c2)¶ Compute the merge of two change states.
-
LxResult
MeshCount
(LXtObjectID self, LXtObjectID defItem, unsigned *count)¶ Given a deformer, get the set of meshes that it influences. The MeshCount() interface will return LXe_FALSE if the deformer is currently inactive as result of being part of a deformation group.
-
LxResult
MeshByIndex
(LXtObjectID self, LXtObjectID defItem, unsigned index, void **ppvObj)¶
-
LxResult
GroupDeformer
(LXtObjectID self, LXtObjectID dgroup, LXtObjectID chanRead, void **ppvObj)¶ Given a group deformer item and a channel read object (for evaluation, not action) this returns the group deformer interface.
-
LxResult
DeformerDeformationItem
(LXtObjectID self, LXtObjectID defItem, void **ppvObj)¶ Given a deformer, this returns the deformation item. If this is a locator deformer then it returns LXe_TRUE, otherwise FALSE.
-
void
InvalidateTargets
(LXtObjectID self, LXtObjectID scene)¶ Some events can cause the set of items that are targets for deformations to change implicitly. If that happens, a client can call this method to cause the deformation system to update.
-
LXtDeformElt
ItemToDeformElt
(LXtObjectID self, LXtObjectID item)¶ The LXtDeformElt type can represent a point or an item (so far). For points the value is the same as the LXtPointID for the point. For items it’s a special pointer that can be converted to and from an item ILxUnknownID using these functions.
-
LXtObjectID
DeformEltToItem
(LXtObjectID self, LXtDeformElt elt)¶
-
bool
IsDeformer
(ILxUnknownID item)¶ User Class Only:
-
bool
GetMesh
(ILxUnknownID defItem, unsigned index, CLxLoc_Item &item)¶ User Class Only:
-
bool
GetGroupDeformer
(ILxUnknownID dgItem, ILxUnknownID chanRead, CLxLoc_GroupDeformer &dgObj)¶ User Class Only:
-
bool
GetDeformerDeformationItem
(ILxUnknownID deformer, CLxLoc_Item &deformerItem, bool &isLocator)¶ User Class Only:
-
LxResult