#include <map>
{
enum
{
};
namespace
{
void CreateTopoVertex( std::map <Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->info()->SetName( L"Vertex_A" );
entity->SetGeom( point );
entity->info()->SetName( L"Vertex_B" );
entity->SetGeom( point );
entity->info()->SetName( L"Vertex_C" );
entity->SetGeom( point );
entity->info()->SetName( L"Vertex_D" );
entity->SetGeom( point );
entity->info()->SetName( L"Vertex_E" );
entity->SetGeom( point );
entity->info()->SetName( L"Vertex_F" );
entity->SetGeom( point );
entity->info()->SetName( L"Vertex_G" );
entity->SetGeom( point );
entity->info()->SetName( L"Vertex_H" );
entity->SetGeom( point );
}
void CreateTopoEdge( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->info()->SetName( L"Edge_AB" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_CA" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_DC" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_BD" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_EA" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_FB" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_FE" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_GD" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_GF" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_HC" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_HG" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
entity->info()->SetName( L"Edge_EH" );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
}
void CreateTopoCoEdge( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->info()->SetName( L"Coedge0_AB" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge0_CA" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge0_CD" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge0_BD" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge1_EA" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge1_AB" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge1_FB" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge1_FE" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge2_FB" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge2_BD" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge2_GD" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge2_GF" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge3_GD" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge3_DC" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge3_HC" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge3_HG" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge4_EH" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge4_FE" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge4_GF" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge4_HG" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge5_EH" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge5_HC" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge5_CA" );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
entity->info()->SetName( L"Coedge5_EA" );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
}
void CreateTopoLoop( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->info()->SetName( L"Loop0_ABCD" );
entity->info()->SetName( L"Loop1_ABFE" );
entity->info()->SetName( L"Loop2_FBDG" );
entity->info()->SetName( L"Loop3_GDCH" );
entity->info()->SetName( L"Loop4_EFGH" );
entity->info()->SetName( L"Loop5_EHCA" );
}
void CreateTopoFace( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
UDegree = 1;
VDegree = 1;
ControlPoints[ 0 ].
resize( 2 );
ControlPoints[ 1 ].
resize( 2 );
Weights[ 0 ][ 0 ] = 1.0;
Weights[ 0 ][ 1 ] = 1.0;
Weights[ 1 ][ 0 ] = 1.0;
Weights[ 1 ][ 1 ] = 1.0;
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 100.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 100.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 100.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 100.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 100.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 0.0, 100.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 0.0, 0.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 0.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 100.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 100.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 100.0, 0.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 0.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 100.0, 100.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 100.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 0.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 0.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 0.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 100.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 100.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 0.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 0.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
}
void CreateTopoShell( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->info()->SetName( L"Shell" );
}
{
}
void CreateTopoVolume( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->info()->SetName( L"Volume" );
}
void CreateTopoLump( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->info()->SetName( L"Lump" );
}
{
return vtx;
}
{
double nrm = norm( D );
D /= nrm;
line->SetTrimmingParameters( 0, nrm );
}
Dtk_CurvePtr MakeSegment2D(
double xmin,
double ymin,
double xmax,
double ymax )
{
return MakeSegment(
Dtk_pnt( xmin, ymin, 0 ),
Dtk_pnt( xmax, ymax, 0 ) );
}
{
circle->SetTrimmingParameters( from, to );
}
{
edge->info()->SetId( id + 10 );
edge->SetGeom( curve3d );
edge->SetStartVertex( vstart );
edge->SetEndVertex( vend );
return edge;
}
{
double domain[ 4 ];
domain[ 0 ] = 0;
domain[ 2 ] = 0;
domain[ 3 ] = height;
cyl->SetTrimUVBox( domain );
}
{
double domain[ 4 ];
domain[ 0 ] = -trim;
domain[ 1 ] = trim;
domain[ 2 ] = -trim;
domain[ 3 ] = trim;
plane->SetTrimUVBox( domain );
}
{
return face;
}
{
coedge->SetGeom( curve2d );
coedge->SetEdge( edge );
coedge->SetOrientation( sensedgeVScoedge );
return coedge;
}
{
}
}
{
std::map<Dtk_ID, Dtk_EntityPtr> array_topo;
body->info()->SetName( L"Body" );
body->info()->SetMetaData( ArrayMetadataEntity );
CreateTopoVertex( array_topo, body );
CreateTopoEdge( array_topo, body );
CreateTopoCoEdge( array_topo, body );
CreateTopoLoop( array_topo, body );
CreateTopoFace( array_topo, body );
CreateTopoShell( array_topo, body );
CreateTopoVolume( array_topo, body );
CreateTopoLump( array_topo, body );
return body;
}
{
cyl->SetTrimUVBox( domain );
return body;
}
{
mycurve->info()->SetColor(
Dtk_RGB( 255, 0, 255 ) );
mycurve->info()->SetName( "mycircle" );
myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.0, 0.0, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 10.0, 5.0 );
mycurve->info()->SetColor(
Dtk_RGB( 255, 255, 0 ) );
mycurve->info()->SetName( "myellipse" );
mycurve->info()->SetColor(
Dtk_RGB( 0, 0, 255 ) );
mycurve->info()->SetName( "myline" );
ControlPoints[ 0 ] =
Dtk_pnt( -5.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( -2.0, 5.0, 0. );
ControlPoints[ 2 ] =
Dtk_pnt( 2.0, -5.0, 0. );
ControlPoints[ 3 ] =
Dtk_pnt( 5.0, 0.0, 0. );
Knots[ 0 ] = Knots[ 1 ] = Knots[ 2 ] = Knots[ 3 ] = 0.0;
Knots[ 4 ] = Knots[ 5 ] = Knots[ 6 ] = Knots[ 7 ] = 1.0;
mycurve->info()->SetColor(
Dtk_RGB( 0, 255, 0 ) );
mycurve->info()->SetName( "mynurbs" );
myshell->AddWire( mycurves );
mybody->AddWireShell( myshell );
mybody->info()->SetMetaData( ArrayMetadataEntity );
return mybody;
}
{
ellipsethick->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
ellipsethick->info()->SetCurveThickNessInMM( 4 );
ellipsedash->info()->SetColor(
Dtk_RGB( 0, 0, 255 ) );
ellipsedash->info()->SetCurveLineType(
DTK_DASHED );
ellipsedotted->info()->SetColor(
Dtk_RGB( 255, 0, 255 ) );
ellipsedotted->info()->SetCurveLineType(
DTK_DOTTED );
ellipsedotted->info()->SetCurveThickNessInMM( 2 );
myshell->AddWire( mycurves );
mybody->AddWireShell( myshell );
return mybody;
}
{
mypoint->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
mypoint->info()->SetName( "mypoint" );
mypoint->info()->SetMetaData( ArrayMetadataEntity );
myshell->AddWire( mypoints );
mybody->AddWireShell( myshell );
return mybody;
}
{
mybody->info()->SetInfiniteGeometryFlag(
DTK_TRUE );
mybody->get_info()->SetRefEntityFlag(
DTK_TRUE );
mybody->info()->SetColor(
Dtk_RGB( 255, 0, 0, 255 ) );
mybody->info()->SetName( L"myplan" );
mybody->info()->SetMetaData( ArrayMetadataEntity );
dom[ 0 ] = 0.0;
dom[ 1 ] = 10.0;
dom[ 2 ] = 0.0;
dom[ 3 ] = 10.0;
plane->SetTrimUVBox( dom );
return mybody;
}
{
dtk_transfo.
setXdir( 0.0, 0.0, 1.0 );
dtk_transfo.
setYdir( -1.0, 0.0, 0.0 );
dtk_transfo.
setZdir( 0.0, -1.0, 0.0 );
mycsystem->SetMatrix( dtk_transfo );
mycsystem->info()->SetName( L"mycsystem" );
mycsystem->info()->SetColor(
Dtk_RGB( 255, 0, 0, 255 ) );
mycsystem->info()->SetLayer( 123 );
mycsystem->info()->SetMetaData( ArrayMetadataEntity );
return mycsystem;
}
{
mybody->get_info()->SetInfiniteGeometryFlag(
DTK_TRUE );
mybody->get_info()->SetRefEntityFlag(
DTK_TRUE );
lineptr->info()->SetColor(
Dtk_RGB( 0, 255, 25, 255 ) );
lineptr->info()->SetName( L"myaxe" );
lineptr->info()->SetMetaData( ArrayMetadataEntity );
shell->AddWire( CurveArray );
mybody->AddWireShell( shell );
return mybody;
}
{
{
mypoint->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
mypoint->info()->SetName( name );
}
{
}
{
myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( -10.0 + 10 * i, 15, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 4.0, 2.5 );
}
{
}
{
myellipse->SetTrimmingParameters( 0.0,
DTK_PI );
}
{
myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( -10.0 + 10 * i, 35, 3.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 3.0, 1.0 );
}
{
myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( -10.0 + 10 * i, 40, 2.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 3.0, 1.0 );
myellipse->SetTrimmingParameters( 0.0,
DTK_PI );
}
myshell->AddWire( ArrayPoint );
myshell->AddWire( ArrayCurve );
mybody->AddWireShell( myshell );
mybody->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
mybody->info()->SetName( L"CreateEsquisse3D" );
mybody->info()->SetMetaData( ArrayMetadataEntity );
return mybody;
}
{
myarccircle =
Dtk_Ellipse::Create(
Dtk_pnt( 1.0, 0.5, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.5, 0.5 );
myarccircle->SetTrimmingParameters( -1.0 *
DTK_PI / 2.0,
DTK_PI / 2.0 );
myarccircle =
Dtk_Ellipse::Create(
Dtk_pnt( 0.0, 0.5, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.5, 0.5 );
myarccircle->SetTrimmingParameters(
DTK_PI / 2.0, 3.0 *
DTK_PI / 2.0 );
myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.5, 0.25, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.25, 0.1 );
myarcellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.5, 0.75, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.25, 0.1 );
myarcellipse->SetTrimmingParameters( -1.0 *
DTK_PI / 2.0,
DTK_PI / 2.0 );
myarcellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.5, 0.75, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.25, 0.1 );
myarcellipse->SetTrimmingParameters(
DTK_PI / 2.0, 3.0 *
DTK_PI / 2.0 );
myshell->AddWire( ArrayPoint );
myshell->AddWire( ArrayCurve );
mybody->AddWireShell( myshell );
mybody->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
mybody->info()->SetName( L"CreateEsquisse2D" );
mybody->Transform( transfo );
mybody->info()->SetMetaData( ArrayMetadataEntity );
return mybody;
}
{
body->AddLump( lump );
lump->AddVolume( volume );
volume->AddOuterShell( shell );
P[ 1 ] =
Dtk_pnt( radius, 0, height );
P[ 2 ] =
Dtk_pnt( -radius, 0, height );
for( i = 0; i < 4; i++ )
v[ i ] = MakeVertex( body, P[ i ] );
e[ 0 ] = MakeEdge( body, v[ 0 ], v[ 1 ], MakeSegment( P[ 0 ], P[ 1 ] ), 1 );
e[ 1 ] = MakeEdge( body, v[ 2 ], v[ 3 ], MakeSegment( P[ 2 ], P[ 3 ] ), 2 );
e[ 2 ] = MakeEdge( body, v[ 3 ], v[ 0 ], MakeArc2D(
Dtk_pnt(), radius, -
DTK_PI, 0 ), 3 );
e[ 3 ] = MakeEdge( body, v[ 0 ], v[ 3 ], MakeArc2D(
Dtk_pnt(), radius, 0,
DTK_PI ), 4 );
e[ 4 ] = MakeEdge( body, v[ 2 ], v[ 1 ], MakeArc2D(
Dtk_pnt( 0, 0, height ), radius, -
DTK_PI, 0 ), 5 );
e[ 5 ] = MakeEdge( body, v[ 1 ], v[ 2 ], MakeArc2D(
Dtk_pnt( 0, 0, height ), radius, 0,
DTK_PI ), 6 );
MakeCoedge( body, e[ 0 ],
DTK_TRUE, MakeSegment2D( 0, 0, 0, height ) ),
MakeCoedge( body, e[ 4 ],
DTK_FALSE, MakeSegment2D( 0, height, -
DTK_PI, height ) ),
MakeCoedge( body, e[ 2 ],
DTK_TRUE, MakeSegment2D( -
DTK_PI, 0, 0, 0 ) )
);
MakeCoedge( body, e[ 3 ],
DTK_TRUE, MakeSegment2D( 0, 0,
DTK_PI, 0 ) ),
MakeCoedge( body, e[ 5 ],
DTK_FALSE, MakeSegment2D(
DTK_PI, height, 0, height ) ),
MakeCoedge( body, e[ 0 ],
DTK_FALSE, MakeSegment2D( 0, height, 0, 0 ) )
);
NULL, NULL
);
NULL, NULL
);
return body;
}
{
cyl->SetTrimUVBox( domain );
cyl->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
cyl->SetTrimUVBox( domain2 );
cyl->info()->SetColor(
Dtk_RGB( 0, 255, 0 ) );
return body;
}
}
#include <map>
{
namespace
{
void CreateTopoVertex_2( std::map <Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
entity->SetGeom( point );
entity->SetGeom( point );
entity->SetGeom( point );
entity->SetGeom( point );
entity->SetGeom( point );
entity->SetGeom( point );
entity->SetGeom( point );
entity->SetGeom( point );
}
void CreateTopoEdge_2( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
start_vertex->GetGeom()->GetCoordinates( ControlPoints[ 0 ] );
end_vertex->GetGeom()->GetCoordinates( ControlPoints[ 1 ] );
entity->SetGeom( curve );
}
void CreateTopoCoEdge_2( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 0.0, 1.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
ControlPoints[ 0 ] =
Dtk_pnt( 1.0, 0.0, 0.0 );
ControlPoints[ 1 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
entity->SetGeom( curve );
}
void CreateTopoLoop_2( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
}
{
}
void CreateTopoFace_2( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
UDegree = 1;
VDegree = 1;
ControlPoints[ 0 ].
resize( 2 );
ControlPoints[ 1 ].
resize( 2 );
Weights[ 0 ][ 0 ] = 1.0;
Weights[ 0 ][ 1 ] = 1.0;
Weights[ 1 ][ 0 ] = 1.0;
Weights[ 1 ][ 1 ] = 1.0;
SetTopoFaceID( entity, 5 );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 100.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 100.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 100.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 100.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
SetTopoFaceID( entity, 33 );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 100.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 0.0, 100.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 0.0, 0.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
SetTopoFaceID( entity, 55 );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 0.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 100.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 100.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
SetTopoFaceID( entity, 73 );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 0.0, 100.0, 0.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 0.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 100.0, 100.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 100.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
SetTopoFaceID( entity, 91 );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 0.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 0.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 0.0, 0.0, 0.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 0.0, 100.0, 0.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
SetTopoFaceID( entity, 105 );
ControlPoints[ 0 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 100.0 );
ControlPoints[ 0 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 100.0 );
ControlPoints[ 1 ][ 0 ] =
Dtk_pnt( 100.0, 0.0, 0.0 );
ControlPoints[ 1 ][ 1 ] =
Dtk_pnt( 100.0, 100.0, 0.0 );
nurbs_surface =
Dtk_NurbsSurface::Create( UDegree, VDegree, UKnots, VKnots, UKnotsMultiplicities, VKnotsMultiplicities, ControlPoints, Weights );
Dtk_Val valprop_area(
"Anodize per specification MIL-A-8625, Type I" );
face_info->
AddAttribute(
"user defined attribute : : Surface Finish", valprop_area );
}
void CreateTopoShell_2( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
}
{
}
void CreateTopoVolume_2( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
Dtk_Val valprop_area(
"60000 mm2" );
volume_info->
AddAttribute(
"geometric validation property : : surface area measure", valprop_area );
Dtk_Val valprop_volume(
"10000 mm3" );
volume_info->
AddAttribute(
"geometric validation property : : volume measure", valprop_volume );
volume_info->
AddAttribute(
"geometric validation property : : centre point", valprop_CG );
}
void CreateTopoLump_2( std::map<Dtk_ID, Dtk_EntityPtr>& outArrayTopo,
const Dtk_BodyPtr& inDtkBody )
{
}
}
{
std::map<Dtk_ID, Dtk_EntityPtr> array_topo;
CreateTopoVertex_2( array_topo, body );
CreateTopoEdge_2( array_topo, body );
CreateTopoCoEdge_2( array_topo, body );
CreateTopoLoop_2( array_topo, body );
CreateTopoFace_2( array_topo, body );
CreateTopoShell_2( array_topo, body );
CreateTopoVolume_2( array_topo, body );
CreateTopoLump_2( array_topo, body );
Dtk_Val valprop_area(
"1234 mm2" );
body_info->
AddAttribute(
"geometric validation property : : surface area measure", valprop_area );
Dtk_Val valprop_volume(
"5678 mm3" );
body_info->
AddAttribute(
"geometric validation property : : volume measure", valprop_volume );
body_info->
AddAttribute(
"geometric validation property : : centre point", valprop_CG );
return body;
}
{
cyl->SetTrimUVBox( domain );
return body;
}
{
mycurve->info()->SetColor(
Dtk_RGB( 255, 0, 255 ) );
mycurve->info()->SetName( "mycircle" );
mycurve->info()->SetColor(
Dtk_RGB( 0, 0, 255 ) );
mycurve->info()->SetName( "myline" );
myshell->AddWire( mycurves );
mysbody->AddWireShell( myshell );
Dtk_Val valprop_curve_length(
"1234 mm" );
body_info->
AddAttribute(
"geometric validation property : : curve length measure", valprop_curve_length );
return mysbody;
}
{
body->AddOpenShell( shell );
body->info()->SetName( "Plane Y=50" );
return body;
}
{
double trim[ 4 ];
trim[ 0 ] = -100.; trim[ 1 ] = 100.; trim[ 2 ] = -100.; trim[ 3 ] = 100.;
plan1->SetTrimUVBox( trim );
plan2->SetTrimUVBox( trim );
trim[ 0 ] = 0.; trim[ 1 ] = 2. *
DTK_PI;
cylsurf->SetTrimUVBox( trim );
V1->SetGeom( P1 );
V2->SetGeom( P2 );
E0->SetStartVertex( V1 );
E0->SetEndVertex( V2 );
E1->SetStartVertex( V1 );
E1->SetEndVertex( V1 );
E2->SetStartVertex( V2 );
E2->SetEndVertex( V2 );
SetTopoFaceID( F0, 10 );
SetTopoFaceID( F1, 20 );
SetTopoFaceID( F2, 30 );
C01->SetEdge( E1 );
C02->SetEdge( E0 );
C03->SetEdge( E2 );
C04->SetEdge( E0 );
C1->SetEdge( E1 );
C2->SetEdge( E2 );
VOL->AddOuterShell( SH );
mysbody->AddLump(
Lump );
mysbody->info()->SetColor(
Dtk_RGB( 0, 255, 0 ) );
return mysbody;
}
}
#include <map>
{
namespace
{
{
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 6; i++ )
{
}
}
{
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 4; i++ )
{
}
for( int i = 0; i < 6; i++ )
{
if( i < 2 )
{
len1 = lenX;
len2 = lenY;
}
else if( i < 4 )
{
len1 = lenX;
len2 = lenZ;
}
else
{
len1 = lenY;
len2 = lenZ;
}
}
}
void CreateMeshCubeFaces(
Dtk_mesh* outCubeMesh )
{
int nbfaces = 6;
for( int i = 0; i < nbfaces; i++ )
{
}
}
}
{
CreateMeshCubeGeometry( vertices, normals, uCoords, vCoords );
{
outCubeMesh->
add_vertex( &( vertices.
at( i ) ), &( normals.
at( i ) ), NULL, uCoords[ i ], vCoords[ i ] );
}
CreateMeshCubeFaces( outCubeMesh );
return outCubeMesh;
}
{
inoutCubeMesh->get_mesh_face( 0 )->info() = infoFace0;
inoutCubeMesh->get_mesh_face( 1 )->info() = infoFace1;
inoutCubeMesh->get_mesh_face( 2 )->info() = infoFace2;
inoutCubeMesh->get_mesh_face( 3 )->info() = infoFace3;
inoutCubeMesh->get_mesh_face( 4 )->info() = infoFace4;
inoutCubeMesh->get_mesh_face( 5 )->info() = infoFace5;
}
{
meshTexture->SetImagePath( inImageDirectory + "sample.bmp" );
meshTexture->SetScale( 2., 2. );
outCubeMesh->info()->AddRenderInfos( meshRender );
outCubeMesh->info()->SetName( "TexturedMesh" );
faceTexture->SetImagePath( inImageDirectory + "logodtk.bmp" );
faceTexture->SetScale( 2., 2. );
if( outCubeMesh->get_mesh_face( 2 )->info().
IsNULL() )
outCubeMesh->get_mesh_face( 2 )->info()->AddRenderInfos( faceRender );
return outCubeMesh;
}
{
CreateMeshCubeGeometry( vertices, normals, uCoords, vCoords );
{
outCubeMesh->
add_vertex( &( vertices.
at( i ) ), &( normals.
at( i ) ), &red );
outCubeMesh->
add_vertex( &( vertices.
at( i + 1 ) ), &( normals.
at( i + 1 ) ), &green );
outCubeMesh->
add_vertex( &( vertices.
at( i + 2 ) ), &( normals.
at( i + 2 ) ), &blue );
outCubeMesh->
add_vertex( &( vertices.
at( i + 3 ) ), &( normals.
at( i + 3 ) ), &all );
}
CreateMeshCubeFaces( outCubeMesh );
return outCubeMesh;
}
{
if( nbpoints < 3 )
{
return NULL;
}
double radius = 3;
double height = 5;
{
double angle = i * 2 *
DTK_PI / nbpoints;
}
return outCylinderMesh;
}
{
numVertices = vertices.
size();
for( i = 0; i < numVertices; i++ )
{
}
info = NULL;
return outWireMesh;
}
{
double coords[ 8 ][ 3 ] = { {-1,-1,-1},{-1,-1,1},{-1,1,-1},{-1,1,1},
{1,-1,-1},{1,-1,1},{1,1,-1},{1,1,1} };
int i;
for( i = 0; i < 8; i++ )
{
Dtk_pnt P( coords[ i ][ 0 ], coords[ i ][ 1 ], coords[ i ][ 2 ] );
}
return outPointMesh;
}
{
inPoints.
first = inFirstPoint;
inPoints.
second = inSecondPoint;
CreateMeshCubeidGeometry( vertices, normals, uCoords, vCoords, inPoints );
{
outCuboidMesh->
add_vertex( &( vertices.
at( i ) ), &( normals.
at( i ) ), NULL, uCoords[ i ], vCoords[ i ] );
}
CreateMeshCubeFaces( outCuboidMesh );
return outCuboidMesh;
}
{
fileName = "..\\InputImages\\sample.bmp";
texture->SetImagePath( fileName );
texture->SetScale( 2, 2 );
return renderInfo;
}
}