Jump to content
Developer Wiki and Function Reference Links ×

VWTransform : void SetRotation(VWPoint3D newZ, VWPoint3D newY); unable to compile


Nebeor

Recommended Posts

I tried to use VWTransform's void SetRotation(VWPoint3D newZ, VWPoint3D newY);
Unfortunately the compiler complains with LNK2019: unresolved external symbol.

I have encountered this bug earlier on, but strange enough, I succeeded yesterday to compile, but I was not able to do the same today. 

Am I the only one who has issues with this function? I cannot make sense out of this situation.

Link to comment

Here you have the complete error:

Error    LNK2019    unresolved external symbol "public: void __cdecl VWFC::Math::VWTransformMatrix::SetRotation(class VWFC::Math::VWPoint3D,class VWFC::Math::VWPoint3D)" (?SetRotation@VWTransformMatrix@Math@VWFC@@QEAAXVVWPoint3D@23@0@Z) referenced in function "public: bool __cdecl NotRelevant::NotRelevantMethod(double &,double &,double &,double &,double &,double &,double &,bool &,char * * &,bool)" (?NotRelevantMethod@NotRelevant@@QEAA_NAEAN000000AEA_NAEAPEAPEAD_N@Z)

Link to comment

However I am checking the VWSDK 2016 (the oldest I have still available here)

 

VWTransformMatrix.h seems to declare that function, but I cannot find a definition for it, neither inline in VWTransformMatrix.h nor in VWTransformMatrix.cpp.

 

I suppose that it was already the case in 2015. It seems to be still the case in 2020 (even if there is a function more, but that exact signature is still only declared not defined.)

 

Therefore I suppose that you will have to compute your rotation another way, for example using matrix multiplication. 

Link to comment
void SetRotationMat(VWTransformMatrix& matrix, VWPoint3D& normal)
{
	double phi = atan(normal.y / normal.x) * kDegreesPerRadian;
	double theta = acos(normal.z / 1) * kDegreesPerRadian);
	matrix.RotateZBefore(phi);
	matrix.RotateYBefore(theta);
}

I made this workaround, it works for me!

Edited by Nebeor
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...