Vector3f
Link to vector3f
Importing the class
Link to importing-the-class
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;
Methods
Link to methods
Name: add
ZenScript CopyVector3f.add(x as float, y as float, z as float)
Parameter | Type |
---|---|
Parameter x | Type float |
Parameter y | Type float |
Parameter z | Type float |
Name: clamp
ZenScript CopyVector3f.clamp(min as float, max as float)
Parameter | Type |
---|---|
Parameter min | Type float |
Parameter max | Type float |
Name: dot
Return Type: float
ZenScript CopyVector3f.dot(other as Vector3f) as float
Parameter | Type |
---|---|
Parameter other | Type Vector3f |
Name: lerp
ZenScript CopyVector3f.lerp(max as Vector3f, value as float)
Parameter | Type |
---|---|
Parameter max | Type Vector3f |
Parameter value | Type float |
Name: mul
ZenScript CopyVector3f.mul(scalar as float)
Parameter | Type |
---|---|
Parameter scalar | Type float |
Name: mul
ZenScript CopyVector3f.mul(x as float, y as float, z as float)
Parameter | Type |
---|---|
Parameter x | Type float |
Parameter y | Type float |
Parameter z | Type 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
Parameter | Type |
---|---|
Parameter rads | Type float |
Name: rotationDegrees
Return Type: Quaternion
ZenScript CopyVector3f.rotationDegrees(degrees as float) as Quaternion
Parameter | Type |
---|---|
Parameter degrees | Type float |
Name: setValues
ZenScript CopyVector3f.setValues(x as float, y as float, z as float)
Parameter | Type |
---|---|
Parameter x | Type float |
Parameter y | Type float |
Parameter z | Type float |
Name: transform
ZenScript CopyVector3f.transform(matrix as Matrix3f)
Parameter | Type |
---|---|
Parameter matrix | Type Matrix3f |
Name: transform
ZenScript CopyVector3f.transform(quaternion as Quaternion)
Parameter | Type |
---|---|
Parameter quaternion | Type 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();
Properties
Link to properties
이름 | Type | Has Getter | Has Setter |
---|---|---|---|
이름 x | Type float | Has Getter true | Has Setter false |
이름 y | Type float | Has Getter true | Has Setter false |
이름 z | Type float | Has Getter true | Has Setter false |