Jump to content
Nebeor

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

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.

Share this post


Link to post

VW SDK 2015? I cannot remember having such a problem back then.

 

Does it compile when you rebuild everything but not when you compile it thereafter? Or vice-versa?

 

Can you post the complete LNK 2019 error? I would like to see if the C++ mangled name correspond to the signature.

Share this post


Link to post

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)

Share this post


Link to post

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. 

Share this post


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

I made this workaround, it works for me!

Edited by Nebeor

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...