Skip to content

Commit

Permalink
Improve bounds calc syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
billkarsh committed Jan 19, 2014
1 parent 7cf8fc0 commit b3c7e90
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion 0_GEN/CTileSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ void CTileSet::ApplyClix( int tfType, const char *path )
void CTileSet::BoundsPlus1( DBox &B, const vector<Point> &cnr, int i )
{
vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
vtil[i].T.Transform( c );

for( int k = 0; k < 4; ++k ) {
Expand Down
2 changes: 1 addition & 1 deletion 0_GEN/CTileSet_Scape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void CTileSet::Scape_AdjustBounds(
for( int i = 0; i < nt; ++i ) {

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
vtil[vid[i]].T.Transform( c );

for( int k = 0; k < 4; ++k ) {
Expand Down
2 changes: 1 addition & 1 deletion 0_GEN/Scape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static void AdjustBounds(
for( int i = 0; i < nt; ++i ) {

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
vTile[i].t2g.Transform( c );

for( int k = 0; k < 4; ++k ) {
Expand Down
2 changes: 1 addition & 1 deletion 1_Cross_CarveBlocks/cross_carveblocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ void BlockSet::OrientLayer( int is0, int isN )
for( int i = is0; i < isN; ++i ) {

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
TS.vtil[i].T.Transform( c );

for( int i = 0; i < 4; ++i )
Expand Down
2 changes: 1 addition & 1 deletion 1_Cross_ThisBlock/cross_thisblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void CSuperscape::CalcBBox()
for( int i = 0; i < gDat.ntil; ++i ) {

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
TS.vtil[vID[i]].T.Transform( c );

for( int k = 0; k < 4; ++k ) {
Expand Down
4 changes: 2 additions & 2 deletions 1_LSQ/lsq_MDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void MDL::Bounds(
continue;

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
L2GPoint( c, X, itr );

for( int k = 0; k < 4; ++k ) {
Expand Down Expand Up @@ -160,7 +160,7 @@ void MDL::Bounds(
vector<Point> c( 4 );
double xmid = 0.0, ymid = 0.0;

memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
L2GPoint( c, X, itr );

for( int k = 0; k < 4; ++k ) {
Expand Down
4 changes: 2 additions & 2 deletions 1_LSQX/lsq_MDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void MDL::Bounds(
continue;

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
L2GPoint( c, X, itr );

for( int k = 0; k < 4; ++k ) {
Expand Down Expand Up @@ -160,7 +160,7 @@ void MDL::Bounds(
vector<Point> c( 4 );
double xmid = 0.0, ymid = 0.0;

memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
L2GPoint( c, X, itr );

for( int k = 0; k < 4; ++k ) {
Expand Down
2 changes: 1 addition & 1 deletion 1_LSQw/lsq_Bounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void* _Bounds( void* ithr )
continue;

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );

if( gX->NE == 6 )
X_AS_AFF( x, ir ).Transform( c );
Expand Down
2 changes: 1 addition & 1 deletion 1_MakeMontages/makemontages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ void BlockSet::OrientLayer( int is0, int isN )
for( int i = is0; i < isN; ++i ) {

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
TS.vtil[i].T.Transform( c );

for( int i = 0; i < 4; ++i )
Expand Down
2 changes: 1 addition & 1 deletion 1_Scapeops/scapeops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void CSuperscape::OrientLayer()
for( int i = is0; i < isN; ++i ) {

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
TS.vtil[i].T.Transform( c );

for( int i = 0; i < 4; ++i )
Expand Down
4 changes: 2 additions & 2 deletions 1_XView/xview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static void GetXY_Aff( DBox &B, const TAffine &Trot )
continue;

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
T = Trot * X_AS_AFF( X.X, j );
T.Transform( c );

Expand Down Expand Up @@ -307,7 +307,7 @@ static void GetXY_Hmy( DBox &B, const THmgphy &Trot )
continue;

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
T = Trot * X_AS_HMY( X.X, j );
T.Transform( c );

Expand Down
4 changes: 2 additions & 2 deletions 2_TFormTableEx/tformtableex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static void GetXYH(
&T.t[6], &T.t[7] );

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
T = R * T;
T.Transform( c );

Expand Down Expand Up @@ -231,7 +231,7 @@ static void GetXYA(
&T.t[3], &T.t[4], &T.t[5] );

vector<Point> c( 4 );
memcpy( &c[0], &cnr[0], 4*2*sizeof(double) );
memcpy( &c[0], &cnr[0], 4*sizeof(Point) );
T = R * T;
T.Transform( c );

Expand Down

0 comments on commit b3c7e90

Please sign in to comment.