OpenMotionLab/MotionGPT
118
1"""Samplers, conforming to the glTF 2.0 standards as specified in2https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-sampler3 4Author: Matthew Matl5"""6from .constants import GLTF7 8 9class Sampler(object):10 """Texture sampler properties for filtering and wrapping modes.11 12 Parameters13 ----------14 name : str, optional15 The user-defined name of this object.16 magFilter : int, optional17 Magnification filter. Valid values:18 - :attr:`.GLTF.NEAREST`19 - :attr:`.GLTF.LINEAR`20 minFilter : int, optional21 Minification filter. Valid values:22 - :attr:`.GLTF.NEAREST`23 - :attr:`.GLTF.LINEAR`24 - :attr:`.GLTF.NEAREST_MIPMAP_NEAREST`25 - :attr:`.GLTF.LINEAR_MIPMAP_NEAREST`26 - :attr:`.GLTF.NEAREST_MIPMAP_LINEAR`27 - :attr:`.GLTF.LINEAR_MIPMAP_LINEAR`28 wrapS : int, optional29 S (U) wrapping mode. Valid values:30 - :attr:`.GLTF.CLAMP_TO_EDGE`31 - :attr:`.GLTF.MIRRORED_REPEAT`32 - :attr:`.GLTF.REPEAT`33 wrapT : int, optional34 T (V) wrapping mode. Valid values:35 - :attr:`.GLTF.CLAMP_TO_EDGE`36 - :attr:`.GLTF.MIRRORED_REPEAT`37 - :attr:`.GLTF.REPEAT`38 """39 40 def __init__(self,41 name=None,42 magFilter=None,43 minFilter=None,44 wrapS=GLTF.REPEAT,45 wrapT=GLTF.REPEAT):46 self.name = name47 self.magFilter = magFilter48 self.minFilter = minFilter49 self.wrapS = wrapS50 self.wrapT = wrapT51 52 @property53 def name(self):54 """str : The user-defined name of this object.55 """56 return self._name57 58 @name.setter59 def name(self, value):60 if value is not None:61 value = str(value)62 self._name = value63 64 @property65 def magFilter(self):66 """int : Magnification filter type.67 """68 return self._magFilter69 70 @magFilter.setter71 def magFilter(self, value):72 self._magFilter = value73 74 @property75 def minFilter(self):76 """int : Minification filter type.77 """78 return self._minFilter79 80 @minFilter.setter81 def minFilter(self, value):82 self._minFilter = value83 84 @property85 def wrapS(self):86 """int : S (U) wrapping mode.87 """88 return self._wrapS89 90 @wrapS.setter91 def wrapS(self, value):92 self._wrapS = value93 94 @property95 def wrapT(self):96 """int : T (V) wrapping mode.97 """98 return self._wrapT99 100 @wrapT.setter101 def wrapT(self, value):102 self._wrapT = value103 