Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
Why there is no Rotate and Rotate3d method in .NET
Why there is no Rotate and Rotate3d method in .NET
Hi
I found Rotate and Rotate3d both exist in VBA (ActiveX) and ObjectARX, but not in .NET?
Do I miss something in .NET?
How I rotate in 3d without COM Interop?
This is just a guess, but can't you create a rotation matrix and multiply it through?
Dim m As Matrix3d = Matrix3d.Rotation(angle, rotationVector, centrePoint)
For Each ent As Entity In objectsToRotate
ent.TransformBy(m)
Next ent
The reason they don't add the functionality is probably because you can do it easily enough yourself, (but only if you understand euclidean mathematics I guess).
This way, it's not necessary for them to add anything at all, since you can
do everything yourself.
Why not write your own operating system and pay for it in the bargain?
wrote in message news:5124556@discussion.autodesk.com...
This is just a guess, but can't you create a rotation matrix and multiply it
through?
Dim m As Matrix3d = Matrix3d.Rotation(angle, rotationVector, centrePoint)
For Each ent As Entity In objectsToRotate
ent.TransformBy(m)
Next ent
The reason they don't add the functionality is probably because you can do
it easily enough yourself, (but only if you understand euclidean mathematics
I guess).
Those have kinda been moved to the Matrix2d and Matrix3d classes. If you need to construct scaling/rotation/etc, you do that with the matrix then apply to the entities ecs.
Example : There is no "Move" method, but this shows how to do it.
Dim fromPt As Point3d
Dim toPt As Point3d
Dim ptRes As PromptPointResult
ptRes = editor.GetPoint("Pick a from point")
If ptRes.Status <> PromptStatus.OK Then Return
fromPt = ptRes.Value
ptRes = editor.GetPoint("Pick a to point")
If ptRes.Status <> PromptStatus.OK Then Return
toPt = ptRes.Value
Dim moveVec As New Vector3d(toPt.X - fromPt.X, toPt.Y - fromPt.Y, toPt.Z - fromPt.Z)
Dim moveMat As Matrix3d = Matrix3d.Displacement(moveVec)
ent.TransformBy(ent.Ecs.PostMultiplyBy(moveMat))