kaolin.physics.simplicits.SkinnedPoints¶
API¶
- class kaolin.physics.simplicits.SkinnedPoints(pts, skinning_weights, strict_checks=True)¶
Bases:
SkinnedPointsProtocol,TensorContainerBasePoints with skinning properties.
- pts¶
The skinned points, of shape \((N, 3)\) (in \(m\)).
- Type
- skinning_weights¶
The skinning weights of the points, of shape \((N, \text{num_handles})\).
- Type
- __init__(pts, skinning_weights, strict_checks=True)¶
- classmethod assert_supported(attr)¶
Raises an exception if class does not support provided attribute name.
- check_other_attribute(attr, log_error=False)¶
Checks a non-tensor attribute validity; returns True if ok.
- check_sanity(log_error=True)¶
Validates that all tensor attributes are correct; implement abstract methods.
- check_tensor_attribute(attr, log_error=False)¶
Checks tensor attribute validity; returns True if valid.
- classmethod class_other_attributes()¶
Returns attribute names that are not PyTorch tensors or dicts thereof.
- classmethod class_tensor_attributes()¶
Returns attribute names that are PyTorch tensors or dicts thereof.
- cpu(attributes: Optional[Sequence[str]] = None)¶
Calls
cpuon all or selected tensor attributes; returns a shallow copy.
- cuda(device: Optional[Union[int, device, str]] = None, attributes: Optional[Sequence[str]] = None)¶
Calls
cudaon all or selected tensor attributes; returns a shallow copy.
- describe_attribute(attr, print_stats=False, detailed=False)¶
Outputs an informative string about an attribute; the same method used for all attributes in
to_string.
- detach(attributes: Optional[Sequence[str]] = None)¶
Detaches all or selected tensor attributes; returns a shallow copy.
- classmethod from_skinning_mod(pts: Tensor, skinning_mod: SkinningModule)¶
Constructor from a
SkinningModuleto be applied on the points.- Parameters
pts (torch.Tensor) – The points to be skinned, of shape \((N, 3)\) (in \(m\))
skinning_mod (SkinningModule) – The SkinningModule to be used to compute the skinning weights.
- get_attributes(only_tensors=False)¶
Returns names of all attributes that are currently set to non-None value in this class instance.
- Parameters
only_tensors – if true, will only include tensor attributes
- Returns
list of string names
- Return type
(list)
- property num_handles¶
Last dimension of the skinning weights
- to(*args: Any, attributes: Optional[Sequence[str]] = None, **kwargs: Any)¶
Moves or casts tensors like
torch.Tensor.to()/torch.nn.Module.to().- Parameters
*args – forwarded to
tensor.to(*args)attributes (list of str, optional) – if set, only these tensor attributes are updated
**kwargs – forwarded to
tensor.to(**kwargs)
- Returns
shallow copy with converted tensors
- Return type
- to_string(print_stats=False, detailed=False)¶
Returns information about tensor attributes currently contained in the object.