Vector¶
-
class
props.
Vector
¶
Three-component vector prop
This is a type of props.Prop that can be used when a props.HasProps class needs a vector property. PROPS.VECTOR is a props.Array with different default values. Overriding these defaults is allowed but not recommended; just use props.Array instead. PROPS.VECTOR also allows the values ‘X’, ‘Y’, and ‘Z’; these are converted to [1 0 0], [0 1 0], and [0 0 1], respectively.
Attributes - No properties besides those inherited from props.Array
Example:
...
class HasVectorProp < props.HasProps
properties (Hidden, SetAccess = immutable)
VectorPropStruct = { ...
struct( ...
'Name', 'ViewDirection', ...
'Type', @props.Vector, ...
'Doc', 'Three-component view direction vector', ...
'DefaultValue', 'Z' ...
) ...
}
end
...
end
See also props.Prop, props.HasProps, props.Array, props.Float