[brlcad-commits] SF.net SVN: brlcad:[35744] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2009-08-28 20:53:49
|
Revision: 35744 http://brlcad.svn.sourceforge.net/brlcad/?rev=35744&view=rev Author: brlcad Date: 2009-08-28 20:53:41 +0000 (Fri, 28 Aug 2009) Log Message: ----------- split out grip object mirroring. seems to have a similar issue computing an angle, but just leave it as is with a note. Modified Paths: -------------- brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj brlcad/trunk/src/librt/CMakeLists.txt brlcad/trunk/src/librt/Makefile.am brlcad/trunk/src/librt/primitives/mirror.c Modified: brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj =================================================================== --- brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj 2009-08-28 20:36:55 UTC (rev 35743) +++ brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj 2009-08-28 20:53:41 UTC (rev 35744) @@ -428,6 +428,10 @@ > </File> <File + RelativePath="..\..\..\src\librt\primitives\grip\grip_mirror.c" + > + </File> + <File RelativePath="..\..\..\src\librt\primitives\half\half.c" > </File> Modified: brlcad/trunk/src/librt/CMakeLists.txt =================================================================== --- brlcad/trunk/src/librt/CMakeLists.txt 2009-08-28 20:36:55 UTC (rev 35743) +++ brlcad/trunk/src/librt/CMakeLists.txt 2009-08-28 20:53:41 UTC (rev 35744) @@ -83,6 +83,7 @@ primitives/eto/eto_brep.cpp primitives/extrude/extrude.c primitives/grip/grip.c + primitives/grip/grip_mirror.c primitives/half/half.c primitives/half/half_mirror.c primitives/hf/hf.c Modified: brlcad/trunk/src/librt/Makefile.am =================================================================== --- brlcad/trunk/src/librt/Makefile.am 2009-08-28 20:36:55 UTC (rev 35743) +++ brlcad/trunk/src/librt/Makefile.am 2009-08-28 20:53:41 UTC (rev 35744) @@ -122,6 +122,7 @@ primitives/eto/eto_brep.cpp \ primitives/extrude/extrude.c \ primitives/grip/grip.c \ + primitives/grip/grip_mirror.c \ primitives/half/half.c \ primitives/half/half_mirror.c \ primitives/hf/hf.c \ Modified: brlcad/trunk/src/librt/primitives/mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/mirror.c 2009-08-28 20:36:55 UTC (rev 35743) +++ brlcad/trunk/src/librt/primitives/mirror.c 2009-08-28 20:53:41 UTC (rev 35744) @@ -47,6 +47,7 @@ RT_DECLARE_MIRROR(ell); RT_DECLARE_MIRROR(arb); RT_DECLARE_MIRROR(half); +RT_DECLARE_MIRROR(grip); /** @@ -137,11 +138,11 @@ err = rt_half_mirror(ip, plane); return err ? NULL : ip; } -#if 0 case ID_GRIP: { - err = rt_grip_mirror(ip, &plane); + err = rt_grip_mirror(ip, plane); return err ? NULL : ip; } +#if 0 case ID_POLY: { err = rt_poly_mirror(ip, &plane); return err ? NULL : ip; @@ -244,31 +245,6 @@ mirmat[3 + Z*4] += 2.0 * mirror_pt[Z] * mirror_dir[Z]; switch (id) { - case ID_GRIP: { - struct rt_grip_internal *grp; - point_t pt; - vect_t h; - vect_t n; - fastf_t ang; - mat_t mat; - - grp = (struct rt_grip_internal *)ip->idb_ptr; - RT_GRIP_CK_MAGIC(grp); - - VMOVE(pt, grp->center); - MAT4X3PNT(grp->center, mirmat, pt); - - VMOVE(h, grp->normal); - VUNITIZE(h); - - VCROSS(n, mirror_dir, grp->normal); - VUNITIZE(n); - ang = M_PI_2 - acos(VDOT(h, mirror_dir)); - bn_mat_arb_rot(mat, origin, n, ang*2); - MAT4X3VEC(grp->normal, mat, h); - - break; - } case ID_POLY: { struct rt_pg_internal *pg; fastf_t *verts; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |