→ index of namespace default
 
→ index of project tkmath
 
→ index of module tkmath

Class tkmath.Vector3d


Synopsis: This class represents a double precision 3 dimensional coordinate vector.

  Methods:

Method add
Add another vector v to this instance
Signature
add(Vector3dv)
Arguments
Vector3dv–vector to add

 
→ top of page
Method cross
Calculate cross product from this instance and v
Signature
cross(Vector3dv)
 :Vector3d
Arguments
Vector3dv–Vector3d instance
Returns
Vector3d–orthogonal vector to this instance and v

 
→ top of page
Method dot
Calculate scalar dot product from this instance and v
Signature
dot(Vector3dv)
 :Double
Arguments
Vector3dv–Vector3d instance
Returns
Double–scalar value

 
→ top of page
Method getAbs
Return length of vector
Signature
getAbs():Double
Returns
Double–length of vector

 
→ top of page
Method getAbsSqr
Return squared length of vector
Signature
getAbsSqr():Double
Returns
Double–length2 of vector

 
→ top of page
Method getString
Get string representation of vector (x, y, z)
Signature
getString():String
Returns
String–string representation of vector

 
→ top of page
Method getX
Get value of x element
Signature
getX():Double
Returns
Double–value of x element

 
→ top of page
Method getY
Get value of y element
Signature
getY():Double
Returns
Double–value of y element

 
→ top of page
Method getZ
Get value of z element
Signature
getZ():Double
Returns
Double–value of z element

 
→ top of page
Method init
Initialise values to x=a, y=b and z=c
Signature
init(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–new x value
Doubleb–new y value
Doublec–new z value

 
→ top of page
Method initf
Initialise values to single precision x=a, y=b and z=c
Signature
initf(floata,
  floatb,
  floatc 
  )  
Arguments
floata–new x value
floatb–new y value
floatc–new z value

 
→ top of page
Method initScaled
Initialise vector to s*v
Signature
initScaled(Vector3dv,
  Doubles 
  )  
Arguments
Vector3dv–Vector3d instance
Doubles–scale to multiply

 
→ top of page
Method mul
Multiply the x element of this instance by the x element of v and do the same with the y and z element
Signature
mul(Vector3dv)
Arguments
Vector3dv–Vector3d instance

 
→ top of page
Method muld
Multiply this instance by scalar value v
Signature
muld(Doublev)
Arguments
Doublev–scalar value

 
→ top of page
Method New
Initialise and return new Vector3d instance with x=a, y=b and z=c
Signature
New(Doublea,
  Doubleb,
  Doublec 
  )  
 :Vector3d
Arguments
Doublea–new x value
Doubleb–new y value
Doublec–new z value
Returns

 
→ top of page
Method setX
Set x element to a
Signature
setX(Doublea)
Arguments
Doublea–new value for x

 
→ top of page
Method setY
Set y element to a
Signature
setY(Doublea)
Arguments
Doublea–new value for y

 
→ top of page
Method setZ
Set z element to a
Signature
setZ(Doublea)
Arguments
Doublea–new value for z

 
→ top of page
Method sub
Substract another vector v from this instance
Signature
sub(Vector3dv)
Arguments
Vector3dv–vector to substract

 
→ top of page
Method tensor
Create resulting matrix of tensor product from this instance and v
Signature
tensor(Vector3dv)
 :Matrix3d
Arguments
Vector3dv–
Returns
Matrix3d–Matrix3d instance

 
→ top of page
Method triple
Calculate triple product this.dot(b.cross(c)) (a*(bxc))
Signature
triple(Vector3db,
  Vector3dc 
  )  
 :Double
Arguments
Vector3db–
Vector3dc–
Returns
Double–scalar value
Description
ærg b second parameter of triple product arg c third parameter of triple product

 
→ top of page
Method unit
Set length to 1
Signature
unit()

 
→ top of page
Method unitScale
Set length to s
Signature
unitScale(Doubles)
Arguments
Doubles–new length of vector

 
→ top of page
 

Project Modules:tkmath 
Project Classes:Complexd , Complexf , Math , Matrix , Matrix2d , Matrix2f , Matrix2x3f , Matrix3d , Matrix3f , Matrix4d , Matrix4f , Quaterniond , Quaternionf , Vector2d , Vector2f , Vector3d , Vector3f , Vector4d , Vector4f 
Project Functions:absd , absf , acoscd , acoscf , acosd , acosf , acoshcd , acoshcf , acoshd , acoshf , asincd , asincf , asind , asinf , asinhcd , asinhcf , asinhd , asinhf , atan2d , atan2f , atancd , atancf , atand , atanf , atanhcd , atanhcf , atanhd , atanhf , ceild , ceilf , complexd , complexf , complexfPolar , complexfPolar , coscd , coscf , cosd , cosf , coshcd , coshcf , coshd , coshf , exp10d , exp10f , exp2d , exp2f , expcd , expcf , expd , expf , f16_from_f32 , f32_from_f16 , floord , floorf , fx16_from_f16 , hypotd , hypotf , log10d , log10f , log2d , log2f , logcd , logcf , logd , logf , matrix2d , matrix2f , matrix2x3f , matrix3d , matrix3f , matrix4d , matrix4f , modd , modf , powcd , powcf , powd , powf , quaterniond , quaternionf , relCmpd , relCmpf , relErrCmpd , relErrCmpf , roundd , roundf , sincd , sincf , sind , sinf , sinhcd , sinhcf , sinhd , sinhf , sqrtcd , sqrtcf , sqrtd , sqrtf , tancf , tancf , tand , tanf , tanhcd , tanhcf , tanhd , tanhf , vector2d , vector2f , vector3d , vector3f , vector4d , vector4f 
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Tue, 3/Mar/2026 18:10:18