ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

current matrix Object ?

2 REPLIES 2
Reply
Message 1 of 3
bikelink
342 Views, 2 Replies

current matrix Object ?

how can I read the current matrix (position and rotation) about a solid ? (or entity ..)
I know that I can move it and rotate any entity with transformby but I need to know his position and rotation before change it.
thanks in advance!
2 REPLIES 2
Message 2 of 3
dougk16
in reply to: bikelink

I have a few suggestions for you, but first of all understand that solids don't have an intrinsic position and rotation per se. Their position and rotation is really whatever you want them to be.

However, take a look at AcDb3dSolid::getMassProp...you'll probably need to research what some of these return values mean, but perhaps you can derive something like rotation relative to the x y and z axes using one or more of them. And of course 'centroid' should give you a useable position. You'll also need to derive some kind of normal vector for rotation to mean anything.

My second suggestion is to simply put the solid into a block right after you create it, or make a "helper" block that's transformed whenever you transform the solid, and then the block itself can give you a position, normal, and rotation.
Message 3 of 3
bikelink
in reply to: bikelink

Thank You.
with a reactor i catch the movement..matrix etc... isn't simple but it's works

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost