Skip to content

Commit

Permalink
Added Acceleration
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonBrandao committed Jun 13, 2014
1 parent 6e94df2 commit 18f712f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions CannonBall/CannonBall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ void SimpleBoxPhysx::createGeometry()
for ( unsigned int i = 0; i < box_ts.size(); ++i ) {
boxes_group->setChild( i, box_ts[i] );
}
boxes_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
boxes_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Spheres Groups
std::vector<optix::Transform> sphere_ts;
Expand All @@ -325,7 +325,7 @@ void SimpleBoxPhysx::createGeometry()
optix::GeometryGroup sphere_group = m_context->createGeometryGroup();
sphere_group->setChildCount( 1u );
sphere_group->setChild( 0, gi );
sphere_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
sphere_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Transform
optix::Transform sphere_transform = m_context->createTransform();
Expand All @@ -339,15 +339,15 @@ void SimpleBoxPhysx::createGeometry()
for ( unsigned int i = 0; i < sphere_ts.size(); ++i ) {
spheres_group->setChild( i, sphere_ts[i] );
}
spheres_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
spheres_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Floor Group
optix::GeometryInstance floor_gi = m_context->createGeometryInstance( parallelogram, &floor_matl, &floor_matl+1 );

optix::GeometryGroup floor_group = m_context->createGeometryGroup();
floor_group->setChildCount( 1u );
floor_group->setChild( 0, floor_gi );
floor_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
floor_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Main Group
optix::Group main_group = m_context->createGroup();
Expand Down
10 changes: 5 additions & 5 deletions OptixPlusPhysx/Box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void SimpleBoxPhysx::createGeometry()
optix::GeometryGroup box_group = m_context->createGeometryGroup();
box_group->setChildCount( 1u );
box_group->setChild( 0, gi );
box_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
box_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Transform
optix::Transform box_transform = m_context->createTransform();
Expand All @@ -310,7 +310,7 @@ void SimpleBoxPhysx::createGeometry()
for ( unsigned int i = 0; i < box_ts.size(); ++i ) {
boxes_group->setChild( i, box_ts[i] );
}
boxes_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
boxes_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Spheres Groups
std::vector<optix::Transform> sphere_ts;
Expand All @@ -325,7 +325,7 @@ void SimpleBoxPhysx::createGeometry()
optix::GeometryGroup sphere_group = m_context->createGeometryGroup();
sphere_group->setChildCount( 1u );
sphere_group->setChild( 0, gi );
sphere_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
sphere_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Transform
optix::Transform sphere_transform = m_context->createTransform();
Expand All @@ -339,15 +339,15 @@ void SimpleBoxPhysx::createGeometry()
for ( unsigned int i = 0; i < sphere_ts.size(); ++i ) {
spheres_group->setChild( i, sphere_ts[i] );
}
spheres_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
spheres_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Floor Group
optix::GeometryInstance floor_gi = m_context->createGeometryInstance( parallelogram, &floor_matl, &floor_matl+1 );

optix::GeometryGroup floor_group = m_context->createGeometryGroup();
floor_group->setChildCount( 1u );
floor_group->setChild( 0, floor_gi );
floor_group->setAcceleration( m_context->createAcceleration("NoAccel","NoAccel") );
floor_group->setAcceleration( m_context->createAcceleration("Bvh","Bvh") );

// Main Group
optix::Group main_group = m_context->createGroup();
Expand Down

0 comments on commit 18f712f

Please sign in to comment.