Skip to content

Commit

Permalink
Update Demos
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonBrandao committed Jun 18, 2014
1 parent 84cd416 commit 5b0573e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion BilliardsBlur/BilliardsBlur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void BilliardsBlurScene::initScene( InitialCameraData& camera_data )
m_context["output_buffer_f3"]->setBuffer( m_context->createBuffer(RT_BUFFER_OUTPUT, RT_FORMAT_FLOAT3, 1, 1));

// Setup camera
camera_data = InitialCameraData( make_float3( 10.3f, 10.0f, -10.0f ), // eye
camera_data = InitialCameraData( make_float3( 12.3f, 8.0f, 0.8f ), // eye
make_float3( 0.5f, 0.3f, 1.0f ), // lookat
make_float3( 0.0f, 1.0f, 0.0f ), // up
40.0f ); // vfov
Expand Down
11 changes: 3 additions & 8 deletions CannonBall/CannonBall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void CannonBall::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 Down Expand Up @@ -384,9 +384,7 @@ void CannonBall::trace( const RayGenCameraData& camera_data )
if(m_animate){
// Update PhysX
if (gScene)
{
StepPhysX();
}
StepPhysX();

// Update Geometry
updateGeometry();
Expand All @@ -403,10 +401,7 @@ void CannonBall::StepPhysX()
{
gScene->simulate(myTimestep);

while(!gScene->fetchResults() )
{
// do something useful
}
while(!gScene->fetchResults() ){}
}

void CannonBall::updateGeometry()
Expand Down
8 changes: 8 additions & 0 deletions OptixPlusPhysx.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CannonBall", "CannonBall\Ca
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BilliardsBlur", "BilliardsBlur\BilliardsBlur.vcxproj", "{C4C0A30E-023C-4494-83AF-6EC1499ED3DE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B1DB0BA7-CBA1-48D4-AEA6-34F124D5CF46}"
ProjectSection(SolutionItems) = preProject
Performance1.psess = Performance1.psess
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -29,4 +34,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal
1 change: 0 additions & 1 deletion OptixPlusPhysx/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ void createActors()
sphereActor->setAngularDamping(0.2f);
sphereActor->setLinearDamping(0.01f);
sphereActor->setMass(1.0f+(i/4.0f));
//actor->setLinearVelocity(physx::PxVec3(0,0,-10.0f));

gScene->addActor(*sphereActor);

Expand Down

0 comments on commit 5b0573e

Please sign in to comment.