Vector3f
Link to vector3f
Importare la Classe
Link to importare-la-classe
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.util.math.Vector3f;
Metodi
Link to metodi
Name: add
ZenScript CopyVector3f.add(x as float, y as float, z as float)
Parametro | Tipo |
---|---|
Parametro x | Tipo float |
Parametro y | Tipo float |
Parametro z | Tipo float |
Name: clamp
ZenScript CopyVector3f.clamp(min as float, max as float)
Parametro | Tipo |
---|---|
Parametro min | Tipo float |
Parametro max | Tipo float |
Name: dot
Return Type: float
ZenScript CopyVector3f.dot(other as Vector3f) as float
Parametro | Tipo |
---|---|
Parametro other | Tipo Vector3f |
Name: lerp
ZenScript CopyVector3f.lerp(max as Vector3f, value as float)
Parametro | Tipo |
---|---|
Parametro max | Tipo Vector3f |
Parametro valore | Tipo float |
Name: mul
ZenScript CopyVector3f.mul(scalar as float)
Parametro | Tipo |
---|---|
Parametro scalar | Tipo float |
Name: mul
ZenScript CopyVector3f.mul(x as float, y as float, z as float)
Parametro | Tipo |
---|---|
Parametro x | Tipo float |
Parametro y | Tipo float |
Parametro z | Tipo float |
Name: normalize
Return Type: boolean
ZenScript Copy// Vector3f.normalize() as boolean
myVector3f.normalize();
Name: rotation
Return Type: Quaternion
ZenScript CopyVector3f.rotation(rads as float) as Quaternion
Parametro | Tipo |
---|---|
Parametro rads | Tipo float |
Name: rotationDegrees
Return Type: Quaternion
ZenScript CopyVector3f.rotationDegrees(degrees as float) as Quaternion
Parametro | Tipo |
---|---|
Parametro degrees | Tipo float |
Name: setValues
ZenScript CopyVector3f.setValues(x as float, y as float, z as float)
Parametro | Tipo |
---|---|
Parametro x | Tipo float |
Parametro y | Tipo float |
Parametro z | Tipo float |
Name: transform
ZenScript CopyVector3f.transform(matrix as Matrix3f)
Parametro | Tipo |
---|---|
Parametro matrix | Tipo Matrix3f |
Name: transform
ZenScript CopyVector3f.transform(quaternion as Quaternion)
Parametro | Tipo |
---|---|
Parametro quaternion | Tipo Quaternion |
Name: x
Return Type: float
ZenScript Copy// Vector3f.x() as float
myVector3f.x();
Name: y
Return Type: float
ZenScript Copy// Vector3f.y() as float
myVector3f.y();
Name: z
Return Type: float
ZenScript Copy// Vector3f.z() as float
myVector3f.z();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome x | Tipo float | Ha Getter sì | Ha Setter no |
Nome y | Tipo float | Ha Getter sì | Ha Setter no |
Nome z | Tipo float | Ha Getter sì | Ha Setter no |