Matrix Vector and SetTranslation, C# |
Top Previous Next |
Here is an example of how to use them:
// Create the default matrix... Matrix PosMat = TransGeom.CreateMatrix(); Vector DistribPos = TransGeom.CreateVector();
Point Origin = TransGeom.CreatePoint(0, 0, 0); Vector VectorAxis = TransGeom.CreateVector(1, 0, 0); PosMat.SetToRotation(-Math.PI/2.0, VectorAxis, Origin);
DistribPos.X = -20.0; // front view vertical positioning, may change DistribPos.Y = 15.0; // how far from the spalla main plane, may change DistribPos.Z = -mmEndPlateWidth/10.0; // position near center of double battery PosMat.SetTranslation(DistribPos);
Remember that SetTranslation will want cm, not mm.
|
Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)