Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
[MinGW]fix missing SFCGAL_API
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed Jul 5, 2013
2 parents 3928ae3 + 513be5d commit 1b8c0d9
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 43 deletions.
3 changes: 0 additions & 3 deletions example/SFCGAL-offset/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#include <iostream>

#include <SFCGAL/Geometry.h>
#include <SFCGAL/MultiPolygon.h>

#include <SFCGAL/io/wkt.h>
Expand Down
5 changes: 3 additions & 2 deletions include/SFCGAL/algorithm/volume.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef _SFCGAL_ALGORITHM_VOLUME_H_
#define _SFCGAL_ALGORITHM_VOLUME_H_

#include <SFCGAL/export.h>
#include <SFCGAL/Kernel.h>
#include <SFCGAL/Geometry.h>

Expand All @@ -34,14 +35,14 @@ struct NoValidityCheck;
* @pre g is a valid Geometry
* @ingroup public_api
*/
const Kernel::FT volume( const Geometry& g );
SFCGAL_API const Kernel::FT volume( const Geometry& g );

/**
* Computes the volume of a Solid
* @pre (not checked) volume is closed and consistently oriented
* @ingroup detail
*/
const Kernel::FT volume( const Solid& g, NoValidityCheck );
SFCGAL_API const Kernel::FT volume( const Solid& g, NoValidityCheck );

}
}
Expand Down
3 changes: 2 additions & 1 deletion include/SFCGAL/detail/transform/AffineTransform2.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef _SFCGAL_TRANSFORM_AFFINETRANSFORM2_H_
#define _SFCGAL_TRANSFORM_AFFINETRANSFORM2_H_

#include <SFCGAL/config.h>
#include <SFCGAL/Kernel.h>
#include <SFCGAL/Transform.h>

Expand All @@ -34,7 +35,7 @@ namespace transform {
* Wrapper for CGAL::Aff_transform_2
* @todo unittest
*/
class AffineTransform2 : public Transform {
class SFCGAL_API AffineTransform2 : public Transform {
public:
/**
* Constructor with a transform
Expand Down
3 changes: 2 additions & 1 deletion include/SFCGAL/detail/transform/AffineTransform3.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef _SFCGAL_TRANSFORM_AFFINETRANSFORM3_H_
#define _SFCGAL_TRANSFORM_AFFINETRANSFORM3_H_

#include <SFCGAL/config.h>
#include <SFCGAL/Kernel.h>
#include <SFCGAL/Transform.h>

Expand All @@ -33,7 +34,7 @@ namespace transform {
* Wrapper for CGAL::Aff_transform_3
* @todo unittest
*/
class AffineTransform3 : public Transform {
class SFCGAL_API AffineTransform3 : public Transform {
public:
/**
* Constructor with a transform
Expand Down
12 changes: 7 additions & 5 deletions src/SFCGAL/detail/transform/AffineTransform2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ namespace transform {
///
///
AffineTransform2::AffineTransform2( CGAL::Aff_transformation_2< Kernel > transform ):
_transform( transform ) {
_transform( transform )
{

}

/*
* [SFCGAL::Transform]
*/
void AffineTransform2::transform( Point& p ) {
if ( ! p.isEmpty() ){
p = Point( p.toPoint_2().transform( _transform ) );
}
void AffineTransform2::transform( Point& p )
{
if ( ! p.isEmpty() ) {
p = Point( p.toPoint_2().transform( _transform ) );
}
}


Expand Down
70 changes: 39 additions & 31 deletions src/SFCGAL/detail/transform/AffineTransform3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,80 +43,88 @@ namespace transform {
///
///
AffineTransform3::AffineTransform3( CGAL::Aff_transformation_3< Kernel > transform ):
_transform( transform ) {
_transform( transform )
{

}

///
///
///
void AffineTransform3::transform( Point& p ) {
if ( ! p.isEmpty() ) {
p = Point( p.toPoint_3().transform( _transform ) ) ;
}
void AffineTransform3::transform( Point& p )
{
if ( ! p.isEmpty() ) {
p = Point( p.toPoint_3().transform( _transform ) ) ;
}
}


///
///
///
void AffineTransform3::transform( LineString& ls ) {
for ( size_t i = 0; i < ls.numPoints(); ++i ) {
transform( ls.pointN( i ) );
}
void AffineTransform3::transform( LineString& ls )
{
for ( size_t i = 0; i < ls.numPoints(); ++i ) {
transform( ls.pointN( i ) );
}
}

///
///
///
void AffineTransform3::transform( Triangle& tri ) {
transform( tri.vertex( 0 ) );
transform( tri.vertex( 1 ) );
transform( tri.vertex( 2 ) );
void AffineTransform3::transform( Triangle& tri )
{
transform( tri.vertex( 0 ) );
transform( tri.vertex( 1 ) );
transform( tri.vertex( 2 ) );
}


///
///
///
void AffineTransform3::transform( Polygon& poly ) {
transform( poly.exteriorRing() );
void AffineTransform3::transform( Polygon& poly )
{
transform( poly.exteriorRing() );

for ( size_t i = 0; i < poly.numInteriorRings(); ++i ) {
transform( poly.interiorRingN( i ) );
}
for ( size_t i = 0; i < poly.numInteriorRings(); ++i ) {
transform( poly.interiorRingN( i ) );
}
}


///
///
///
void AffineTransform3::transform( PolyhedralSurface& surf ) {
for ( size_t i = 0; i < surf.numPolygons(); ++i ) {
transform( surf.polygonN( i ) );
}
void AffineTransform3::transform( PolyhedralSurface& surf )
{
for ( size_t i = 0; i < surf.numPolygons(); ++i ) {
transform( surf.polygonN( i ) );
}
}


///
///
///
void AffineTransform3::transform( TriangulatedSurface& surf ) {
for ( size_t i = 0; i < surf.numGeometries(); ++i ) {
transform( surf.geometryN( i ) );
}
void AffineTransform3::transform( TriangulatedSurface& surf )
{
for ( size_t i = 0; i < surf.numGeometries(); ++i ) {
transform( surf.geometryN( i ) );
}
}


///
///
///
void AffineTransform3::transform( Solid& solid ) {
transform( solid.exteriorShell() );
void AffineTransform3::transform( Solid& solid )
{
transform( solid.exteriorShell() );

for ( size_t i = 0; i < solid.numInteriorShells(); ++i ) {
transform( solid.interiorShellN( i ) );
}
for ( size_t i = 0; i < solid.numInteriorShells(); ++i ) {
transform( solid.interiorShellN( i ) );
}
}


Expand Down

0 comments on commit 1b8c0d9

Please sign in to comment.